From cd1dab68492f891e46d7e17660bcf4d50e34a972 Mon Sep 17 00:00:00 2001
From: Marco Antonio Nina
Date: Wed, 30 Jan 2013 09:27:21 -0400
Subject: [PATCH] BUG 10548 Case Notes. After adding case notes,
ProcessMaker... IMPROVEMENT
- The cases notes no obey restrictions of permits en uxs.
- Was add validation.
---
.../simplified/templates/appList.html | 73 +++++++++++++------
.../simplified/templates/appListSearch.html | 68 +++++++++++------
.../simplified/templates/applications.html | 2 +-
3 files changed, 98 insertions(+), 45 deletions(-)
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 @@
-
+