BUG 5488 "case inbox refresh time should be configurable..." SOLVED

- New feature
- Case inbox refresh time should be configurable
- Added new feature
* Available from version 2.0.45
This commit is contained in:
Victor Saisa Lopez
2012-09-26 16:28:33 -04:00
parent ea6f57fc3c
commit d3ae88672f
5 changed files with 386 additions and 321 deletions

View File

@@ -311,34 +311,44 @@ class Configurations // extends Configuration
* @author Enrique Ponce de Leon enrique@colosa.com * @author Enrique Ponce de Leon enrique@colosa.com
* @return FORMATS array * @return FORMATS array
*/ */
public function getFormats()
function getFormats(){ {
if (!isset($this->UserConfig)) { if (!isset($this->UserConfig)) {
$this->UserConfig = $this->getConfiguration('ENVIRONMENT_SETTINGS', ''); $this->UserConfig = $this->getConfiguration("ENVIRONMENT_SETTINGS", "");
} }
// setting defaults //Setting defaults
if (!isset($this->UserConfig['format'])) { if (!isset($this->UserConfig["format"])) {
$this->UserConfig['format'] = '@lastName, @firstName (@userName)'; $this->UserConfig["format"] = "@lastName, @firstName (@userName)";
} }
if (!isset($this->UserConfig['dateFormat'])) {
$this->UserConfig['dateFormat'] = 'Y-m-d H:i:s'; if (!isset($this->UserConfig["dateFormat"])) {
$this->UserConfig["dateFormat"] = "Y-m-d H:i:s";
} }
if (!isset($this->UserConfig['casesListDateFormat'])) {
$this->UserConfig['casesListDateFormat'] = 'Y-m-d H:i:s'; if (!isset($this->UserConfig["startCaseHideProcessInf"])) {
$this->UserConfig["startCaseHideProcessInf"] = false;
} }
if (!isset($this->UserConfig['casesListRowNumber'])) {
$this->UserConfig['CasesListRowNumber'] = '25'; if (!isset($this->UserConfig["casesListDateFormat"])) {
$this->UserConfig["casesListDateFormat"] = "Y-m-d H:i:s";
} }
if (!isset($this->UserConfig['startCaseHideProcessInf'])) {
$this->UserConfig['startCaseHideProcessInf'] = false; if (!isset($this->UserConfig["casesListRowNumber"])) {
$this->UserConfig["casesListRowNumber"] = 25;
} }
$this->UserConfig['TimeZone'] = date('T');
if (!isset($this->UserConfig["casesListRefreshTime"]) ||
(isset($this->UserConfig["casesListRefreshTime"]) && empty($this->UserConfig["casesListRefreshTime"]))
) {
$this->UserConfig["casesListRefreshTime"] = 120; //2 minutes
}
$this->UserConfig["TimeZone"] = date("T");
return $this->UserConfig; return $this->UserConfig;
} }
/** /**
* setConfig * setConfig
* *
@@ -545,4 +555,4 @@ class Configurations // extends Configuration
return $this->aConfig; return $this->aConfig;
} }
} }
?>

View File

@@ -23,53 +23,64 @@
* *
*/ */
$oHeadPublisher =& headPublisher::getSingleton(); G::LoadClass("configuration");
$oHeadPublisher->addExtJsScript('cases/main', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/main'); //adding a html file .html.
$keyMem = 'USER_PREFERENCES'.$_SESSION['USER_LOGGED'];
$memcache = & PMmemcached::getSingleton(SYS_SYS);
if ( ($arrayConfig = $memcache->get($keyMem)) === false ) {
G::loadClass('configuration');
$oConf = new Configurations;
$oConf->loadConfig($x, 'USER_PREFERENCES','','',$_SESSION['USER_LOGGED'],'');
$arrayConfig = $oConf->aConfig;
$memcache->set( $keyMem, $arrayConfig, PMmemcached::ONE_HOUR);
}
$confDefaultOption='';
if( isset($arrayConfig['DEFAULT_CASES_MENU']) ){ #this user has a configuration record
$confDefaultOption = $arrayConfig['DEFAULT_CASES_MENU'];
$conf = new Configurations();
$oHeadPublisher = &headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript("cases/main", false); //Adding a javascript file .js
$oHeadPublisher->addContent("cases/main"); //Adding a html file .html.
$keyMem = "USER_PREFERENCES" . $_SESSION["USER_LOGGED"];
$memcache = &PMmemcached::getSingleton(SYS_SYS);
if (($arrayConfig = $memcache->get($keyMem)) === false) {
$conf->loadConfig($x, "USER_PREFERENCES", "", "", $_SESSION["USER_LOGGED"], "");
$arrayConfig = $conf->aConfig;
$memcache->set($keyMem, $arrayConfig, PMmemcached::ONE_HOUR);
}
$confDefaultOption = "";
if (isset($arrayConfig["DEFAULT_CASES_MENU"])) { //this user has a configuration record
$confDefaultOption = $arrayConfig["DEFAULT_CASES_MENU"];
global $G_TMP_MENU; global $G_TMP_MENU;
$oMenu = new Menu(); $oMenu = new Menu();
$oMenu->load('cases'); $oMenu->load("cases");
$defaultOption = ''; $defaultOption = "";
foreach($oMenu->Id as $i=>$id){
if( $id == $confDefaultOption ){ foreach ($oMenu->Id as $i => $id) {
if ($id == $confDefaultOption) {
$defaultOption = $oMenu->Options[$i]; $defaultOption = $oMenu->Options[$i];
break; break;
} }
} }
$defaultOption = $defaultOption != '' ? $defaultOption : 'casesListExtJs';
$defaultOption = ($defaultOption != "")? $defaultOption : "casesListExtJs";
} else {
$defaultOption = "casesListExtJs";
$confDefaultOption = "CASES_INBOX";
}
if (isset($_GET["id"]) && isset($_GET["id"])) {
$defaultOption = "../cases/open?APP_UID=" . $_GET["id"] . "&DEL_INDEX=" . $_GET["i"];
if (isset($_GET["a"])) {
$defaultOption .= "&action=" . $_GET["a"];
} }
else { }
$defaultOption = 'casesListExtJs';
$confDefaultOption = 'CASES_INBOX';
}
if (isset($_GET['id']) && isset($_GET['id'])) { $oHeadPublisher->assign("defaultOption", $defaultOption); //User menu permissions
$defaultOption = '../cases/open?APP_UID=' . $_GET['id'] . '&DEL_INDEX=' . $_GET['i']; $oHeadPublisher->assign("_nodeId", isset($confDefaultOption)? $confDefaultOption : "PM_USERS"); //User menu permissions
$oHeadPublisher->assign("FORMATS", $conf->getFormats());
if (isset($_GET['a'])) { $_SESSION["current_ux"] = "NORMAL";
$defaultOption .= '&action=' . $_GET['a'];
}
}
$oHeadPublisher->assign( 'defaultOption', $defaultOption); // user menu permissions G::RenderPage("publish", "extJs");
$oHeadPublisher->assign( '_nodeId', isset($confDefaultOption)?$confDefaultOption:'PM_USERS'); // user menu permissions
$_SESSION['current_ux'] = 'NORMAL';
G::RenderPage('publish', 'extJs');

View File

@@ -1,58 +1,62 @@
<?php <?php
/** /**
* @author Erik A.O. <erik@colosa.com> * @author Erik A.O. <erik@colosa.com>
* @date Sept 13th, 2010 * @date Sept 13th, 2010
*
*/ */
$request = isset($_POST['request'])? $_POST['request']: (isset($_GET['request'])? $_GET['request']: null); G::LoadClass("configuration");
switch($request){
case 'getUserMaskList':
G::loadClass('configuration');
$request = isset($_POST["request"])? $_POST["request"] : (isset($_GET["request"])? $_GET["request"] : null);
switch ($request) {
case "getUserMaskList":
$result->rows = Configurations::getUserNameFormats(); $result->rows = Configurations::getUserNameFormats();
print(G::json_encode($result)); print(G::json_encode($result));
break; break;
case 'getDateFormats': case "getDateFormats":
G::loadClass('configuration');
$result->rows = Configurations::getDateFormats(); $result->rows = Configurations::getDateFormats();
print(G::json_encode($result)); print(G::json_encode($result));
break; break;
case 'getCasesListDateFormat': case "getCasesListDateFormat":
G::loadClass('configuration');
$result->rows = Configurations::getDateFormats();; $result->rows = Configurations::getDateFormats();;
print(G::json_encode($result)); print(G::json_encode($result));
break; break;
case 'getCasesListRowNumber': case "getCasesListRowNumber":
for($i=10; $i<=50; $i+=5){ for ($i = 10; $i <= 50; $i+=5) {
$formats[] = Array('id'=>"$i", 'name'=>"$i"); $formats[] = array("id" => "$i", "name" => "$i");
} }
$result->rows = $formats; $result->rows = $formats;
print(G::json_encode($result)); print(G::json_encode($result));
break; break;
case 'save': case "save":
$conf = new Configurations();
G::LoadClass('configuration'); $conf->aConfig = array(
$conf = new Configurations; "format" => $_POST["userFormat"],
$conf->aConfig = Array( "dateFormat" => $_POST["dateFormat"],
'format'=>$_POST['userFormat'], "startCaseHideProcessInf" => ((isset($_POST["hideProcessInf"]))? true : false),
'dateFormat'=>$_POST['dateFormat'], "casesListDateFormat" => $_POST["casesListDateFormat"],
'casesListDateFormat' =>$_POST['casesListDateFormat'], "casesListRowNumber" => intval($_POST["casesListRowNumber"]),
'casesListRowNumber' =>$_POST['casesListRowNumber'] "casesListRefreshTime" => intval($_POST["txtCasesRefreshTime"])
); );
$conf->aConfig['startCaseHideProcessInf'] = isset($_POST['hideProcessInf']) ? true : false;
$conf->saveConfig('ENVIRONMENT_SETTINGS', ''); $conf->saveConfig("ENVIRONMENT_SETTINGS", "");
$response = new StdClass(); $response = new stdclass();
$response->success = true; $response->success = true;
$response->msg = G::LoadTranslation('ID_SAVED_SUCCESSFULLY'); $response->msg = G::LoadTranslation("ID_SAVED_SUCCESSFULLY");
echo G::json_encode($response); echo G::json_encode($response);
break; break;
} }

View File

@@ -1,5 +1,4 @@
var PANEL_EAST_OPEN = false; var PANEL_EAST_OPEN = false;
var timerMinutes = 2*60*1000; //every 2 minutes, this should be customized also,
var currentSelectedTreeMenuItem = null; var currentSelectedTreeMenuItem = null;
var centerPanel; var centerPanel;
var menuTree; var menuTree;
@@ -313,7 +312,7 @@ Ext.onReady(function(){
treeMenuItemDetail treeMenuItemDetail
] ]
}); });
mainMenu.setTitle('<a href="#"><img id="refreshNotifiers" src="/images/refresh.gif" onClick="updateCasesTree(); updateCasesView();" /></a>'); mainMenu.setTitle("<div style=\"height: 18px;\"><a href=\"javascript:;\"><img id=\"refreshNotifiers\" src=\"/images/refresh.gif\" onclick=\"updateCasesTree(); updateCasesView();\" /></a></div>");
/** /**
* Triggers Panel * Triggers Panel
@@ -529,8 +528,8 @@ Ext.onReady(function(){
menuPanelDetail.hide(); menuPanelDetail.hide();
menuPanelDetail.ownerCt.doLayout(); menuPanelDetail.ownerCt.doLayout();
//the starting timer will be triggered after timerMinutes //FORMATS.casesListRefreshTime is in seconds
setTimeout('Timer()', timerMinutes ); setTimeout("timer()", parseInt(FORMATS.casesListRefreshTime) * 1000);
}); });
function updateCasesView() { function updateCasesView() {
@@ -583,10 +582,13 @@ function updateCasesTree() {
} }
//the timer function will be called after 2 minutes; function timer()
function Timer(){ {
//FORMATS.casesListRefreshTime is in seconds
updateCasesTree();
updateCasesView(); updateCasesView();
setTimeout('Timer()', timerMinutes);
setTimeout("timer()", parseInt(FORMATS.casesListRefreshTime) * 1000);
} }
Ext.data.DynamicJsonReader = function(config){ Ext.data.DynamicJsonReader = function(config){

View File

@@ -5,6 +5,8 @@ var fsDates;
var fsCases; var fsCases;
var _firstName, _lastName, _userName, _dateSample; var _firstName, _lastName, _userName, _dateSample;
var txtCasesRefreshTime;
Ext.onReady(function() { Ext.onReady(function() {
Ext.QuickTips.init(); Ext.QuickTips.init();
@@ -21,8 +23,10 @@ Ext.onReady(function() {
items: [ items: [
{xtype: 'label', fieldLabel: _('IS_USER_NAME_DISPLAY_FORMAT'), id: 'lblFullName', width: 400}, {xtype: 'label', fieldLabel: _('IS_USER_NAME_DISPLAY_FORMAT'), id: 'lblFullName', width: 400},
{xtype: 'label', fieldLabel: _('ID_GLOBAL_DATE_FORMAT'), id: 'lblDateFormat', width: 400}, {xtype: 'label', fieldLabel: _('ID_GLOBAL_DATE_FORMAT'), id: 'lblDateFormat', width: 400},
{xtype: 'label', fieldLabel: _('ID_CASE_LIST') +': '+_('ID_CASES_DATE_MASK'), id: 'lblCasesDateFormat', width: 400}, {xtype: 'label', fieldLabel: _('ID_CASE_LIST') +': '+_('ID_CASES_DATE_MASK'), id: 'lblCasesDateFormat', width: 400}
{xtype: 'label', fieldLabel: _('ID_CASE_LIST') +': '+_('ID_CASES_ROW_NUMBER'), id: 'lblCasesRowsList', width: 400} //,
//{xtype: "label", fieldLabel: _("ID_CASE_LIST") + ": " +_("ID_CASES_ROW_NUMBER"), id: "lblCasesRowsList", width: 400},
//{xtype: "label", fieldLabel: _("ID_CASE_LIST") + ": " + _("ID_REFRESH_TIME_SECONDS"), id: "lblCasesRefreshTime", width: 400}
] ]
}); });
@@ -37,14 +41,14 @@ Ext.onReady(function() {
listeners:{ listeners:{
load: function(){ load: function(){
default_format = FORMATS.format; default_format = FORMATS.format;
i = cmbUsernameFormats.store.findExact('id', default_format, 0); i = cmbUsernameFormat.store.findExact('id', default_format, 0);
cmbUsernameFormats.setValue(cmbUsernameFormats.store.getAt(i).data.id); cmbUsernameFormat.setValue(cmbUsernameFormat.store.getAt(i).data.id);
cmbUsernameFormats.setRawValue(cmbUsernameFormats.store.getAt(i).data.name); cmbUsernameFormat.setRawValue(cmbUsernameFormat.store.getAt(i).data.name);
} }
} }
}); });
cmbUsernameFormats = new Ext.form.ComboBox({ cmbUsernameFormat = new Ext.form.ComboBox({
fieldLabel : _('IS_USER_NAME_DISPLAY_FORMAT'), fieldLabel : _('IS_USER_NAME_DISPLAY_FORMAT'),
hiddenName : 'userFormat', hiddenName : 'userFormat',
store : storeUsernameFormat, store : storeUsernameFormat,
@@ -59,9 +63,12 @@ Ext.onReady(function() {
mode:'local', mode:'local',
listeners:{ listeners:{
afterrender:function(){ afterrender:function(){
cmbUsernameFormats.store.load(); cmbUsernameFormat.store.load();
}, },
select: function(){ChangeSettings('1');} select: function ()
{
changeSettings(1);
}
} }
}); });
@@ -80,14 +87,14 @@ Ext.onReady(function() {
listeners:{ listeners:{
load: function(){ load: function(){
default_date_format = FORMATS.dateFormat, default_date_format = FORMATS.dateFormat,
i = cmbDateFormats.store.findExact('id', default_date_format, 0); i = cmbDateFormat.store.findExact('id', default_date_format, 0);
cmbDateFormats.setValue(cmbDateFormats.store.getAt(i).data.id); cmbDateFormat.setValue(cmbDateFormat.store.getAt(i).data.id);
cmbDateFormats.setRawValue(cmbDateFormats.store.getAt(i).data.name); cmbDateFormat.setRawValue(cmbDateFormat.store.getAt(i).data.name);
} }
} }
}); });
cmbDateFormats = new Ext.form.ComboBox({ cmbDateFormat = new Ext.form.ComboBox({
fieldLabel : _('ID_GLOBAL_DATE_FORMAT'), fieldLabel : _('ID_GLOBAL_DATE_FORMAT'),
hiddenName : 'dateFormat', hiddenName : 'dateFormat',
store : storeDateFormat, store : storeDateFormat,
@@ -102,13 +109,16 @@ Ext.onReady(function() {
mode:'local', mode:'local',
listeners:{ listeners:{
afterrender:function(){ afterrender:function(){
cmbDateFormats.store.load(); cmbDateFormat.store.load();
}, },
select: function(){ChangeSettings('2');} select: function ()
{
changeSettings(2);
}
} }
}); });
storeCaseUserNameFormat = new Ext.data.Store({ storeCasesDateFormat = new Ext.data.Store({
proxy : new Ext.data.HttpProxy({ proxy : new Ext.data.HttpProxy({
url : 'environmentSettingsAjax?request=getCasesListDateFormat', url : 'environmentSettingsAjax?request=getCasesListDateFormat',
method : 'POST' method : 'POST'
@@ -123,17 +133,17 @@ Ext.onReady(function() {
listeners:{ listeners:{
load: function(){ load: function(){
default_caseslist_date_format = FORMATS.casesListDateFormat; default_caseslist_date_format = FORMATS.casesListDateFormat;
i = cmbCasesDateFormats.store.findExact('id', default_caseslist_date_format, 0); i = cmbCasesDateFormat.store.findExact('id', default_caseslist_date_format, 0);
cmbCasesDateFormats.setValue(cmbCasesDateFormats.store.getAt(i).data.id); cmbCasesDateFormat.setValue(cmbCasesDateFormat.store.getAt(i).data.id);
cmbCasesDateFormats.setRawValue(cmbCasesDateFormats.store.getAt(i).data.name); cmbCasesDateFormat.setRawValue(cmbCasesDateFormat.store.getAt(i).data.name);
} }
} }
}); });
cmbCasesDateFormats = new Ext.form.ComboBox({ cmbCasesDateFormat = new Ext.form.ComboBox({
fieldLabel : _('ID_CASES_DATE_MASK'), fieldLabel : _('ID_CASES_DATE_MASK'),
hiddenName : 'casesListDateFormat', hiddenName : 'casesListDateFormat',
store : storeCaseUserNameFormat, store : storeCasesDateFormat,
valueField : 'id', valueField : 'id',
displayField : 'name', displayField : 'name',
triggerAction : 'all', triggerAction : 'all',
@@ -144,13 +154,16 @@ Ext.onReady(function() {
mode:'local', mode:'local',
listeners:{ listeners:{
afterrender:function(){ afterrender:function(){
cmbCasesDateFormats.store.load(); cmbCasesDateFormat.store.load();
}, },
select: function(){ChangeSettings('3');} select: function ()
{
changeSettings(4);
}
} }
}); });
storeCaseListNumber = new Ext.data.Store({ storeCasesRowNumber = new Ext.data.Store({
proxy : new Ext.data.HttpProxy( { proxy : new Ext.data.HttpProxy( {
url : 'environmentSettingsAjax?request=getCasesListRowNumber', url : 'environmentSettingsAjax?request=getCasesListRowNumber',
method : 'POST' method : 'POST'
@@ -163,21 +176,17 @@ Ext.onReady(function() {
] ]
}), }),
listeners:{ listeners:{
load: function(){ load: function ()
default_caseslist_row_number = FORMATS.casesListRowNumber; {
i = cmbCasesRowsPerPage.store.findExact('id', default_caseslist_row_number, 0); cmbCasesRowNumber.setValue(FORMATS.casesListRowNumber + "");
if( i != -1 ){
cmbCasesRowsPerPage.setValue(cmbCasesRowsPerPage.store.getAt(i).data.id);
cmbCasesRowsPerPage.setRawValue(cmbCasesRowsPerPage.store.getAt(i).data.name);
}
} }
} }
}); });
cmbCasesRowsPerPage = new Ext.form.ComboBox({ cmbCasesRowNumber = new Ext.form.ComboBox({
fieldLabel : _('ID_CASES_ROW_NUMBER'), fieldLabel : _('ID_CASES_ROW_NUMBER'),
hiddenName : 'casesListRowNumber', hiddenName : 'casesListRowNumber',
store : storeCaseListNumber, store : storeCasesRowNumber,
valueField : 'id', valueField : 'id',
displayField : 'name', displayField : 'name',
triggerAction : 'all', triggerAction : 'all',
@@ -188,22 +197,42 @@ Ext.onReady(function() {
mode:'local', mode:'local',
listeners:{ listeners:{
afterrender:function(){ afterrender:function(){
cmbCasesRowsPerPage.store.load(); cmbCasesRowNumber.store.load();
}, },
select: function(){ChangeSettings('4');} select: function ()
{
changeSettings(5);
}
}
});
txtCasesRefreshTime = new Ext.form.TextField({
id: "txtCasesRefreshTime",
name: "txtCasesRefreshTime",
value: FORMATS.casesListRefreshTime,
fieldLabel: _("ID_REFRESH_TIME_SECONDS"),
maskRe: /^\d*$/,
enableKeyEvents: true,
listeners: {
keyup: function (txt, e)
{
changeSettings(6);
}
} }
}); });
fsNames = new Ext.form.FieldSet({ fsNames = new Ext.form.FieldSet({
title: _('ID_PM_ENV_SETTINGS_USERFIELDSET_TITLE'), title: _('ID_PM_ENV_SETTINGS_USERFIELDSET_TITLE'),
labelAlign: 'right', labelAlign: 'right',
items: [cmbUsernameFormats] items: [cmbUsernameFormat]
}); });
fsDates = new Ext.form.FieldSet({ fsDates = new Ext.form.FieldSet({
title: _('ID_PM_ENV_SETTINGS_REGIONFIELDSET_TITLE'), title: _('ID_PM_ENV_SETTINGS_REGIONFIELDSET_TITLE'),
labelAlign: 'right', labelAlign: 'right',
items: [cmbDateFormats] items: [cmbDateFormat]
}); });
fsCases = new Ext.form.FieldSet({ fsCases = new Ext.form.FieldSet({
@@ -228,9 +257,9 @@ Ext.onReady(function() {
] ]
}), }),
new Ext.form.FieldSet({ new Ext.form.FieldSet({
title: _('ID_CASES_LIST_SETUP'), title: _("ID_CASES_LIST_SETUP"),
labelAlign: 'right', labelAlign: "right",
items: [cmbCasesDateFormats,cmbCasesRowsPerPage] items: [cmbCasesDateFormat, cmbCasesRowNumber, txtCasesRefreshTime]
}) })
] ]
}); });
@@ -265,7 +294,7 @@ Ext.onReady(function() {
buttons : [saveButton] buttons : [saveButton]
}); });
LoadSamples(); loadSamples();
/*viewport = new Ext.Viewport({ /*viewport = new Ext.Viewport({
layout: 'fit', layout: 'fit',
@@ -279,32 +308,41 @@ Ext.onReady(function() {
}); });
//Load Samples Label //Load Samples Label
LoadSamples = function(){ loadSamples = function ()
Ext.getCmp('lblFullName').setText(_FNF(_userName, _firstName, _lastName, FORMATS.format)); {
Ext.getCmp('lblDateFormat').setText(_DF(_dateSample, FORMATS.dateFormat)); Ext.getCmp("lblFullName").setText(_FNF(_userName, _firstName, _lastName, FORMATS.format));
Ext.getCmp('lblCasesDateFormat').setText(_DF(_dateSample, FORMATS.casesListDateFormat, FORMATS.casesListDateFormat)); Ext.getCmp("lblDateFormat").setText(_DF(_dateSample, FORMATS.dateFormat));
Ext.getCmp('lblCasesRowsList').setText(FORMATS.casesListRowNumber); Ext.getCmp("lblCasesDateFormat").setText(_DF(_dateSample, FORMATS.casesListDateFormat, FORMATS.casesListDateFormat));
//Ext.getCmp("lblCasesRowsList").setText(FORMATS.casesListRowNumber);
//Ext.getCmp("lblCasesRefreshTime").setText(FORMATS.casesListRefreshTime);
}; };
//Change Some Setting //Change Some Setting
ChangeSettings = function(iType){ changeSettings = function (iType)
{
saveButton.enable(); saveButton.enable();
switch (iType){
case '1': switch (iType) {
_format = cmbUsernameFormats.getValue(); case 1:
Ext.getCmp('lblFullName').setText(_FNF(_userName,_firstName,_lastName, _format)); var f = FORMATS.format;
FORMATS.format = cmbUsernameFormat.getValue();
Ext.getCmp("lblFullName").setText(_FNF(_userName, _firstName, _lastName, cmbUsernameFormat.getValue()));
FORMATS.format = f;
break; break;
case '2': case 2:
_format = cmbDateFormats.getValue(); Ext.getCmp("lblDateFormat").setText(_DF(_dateSample, cmbDateFormat.getValue()));
Ext.getCmp('lblDateFormat').setText(_DF(_dateSample,_format));
break; break;
case '3': case 3:
_format = cmbCasesDateFormats.getValue();
Ext.getCmp('lblCasesDateFormat').setText(_DF(_dateSample,_format));
break; break;
case '4': case 4:
_format = cmbCasesRowsPerPage.getValue(); Ext.getCmp("lblCasesDateFormat").setText(_DF(_dateSample, cmbCasesDateFormat.getValue()));
Ext.getCmp('lblCasesRowsList').setText(_format); break;
case 5:
//Ext.getCmp("lblCasesRowsList").setText(cmbCasesRowNumber.getValue());
break;
case 6:
//Ext.getCmp("lblCasesRefreshTime").setText(txtCasesRefreshTime.getValue());
break; break;
} }
}; };