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

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