Merge pull request #1255 from marcoAntonioNina/BUG-10548

BUG 10548 Case Notes. After adding case notes, ProcessMaker... SOLVED
This commit is contained in:
julceslauhub
2013-01-29 13:14:54 -08:00
5 changed files with 100 additions and 48 deletions

View File

@@ -151,6 +151,8 @@ class AppCacheView extends BaseAppCacheView
$criteria = $this->addPMFieldsToCriteria('draft');
}
$criteria->addSelectColumn(AppCacheViewPeer::TAS_UID);
$criteria->addSelectColumn(AppCacheViewPeer::PRO_UID);
$criteria->add(AppCacheViewPeer::APP_STATUS, "DRAFT", CRITERIA::EQUAL);
if (!empty($userUid)) {
@@ -403,6 +405,8 @@ class AppCacheView extends BaseAppCacheView
$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::USR_UID, '');

View File

@@ -213,6 +213,7 @@ class Home extends Controller
$this->setVar( 'cases', $cases['data'] );
$this->setVar( 'cases_count', $cases['totalCount'] );
$this->setVar( 'title', $title );
$this->setVar( 'noPerms', G::LoadTranslation( 'ID_CASES_NOTES_NO_PERMISSIONS' ));
$this->setVar( 'appListStart', $this->appListLimit );
$this->setVar( 'appListLimit', 10 );
$this->setVar( 'listType', $httpData->t );
@@ -260,6 +261,7 @@ class Home extends Controller
$this->setVar( 'cases', $cases['data'] );
$this->setVar( 'cases_count', $cases['totalCount'] );
$this->setVar( 'title', $title );
$this->setVar( 'noPerms', G::LoadTranslation( 'ID_CASES_NOTES_NO_PERMISSIONS' ));
$this->setVar( 'appListStart', $this->appListLimit );
$this->setVar( 'appListLimit', 10 );
$this->setVar( 'listType', $httpData->t );

View File

@@ -58,9 +58,24 @@
}
}
function addNt(appUid)
function addNt(appUid, proUid, tasUid)
{
$('textarea#note_text').val('');
$.post(
'../appProxy/getNotesList',
{
appUid : appUid,
pro:proUid,
tas:tasUid,
start:0,
limit:25
},
function(responseText) {
data = jQuery.parseJSON(responseText);
if (typeof (data.noPerms) != 'undefined') {
alert(noPerms);
return false;
} else {
$( "#dialog-add-note" ).dialog({
resizable: false,
height:192,
@@ -86,6 +101,14 @@
}
}
});
}
//updateNt(appUid);
}
);
}
function updateNt(appUid)
@@ -146,6 +169,7 @@
var appListLimit = {$appListLimit};
var appListStart = {$appListStart};
var listType = '{$listType}';
var noPerms = '{$noPerms}';
</script>
</head>

View File

@@ -125,9 +125,26 @@
}
}
function addNt(appUid)
function addNt(appUid, proUid, tasUid)
{
$('textarea#note_text').val('');
$.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,
@@ -154,6 +171,10 @@
}
});
}
//updateNt(appUid);
}
);
}
function addPanelSearch()
{
var urlFile = $('#imagenPanel').attr('src');
@@ -246,6 +267,7 @@
var appListLimit = {$appListLimit};
var appListStart = {$appListStart};
var noPerms = '{$noPerms}';
var listType = '{$listType}';
var process = '{$arraySearch[0]}';
var status = '{$arraySearch[1]}';

View File

@@ -9,7 +9,7 @@
</span>
<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>
<p>