select PRO_UID, APP_PRO_TITLE from _PROCESSES
Process
Read
Unread
All
-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);
if(uri.indexOf('?l=to_do')==-1) uri=uri+'?l=to_do';
document.location.href = uri + '&PROCESS_UID='+this.value+'&r='+Math.floor(Math.random()*999999);
}.extend(getField('PROCESS_FILTER')));
function selectionHighlight(filter) {
switch (param.toUpperCase()) {
case 'READ' : getField("READ_FILTER").style.fontWeight = 'bold';
getField("UNREAD_FILTER").style.fontWeight = 'normal';
getField("ALL_FILTER").style.fontWeight = 'normal';
break;
case 'UNREAD': getField("READ_FILTER").style.fontWeight = 'normal';
getField("UNREAD_FILTER").style.fontWeight = 'bold';
getField("ALL_FILTER").style.fontWeight = 'normal';
break;
case 'ALL' : getField("READ_FILTER").style.fontWeight = 'normal';
getField("UNREAD_FILTER").style.fontWeight = 'normal';
getField("ALL_FILTER").style.fontWeight = 'bold';
break;
default : 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 + '&PROCESS_UID='+getField('PROCESS_FILTER').value + '&' + filter + '=1'+'&r='+Math.floor(Math.random()*999999) + '&filter=' + filter;
}
]]>