123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: HTS
- (C) Copyright IBM Corp. 2005, 2010
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:hts="http://developer.cognos.com/myinbox/common/hts_ui" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xts hts xtsext">
- <xsl:import href="../../common/task-tooltip.xslt"/>
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:variable name="creator_input_field"><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_CREATOR_ALT_TXT"/></xsl:variable>
- <xsl:variable name="assignedTo_input_field"><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_ASSIGNED_TO_ALT_TXT"/></xsl:variable>
- <xsl:variable name="potentialOwners_input_field"><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_POTENTIAL_OWNERS_ALT_TXT"/></xsl:variable>
- <xsl:variable name="stakeholder_input_field"><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_STAKEHOLDERS_ALT_TXT"/></xsl:variable>
- <xsl:variable name="skin"><xsl:value-of select="xtsext:javascriptencode(string(/root/preferences/param[@name='skin']))"/></xsl:variable>
- <xsl:variable name="btnSaveTooltip"><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_SAVE"/></xsl:variable>
- <xsl:variable name="btnRevertTooltip"><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_REVERT"/></xsl:variable>
- <xsl:variable name="btnClaimTooltip"><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_CLAIM"/></xsl:variable>
- <xsl:variable name="btnRemoveMeTooltip"><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_REMOVE_ME"/></xsl:variable>
- <xsl:variable name="btnCompleteTooltip"><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_COMPLETE"/></xsl:variable>
- <xsl:variable name="btnCancelTooltip"><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_CANCEL"/></xsl:variable>
-
- <xsl:template match="/">
- <xsl:apply-templates select="/" mode="common"/>
- <hts:script>
- dojo.require("dojo.string");
-
- var _THIS_dateFrom="";
- var _THIS_dateTo="";
- var _THIS_toggler = new hts_toggler();
- var _THIS_changedParams;
- var _THIS_utils = new hts_utils();
- var _THIS_menu_strings = new Object();
- var _THIS_revert_taskInfo_evt;
-
- _THIS_menu_strings["CREATED"] = '<xts:string id="IDS_FRAG_TASK_STATUS_CREATED" encode="javascript"/>';
- _THIS_menu_strings["READY"] = '<xts:string id="IDS_FRAG_TASK_STATUS_RESERVED" encode="javascript"/>';
- _THIS_menu_strings["RESERVED"] = '<xts:string id="IDS_FRAG_TASK_STATUS_RESERVED" encode="javascript"/>';
- _THIS_menu_strings["IN_PROGRESS"] = '<xts:string id="IDS_FRAG_TASK_STATUS_IN_PROGRESS" encode="javascript"/>';
- _THIS_menu_strings["SUSPENDED"] = '<xts:string id="IDS_FRAG_TASK_STATUS_SUSPENDED" encode="javascript"/>';
- _THIS_menu_strings["COMPLETED"] = '<xts:string id="IDS_FRAG_TASK_STATUS_COMPLETED" encode="javascript"/>';
- _THIS_menu_strings["FAILED"] = '<xts:string id="IDS_FRAG_TASK_STATUS_FAILED" encode="javascript"/>';
- _THIS_menu_strings["ERROR"] = '<xts:string id="IDS_FRAG_TASK_STATUS_ERROR" encode="javascript"/>';
- _THIS_menu_strings["EXITED"] = '<xts:string id="IDS_FRAG_TASK_STATUS_CANCELLED" encode="javascript"/>';
- _THIS_menu_strings["OBSOLETE"] = '<xts:string id="IDS_FRAG_TASK_STATUS_CANCELLED" encode="javascript"/>';
-
- //Default all to true
- var _THIS_properties = new Array();
- _THIS_properties.push({name:"showSubject",value:'true'});
- _THIS_properties.push({name:"showCreator",value:'true'});
- _THIS_properties.push({name:"showOwner",value:'true'});
- _THIS_properties.push({name:"allowOwnerEdits",value:'true'});
- _THIS_properties.push({name:"showHumanRoles",value:'true'});
- _THIS_properties.push({name:"allowHumaneRoleEdits",value:'true'});
- _THIS_properties.push({name:"showDueDate",value:'true'});
- _THIS_properties.push({name:"showStartBy",value:'true'});
- _THIS_properties.push({name:"showStatus",value:'true'});
- _THIS_properties.push({name:"showPriority",value:'true'});
- _THIS_properties.push({name:"showGenericComplete",value:'false'});
- _THIS_.addEventListener("fragment.load", "_THIS_init");
- function _THIS_init() {
-
- //HACK alert, shouldn't have to do this but the booklet subfragment does not send the event so we need to add it to the parent
- _THIS_.parent.addEventListener('cognos.hts.task_info', '_THIS_handleTaskInfoEvent', false);
- _THIS_.parent.addEventListener('cognos.hts.changed_subscriptions', '_THIS_handleChangedSubscriptions', false);
- //the message has already been set so just show the info pane
- _THIS_.raiseEvent('cognos.hts.hideAll');
-
- }
-
- function _THIS_handleChangedSubscriptions(evt) {
- _THIS_changedParams = evt.payload;
- }
- function _THIS_handleTaskInfoEvent(evt) {
-
- if (!evt.reflected)
- {
- var taskStatus="";
- if (evt.payload!=null)
- {
- var taskInfo = evt.payload;
-
- //keep a ref. of original event, for revert
- if(_THIS_revert_taskInfo_evt==null) {
- _THIS_revert_taskInfo_evt = evt;
- } else if (_THIS_revert_taskInfo_evt.payload.id != taskInfo.payload) {
- //is possible that we are now dealing with a different payload.
- //If so cache the new evt details for the revert.
- _THIS_revert_taskInfo_evt = evt;
- }
- _THIS_updateUI(taskInfo);
- var _THIS_infoButtons = hts_getButtonsInfo(taskInfo);
- //check to see whether any buttons should be disabled for current user.
- hts_hideButtons($("_THIS_btnCancel"), _THIS_infoButtons.skip == 'false'); //"cancel" is internally mapped to "skip" on the server side
- hts_hideButtons($("_THIS_btnCancel_disabled"), _THIS_infoButtons.skip == 'true'); //"cancel" is internally mapped to "skip" on the server side
- hts_hideButtons($("_THIS_btnComplete"), _THIS_infoButtons.complete == 'false');
- hts_hideButtons($("_THIS_btnComplete_disabled"), _THIS_infoButtons.complete == 'true');
- hts_hideButtons($("_THIS_btnSaveAndClose"), _THIS_infoButtons.updateTaskDetails == 'false');
- hts_hideButtons($("_THIS_btnSaveAndClose_disabled"), _THIS_infoButtons.updateTaskDetails == 'true');
- hts_hideButtons($("_THIS_revertTask_disabled"), 'true');
- var userName = '<xsl:value-of select="xtsext:javascriptencode(string(/root/interactions/param[@name='user_name']))"/>';
- var taskStatus = taskInfo.status;
- if (taskInfo.formattedActualOwner == userName) {
- if (taskStatus==undefined || taskStatus=='COMPLETED' || taskStatus=='ERROR' || taskStatus=='EXITED' || taskStatus=='OBSOLETE') {
- hts_hideButtons($("_THIS_btnRelease"), true);
- hts_hideButtons($("_THIS_btnRelease_disabled"), false);
- //disable the save button
- //hts_hideButtons($("_THIS_btnSaveAndClose"), true);
- //hts_hideButtons($("_THIS_btnSaveAndClose_disabled"), false);
- //disable the revert button
- hts_hideButtons($("_THIS_revertTask"), true);
- hts_hideButtons($("_THIS_revertTask_disabled"), false);
- //disable the startdate and due date
- hts_disableDatePicker('_THIS_taskOptions_startBy');
- hts_disableDatePicker('_THIS_taskOptions_dueDate');
- //disable the priority and status select controls
- $("_THIS_taskOptions_status").disabled = true;
- $("_THIS_taskOptions_priority").disabled = true;
- } else {
-
- if (taskStatus=='IN_PROGRESS') {
- hts_hideButtons($("_THIS_btnRelease"), true);
- hts_hideButtons($("_THIS_btnRelease_disabled"), false);
- } else {
- hts_hideButtons($("_THIS_btnRelease"), false);
- hts_hideButtons($("_THIS_btnRelease_disabled"), true);
- }
- //enable the save button
- //hts_hideButtons($("_THIS_btnSaveAndClose"), false);
- //hts_hideButtons($("_THIS_btnSaveAndClose_disabled"), true);
- //enable the revert button
- hts_hideButtons($("_THIS_revertTask"), false);
- hts_hideButtons($("_THIS_revertTask_disabled"), true);
- //enable the startdate and due date
- if (taskStatus=='IN_PROGRESS') {
- //in this special case, disable the startDate
- hts_disableDatePicker('_THIS_taskOptions_startBy');
- } else {
- hts_enableDatePicker('_THIS_taskOptions_startBy');
- }
- hts_enableDatePicker('_THIS_taskOptions_dueDate');
- //enable the priority and status select controls
- $("_THIS_taskOptions_status").disabled = false;
- $("_THIS_taskOptions_priority").disabled = false;
- }
- hts_hideButtons($("_THIS_btnClaim"), true);
- hts_hideButtons($("_THIS_btnClaim_disabled"), true);
- } else {
- hts_hideButtons($("_THIS_btnRelease"), true);
- hts_hideButtons($("_THIS_btnRelease_disabled"), true);
- hts_hideButtons($("_THIS_btnClaim"), _THIS_infoButtons.claim == 'false');
- hts_hideButtons($("_THIS_btnClaim_disabled"), _THIS_infoButtons.claim == 'true');
- //hts_hideButtons($("_THIS_btnSaveAndClose"), false);
- //hts_hideButtons($("_THIS_btnSaveAndClose_disabled"), true);
-
-
- if (taskStatus==undefined || taskStatus=='COMPLETED' || taskStatus=='ERROR' || taskStatus=='EXITED' || taskStatus=='OBSOLETE') {
- //disable the revert button
- hts_hideButtons($("_THIS_revertTask"), true);
- hts_hideButtons($("_THIS_revertTask_disabled"), false);
- //disable the priority and status select controls
- $("_THIS_taskOptions_status").disabled = true;
- $("_THIS_taskOptions_priority").disabled = true;
- //disable the startdate and due date
- hts_disableDatePicker('_THIS_taskOptions_startBy');
- hts_disableDatePicker('_THIS_taskOptions_dueDate');
- } else {
- //enable the revert button
- hts_hideButtons($("_THIS_revertTask"), false);
- hts_hideButtons($("_THIS_revertTask_disabled"), true);
- //enable the startdate and due date
- if (taskStatus=='IN_PROGRESS') {
- //in this special case, disable the startDate
- hts_disableDatePicker('_THIS_taskOptions_startBy');
- } else {
- hts_enableDatePicker('_THIS_taskOptions_startBy');
- }
- hts_enableDatePicker('_THIS_taskOptions_dueDate');
- //enable the priority and status select controls
- $("_THIS_taskOptions_status").disabled = false;
- $("_THIS_taskOptions_priority").disabled = false;
- }
- }
-
- var utils = new hts_utils();
- var content =$('_THIS__ownerEditDisabled');
- utils.setUIState(content,_THIS_infoButtons.delegate == 'false');
- hts_hideButtons(content, _THIS_infoButtons.delegate == 'true');
- hts_hideButtons($("_THIS__ownerEdit"), _THIS_infoButtons.delegate == 'false');
-
- //show the enabled or disabled potential owners link (add/remove recipients)
- var humanRolesDisabled =$('_THIS_humanRolesDisabled');
- utils.setUIState(humanRolesDisabled,_THIS_infoButtons.delegate == 'false');
- hts_hideButtons(humanRolesDisabled, _THIS_infoButtons.delegate == 'true');
- hts_hideButtons($("_THIS_humanRoles"), _THIS_infoButtons.delegate == 'false');
-
- //Hide parts we should not show. This is done here becuase the lines above
- //may hide/show parts that user is not allowed to see based on properties
- //settings. So we do this last to make sure properties are applied last.
- //effing xsltjsonifier doesnt work when theres only one
- if(!taskInfo.properties || !taskInfo.properties.length){
- //probable only one
- var temp = new Array();
- if(taskInfo.properties && !taskInfo.properties.length){
- temp.push(taskInfo.properties);
- }
- taskInfo.properties = temp;
- }
-
- dojo.forEach(_THIS_properties, function(node) {
- var filtered = dojo.filter(taskInfo.properties, function(item){
- return node && item && item.property && item.property.name === node.name;
- });
-
- node.value = (filtered && filtered.length > 0 )?filtered[0].property.value:'true';
- var display = node.value==='true'?'':'none';
- var visibility = node.value==='true'?'visible':'hidden';
- dojo.query('[id^= \"_THIS__'+ node.name +'\"]').style({"display":display,"visibility":visibility});
- });
- setTimeout(_THIS_setInitialFocus, 200);
- }
-
- }
- //only react once to this event. the booklet sends it twice, once for each tab in the booklet. this needs to be sorted out properly i.e. a change to the booklet code
- evt.reflected=true;
- }
-
- function _THIS_setInitialFocus() {
- var input = null;
- try {
- input = dojo.byId('_THIS_btnSaveAndCloseImage');
- if (input.parentNode.parentNode.style.visibility!= 'visible') {
- setTimeout(_THIS_setInitialFocus, 200);
- }
- else {
- input.focus();
- }
- }
- catch(exception) {
- //swallow it
- }
- }
- function _THIS_save() {
- //save the task
- if (hts_saveTaskOptions(_THIS_,'_THIS_') ) {
- //if we have changed subscription params do the call.
- if (_THIS_changedParams) {
- _THIS_.retrieve(_THIS_changedParams,null,true);
- }
- //the poolTaskList is the subbook that contains the inbox and archive tabs, reload the current tab only
- var _THIS_utils = new hts_utils(_THIS_);
- _THIS_utils.refreshCurrentTab('poolTaskList');
- }
- }
-
- function _THIS_revert() {
- if(_THIS_revert_taskInfo_evt!=null) {
- //call the event handling code with the cached original taskInfo
- _THIS_revert_taskInfo_evt.reflected=false;
- _THIS_handleTaskInfoEvent(_THIS_revert_taskInfo_evt);
- }
- }
- function _THIS_skip() {
- if (hts_skipTask(_THIS_,'_THIS_')) {
- //reload the task viewer to reflect the changes
- var _THIS_utils = new hts_utils(_THIS_);
- _THIS_utils.refreshCurrentTab('poolTaskList');
- }
- }
-
- function _THIS_claim() {
- if (hts_claimTask(_THIS_,'_THIS_')) {
- //reload the task viewer to reflect the changes
- var _THIS_utils = new hts_utils(_THIS_);
- _THIS_utils.refreshCurrentTab('poolTaskList');
- }
- }
-
- function _THIS_complete() {
- if (hts_complete(_THIS_,'_THIS_')) {
- //reload the task viewer to reflect the changes
- var _THIS_utils = new hts_utils(_THIS_);
- _THIS_utils.refreshCurrentTab('poolTaskList');
- }
- }
- function _THIS_release() {
- if (hts_releaseTask(_THIS_,'_THIS_')) {
- //reload the task viewer to reflect the changes
- var _THIS_utils = new hts_utils(_THIS_);
- _THIS_utils.refreshCurrentTab('poolTaskList');
- }
- }
- function _THIS_delegate() {
- ccModalCallBack = function(cmd,sResponse) {
- if (cmd == "ok") {
- var xmlDoc = XMLBuilderLoadXMLFromString(xmldecode(sResponse));
- var userTokenNode = _F_DOM.selectSingleNode(xmlDoc,"//item[./name[.='searchPath']]/value");
- var userNameNode = _F_DOM.selectSingleNode(xmlDoc,"//item[./name[.='defaultName']]/value");
-
- hts_setText($("_THIS__assingnedTo_value"),_F_DOM.text(userNameNode));
- hts_setText($("_THIS__assingnedTo_token"),_F_DOM.text(userTokenNode));
- }
- ui_modal_dialog.close();
- dojo.query('div#_THIS__ownerEdit a').forEach(
- function(node, index, arr) {
- node.focus();
- }
- );
- }
- var sHeaderTitle = '<xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_CHANGE_OWNER" encode="javascript"/>';
- ui_modal_dialog.open('?b_action=xts.run&m=portal/select/select.xts&so.select=adminconsole.users&md.callBack=data&md.callBackMode=&m_name=' + sHeaderTitle, false, true, true);
- }
- function _THIS_updateUI(taskInfo) {
- try{
- //set the pickers to the current date
- _THIS_dateFrom="";
- _THIS_dateTo="";
- hts_clearDatePickers('_THIS_');
- //the picker text boxes by default are set to the current date. set them to display nothing.
- //this fixes the issue of todays date getting displayed when no deadlines exist
- //also set the correct tab index and the correct label to be read by JAWs screen reader
- var dueDateEle = $('txtDate'+'_THIS_'+'taskOptions_dueDate');
- if (dueDateEle) {
- dueDateEle.value="";
- dijit.setWaiState(dueDateEle,'label','<xts:string id="IDS_FRAG_A11Y_DUE_DATE_LABEL" encode="javascript"/>');
- }
- var startByEle = $('txtDate'+'_THIS_'+'taskOptions_startBy');
- if (startByEle) {
- startByEle.value="";
- dijit.setWaiState(startByEle,'label','<xts:string id="IDS_FRAG_A11Y_START_BY_DATE_LABEL" encode="javascript"/>');
- }
- //set the deadlines into the date pickers
- var deadlines;
-
- if (taskInfo.formattedDeadlines) {
- if(taskInfo.formattedDeadlines && taskInfo.formattedDeadlines.length){
- deadlines = taskInfo.formattedDeadlines;
- }else if(taskInfo.formattedDeadlines){
- deadlines = new Array();
- deadlines.push(taskInfo.formattedDeadlines);
- }
-
- for (var i=0; i <deadlines.length;i++) {
- var deadlineInstance = deadlines[i].deadlineInstance;
- if (deadlineInstance.type=="START") {
- _THIS_dateFrom = deadlineInstance.formattedDateForDatePicker;
- }
- else if (deadlineInstance.type=="COMPLETE") {
- _THIS_dateTo = deadlineInstance.formattedDateForDatePicker;
- }
- }
- hts_setDatePickers('_THIS_',_THIS_dateFrom,_THIS_dateTo);
- }
- var subjectSpan = $("_THIS__subject_value");
- if (subjectSpan.childNodes.length == 0) {
- var subjectText = document.createTextNode(taskInfo.presentationSubject);
- subjectSpan.appendChild(subjectText)
- } else {
- subjectSpan.firstChild.nodeValue = taskInfo.presentationSubject;
- }
- hts_setText($("_THIS__creator_value"),taskInfo.formattedCreatedBy);
- var owner = taskInfo.formattedActualOwner && taskInfo.formattedActualOwner != ''?taskInfo.formattedActualOwner:'<xts:string id="IDS_FRAG_TASKVIEWER_OWNER_NONE" encode="javascript"/>';
- hts_setText($("_THIS__assingnedTo_value"),owner);
- //set the potential owners. if none exist commit will set empty list.
- var potentialOwners = new HTSHumanRole("_THIS__potentialOwners");
- potentialOwners.parse(taskInfo.formattedPotentialOwners,taskInfo.potentialOwners);
- potentialOwners.commit();
- //set the stakeholders. if none exist commit will set empty list.
- var stakeHolders = new HTSHumanRole("_THIS__stakeHolders");
- stakeHolders.parse(taskInfo.formattedTaskStakeholders,taskInfo.taskStakeholders);
- stakeHolders.commit();
- //set the tasks priority into the combo
- hts_selectComboItem($("_THIS_taskOptions_priority"),taskInfo.priority);
- //set the status into the combo
- hts_populateStatusComboItem($("_THIS_taskOptions_status"),taskInfo, _THIS_menu_strings);
- //alert('updating the task details UI, pri:'+taskInfo.priority+', stakes:'+taskInfo.formattedTaskStakeholders+', groups:'+taskInfo.taskStakeholders.groups+', owner:'+taskInfo.formattedActualOwner+', name:'+taskInfo.presentationName+', dateFrom:'+_THIS_dateFrom+', dateTo:'+_THIS_dateTo);
- var img = dojo.byId('_THIS_taskImage');
- var srcPath = "_THIS?frag-resource=${0}/THIS_";
- var src = dojo.string.substitute(srcPath,["fragments/common/images/space.gif"]);
- var alt = _THIS_getLocalisedTaskTooltip(taskInfo.presentationName);
- var title = alt;
- if (taskInfo.taskIconPath && taskInfo.taskIconPath != '') {
- src = dojo.string.substitute(srcPath,[escape(taskInfo.taskIconPath)]);
- } else {
- if (taskInfo.taskType == 'TASK') {
- src = dojo.string.substitute(srcPath,["fragments/myinbox/images/icon_task.gif"]);
- } else if (taskInfo.taskType == 'NOTIFICATION') {
- src = dojo.string.substitute(srcPath,["fragments/myinbox/images/icon_notification.gif"]);
- }
- }
- dojo.attr(img, {src: src,alt: alt,title: title,style: {cursor: "default"}});
- }catch(ex){
- alert('<xts:string id="IDS_FRAG_UPDATEUI_ERROR_MESSAGE" encode="javascript"/>' + ex.description);
- }
- }
-
- //declare the error messages
- var _THIS_msg_array = new Array();
- _THIS_msg_array['MSG_ERR_INCOMPATIBLE_DATES'] = '<xts:string id="IDS_FRAG_TASKVIEWER_WARN_INCOMPATIBLE_DATES" encode="javascript"/>';
- _THIS_msg_array['MSG_ERR_INVALID_END_DATE'] = '<xts:string id="IDS_FRAG_TASKVIEWER_WARN_INVALID_END_DATE" encode="javascript"/>';
- _THIS_msg_array['MSG_ERR_INVALID_START_DATE'] = '<xts:string id="IDS_FRAG_TASKVIEWER_WARN_INVALID_START_DATE" encode="javascript"/>';
- _THIS_msg_array['MSG_ERR_INVALID_DATE'] = '<xts:string id="IDS_FRAG_TASKVIEWER_WARN_INVALID_DATE" encode="javascript"/>';
- _THIS_msg_array['MSG_ERR_INVALID_ASSIGNMENT'] = '<xts:string id="IDS_FRAG_TASKVIEWER_WARN_INVALID_ASSIGNMENT" encode="javascript"/>';
- _THIS_msg_array['MSG_ERR_EQUAL_DATES'] = '<xts:string id="IDS_FRAG_TASKVIEWER_WARN_EQUAL_DATES" encode="javascript"/>';
- //_THIS_msg_array['MSG_ERR_START_CANNOT_USE_CURRENT_DATE'] = '<xts:string id="IDS_FRAG_TASKVIEWER_WARN_START_CANNOT_USE_CURRENT_DATE" encode="javascript"/>';
- _THIS_msg_array['MSG_ERR_COMPLETE_CANNOT_USE_CURRENT_DATE'] = '<xts:string id="IDS_FRAG_TASKVIEWER_WARN_COMPLETE_CANNOT_USE_CURRENT_DATE" encode="javascript"/>';
- try{
- if (typeof oCV=="undefined") {
- oCV=window;
- }
- } catch(e) {
- oCV=window;
- }
- var G_PM_THIS_ = new C_PromptManager();
- oCV.preProcessControlArray=[];
- p_sSkinFolder=_F_Config.webContent+"/skins/<xsl:value-of select='$skin'/>";
- p_sWebContentURI=_F_Config.webContent;
- oCV.gbPromptRequestSubmitted=false;
- oCV.bCanFinish=true;
- oCV.bNextPage=true;
- oCV.pageNavigationObserverArray=[];
- oCV.rangeObserverArray=[];
- oCV.multipleObserverArray=[];
- oCV.datePickerObserverArray=[];
- oCV.hasPromptKeyDown=false;
- _THIS_monitor = function (evt) {
- //only want to execute this on downstream events
- if (evt.eventPhase == evt.AT_TARGET)
- return;
- var saveAndClose = $('_THIS_btnSaveAndClose');
- var revert = $('_THIS_btnRevert');
- var cancel = $('_THIS_btnCancel');
- if (evt.name == "fragment.retrieve.before"){
- if (saveAndClose) {saveAndClose.disabled = true;}
- if (cancel) {cancel.disabled = true;}
- } else {
- if (saveAndClose) {saveAndClose.disabled = false;}
- if (cancel) {cancel.disabled = false;}
- }
- }
- _THIS_.parent.addEventListener("fragment.retrieve.before", "_THIS_monitor", true);
- _THIS_.parent.addEventListener("fragment.retrieve.after", "_THIS_monitor", true);
- </hts:script>
- <!--hts:div id="_THIS_wrapperDiv" style="height:200px;"-->
- <xsl:call-template name="renderOptions"/>
- <!--/hts:div-->
- </xsl:template>
- <xsl:template name="renderOptions">
- <form name="_THIS_pform" id="_THIS_pform" method="post" action="_THIS?/THIS_">
- <!--render the button bar -->
- <hts:section id="_THIS_footer" class="taskDetailsButtonBar">
- <hts:rowset>
- <hts:row>
- <hts:link nowrap="true" id="_THIS_btnSaveAndClose" type="button" onKeyPress="if (_hts_getKeyCode(event) == 13) _THIS_save();" onclick="_THIS_save();">
- <hts:img id="_THIS_btnSaveAndCloseImage" alt="" title="" tabindex="0" src="_THIS?frag-resource=/fragments/myinbox/images/action_save.gif/THIS_" style="vertical-align:middle;margin-right:3px"/>
- <hts:img id="_THIS_btnSaveAndCloseImgDisabled" alt="" title="" disabled="true" src="_THIS?frag-resource=/fragments/myinbox/images/action_save_d.gif/THIS_" style="vertical-align:middle;margin-right:3px"/>
- <hts:value><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_SAVE"/></hts:value>
- </hts:link>
- <hts:link nowrap="true" id="_THIS_revertTask" type="button" onKeyPress="if (_hts_getKeyCode(event) == 13) _THIS_revert();" onclick="_THIS_revert();">
- <hts:img id="_THIS_revertTaskImage" tabindex="0" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_revert.gif/THIS_" style="vertical-align:middle;margin-right:3px"/>
- <hts:img id="_THIS_revertTaskImgDisabed" disabled="true" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_revert_d.gif/THIS_" style="vertical-align:middle;margin-right:3px"/>
- <hts:value><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_REVERT"/></hts:value>
- </hts:link>
- <hts:separator type="vertical"/>
- <hts:link nowrap="true" id="_THIS_btnClaim" type="button" onKeyPress="if (_hts_getKeyCode(event) == 13) _THIS_claim();" onclick="_THIS_claim();">
- <hts:img id="_THIS_btnClaimImage" tabindex="0" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_claim.gif/THIS_" style="vertical-align: middle;margin-right:3px"/>
- <hts:img id="_THIS_btnClaimImgDisabled" disabled="true" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_claim_d.gif/THIS_" style="vertical-align: middle;margin-right:3px"/>
- <hts:value><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_CLAIM"/></hts:value>
- </hts:link>
- <hts:link nowrap="true" display="none" id="_THIS_btnRelease" type="button" onKeyPress="if (_hts_getKeyCode(event) == 13) _THIS_release();" onclick="_THIS_release();">
- <hts:img id="_THIS_btnReleaseImage" tabindex="0" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_return.gif/THIS_" style="vertical-align: middle;margin-right:3px"/>
- <hts:img id="_THIS_btnReleaseImageDisabled" disabled="true" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_return_d.gif/THIS_" style="vertical-align: middle;margin-right:3px"/>
- <hts:value><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_REMOVE_ME"/></hts:value>
- </hts:link>
- <hts:separator type="vertical"/>
- <hts:span id="_THIS__showGenericComplete" nowrap="true">
- <hts:link nowrap="true" id="_THIS_btnComplete" type="button" onKeyPress="if (_hts_getKeyCode(event) == 13) _THIS_complete();" onclick="_THIS_complete();">
- <hts:img id="_THIS_btnCompleteImage" tabindex="0" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_complete.gif/THIS_" style="vertical-align:middle;margin-right:3px"/>
- <hts:img id="_THIS_btnCompleteImgDisabled" disabled="true" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_complete_d.gif/THIS_" style="vertical-align: middle;margin-right:3px"/>
- <hts:value><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_COMPLETE"/></hts:value>
- </hts:link>
- </hts:span>
- <hts:link nowrap="true" id="_THIS_btnCancel" type="button" onKeyPress="if (_hts_getKeyCode(event) == 13) _THIS_skip();" onclick="_THIS_skip();">
- <hts:img id="_THIS_btnCancelImage" tabindex="0" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_cancel.gif/THIS_" style="vertical-align:middle;margin-right:3px"/>
- <hts:img id="_THIS_btnCancelImgDisabled" disabled="true" alt="" title="" src="_THIS?frag-resource=/fragments/myinbox/images/action_task_cancel_d.gif/THIS_" style="vertical-align: middle;margin-right:3px"/>
- <hts:value><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_CANCEL"/></hts:value>
- </hts:link>
- </hts:row>
- </hts:rowset>
- </hts:section>
- <!-- Text fields and date fields -->
- <hts:section format="select-dialog" style="width:100%">
- <hts:rowset>
- <hts:row format="select">
- <hts:div id="_THIS__showSubject">
- <hts:actionlist colspan="2">
- <hts:action>
- <hts:img id="_THIS_taskImage" width="16" src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_"/>
- </hts:action>
- <hts:action>
- <!-- Add space inside span so that we have a first child - see related javascript -->
- <hts:span class="subject_line" name="_THIS__subject_value" id="_THIS__subject_value"/>
- </hts:action>
- </hts:actionlist>
- </hts:div>
- </hts:row>
- <hts:row format="select">
- <hts:div id="_THIS__showCreator">
- <hts:actionlist>
- <hts:action style="width:100px">
- <hts:text><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_CREATOR"/></hts:text>
- </hts:action>
- <hts:action>
- <hts:img src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_" alt="" height="12px" width="0px"/>
- </hts:action>
- <hts:action>
- <hts:div style="overflow-y:auto;background:none;outline:none;border:none" type="text" alt="{$creator_input_field}" name="_THIS__creator_value" id="_THIS__creator_value"></hts:div>
- </hts:action>
- </hts:actionlist>
- </hts:div>
- </hts:row>
- <hts:row format="select">
- <hts:div id="_THIS__showOwner">
- <hts:actionlist>
- <hts:action style="width:100px">
- <hts:text><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_ASSIGNED_TO"/></hts:text>
- </hts:action>
- <hts:action>
- <hts:img src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_" alt="" height="12px" width="0px"/>
- </hts:action>
- <hts:action>
- <hts:div style="overflow-y:auto;background:none;outline:none;border:none" type="text" alt="{$assignedTo_input_field}" name="_THIS__assingnedTo_value" id="_THIS__assingnedTo_value"></hts:div>
- <hts:hidden id="_THIS__assingnedTo_token" name="_THIS__assingnedTo_token"/>
- </hts:action>
- <hts:action>
- <hts:img src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_" alt="" height="0px" width="20px"/>
- </hts:action>
- <hts:action id="_THIS__allowOwnerEdits">
- <hts:link id="_THIS__ownerEdit" onKeyPress="if (_hts_getKeyCode(event) == 13) _THIS_delegate();" onclick="_THIS_delegate();" href="#"><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_CHANGE_OWNER"/></hts:link>
- <hts:link id="_THIS__ownerEditDisabled" href="javascript:void(0)"><xts:string id="IDS_FRAG_TASKVIEWER_BUTTON_CHANGE_OWNER"/></hts:link>
- </hts:action>
- </hts:actionlist>
- </hts:div>
- </hts:row>
- <hts:row format="select">
- <hts:div id="_THIS__showHumanRolesPO">
- <xsl:variable name="labelName">
- <xts:string id="IDS_FRAG_TASKVIEWER_LABEL_POTENTIAL_OWNERS"/>
- </xsl:variable>
- <hts:actionlist>
- <hts:action style="width:100px">
- <hts:text><xsl:value-of select="$labelName"/></hts:text>
- </hts:action>
- <hts:action>
- <hts:img src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_" alt="" height="12px" width="0px"/>
- </hts:action>
- <hts:action>
- <hts:div style="overflow-y:auto;background:none;outline:none;border:none" type="text" alt="{$potentialOwners_input_field}" name="_THIS__potentialOwners_display" id="_THIS__potentialOwners_display"></hts:div>
- <hts:hidden id="_THIS__potentialOwners_value" name="_THIS__potentialOwners_value"/>
- </hts:action>
- <hts:action>
- <hts:img src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_" alt="" height="0px" width="20px"/>
- </hts:action>
- <hts:action id="_THIS__allowHumanRoleEdits">
- <hts:link id="_THIS_humanRoles" onKeyPress="if (_hts_getKeyCode(event) == 13) hts_selectRecipients("",_THIS_msg_array,'_THIS_'+'_stakeHolders','_THIS_'+'_potentialOwners','humanTask', '_THIS_humanRoles');" onclick="hts_selectRecipients("",_THIS_msg_array,'_THIS_'+'_stakeHolders','_THIS_'+'_potentialOwners','humanTask', '_THIS_humanRoles');" href="#"><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_ADD_RECIPIENTS"/></hts:link>
- <hts:link id="_THIS_humanRolesDisabled" href="javascript:void(0)"><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_ADD_RECIPIENTS"/></hts:link>
- </hts:action>
- </hts:actionlist>
- </hts:div>
- </hts:row>
- <hts:row format="select">
- <hts:div id="_THIS__showHumanRolesSH">
- <xsl:variable name="labelName">
- <xts:string id="IDS_FRAG_TASKVIEWER_LABEL_STAKEHOLDERS"/>
- </xsl:variable>
- <hts:actionlist>
- <hts:action style="width:100px">
- <hts:text><xsl:value-of select="$labelName"/></hts:text>
- </hts:action>
- <hts:action>
- <hts:img src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_" alt="" height="12px" width="0px"/>
- </hts:action>
- <hts:action>
- <hts:div style="overflow-y:auto;background:none;outline:none;border:none" type="text" alt="{$stakeholder_input_field}" name="_THIS__stakeHolders_display" id="_THIS__stakeHolders_display"></hts:div>
- <hts:hidden id="_THIS__stakeHolders_value" name="_THIS__stakeHolders_value"/>
- </hts:action>
- </hts:actionlist>
- </hts:div>
- </hts:row>
- </hts:rowset>
- <!-- date fields -->
- <hts:actionlist>
- <hts:action id="_THIS__showStartBy">
- <hts:text label-for="txtDate_THIS_taskOptions_startBy">
- <xsl:attribute name="style">margin-left:2px</xsl:attribute>
- <hts:text><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_START_BY"/></hts:text>
- </hts:text>
- <hts:section format="select-dialog" id="selectDate_THIS_taskOptions_startBy">
- <hts:script>
- var _THIS_startById = '_THIS_taskOptions_startBy';
- hts_clearDatePickersIframe(_THIS_startById);
- genSelectDateHTML({formName:"_THIS_pform",parameterName:"_THIS_taskOptions_startBy",submitType:"",prmtDefaultDate:_THIS_dateFrom,defaultValue:_THIS_dateFrom,startOfWeek:"Sunday",calendar:"Gregorian",selectUI:"editBox",selectDateUI:"editBox",inputOrder:"YMD",firstDate:hts_getCurrentDate(),lastDate:"",dateTime:0,initialState:RANGE_NO_VALUE,required:false,suppressDisabled:true,hideAdornments:false,suppressExtraPromptNames:false,multi:false,range:false,style:"",selectDateEditBoxStyle:"",selectDateYearsStyle:"",selectDateMonthsStyle:"",selectDateDaysOfWeekStyle:"",selectDateDaysStyle:"",CVId:"",id:_THIS_startById});
- </hts:script>
- </hts:section>
- </hts:action>
- <hts:action id="_THIS__showDueDateSpacer">
- <hts:img src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_" alt="" width="24px"/>
- </hts:action>
- <hts:action id="_THIS__showDueDate">
- <hts:text label-for="txtDate_THIS_taskOptions_dueDate">
- <xsl:attribute name="style">margin-left:2px</xsl:attribute>
- <hts:text><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_DUE_DATE"/></hts:text>
- </hts:text>
- <hts:section format="select-dialog" id="selectDate_THIS_taskOptions_dueDate">
- <hts:script>
- var _THIS_dueDateId = "_THIS_taskOptions_dueDate";
- hts_clearDatePickersIframe(_THIS_dueDateId);
- genSelectDateHTML({formName:"_THIS_pform",parameterName:"_THIS_taskOptions_dueDate",submitType:"",prmtDefaultDate:_THIS_dateTo,defaultValue:_THIS_dateTo,startOfWeek:"Sunday",calendar:"Gregorian",selectUI:"editBox",selectDateUI:"editBox",inputOrder:"YMD",firstDate:hts_getCurrentDate(),lastDate:"",dateTime:0,initialState:RANGE_NO_VALUE,required:false,suppressDisabled:true,hideAdornments:false,suppressExtraPromptNames:false,multi:false,range:false,style:"",selectDateEditBoxStyle:"",selectDateYearsStyle:"",selectDateMonthsStyle:"",selectDateDaysOfWeekStyle:"",selectDateDaysStyle:"",CVId:"",id:_THIS_dueDateId});
- </hts:script>
- </hts:section>
- </hts:action>
- <hts:action id="_THIS__showStartBySpacer">
- <hts:img src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_" alt="" width="24px"/>
- </hts:action>
- <hts:action id="_THIS__showStatus">
- <hts:text label-for="_THIS_taskOptions_status">
- <xsl:attribute name="style">margin-left:3px</xsl:attribute>
- <xsl:text><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_STATUS"/></xsl:text>
- </hts:text>
- <hts:section format="select-dialog">
- <hts:select name="_THIS_taskOptions_status" id="_THIS_taskOptions_status" disabled="false"/>
- </hts:section>
- </hts:action>
- <hts:action id="_THIS__showStatusSpacer">
- <hts:img src="_THIS?frag-resource=/fragments/common/images/space.gif/THIS_" alt="" width="24px"/>
- </hts:action>
- <hts:action id="_THIS__showPriority">
- <hts:text label-for="_THIS_taskOptions_priority">
- <xsl:attribute name="style">margin-left:3px</xsl:attribute>
- <xsl:text><xts:string id="IDS_FRAG_TASKVIEWER_LABEL_PRIORITY"/></xsl:text>
- </hts:text>
- <hts:section format="select-dialog">
- <hts:select name="_THIS_taskOptions_priority" id="_THIS_taskOptions_priority" disabled="false">
- <hts:option value="5"><xts:string id="IDS_FRAG_PRIORITY_LABEL_LOW"/></hts:option>
- <hts:option value="3">
- <xsl:attribute name="selected">true</xsl:attribute>
- <xts:string id="IDS_FRAG_PRIORITY_LABEL_MEDIUM"/>
- </hts:option>
- <hts:option value="1"><xts:string id="IDS_FRAG_PRIORITY_LABEL_HIGH"/></hts:option>
- </hts:select>
- </hts:section>
- </hts:action>
- </hts:actionlist>
- </hts:section>
- </form>
- </xsl:template>
- </xsl:stylesheet>
|