Cases Scheduler Log ExtJs update look n feel

This commit is contained in:
Enrique Ponce de Leon
2011-02-24 19:14:06 +00:00
parent 3f0c7dfb1a
commit a90f980306
4 changed files with 310 additions and 219 deletions

View File

@@ -0,0 +1,44 @@
<?php
/**
* casesSchedulerLog_Ajax.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
G::LoadInclude('ajax');
$_POST['action'] = get_ajax_value('action');
switch ($_POST['action'])
{
case 'updatePageSize':
G::LoadClass('configuration');
$c = new Configurations();
$arr['pageSize'] = $_REQUEST['size'];
$arr['dateSave'] = date('Y-m-d H:i:s');
$config = Array();
$config[] = $arr;
$c->aConfig = $config;
$c->saveConfig('casesSchedulerLogList', 'pageSize','',$_SESSION['USER_LOGGED']);
echo '{success: true}';
break;
break;
}
?>

View File

@@ -26,6 +26,10 @@
if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
$G_PUBLISH = new Publisher;
G::LoadClass('configuration');
$c = new Configurations();
$configPage = $c->getConfiguration('casesSchedulerLogList', 'pageSize','',$_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$oHeadPublisher =& headPublisher::getSingleton();
@@ -33,11 +37,9 @@ $oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('cases/casesSchedulerLog', false); //adding a javascript file .js
$oHeadPublisher->addContent('cases/casesSchedulerLog'); //adding a html file .html.
$labels = G::getTranslations(Array('ID_DATE_LABEL','ID_TIME_LABEL','ID_USER','ID_RESULT', 'ID_CREATED_CASE_STATUS',
'ID_ROUTED_CASE_STATUS','ID_CLOSE','ID_LOG_CASE_SCHEDULER','ID_VIEW','ID_TITLE_LOG_DETAIL','ID_ENTER_SEARCH_TERM','ID_SEARCH',
'ID_SCHEDULER_TASK','ID_TASK_ID','ID_PROCESS_ID','ID_EXECUTION_DATE','ID_EXECUTION_HOUR','ID_EXECUTION_STATUS'));
$oHeadPublisher->assign('CONFIG', $Config);
$oHeadPublisher->assign('TRANSLATIONS', $labels);
G::RenderPage('publish', 'extJs');
?>

View File

@@ -25,10 +25,14 @@
require_once 'classes/model/LogCasesSchedulerPeer.php';
require_once 'classes/model/LogCasesScheduler.php';
G::LoadClass('configuration');
$co = new Configurations();
$config = $co->getConfiguration('casesSchedulerLogList', 'pageSize','',$_SESSION['USER_LOGGED']);
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
$start = isset($_REQUEST['start'])? $_REQUEST['start'] : 0;
$limit = isset($_REQUEST['limit'])? $_REQUEST['limit'] : 20;
$limit = isset($_REQUEST['limit'])? $_REQUEST['limit'] : $limit_size;
$filter = (isset($_POST['textFilter'])) ? $_POST['textFilter'] : '';
$oCriteria = new Criteria('workflow');