Spaces:
Sleeping
Sleeping
processmaker-community / processmaker-files /workflow /engine /xmlform /cases /cases_OptionsSent.xml
| <dynaForm type="xmlmenu"> | |
| <PRO_UID type="private"/> | |
| <cases_New type="private" defaultValue="../cases/cases_New"/> | |
| <cases_Edit type="private" defaultValue="../cases/cases_Edit"/> | |
| <cases_Open type="private" defaultValue="../cases/cases_Open"/> | |
| <cases_Delete type="private" defaultValue="../cases/cases_Delete"/> | |
| <PAGED_TABLE_ID type="private"/> | |
| <!-- Default Search option --> | |
| <PROCESS_FILTER type="dropdown" colWidth="350" sqlconnection="dbarray" colAlign="left"> | |
| select PRO_UID, APP_PRO_TITLE from _PROCESSES | |
| <en><![CDATA[Process]]><option name="0"><![CDATA[All]]></option></en> | |
| </PROCESS_FILTER> | |
| <APP_STATUS_FILTER type="dropdown" colWidth="200" colAlign="left"> | |
| <en><![CDATA[Status]]><option name="ALL"><![CDATA[All]]></option><option name="TO_DO"><![CDATA[To Do]]></option><option name="CANCELLED"><![CDATA[Canceled]]></option><option name="COMPLETED"><![CDATA[Completed]]></option></en> | |
| </APP_STATUS_FILTER> | |
| <MINE type="link" link="#" onclick="javascript:applyAdditionalFilter('MINE'); return false" value="" colWidth="2%" colAlign="bottom"> | |
| <en><![CDATA[Started by me]]></en> | |
| </MINE> | |
| <READ_FILTER type="link" link="#" onclick="javascript:applyAdditionalFilter('READ'); return false" value="" colWidth="2%" colAlign="bottom"> | |
| <en><![CDATA[Read]]></en> | |
| </READ_FILTER> | |
| <UNREAD_FILTER type="link" link="#" onclick="javascript:applyAdditionalFilter('UNREAD'); return false" value="" colWidth="2%" colAlign="bottom"> | |
| <en><![CDATA[Unread]]></en> | |
| </UNREAD_FILTER> | |
| <ALL_FILTER type="link" link="#" onclick="javascript:applyAdditionalFilter('ALL'); return false" value="" colWidth="2%" colAlign="bottom"> | |
| <en><![CDATA[All]]></en> | |
| </ALL_FILTER> | |
| <SEARCH_FILTER_FORM type="private"/> | |
| <!--<MNU_NEW type="link" label="@G::LoadTranslation(ID_START_CASE)" value='' link="@G::encryptLink(@#cases_New)" colAlign="left" colWidth="85"/>--> | |
| <PAGED_TABLE_ID type="private"/> | |
| <PAGED_TABLE_FAST_SEARCH type="FastSearch" label=""/> | |
| <MNU_FAST_SEARCH type="button" label="@G::LoadTranslation(ID_SEARCH)" colAlign="right" colWidth="50" onclick="@#PAGED_TABLE_ID.doFastSearch(getField('PAGED_TABLE_FAST_SEARCH',this.form).value);"/> | |
| <PAGED_TABLE_JUMP type="text" colAlign="right" colWidth="80" size="4" maxlength="5" label=""/> | |
| <MNU_JUMP type="button" label="@G::LoadTranslation(ID_JUMP)" colAlign="right" colWidth="50" onclick="Jump()"/> | |
| <!--<MNU_SEARCH type="link" value='' link="#" onclick="showHideSearch('@#SEARCH_FILTER_FORM',this); return false;" colAlign="right" colWidth="130"> | |
| <en>Advanced Search</en> | |
| </MNU_SEARCH>--> | |
| <JS type="javascript"><![CDATA[ | |
| param = getURLParam("filtertit"); | |
| selectionHighlight(param); | |
| function getURLParam(strParamName){ | |
| var strReturn = ""; | |
| var strHref = window.location.href; | |
| if ( strHref.indexOf("&") > -1 ){ | |
| var strQueryString = strHref.substr(strHref.indexOf("&")).toLowerCase(); | |
| var aQueryString = strQueryString.split("&"); | |
| for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){ | |
| if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ){ | |
| var aParam = aQueryString[iParam].split("="); | |
| strReturn = aParam[1]; | |
| break; | |
| } | |
| } | |
| } | |
| return strReturn; | |
| } | |
| function casesDelete(app) { | |
| ajax_function('cases_Delete','','APP_UID='+encodeURIComponent(app)); | |
| @#PAGED_TABLE_ID.refresh(); | |
| } | |
| var cancelCase = function(sUID, iIndex) { | |
| new leimnud.module.app.confirm().make({ | |
| label : G_STRINGS.ID_CONFIRM_CANCEL_CASE, | |
| action: function() { | |
| var oRPC = new leimnud.module.rpc.xmlhttp({ | |
| url: 'cases_Ajax', | |
| args: 'action=cancelCase&sApplicationUID=' + sUID + '&iIndex=' + iIndex | |
| }); | |
| oRPC.callback = function(oRPC) { | |
| @#PAGED_TABLE_ID.refresh(); | |
| }.extend(this); | |
| oRPC.make(); | |
| }.extend(this) | |
| }); | |
| }; | |
| var pauseCase = function(sUID, iIndex) | |
| { | |
| new leimnud.module.app.confirm().make({ | |
| label : G_STRINGS.ID_CONFIRM_PAUSE_CASE, | |
| action: function() { | |
| var oRPC = new leimnud.module.rpc.xmlhttp({ | |
| url: 'cases_Ajax', | |
| args: 'action=pauseCase&sApplicationUID=' + sUID + '&iIndex=' + iIndex | |
| }); | |
| oRPC.callback = function(oRPC) { | |
| @#PAGED_TABLE_ID.refresh(); | |
| }.extend(this); | |
| oRPC.make(); | |
| }.extend(this) | |
| }); | |
| }; | |
| var reactivateCase = function(sUID, iIndex) { | |
| new leimnud.module.app.confirm().make({ | |
| label : G_STRINGS.ID_MSG_CONFIRM_REACTIVATE_CASES, | |
| action: function() { | |
| var oRPC = new leimnud.module.rpc.xmlhttp({ | |
| url: 'cases_Ajax', | |
| args: 'action=reactivateCase&sApplicationUID=' + sUID + '&iIndex=' + iIndex | |
| }); | |
| oRPC.callback = function(oRPC) { | |
| @#PAGED_TABLE_ID.refresh(); | |
| }.extend(this); | |
| oRPC.make(); | |
| }.extend(this) | |
| }); | |
| }; | |
| var unpauseCase = function(sUID, iIndex) | |
| { | |
| new leimnud.module.app.confirm().make({ | |
| label : G_STRINGS.ID_CONFIRM_UNPAUSE_CASE, | |
| action: function() { | |
| var oRPC = new leimnud.module.rpc.xmlhttp({ | |
| url: 'cases_Ajax', | |
| args: 'action=unpauseCase&sApplicationUID=' + sUID + '&iIndex=' + iIndex | |
| }); | |
| oRPC.callback = function(oRPC) { | |
| @#PAGED_TABLE_ID.refresh(); | |
| }.extend(this); | |
| oRPC.make(); | |
| }.extend(this) | |
| }); | |
| }; | |
| getField("PAGED_TABLE_JUMP").onkeypress = function(event) { | |
| event = window.event ? window.event : event; | |
| if (event.keyCode===13) Jump(); | |
| }; | |
| function Jump(){ | |
| window.location.href='@#cases_Open?APP_NUMBER='+encodeURIComponent(getField('PAGED_TABLE_JUMP').value)+"&content=inner"; | |
| } | |
| // Additional filter -- By Erik | |
| leimnud.event.add(getField('PROCESS_FILTER'), 'change', function() { | |
| loc = new String(window.location); | |
| tmp = (loc.indexOf('&') != -1 )? loc.indexOf('&'): loc.length; | |
| uri = loc.substring(0, tmp); | |
| location.href = uri + '&PROCESS_UID='+this.value+'&APP_STATUS_FILTER='+getField('APP_STATUS_FILTER').value+'&r='+Math.floor(Math.random()*999999); | |
| }.extend(getField('PROCESS_FILTER'))); | |
| leimnud.event.add(getField('APP_STATUS_FILTER'), 'change', function() { | |
| loc = new String(window.location); | |
| tmp = (loc.indexOf('&') != -1 )? loc.indexOf('&'): loc.length; | |
| uri = loc.substring(0, tmp); | |
| location.href = uri + '&PROCESS_UID='+getField('PROCESS_FILTER').value+'&APP_STATUS_FILTER='+this.value+'&r='+Math.floor(Math.random()*999999); | |
| }.extend(getField('APP_STATUS_FILTER'))); | |
| function selectionHighlight(filter) { | |
| switch (filter.toUpperCase()) { | |
| case 'MINE' : getField("MINE").style.fontWeight = 'bold'; | |
| getField("READ_FILTER").style.fontWeight = 'normal'; | |
| getField("UNREAD_FILTER").style.fontWeight = 'normal'; | |
| getField("ALL_FILTER").style.fontWeight = 'normal'; | |
| break; | |
| case 'READ' : getField("MINE").style.fontWeight = 'normal'; | |
| getField("READ_FILTER").style.fontWeight = 'bold'; | |
| getField("UNREAD_FILTER").style.fontWeight = 'normal'; | |
| getField("ALL_FILTER").style.fontWeight = 'normal'; | |
| break; | |
| case 'UNREAD': getField("MINE").style.fontWeight = 'normal'; | |
| getField("READ_FILTER").style.fontWeight = 'normal'; | |
| getField("UNREAD_FILTER").style.fontWeight = 'bold'; | |
| getField("ALL_FILTER").style.fontWeight = 'normal'; | |
| break; | |
| case 'ALL' : getField("MINE").style.fontWeight = 'normal'; | |
| getField("READ_FILTER").style.fontWeight = 'normal'; | |
| getField("UNREAD_FILTER").style.fontWeight = 'normal'; | |
| getField("ALL_FILTER").style.fontWeight = 'bold'; | |
| break; | |
| } | |
| } | |
| function applyAdditionalFilter(filter){ | |
| selectionHighlight(filter); | |
| loc = new String(window.location); | |
| tmp = (loc.indexOf('&') != -1 )? loc.indexOf('&'): loc.length; | |
| uri = loc.substring(0, tmp); | |
| location.href = uri + '&APP_STATUS_FILTER='+getField('APP_STATUS_FILTER').value + '&PROCESS_UID='+getField('PROCESS_FILTER').value + '&' + filter + '=1'+'&r='+Math.floor(Math.random()*999999) + '&filterTit=' + filter; | |
| } | |
| ]]></JS> | |
| </dynaForm> | |