BUG 10548 Case Notes. After adding case notes, ProcessMaker... SOLVED
- The cases notes no obey restrictions of permits en uxs. - Was add validation.
This commit is contained in:
@@ -151,6 +151,8 @@ class AppCacheView extends BaseAppCacheView
|
|||||||
$criteria = $this->addPMFieldsToCriteria('draft');
|
$criteria = $this->addPMFieldsToCriteria('draft');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(AppCacheViewPeer::TAS_UID);
|
||||||
|
$criteria->addSelectColumn(AppCacheViewPeer::PRO_UID);
|
||||||
$criteria->add(AppCacheViewPeer::APP_STATUS, "DRAFT", CRITERIA::EQUAL);
|
$criteria->add(AppCacheViewPeer::APP_STATUS, "DRAFT", CRITERIA::EQUAL);
|
||||||
|
|
||||||
if (!empty($userUid)) {
|
if (!empty($userUid)) {
|
||||||
@@ -403,6 +405,8 @@ class AppCacheView extends BaseAppCacheView
|
|||||||
$criteria = $this->addPMFieldsToCriteria('unassigned');
|
$criteria = $this->addPMFieldsToCriteria('unassigned');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(AppCacheViewPeer::TAS_UID);
|
||||||
|
$criteria->addSelectColumn(AppCacheViewPeer::PRO_UID);
|
||||||
$criteria->add(AppCacheViewPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
|
$criteria->add(AppCacheViewPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
|
||||||
$criteria->add(AppCacheViewPeer::USR_UID, '');
|
$criteria->add(AppCacheViewPeer::USR_UID, '');
|
||||||
|
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ class Home extends Controller
|
|||||||
$this->setVar( 'cases', $cases['data'] );
|
$this->setVar( 'cases', $cases['data'] );
|
||||||
$this->setVar( 'cases_count', $cases['totalCount'] );
|
$this->setVar( 'cases_count', $cases['totalCount'] );
|
||||||
$this->setVar( 'title', $title );
|
$this->setVar( 'title', $title );
|
||||||
|
$this->setVar( 'noPerms', G::LoadTranslation( 'ID_CASES_NOTES_NO_PERMISSIONS' ));
|
||||||
$this->setVar( 'appListStart', $this->appListLimit );
|
$this->setVar( 'appListStart', $this->appListLimit );
|
||||||
$this->setVar( 'appListLimit', 10 );
|
$this->setVar( 'appListLimit', 10 );
|
||||||
$this->setVar( 'listType', $httpData->t );
|
$this->setVar( 'listType', $httpData->t );
|
||||||
@@ -260,6 +261,7 @@ class Home extends Controller
|
|||||||
$this->setVar( 'cases', $cases['data'] );
|
$this->setVar( 'cases', $cases['data'] );
|
||||||
$this->setVar( 'cases_count', $cases['totalCount'] );
|
$this->setVar( 'cases_count', $cases['totalCount'] );
|
||||||
$this->setVar( 'title', $title );
|
$this->setVar( 'title', $title );
|
||||||
|
$this->setVar( 'noPerms', G::LoadTranslation( 'ID_CASES_NOTES_NO_PERMISSIONS' ));
|
||||||
$this->setVar( 'appListStart', $this->appListLimit );
|
$this->setVar( 'appListStart', $this->appListLimit );
|
||||||
$this->setVar( 'appListLimit', 10 );
|
$this->setVar( 'appListLimit', 10 );
|
||||||
$this->setVar( 'listType', $httpData->t );
|
$this->setVar( 'listType', $httpData->t );
|
||||||
|
|||||||
@@ -58,34 +58,57 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addNt(appUid)
|
function addNt(appUid, proUid, tasUid)
|
||||||
{
|
{
|
||||||
$('textarea#note_text').val('');
|
$('textarea#note_text').val('');
|
||||||
$( "#dialog-add-note" ).dialog({
|
$.post(
|
||||||
resizable: false,
|
'../appProxy/getNotesList',
|
||||||
height:192,
|
{
|
||||||
modal: true,
|
appUid : appUid,
|
||||||
buttons: {
|
pro:proUid,
|
||||||
"Add Note": function() {
|
tas:tasUid,
|
||||||
var sendMail = document.getElementById('chkSendMail').checked;
|
start:0,
|
||||||
sendMail = (sendMail == true) ? '1' : '0';
|
limit:25
|
||||||
$(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() {
|
function(responseText) {
|
||||||
$(this).dialog( "close" );
|
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)
|
function updateNt(appUid)
|
||||||
@@ -146,6 +169,7 @@
|
|||||||
var appListLimit = {$appListLimit};
|
var appListLimit = {$appListLimit};
|
||||||
var appListStart = {$appListStart};
|
var appListStart = {$appListStart};
|
||||||
var listType = '{$listType}';
|
var listType = '{$listType}';
|
||||||
|
var noPerms = '{$noPerms}';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -125,34 +125,55 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addNt(appUid)
|
function addNt(appUid, proUid, tasUid)
|
||||||
{
|
{
|
||||||
$('textarea#note_text').val('');
|
$('textarea#note_text').val('');
|
||||||
$( "#dialog-add-note" ).dialog({
|
$.post(
|
||||||
resizable: false,
|
'../appProxy/getNotesList',
|
||||||
height:192,
|
{
|
||||||
modal: true,
|
appUid : appUid,
|
||||||
buttons: {
|
pro:proUid,
|
||||||
"Add Note": function() {
|
tas:tasUid,
|
||||||
var sendMail = document.getElementById('chkSendMail').checked;
|
start:0,
|
||||||
sendMail = (sendMail == true) ? '1' : '0';
|
limit:25
|
||||||
$(this).dialog("close");
|
},
|
||||||
$.post(
|
function(responseText) {
|
||||||
'../appProxy/postNote',
|
console.log(responseText);
|
||||||
{appUid : appUid,
|
data = jQuery.parseJSON(responseText);
|
||||||
noteText: $('textarea#note_text').val(),
|
console.log(data.noPerms);
|
||||||
swSendMail : sendMail},
|
if (typeof (data.noPerms) != 'undefined') {
|
||||||
function(responseText) {
|
alert(noPerms);
|
||||||
updateNt(appUid);
|
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()
|
function addPanelSearch()
|
||||||
{
|
{
|
||||||
@@ -246,6 +267,7 @@
|
|||||||
|
|
||||||
var appListLimit = {$appListLimit};
|
var appListLimit = {$appListLimit};
|
||||||
var appListStart = {$appListStart};
|
var appListStart = {$appListStart};
|
||||||
|
var noPerms = '{$noPerms}';
|
||||||
var listType = '{$listType}';
|
var listType = '{$listType}';
|
||||||
var process = '{$arraySearch[0]}';
|
var process = '{$arraySearch[0]}';
|
||||||
var status = '{$arraySearch[1]}';
|
var status = '{$arraySearch[1]}';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="notes-plus-link">
|
<span class="notes-plus-link">
|
||||||
<a href="#" onclick="addNt('{$APP.APP_UID}', '{$APP.APP_UID}'); return false;"><img src="/images/simplified/messages-grey-plus.png" height="21" width="21" border="0"></a>
|
<a href="#" onclick="addNt('{$APP.APP_UID}', '{$APP.PRO_UID}', '{$APP.TAS_UID}'); return false;"><img src="/images/simplified/messages-grey-plus.png" height="21" width="21" border="0"></a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user