BUG 9943 Advanced Search menu should be seen on UXS SOLVED
- According to the specifications. - Was add the file for advanced search with the same functionality.
This commit is contained in:
@@ -218,6 +218,53 @@ class Home extends Controller
|
||||
$this->render();
|
||||
}
|
||||
|
||||
public function appAdvancedSearch ($httpData)
|
||||
{
|
||||
$title = G::LoadTranslation("ID_ADVANCEDSEARCH");
|
||||
$httpData->t = 'search';
|
||||
|
||||
// settings html template
|
||||
$this->setView( $this->userUxBaseTemplate . PATH_SEP . 'appListSearch' );
|
||||
|
||||
$process = (isset($httpData->process)) ? $httpData->process : null;
|
||||
$status = (isset($httpData->status)) ? $httpData->status : null;
|
||||
$search = (isset($httpData->search)) ? $httpData->search : null;
|
||||
$category = (isset($httpData->category)) ? $httpData->category : null;
|
||||
$user = (isset($httpData->user)) ? $httpData->user : null;
|
||||
$dateFrom = (isset($httpData->dateFrom)) ? $httpData->dateFrom : null;
|
||||
$dateTo = (isset($httpData->dateTo)) ? $httpData->dateTo : null;
|
||||
|
||||
$cases = $this->getAppsData( $httpData->t, null, null, $user, null, $search, $process, $status, $dateFrom, $dateTo, null, null, 'APP_CACHE_VIEW.APP_NUMBER', $category);
|
||||
$arraySearch = array($process, $status, $search, $category, $user, $dateFrom, $dateTo );
|
||||
|
||||
// settings vars and rendering
|
||||
$processes = array();
|
||||
$processes = $this->getProcessArray($httpData->t, $this->userID );
|
||||
$this->setVar( 'statusValues', $this->getStatusArray( $httpData->t, $this->userID ) );
|
||||
$this->setVar( 'processValues', $processes );
|
||||
$this->setVar( 'categoryValues', $this->getCategoryArray() );
|
||||
$this->setVar( 'userValues', $this->getUserArray( $httpData->t, $this->userID ) );
|
||||
$this->setVar( 'allUsersValues', $this->getAllUsersArray( 'search' ) );
|
||||
$this->setVar( 'categoryTitle', G::LoadTranslation("ID_CATEGORY") );
|
||||
$this->setVar( 'processTitle', G::LoadTranslation("ID_PROCESS") );
|
||||
$this->setVar( 'statusTitle', G::LoadTranslation("ID_STATUS") );
|
||||
$this->setVar( 'searchTitle', G::LoadTranslation("ID_SEARCH") );
|
||||
$this->setVar( 'userTitle', G::LoadTranslation("ID_USER") );
|
||||
$this->setVar( 'fromTitle', G::LoadTranslation("ID_DELEGATE_DATE_FROM") );
|
||||
$this->setVar( 'toTitle', G::LoadTranslation("ID_DELEGATE_DATE_TO") );
|
||||
$this->setVar( 'filterTitle', G::LoadTranslation("ID_FILTER") );
|
||||
$this->setVar( 'arraySearch', $arraySearch );
|
||||
|
||||
$this->setVar( 'cases', $cases['data'] );
|
||||
$this->setVar( 'cases_count', $cases['totalCount'] );
|
||||
$this->setVar( 'title', $title );
|
||||
$this->setVar( 'appListStart', $this->appListLimit );
|
||||
$this->setVar( 'appListLimit', 10 );
|
||||
$this->setVar( 'listType', $httpData->t );
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
public function getApps ($httpData)
|
||||
{
|
||||
$cases = $this->getAppsData( $httpData->t, $httpData->start, $httpData->limit );
|
||||
@@ -227,7 +274,21 @@ class Home extends Controller
|
||||
$this->render();
|
||||
}
|
||||
|
||||
public function getAppsData ($type, $start = null, $limit = null)
|
||||
public function getAppsData (
|
||||
$type,
|
||||
$start = null,
|
||||
$limit = null,
|
||||
$user = null,
|
||||
$filter = null,
|
||||
$search = null,
|
||||
$process = null,
|
||||
$status = null,
|
||||
$dateFrom = null,
|
||||
$dateTo = null,
|
||||
$callback = null,
|
||||
$dir = null,
|
||||
$sort = "APP_CACHE_VIEW.APP_NUMBER",
|
||||
$category = null)
|
||||
{
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
G::LoadClass( 'applications' );
|
||||
@@ -240,10 +301,22 @@ class Home extends Controller
|
||||
|
||||
$notesStart = 0;
|
||||
$notesLimit = 4;
|
||||
switch ($user) {
|
||||
case 'CURRENT_USER':
|
||||
$user = $this->userID;
|
||||
break;
|
||||
case 'ALL':
|
||||
$user = null;
|
||||
break;
|
||||
case null:
|
||||
$user = $this->userID;
|
||||
break;
|
||||
default:
|
||||
//$user = $this->userID;
|
||||
break;
|
||||
}
|
||||
|
||||
$cases = $apps->getAll( $this->userID, $start, $limit, $type );
|
||||
//g::pr($cases['data']); die;
|
||||
|
||||
$cases = $apps->getAll( $user, $start, $limit, $type, $filter, $search, $process, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort, $category);
|
||||
|
||||
// formating & complitting apps data with 'Notes'
|
||||
foreach ($cases['data'] as $i => $row) {
|
||||
@@ -312,5 +385,216 @@ class Home extends Controller
|
||||
$this->setView( $tpl );
|
||||
$this->render();
|
||||
}
|
||||
|
||||
function getUserArray ($action, $userUid)
|
||||
{
|
||||
global $oAppCache;
|
||||
$status = array ();
|
||||
$users[] = array ("CURRENT_USER",G::LoadTranslation( "ID_CURRENT_USER" ));
|
||||
$users[] = array ("ALL",G::LoadTranslation( "ID_ALL_USERS" ));
|
||||
|
||||
//now get users, just for the Search action
|
||||
switch ($action) {
|
||||
case 'search_simple':
|
||||
case 'search':
|
||||
$cUsers = new Criteria( 'workflow' );
|
||||
$cUsers->clearSelectColumns();
|
||||
$cUsers->addSelectColumn( UsersPeer::USR_UID );
|
||||
$cUsers->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
||||
$cUsers->addSelectColumn( UsersPeer::USR_LASTNAME );
|
||||
$oDataset = UsersPeer::doSelectRS( $cUsers );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$users[] = array ($aRow['USR_UID'], htmlentities($aRow['USR_LASTNAME'] . ' ' . $aRow['USR_FIRSTNAME'], ENT_QUOTES, "UTF-8"));
|
||||
$oDataset->next();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return $users;
|
||||
break;
|
||||
}
|
||||
return $users;
|
||||
}
|
||||
|
||||
function getCategoryArray ()
|
||||
{
|
||||
global $oAppCache;
|
||||
require_once 'classes/model/ProcessCategory.php';
|
||||
$category[] = array ("",G::LoadTranslation( "ID_ALL_CATEGORIES" )
|
||||
);
|
||||
|
||||
$criteria = new Criteria( 'workflow' );
|
||||
$criteria->addSelectColumn( ProcessCategoryPeer::CATEGORY_UID );
|
||||
$criteria->addSelectColumn( ProcessCategoryPeer::CATEGORY_NAME );
|
||||
$dataset = ProcessCategoryPeer::doSelectRS( $criteria );
|
||||
$dataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$dataset->next();
|
||||
|
||||
while ($row = $dataset->getRow()) {
|
||||
$category[] = array ($row['CATEGORY_UID'],$row['CATEGORY_NAME']);
|
||||
$dataset->next();
|
||||
}
|
||||
return $category;
|
||||
}
|
||||
|
||||
function getAllUsersArray ($action)
|
||||
{
|
||||
global $oAppCache;
|
||||
$status = array ();
|
||||
$users[] = array ("CURRENT_USER",G::LoadTranslation( "ID_CURRENT_USER" )
|
||||
);
|
||||
$users[] = array ("",G::LoadTranslation( "ID_ALL_USERS" )
|
||||
);
|
||||
|
||||
if ($action == 'to_reassign') {
|
||||
//now get users, just for the Search action
|
||||
$cUsers = $oAppCache->getToReassignListCriteria(null);
|
||||
$cUsers->addSelectColumn( AppCacheViewPeer::USR_UID );
|
||||
|
||||
if (g::MySQLSintaxis()) {
|
||||
$cUsers->addGroupByColumn( AppCacheViewPeer::USR_UID );
|
||||
}
|
||||
|
||||
$cUsers->addAscendingOrderByColumn( AppCacheViewPeer::APP_CURRENT_USER );
|
||||
$oDataset = AppCacheViewPeer::doSelectRS( $cUsers );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$users[] = array ($aRow['USR_UID'],$aRow['APP_CURRENT_USER']);
|
||||
$oDataset->next();
|
||||
}
|
||||
}
|
||||
return $users;
|
||||
}
|
||||
|
||||
function getStatusArray ($action, $userUid)
|
||||
{
|
||||
global $oAppCache;
|
||||
$status = array ();
|
||||
$status[] = array ('',G::LoadTranslation( 'ID_ALL_STATUS' ));
|
||||
//get the list based in the action provided
|
||||
switch ($action) {
|
||||
case 'sent':
|
||||
$cStatus = $oAppCache->getSentListProcessCriteria( $userUid ); // a little slow
|
||||
break;
|
||||
case 'simple_search':
|
||||
case 'search':
|
||||
$cStatus = new Criteria( 'workflow' );
|
||||
$cStatus->clearSelectColumns();
|
||||
$cStatus->setDistinct();
|
||||
$cStatus->addSelectColumn( ApplicationPeer::APP_STATUS );
|
||||
$oDataset = ApplicationPeer::doSelectRS( $cStatus );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$status[] = array ($aRow['APP_STATUS'],G::LoadTranslation( 'ID_CASES_STATUS_' . $aRow['APP_STATUS'] )
|
||||
); //here we can have a translation for the status ( the second param)
|
||||
$oDataset->next();
|
||||
}
|
||||
return $status;
|
||||
break;
|
||||
case 'selfservice':
|
||||
$cStatus = $oAppCache->getUnassignedListCriteria( $userUid );
|
||||
break;
|
||||
case 'paused':
|
||||
$cStatus = $oAppCache->getPausedListCriteria( $userUid );
|
||||
break;
|
||||
case 'to_revise':
|
||||
$cStatus = $oAppCache->getToReviseListCriteria( $userUid );
|
||||
// $cStatus = $oAppCache->getPausedListCriteria($userUid);
|
||||
break;
|
||||
case 'to_reassign':
|
||||
$cStatus = $oAppCache->getToReassignListCriteria($userUid);
|
||||
break;
|
||||
case 'todo':
|
||||
case 'draft':
|
||||
case 'gral':
|
||||
// case 'to_revise' :
|
||||
default:
|
||||
return $status;
|
||||
break;
|
||||
}
|
||||
|
||||
//get the status for this user in this action only for participated, unassigned, paused
|
||||
// if ( $action != 'todo' && $action != 'draft' && $action != 'to_revise') {
|
||||
if ($action != 'todo' && $action != 'draft') {
|
||||
//$cStatus = new Criteria('workflow');
|
||||
$cStatus->clearSelectColumns();
|
||||
$cStatus->setDistinct();
|
||||
$cStatus->addSelectColumn( AppCacheViewPeer::APP_STATUS );
|
||||
$oDataset = AppCacheViewPeer::doSelectRS( $cStatus );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$status[] = array ($aRow['APP_STATUS'],G::LoadTranslation( 'ID_CASES_STATUS_' . $aRow['APP_STATUS'] ));
|
||||
//here we can have a translation for the status ( the second param)
|
||||
$oDataset->next();
|
||||
}
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
function getProcessArray($action, $userUid)
|
||||
{
|
||||
global $oAppCache;
|
||||
|
||||
$processes = array();
|
||||
$processes[] = array("", G::LoadTranslation("ID_ALL_PROCESS"));
|
||||
|
||||
switch ($action) {
|
||||
case "simple_search":
|
||||
case "search":
|
||||
//In search action, the query to obtain all process is too slow, so we need to query directly to
|
||||
//process and content tables, and for that reason we need the current language in AppCacheView.
|
||||
G::loadClass("configuration");
|
||||
$oConf = new Configurations;
|
||||
$oConf->loadConfig($x, "APP_CACHE_VIEW_ENGINE", "", "", "", "");
|
||||
$appCacheViewEngine = $oConf->aConfig;
|
||||
$lang = isset($appCacheViewEngine["LANG"])? $appCacheViewEngine["LANG"] : "en";
|
||||
|
||||
$cProcess = new Criteria("workflow");
|
||||
$cProcess->clearSelectColumns();
|
||||
$cProcess->addSelectColumn(ProcessPeer::PRO_UID);
|
||||
$cProcess->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
|
||||
$del = DBAdapter::getStringDelimiter();
|
||||
|
||||
$conds = array();
|
||||
$conds[] = array(ProcessPeer::PRO_UID, ContentPeer::CON_ID);
|
||||
$conds[] = array(ContentPeer::CON_CATEGORY, $del . "PRO_TITLE" . $del);
|
||||
$conds[] = array(ContentPeer::CON_LANG, $del . $lang . $del);
|
||||
$cProcess->addJoinMC($conds, Criteria::LEFT_JOIN);
|
||||
$cProcess->add(ProcessPeer::PRO_STATUS, "ACTIVE");
|
||||
$oDataset = ProcessPeer::doSelectRS($cProcess);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$processes[] = array($aRow["PRO_UID"], $aRow["CON_VALUE"]);
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
return ($processes);
|
||||
break;
|
||||
case "consolidated":
|
||||
default:
|
||||
$cProcess = $oAppCache->getToDoListCriteria($userUid); //fast enough
|
||||
break;
|
||||
}
|
||||
|
||||
$cProcess->clearSelectColumns();
|
||||
$cProcess->setDistinct();
|
||||
$cProcess->addSelectColumn(AppCacheViewPeer::PRO_UID);
|
||||
$cProcess->addSelectColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
||||
$oDataset = AppCacheViewPeer::doSelectRS($cProcess);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$processes[] = array($aRow["PRO_UID"], $aRow["APP_PRO_TITLE"]);
|
||||
$oDataset->next();
|
||||
}
|
||||
return ($processes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,5 +12,7 @@ if ($RBAC->userCanAccess("PM_CASES") == 1) {
|
||||
"/images/simplified/folder-grey3.png", null, null, null);
|
||||
$G_TMP_MENU->AddIdRawOption("S_NEW_CASE", "#", G::LoadTranslation("ID_NEW_CASE"),
|
||||
"/images/simplified/plus-set-grey.png", null, null, null);
|
||||
$G_TMP_MENU->AddIdRawOption("S_ADVANCED_SEARCH", "home/appAdvancedSearch", G::LoadTranslation("ID_ADVANCEDSEARCH"),
|
||||
"/images/simplified/advancedSearch.png", null, null, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,14 @@ pre {
|
||||
height: 40px;
|
||||
background-color: #252525;
|
||||
background-position: 0 0;
|
||||
background: #007eb5; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #007eb5 0%, #003d5a 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#007eb5), color-stop(100%,#003d5a)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #007eb5 0%,#003d5a 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #007eb5 0%,#003d5a 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #007eb5 0%,#003d5a 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #007eb5 0%,#003d5a 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#007eb5', endColorstr='#003d5a',GradientType=0 ); /* IE6-9 */
|
||||
|
||||
/* background-image: url("/images/twitter_web_sprite_bgs.png");
|
||||
background-repeat: repeat-x;*/
|
||||
|
||||
@@ -592,7 +592,8 @@ div.topbar ul li ul li span {
|
||||
div#corpBar div.topbar-bg {
|
||||
background-color: #142F3C;
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#142F3C), to(#307190)); /* Webkit */
|
||||
background-image: -moz-linear-gradient(#142F3C, #1D4558); /* FF3.6 */
|
||||
background-image: -moz-linear-gradient(top, #0085bf 0%, #003954 100%); /* FF3.6 */
|
||||
/*background-image: -moz-linear-gradient(#677C89 , #1D4558); *//* FF3.6 */
|
||||
/*erik: modified backgournd colors in topbar, but just for FF, we need todo for others;
|
||||
original: #00a0d1, #008db8 */
|
||||
|
||||
|
||||
353
workflow/engine/templates/home/appListSearch.html
Normal file
353
workflow/engine/templates/home/appListSearch.html
Normal file
@@ -0,0 +1,353 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
|
||||
|
||||
<link rel="stylesheet" href="/css/simplified.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="/js/jquery/css/smoothness/jquery-ui-1.8.17.custom.css" type="text/css">
|
||||
<!--<link rel="stylesheet" href="/js/jquery/css/redmond/jquery-ui-1.7.2.custom.css" type="text/css">-->
|
||||
|
||||
<script type="text/javascript" src="/js/jquery/jquery-1.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery/jquery-ui-1.8.17.min.js"></script>
|
||||
|
||||
{literal}
|
||||
<style>
|
||||
body {
|
||||
/*width: 500px;*/
|
||||
margin: 10px auto;
|
||||
/*color: #999;*/
|
||||
font: 90%/150% Arial, Helvetica, sans-serif;
|
||||
/*margin : 0px;*/
|
||||
color : #808080;
|
||||
/*font : normal 8pt sans-serif,Tahoma,MiscFixed;*/
|
||||
background-color:#ECECEC;
|
||||
}
|
||||
|
||||
#note_text {
|
||||
width:100%;
|
||||
height:52px;
|
||||
}
|
||||
|
||||
.postitem:hover{
|
||||
/*background:#EFEFEF;*/
|
||||
}
|
||||
.fontText {
|
||||
color: #565656;
|
||||
font: bold 10px/15px Helvetica,Sans-Serif;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
text-shadow: 0 1px 2px #FFFFFF;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#btn {
|
||||
background: #ffffff; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #dbdbdb 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#dbdbdb)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#dbdbdb 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#dbdbdb 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#dbdbdb 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#dbdbdb 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#dbdbdb',GradientType=0 ); /* IE6-9 */
|
||||
|
||||
border: 1px solid #FFFFFF;
|
||||
color: #565656;
|
||||
text-decoration: none;
|
||||
text-shadow: 1px 1px 1px #FFFFFF;
|
||||
font: 10px/25px Helvetica,Sans-Serif;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
box-shadow: 0 0 6px #FFFFFF inset;
|
||||
text-decoration: none;
|
||||
padding: 5px 0 0;
|
||||
}
|
||||
a.btn:hover {
|
||||
color: #145675;
|
||||
-moz-transition: color 0.25s ease-in-out;
|
||||
-webkit-transition: color 0.25s ease-in-out;
|
||||
transition: color 0.25s ease-in-out;
|
||||
}
|
||||
.global-nav{
|
||||
background: #007eb5; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #007eb5 0%, #003d5a 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#007eb5), color-stop(100%,#003d5a)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #007eb5 0%,#003d5a 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #007eb5 0%,#003d5a 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #007eb5 0%,#003d5a 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #007eb5 0%,#003d5a 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#007eb5', endColorstr='#003d5a',GradientType=0 ); /* IE6-9 */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function resize()
|
||||
{
|
||||
var h = $(document.body).height() - 52;
|
||||
var w = $(document.body).width();
|
||||
if (w > 600) {
|
||||
w = 600;
|
||||
}
|
||||
|
||||
$('.content-header').width(w-50);
|
||||
}
|
||||
function setTextSearch()
|
||||
{
|
||||
$("#searchText").val(null);
|
||||
redirect();
|
||||
}
|
||||
|
||||
function redirect()
|
||||
{
|
||||
var src = $("#iframex", window.parent.document).attr('src');
|
||||
src = src.split("?");
|
||||
|
||||
var params = '?';
|
||||
params += 'process='+$("#comboProcess option:selected").val();
|
||||
params += '&status='+$("#comboStatus option:selected").val();
|
||||
params += '&search='+$("#searchText").val();
|
||||
params += '&category='+$("#comboCategory option:selected").val();
|
||||
params += '&user='+$("#comboUsers option:selected").val();
|
||||
params += '&dateFrom='+$("#dateFrom").val();
|
||||
params += '&dateTo='+$("#dateTo").val();
|
||||
|
||||
$("#iframex", window.parent.document).attr({src : src[0]+params});
|
||||
return false;
|
||||
}
|
||||
|
||||
function showNt(appUid)
|
||||
{
|
||||
var d = $('#m_'+appUid);
|
||||
|
||||
if (d.css('display') == 'block') {
|
||||
d.hide('slow');
|
||||
}
|
||||
else {
|
||||
d.show('slow');
|
||||
}
|
||||
}
|
||||
|
||||
function addNt(appUid)
|
||||
{
|
||||
$('textarea#note_text').val('');
|
||||
$( "#dialog-add-note" ).dialog({
|
||||
resizable: false,
|
||||
height:192,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Add Note": function() {
|
||||
var sendMail = document.getElementById('chkSendMail').checked;
|
||||
sendMail = (sendMail == true) ? '1' : '0';
|
||||
$(this).dialog("close");
|
||||
$.post(
|
||||
'../appProxy/postNote',
|
||||
{appUid : appUid,
|
||||
noteText: $('textarea#note_text').val(),
|
||||
swSendMail : sendMail},
|
||||
function(responseText) {
|
||||
updateNt(appUid);
|
||||
}
|
||||
);
|
||||
//redirect('home/startCase?id='+id);
|
||||
},
|
||||
Cancel: function() {
|
||||
$(this).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function addPanelSearch()
|
||||
{
|
||||
var urlFile = $('#imagenPanel').attr('src');
|
||||
var file = urlFile.split("/");
|
||||
var img = file.pop();
|
||||
var stylePanel = '';
|
||||
switch (img) {
|
||||
case 'down.png':
|
||||
src = '/images/simplified/up.png';
|
||||
$('#panelDown').attr({style: 'display: table; width: 95%;'});
|
||||
$('#panelDown').show();
|
||||
break;
|
||||
case 'up.png':
|
||||
src = '/images/simplified/down.png';
|
||||
$('#panelDown').attr({style: 'display:none width: 95%;'});
|
||||
$('#panelDown').hide();
|
||||
default:
|
||||
src = '/images/simplified/down.png';
|
||||
$('#panelDown').attr({style: 'display:none width: 95%;'});
|
||||
$('#panelDown').hide();
|
||||
break;
|
||||
}
|
||||
$('#imagenPanel').attr({src: src});
|
||||
}
|
||||
|
||||
function updateNt(appUid)
|
||||
{
|
||||
$.post(
|
||||
'../appProxy/getNotesList?appUid='+appUid,
|
||||
{start:0, limit:100},
|
||||
function(resp) {
|
||||
data = jQuery.parseJSON(resp);
|
||||
content = $('div#m_'+appUid);
|
||||
content.html('');
|
||||
|
||||
for (i=0; i<data.notes.length; i++) {
|
||||
r = data.notes[i];
|
||||
|
||||
s = '<div class="appMessage"><table border="0"><tr>' +
|
||||
'<td width="50" valign="top">'+
|
||||
'<img border="0" src="../users/users_ViewPhotoGrid?pUID='+r.USR_UID+'" width="40" height="40"/>' +
|
||||
'</td><td>' +
|
||||
'<h3>'+r.USR_FIRSTNAME+' '+r.USR_LASTNAME+' ('+r.USR_USERNAME+')</h3>' +
|
||||
'<p><pre>'+r.NOTE_CONTENT+'</pre>' +
|
||||
'<div class="appMessageDate">Posted at '+r.NOTE_DATE+'</div>' +
|
||||
'</td></tr></table></div>';
|
||||
|
||||
content.append(s);
|
||||
$('#n_'+appUid).show('slow');
|
||||
}
|
||||
d = $('#m_'+appUid);
|
||||
d.show('slow');
|
||||
}
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#loadmorebutton").click(function (){
|
||||
$('#loadmorebutton').html('<img src="/images/ajax-loader.gif" />');
|
||||
$.ajax({
|
||||
url: "getApps?t="+listType+"&start="+appListStart+"&limit="+appListLimit,
|
||||
success: function(html){
|
||||
appListStart += appListLimit;
|
||||
|
||||
if(jQuery.trim(html) != ''){
|
||||
$("#commentlist").append(html);
|
||||
$('#loadmorebutton').html('Load More');
|
||||
}
|
||||
else {
|
||||
$('#loadmorebutton').replaceWith('<center>No more applications to show.</center>');
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$("#dateFrom").datepicker({ dateFormat:'yy-mm-dd'});
|
||||
$("#dateTo").datepicker({ dateFormat:'yy-mm-dd'});
|
||||
|
||||
$("#comboProcess").val(process);
|
||||
$("#comboStatus").val(status);
|
||||
$("#searchText").val(search);
|
||||
$("#comboCategory").val(category);
|
||||
$("#comboUsers").val(user);
|
||||
$("#dateFrom").val(dateFrom);
|
||||
$("#dateTo").val(dateTo);
|
||||
|
||||
});
|
||||
{/literal}
|
||||
|
||||
var appListLimit = {$appListLimit};
|
||||
var appListStart = {$appListStart};
|
||||
var listType = '{$listType}';
|
||||
var process = '{$arraySearch[0]}';
|
||||
var status = '{$arraySearch[1]}';
|
||||
var search = '{$arraySearch[2]}';
|
||||
var category = '{$arraySearch[3]}';
|
||||
var user = '{$arraySearch[4]}';
|
||||
var dateFrom = '{$arraySearch[5]}';
|
||||
var dateTo = '{$arraySearch[6]}';
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body id='bodySearch' onload="resize()" onresize="resize()" >
|
||||
|
||||
<center>
|
||||
<div id="btn" style = "display: table; width: 550px; margin: 5px;">
|
||||
<center>
|
||||
<div style = "display: table; width: 95%;">
|
||||
<div style = "float: left;"> <b>{$categoryTitle}:</b>
|
||||
<select id="comboCategory" onchange="redirect();" style="width: 200px">
|
||||
{foreach from=$categoryValues key=k item=VALUE}
|
||||
<option value="{$VALUE[0]}">{$VALUE[1]}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div style = "float: right;"> <b>{$processTitle}:</b>
|
||||
<select id="comboProcess" onchange="redirect();" style="width: 200px">
|
||||
{foreach from=$processValues key=k item=VALUE}
|
||||
<option value="{$VALUE[0]}">{$VALUE[1]}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div style = "float: left;"> <b>{$statusTitle}: </b>
|
||||
<select id="comboStatus" onchange="redirect();" style="width: 200px">
|
||||
{foreach from=$statusValues key=k item=VALUE}
|
||||
<option value="{$VALUE[0]}">{$VALUE[1]}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div style = "float: right;">
|
||||
<input type="button" class="fontText" onclick="setTextSearch();" tabindex="2" value=" x ">
|
||||
</div>
|
||||
<div style = "float: right;"><b>{$searchTitle}:</b>
|
||||
<input type="text" size="27" maxlength="60" value="" id='searchText' placeholder="{$searchTitle}...">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id='panelDown' style = "display: none; width: 95%;">
|
||||
<div style = "float: left;"> <b>{$userTitle}: </b>
|
||||
<select id="comboUsers" onchange="redirect();" style="width: 400px">
|
||||
{foreach from=$userValues key=k item=VALUE}
|
||||
<option value="{$VALUE[0]}">{$VALUE[1]}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div style = "float: left;"><b>{$fromTitle} </b>
|
||||
<input id='dateFrom' type='text' readonly='true' size="10">
|
||||
<div style="display: none" class=demo-description></div>
|
||||
</div>
|
||||
<div style = "float: left;"><b> {$toTitle}
|
||||
<input id='dateTo' type='text' readonly='true' size="10">
|
||||
<div style="display: none" class=demo-description></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style = "display: table; width: 95%;">
|
||||
<div style = "float: left">
|
||||
<input type="button" class="fontText" onclick="redirect();" name="commit" tabindex="1" value="{$searchTitle}">
|
||||
</div>
|
||||
<div style = "float: right;">
|
||||
<a href="#" onclick="addPanelSearch(); return false;"><img id='imagenPanel' src="/images/simplified/down.png" border="0"></a>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<center>
|
||||
<div class="content-header" style="text-align:left">
|
||||
<h1 style="padding: 10px">{$title} ({$cases_count})</h1>
|
||||
<ul id="commentlist">
|
||||
{include file='home/applications.html'}
|
||||
</ul>
|
||||
|
||||
{if $cases_count > $appListLimit}
|
||||
<center>
|
||||
<a href="#" style="color:#1F98C7; font-size:12px; font-weight:bold;" id="loadmorebutton">Load More</a>
|
||||
</center>
|
||||
{/if}
|
||||
</div>
|
||||
</center>
|
||||
|
||||
<div id="dialog-add-note" title="Case Note" style="display:none">
|
||||
<p><!-- <span class="ui-icon ui-icon-document" style="float:left; margin:0 7px 20px 0;"></span> -->
|
||||
<span id="startAppTitle"/>
|
||||
<textarea id="note_text" rows="2" cols="22"></textarea>
|
||||
<div class="x-form-check-wrap" id="ext-gen160" style="font-size:11px">
|
||||
<input type="checkbox" name="chkSendMail" id="chkSendMail" autocomplete="off" class=" x-form-checkbox x-form-field" checked="">
|
||||
<label class="x-form-cb-label" for="chkSendMail" id="ext-gen161">Send email (Case Participants)</label>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
<br/>
|
||||
</body>
|
||||
</html>
|
||||
BIN
workflow/public_html/images/simplified/advancedSearch.png
Normal file
BIN
workflow/public_html/images/simplified/advancedSearch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
BIN
workflow/public_html/images/simplified/down.png
Normal file
BIN
workflow/public_html/images/simplified/down.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
workflow/public_html/images/simplified/up.png
Normal file
BIN
workflow/public_html/images/simplified/up.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user