diff --git a/workflow/engine/skinEngine/simplified/templates/appList.html b/workflow/engine/skinEngine/simplified/templates/appList.html index 95c88e871..31b5655f1 100644 --- a/workflow/engine/skinEngine/simplified/templates/appList.html +++ b/workflow/engine/skinEngine/simplified/templates/appList.html @@ -22,7 +22,6 @@ color : #808080; /*font : normal 8pt sans-serif,Tahoma,MiscFixed;*/ background-color:#ECECEC; - } #note_text { @@ -59,30 +58,57 @@ } } - function addNt(appUid) + function addNt(appUid, proUid, tasUid) { $('textarea#note_text').val(''); - $( "#dialog-add-note" ).dialog({ - resizable: false, - height:178, - modal: true, - buttons: { - "Add Note": function() { - $(this).dialog("close"); - $.post( - '../appProxy/postNote', - {appUid: appUid, noteText: $('textarea#note_text').val()}, - function(responseText) { - updateNt(appUid); - } - ); - //redirect('home/startCase?id='+id); + $.post( + '../appProxy/getNotesList', + { + appUid : appUid, + pro:proUid, + tas:tasUid, + start:0, + limit:25 }, - Cancel: function() { - $(this).dialog( "close" ); + function(responseText) { + data = jQuery.parseJSON(responseText); + if (typeof (data.noPerms) != 'undefined') { + alert(noPerms); + return false; + } else { + $( "#dialog-add-note" ).dialog({ + resizable: false, + height:192, + modal: true, + buttons: { + "Add Note": function() { + var sendMail = document.getElementById('chkSendMail').checked; + sendMail = (sendMail == true) ? '1' : '0'; + $(this).dialog("close"); + $.post( + '../appProxy/postNote', + {appUid : appUid, + noteText: $('textarea#note_text').val(), + swSendMail : sendMail}, + function(responseText) { + updateNt(appUid); + } + ); + //redirect('home/startCase?id='+id); + }, + Cancel: function() { + $(this).dialog( "close" ); + } + } + }); + } + //updateNt(appUid); + } - } - }); + ); + + + } function updateNt(appUid) @@ -143,6 +169,7 @@ var appListLimit = {$appListLimit}; var appListStart = {$appListStart}; var listType = '{$listType}'; + var noPerms = '{$noPerms}'; @@ -167,6 +194,10 @@

+

+ + +


diff --git a/workflow/engine/skinEngine/simplified/templates/appListSearch.html b/workflow/engine/skinEngine/simplified/templates/appListSearch.html index 38cfaff7e..844893e89 100644 --- a/workflow/engine/skinEngine/simplified/templates/appListSearch.html +++ b/workflow/engine/skinEngine/simplified/templates/appListSearch.html @@ -125,34 +125,55 @@ } } - function addNt(appUid) + function addNt(appUid, proUid, tasUid) { $('textarea#note_text').val(''); - $( "#dialog-add-note" ).dialog({ - resizable: false, - height:192, - modal: true, - buttons: { - "Add Note": function() { - var sendMail = document.getElementById('chkSendMail').checked; - sendMail = (sendMail == true) ? '1' : '0'; - $(this).dialog("close"); - $.post( - '../appProxy/postNote', - {appUid : appUid, - noteText: $('textarea#note_text').val(), - swSendMail : sendMail}, - function(responseText) { - updateNt(appUid); + $.post( + '../appProxy/getNotesList', + { + appUid : appUid, + pro:proUid, + tas:tasUid, + start:0, + limit:25 + }, + function(responseText) { + console.log(responseText); + data = jQuery.parseJSON(responseText); + console.log(data.noPerms); + if (typeof (data.noPerms) != 'undefined') { + alert(noPerms); + return false; + } else { + $( "#dialog-add-note" ).dialog({ + resizable: false, + height:192, + modal: true, + buttons: { + "Add Note": function() { + var sendMail = document.getElementById('chkSendMail').checked; + sendMail = (sendMail == true) ? '1' : '0'; + $(this).dialog("close"); + $.post( + '../appProxy/postNote', + {appUid : appUid, + noteText: $('textarea#note_text').val(), + swSendMail : sendMail}, + function(responseText) { + updateNt(appUid); + } + ); + //redirect('home/startCase?id='+id); + }, + Cancel: function() { + $(this).dialog( "close" ); + } } - ); - //redirect('home/startCase?id='+id); - }, - Cancel: function() { - $(this).dialog( "close" ); + }); } + //updateNt(appUid); } - }); + ); } function addPanelSearch() { @@ -246,6 +267,7 @@ var appListLimit = {$appListLimit}; var appListStart = {$appListStart}; + var noPerms = '{$noPerms}'; var listType = '{$listType}'; var process = '{$arraySearch[0]}'; var status = '{$arraySearch[1]}'; diff --git a/workflow/engine/skinEngine/simplified/templates/applications.html b/workflow/engine/skinEngine/simplified/templates/applications.html index 2be3e212f..91cd8e0c3 100644 --- a/workflow/engine/skinEngine/simplified/templates/applications.html +++ b/workflow/engine/skinEngine/simplified/templates/applications.html @@ -9,7 +9,7 @@ - +