Cases Scheduler Log Ext JS Migration Complete
This commit is contained in:
@@ -51,6 +51,7 @@ class LogCasesScheduler extends BaseLogCasesScheduler {
|
|||||||
|
|
||||||
return $aRows;
|
return $aRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveLogParameters($params){
|
function saveLogParameters($params){
|
||||||
|
|
||||||
if ( isset ( $params['LOG_CASE_UID'] ) && $params['LOG_CASE_UID']== '' )
|
if ( isset ( $params['LOG_CASE_UID'] ) && $params['LOG_CASE_UID']== '' )
|
||||||
|
|||||||
@@ -23,48 +23,65 @@
|
|||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
//if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
|
||||||
|
//global $RBAC;
|
||||||
|
//
|
||||||
|
//if (!class_exists('LogCasesSchedulerPeer')){
|
||||||
|
//require ("classes/model/LogCasesSchedulerPeer.php");
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//$oLogCaseScheduler = new LogCasesScheduler();
|
||||||
|
//$aRows = $oLogCaseScheduler->getAll();
|
||||||
|
//
|
||||||
|
//$fieldNames = Array(
|
||||||
|
// 'LOG_CASE_UID' => 'char',
|
||||||
|
// 'PRO_UID' => 'char',
|
||||||
|
// 'TAS_UID' => 'char',
|
||||||
|
// 'USR_NAME' => 'char',
|
||||||
|
// 'EXEC_DATE' => 'char',
|
||||||
|
// 'EXEC_HOUR' => 'char',
|
||||||
|
// 'RESULT' => 'char',
|
||||||
|
// 'SCH_UID' => 'char',
|
||||||
|
// 'WS_CREATE_CASE_STATUS' => 'char',
|
||||||
|
// 'WS_ROUTE_CASE_STATUS' => 'char',
|
||||||
|
//);
|
||||||
|
//
|
||||||
|
//$aRows = array_merge(Array($fieldNames), $aRows);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//$_DBArray['log_cases_scheduler'] = $aRows;
|
||||||
|
//$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
//
|
||||||
|
//$oCriteria = new Criteria('dbarray');
|
||||||
|
//$oCriteria->setDBArrayTable('log_cases_scheduler');
|
||||||
|
////krumo($oCriteria);
|
||||||
|
////$G_MAIN_MENU = 'processmaker';
|
||||||
|
////$G_SUB_MENU = 'cases';
|
||||||
|
////
|
||||||
|
////$G_ID_MENU_SELECTED = 'CASES';
|
||||||
|
////$G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER_LOG';
|
||||||
|
//
|
||||||
|
//$G_PUBLISH = new Publisher;
|
||||||
|
//$G_PUBLISH->ROWS_PER_PAGE = 10;
|
||||||
|
//$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_Scheduler_Log', $oCriteria);
|
||||||
|
//$G_PUBLISH->oPropelTable->rowsPerPage = 10;
|
||||||
|
//G::RenderPage('publishBlank', 'blank');
|
||||||
|
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
|
if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
|
||||||
if (!class_exists('LogCasesSchedulerPeer')){
|
|
||||||
require ("classes/model/LogCasesSchedulerPeer.php");
|
|
||||||
}
|
|
||||||
|
|
||||||
$oLogCaseScheduler = new LogCasesScheduler();
|
|
||||||
$aRows = $oLogCaseScheduler->getAll();
|
|
||||||
|
|
||||||
$fieldNames = Array(
|
|
||||||
'LOG_CASE_UID' => 'char',
|
|
||||||
'PRO_UID' => 'char',
|
|
||||||
'TAS_UID' => 'char',
|
|
||||||
'USR_NAME' => 'char',
|
|
||||||
'EXEC_DATE' => 'char',
|
|
||||||
'EXEC_HOUR' => 'char',
|
|
||||||
'RESULT' => 'char',
|
|
||||||
'SCH_UID' => 'char',
|
|
||||||
'WS_CREATE_CASE_STATUS' => 'char',
|
|
||||||
'WS_ROUTE_CASE_STATUS' => 'char',
|
|
||||||
);
|
|
||||||
|
|
||||||
$aRows = array_merge(Array($fieldNames), $aRows);
|
|
||||||
|
|
||||||
|
|
||||||
$_DBArray['log_cases_scheduler'] = $aRows;
|
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
|
||||||
|
|
||||||
$oCriteria = new Criteria('dbarray');
|
|
||||||
$oCriteria->setDBArrayTable('log_cases_scheduler');
|
|
||||||
//krumo($oCriteria);
|
|
||||||
//$G_MAIN_MENU = 'processmaker';
|
|
||||||
//$G_SUB_MENU = 'cases';
|
|
||||||
//
|
|
||||||
//$G_ID_MENU_SELECTED = 'CASES';
|
|
||||||
//$G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER_LOG';
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher;
|
||||||
$G_PUBLISH->ROWS_PER_PAGE = 10;
|
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_Scheduler_Log', $oCriteria);
|
$oHeadPublisher =& headPublisher::getSingleton();
|
||||||
$G_PUBLISH->oPropelTable->rowsPerPage = 10;
|
|
||||||
G::RenderPage('publishBlank', 'blank');
|
//$oHeadPublisher->usingExtJs('ux/Ext.ux.fileUploadField');
|
||||||
|
$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'));
|
||||||
|
|
||||||
|
$oHeadPublisher->assign('TRANSLATIONS', $labels);
|
||||||
|
G::RenderPage('publish', 'extJs');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ try {
|
|||||||
// var_dump(htmlspecialchars($_GET['WS_ROUTE']));
|
// var_dump(htmlspecialchars($_GET['WS_ROUTE']));
|
||||||
// var_dump(htmlentities($_GET['WS_ROUTE']));
|
// var_dump(htmlentities($_GET['WS_ROUTE']));
|
||||||
|
|
||||||
$oCriteria->add(LogCasesSchedulerPeer::LOG_CASE_UID,$_GET['LOG_CASE_UID']);
|
$oCriteria->add(LogCasesSchedulerPeer::LOG_CASE_UID,$_REQUEST['LOG_CASE_UID']);
|
||||||
|
|
||||||
$result = LogCasesSchedulerPeer::doSelectRS($oCriteria);
|
$result = LogCasesSchedulerPeer::doSelectRS($oCriteria);
|
||||||
$result->next();
|
$result->next();
|
||||||
@@ -85,8 +85,6 @@ try {
|
|||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_Scheduler_Log_Detail.xml', '', $aFields, '');
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_Scheduler_Log_Detail.xml', '', $aFields, '');
|
||||||
G::RenderPage('publishBlank', 'blank');
|
G::RenderPage('publishBlank', 'blank');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception $oException) {
|
catch (Exception $oException) {
|
||||||
die($oException->getMessage());
|
die($oException->getMessage());
|
||||||
|
|||||||
68
workflow/engine/methods/cases/data_casesSchedulerLog.php
Normal file
68
workflow/engine/methods/cases/data_casesSchedulerLog.php
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* data_casesSchedulerLog.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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once 'classes/model/LogCasesSchedulerPeer.php';
|
||||||
|
require_once 'classes/model/LogCasesScheduler.php';
|
||||||
|
|
||||||
|
$start = isset($_REQUEST['start'])? $_REQUEST['start'] : 0;
|
||||||
|
$limit = isset($_REQUEST['limit'])? $_REQUEST['limit'] : 20;
|
||||||
|
|
||||||
|
$oCriteria = new Criteria('workflow');
|
||||||
|
$oCriteria->clearSelectColumns();
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::LOG_CASE_UID);
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::PRO_UID);
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::TAS_UID);
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::USR_NAME);
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::EXEC_DATE);
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::EXEC_HOUR);
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::RESULT);
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::SCH_UID);
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::WS_CREATE_CASE_STATUS);
|
||||||
|
$oCriteria->addSelectColumn(LogCasesSchedulerPeer::WS_ROUTE_CASE_STATUS);
|
||||||
|
|
||||||
|
$oCriteria->setOffset($start);
|
||||||
|
$oCriteria->setLimit($limit);
|
||||||
|
|
||||||
|
$oCriteria->addDescendingOrderByColumn(LogCasesSchedulerPeer::EXEC_DATE);
|
||||||
|
$oCriteria->addDescendingOrderByColumn(LogCasesSchedulerPeer::EXEC_HOUR);
|
||||||
|
|
||||||
|
$oDataset = LogCasesSchedulerPeer::doSelectRS ( $oCriteria );
|
||||||
|
$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//$oDataset = LogCasesSchedulerPeer::doSelectRS ( $oCriteria );
|
||||||
|
//$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
|
||||||
|
$addTables = Array();
|
||||||
|
while( $oDataset->next() ) {
|
||||||
|
$addTables[] = $oDataset->getRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
$oLogCasesScheduler = new LogCasesScheduler();
|
||||||
|
$arrData = $oLogCasesScheduler->getAll();
|
||||||
|
$results = count($arrData);
|
||||||
|
|
||||||
|
echo '{results: '.$results.', rows: '.G::json_encode($addTables).'}';
|
||||||
3
workflow/engine/templates/cases/casesSchedulerLog.html
Normal file
3
workflow/engine/templates/cases/casesSchedulerLog.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<div style="padding: 15px">
|
||||||
|
<div id="list-panel"></div>
|
||||||
|
</div>
|
||||||
171
workflow/engine/templates/cases/casesSchedulerLog.js
Normal file
171
workflow/engine/templates/cases/casesSchedulerLog.js
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
/*
|
||||||
|
* @author: Qennix
|
||||||
|
* Jan 18th, 2011
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Keyboard Events
|
||||||
|
new Ext.KeyMap(document, {
|
||||||
|
key: Ext.EventObject.F5,
|
||||||
|
fn: function(keycode, e) {
|
||||||
|
if (! e.ctrlKey) {
|
||||||
|
if (Ext.isIE) {
|
||||||
|
// IE6 doesn't allow cancellation of the F5 key, so trick it into
|
||||||
|
// thinking some other key was pressed (backspace in this case)
|
||||||
|
e.browserEvent.keyCode = 8;
|
||||||
|
}
|
||||||
|
e.stopEvent();
|
||||||
|
document.location = document.location;
|
||||||
|
}else{
|
||||||
|
Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var store;
|
||||||
|
var cmodel;
|
||||||
|
var infoGrid;
|
||||||
|
var viewport;
|
||||||
|
var bbarpaging;
|
||||||
|
var w;
|
||||||
|
|
||||||
|
|
||||||
|
Ext.onReady(function(){
|
||||||
|
Ext.QuickTips.init();
|
||||||
|
|
||||||
|
store = new Ext.data.GroupingStore( {
|
||||||
|
proxy : new Ext.data.HttpProxy({
|
||||||
|
url: 'data_casesSchedulerLog'
|
||||||
|
}),
|
||||||
|
reader : new Ext.data.JsonReader( {
|
||||||
|
root: 'rows',
|
||||||
|
totalProperty: 'results',
|
||||||
|
fields : [
|
||||||
|
{name : 'LOG_CASE_UID'},
|
||||||
|
{name : 'PRO_UID'},
|
||||||
|
{name : 'TAS_UID'},
|
||||||
|
{name : 'USR_NAME'},
|
||||||
|
{name : 'EXEC_DATE'},
|
||||||
|
{name : 'EXEC_HOUR'},
|
||||||
|
{name : 'RESULT'},
|
||||||
|
{name : 'SCH_UID'},
|
||||||
|
{name : 'WS_CREATE_CASE_STATUS'},
|
||||||
|
{name : 'WS_ROUTE_CASE_STATUS'}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
cmodel = new Ext.grid.ColumnModel({
|
||||||
|
defaults: {
|
||||||
|
width: 50,
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{id:'LOG_CASE_UID', dataIndex: 'LOG_CASE_UID', hidden:true, hideable:false},
|
||||||
|
{header: TRANSLATIONS.ID_DATE_LABEL, dataIndex: 'EXEC_DATE', width: 30, align:'left'},
|
||||||
|
{header: TRANSLATIONS.ID_TIME_LABEL, dataIndex: 'EXEC_HOUR', width: 30, hidden:false, align:'left'},
|
||||||
|
{header: TRANSLATIONS.ID_USER, dataIndex: 'USR_NAME', width: 40, hidden:false, align:'left'},
|
||||||
|
{header: TRANSLATIONS.ID_RESULT, dataIndex: 'RESULT', width: 40, hidden:false, align:'left'},
|
||||||
|
{header: TRANSLATIONS.ID_CREATED_CASE_STATUS, dataIndex: 'WS_CREATE_CASE_STATUS', width: 80, hidden:false, align:'left'},
|
||||||
|
{header: TRANSLATIONS.ID_ROUTED_CASE_STATUS, dataIndex: 'WS_ROUTE_CASE_STATUS', width: 80, hidden:false, align:'left'},
|
||||||
|
{header: TRANSLATIONS.ID_VIEW, dataIndex: 'LOG_CASE_UID', width: 20, hidden:false, align:'center', renderer: view_button}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
bbarpaging = new Ext.PagingToolbar({
|
||||||
|
pageSize: 20,
|
||||||
|
store: store
|
||||||
|
});
|
||||||
|
|
||||||
|
infoGrid = new Ext.grid.GridPanel({
|
||||||
|
region: 'center',
|
||||||
|
layout: 'fit',
|
||||||
|
id: 'infoGrid',
|
||||||
|
height:100,
|
||||||
|
autoWidth : true,
|
||||||
|
title : TRANSLATIONS.ID_LOG_CASE_SCHEDULER,
|
||||||
|
stateful : true,
|
||||||
|
stateId : 'grid',
|
||||||
|
enableColumnResize: true,
|
||||||
|
enableHdMenu: true,
|
||||||
|
frame:true,
|
||||||
|
iconCls:'icon-grid',
|
||||||
|
columnLines: false,
|
||||||
|
viewConfig: {
|
||||||
|
forceFit:true
|
||||||
|
},
|
||||||
|
store: store,
|
||||||
|
cm: cmodel,
|
||||||
|
bbar: [{xtype: 'tbfill'}, bbarpaging],
|
||||||
|
listeners: {
|
||||||
|
rowdblclick: ShowSelectedLog,
|
||||||
|
},
|
||||||
|
view: new Ext.grid.GroupingView({
|
||||||
|
forceFit:true,
|
||||||
|
groupTextTpl: '{text}'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
infoGrid.store.load({params: {"function":"caseSchedulerLog"}});
|
||||||
|
|
||||||
|
viewport = new Ext.Viewport({
|
||||||
|
layout: 'fit',
|
||||||
|
autoScroll: false,
|
||||||
|
items: [
|
||||||
|
infoGrid
|
||||||
|
]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Do Nothing Function
|
||||||
|
DoNothing = function(){}
|
||||||
|
|
||||||
|
//Handles DoubleClick's Grid
|
||||||
|
ShowSelectedLog = function(){
|
||||||
|
iGrid = Ext.getCmp('infoGrid');
|
||||||
|
rowSelected = iGrid.getSelectionModel().getSelected();
|
||||||
|
if (rowSelected){
|
||||||
|
ViewLogScheduler(rowSelected.data.LOG_CASE_UID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Renderer Button on Grid
|
||||||
|
view_button = function(val){
|
||||||
|
var sep = "'";
|
||||||
|
return '<input type="button" value="' + TRANSLATIONS.ID_VIEW + '" onclick="ViewLogScheduler(' + sep + val + sep + ');" />';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Open Popup View Log Window
|
||||||
|
ViewLogScheduler = function(value){
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: 'cases_Scheduler_Log_Detail',
|
||||||
|
success: SuccessViewLog,
|
||||||
|
failure: DoNothing,
|
||||||
|
params: {LOG_CASE_UID: value}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//Response View Handler
|
||||||
|
SuccessViewLog = function(response, opts){
|
||||||
|
w = new Ext.Window({
|
||||||
|
height: 320,
|
||||||
|
width: 600,
|
||||||
|
resizable: false,
|
||||||
|
html: response.responseText,
|
||||||
|
autoscroll: false,
|
||||||
|
title: TRANSLATIONS.ID_TITLE_LOG_DETAIL,
|
||||||
|
closable: true,
|
||||||
|
buttons: [{
|
||||||
|
text: TRANSLATIONS.ID_CLOSE,
|
||||||
|
handler: CloseView
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
w.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Close View Dialog
|
||||||
|
CloseView = function(){
|
||||||
|
w.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<dynaForm type="xmlform" menu="" searchBy="">
|
<dynaForm type="xmlform" menu="" searchBy="" width="570">
|
||||||
|
|
||||||
<SCH_UID type="text" titlealign="left" align="left" colWidth="90" mode="view">
|
<SCH_UID type="text" titlealign="left" align="left" colWidth="90" mode="view">
|
||||||
<en>Scheduled Task ID</en>
|
<en>Scheduled Task ID</en>
|
||||||
@@ -35,8 +35,4 @@
|
|||||||
<WS_ROUTE_CASE_STATUS type="text" titlealign="left" align="left" colWidth="140" mode="view">
|
<WS_ROUTE_CASE_STATUS type="text" titlealign="left" align="left" colWidth="140" mode="view">
|
||||||
<en>Routed Case Status</en>
|
<en>Routed Case Status</en>
|
||||||
</WS_ROUTE_CASE_STATUS>
|
</WS_ROUTE_CASE_STATUS>
|
||||||
|
|
||||||
<VIEW type="link" colWidth="40" value="" link="cases_Scheduler_Log" onclick="">
|
|
||||||
<en>Back to List</en>
|
|
||||||
</VIEW>
|
|
||||||
</dynaForm>
|
</dynaForm>
|
||||||
Reference in New Issue
Block a user