Merge branch 'master' of github.com:colosa/processmaker
This commit is contained in:
@@ -1775,7 +1775,7 @@ class G
|
|||||||
}
|
}
|
||||||
|
|
||||||
$strContentAux = $strContentAux1 . $strContentAux;
|
$strContentAux = $strContentAux1 . $strContentAux;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5222,6 +5222,14 @@ class G
|
|||||||
|
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isUserFunction($functionName) {
|
||||||
|
$allFunctions = get_defined_functions();
|
||||||
|
if (!isset($allFunctions['user'])) {
|
||||||
|
$allFunctions['user'] = array();
|
||||||
|
}
|
||||||
|
return in_array(strtolower($functionName), $allFunctions['user']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -412,6 +412,9 @@ class AdditionalTables extends BaseAdditionalTables
|
|||||||
}
|
}
|
||||||
$stringOr .= ');';
|
$stringOr .= ');';
|
||||||
eval($stringOr);
|
eval($stringOr);
|
||||||
|
|
||||||
|
$oCriteriaCount = clone $oCriteria;
|
||||||
|
eval('$count = ' . $sClassPeerName . '::doCount($oCriteria);');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['sort'])) {
|
if (isset($_POST['sort'])) {
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ class pmTablesProxy extends HttpProxyController
|
|||||||
$table = $additionalTables->load( $httpData->id, true );
|
$table = $additionalTables->load( $httpData->id, true );
|
||||||
|
|
||||||
if ($filter != '') {
|
if ($filter != '') {
|
||||||
$result = $additionalTables::getAllData( $httpData->id, $start, $limit, true, $filter);
|
$result = $additionalTables->getAllData( $httpData->id, $start, $limit, true, $filter);
|
||||||
} else {
|
} else {
|
||||||
$result = $additionalTables->getAllData( $httpData->id, $start, $limit );
|
$result = $additionalTables->getAllData( $httpData->id, $start, $limit );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ if (isset ($_REQUEST ['action']) && isset($_REQUEST['sort']) && isset($_REQUEST[
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (! isset ($_REQUEST ['action'])) {
|
if (! isset ($_REQUEST ['action'])) {
|
||||||
$res ['success'] = false;
|
$res ['success'] = false;
|
||||||
$res ['message'] = 'You may request an action';
|
$res ['message'] = 'You may request an action';
|
||||||
print G::json_encode ($res);
|
print G::json_encode ($res);
|
||||||
die ();
|
die ();
|
||||||
}
|
}
|
||||||
if (! function_exists ($_REQUEST ['action'])) {
|
if (! function_exists ($_REQUEST['action']) || !G::isUserFunction($_REQUEST['action'])) {
|
||||||
$res ['success'] = false;
|
$res ['success'] = false;
|
||||||
$res ['message'] = 'The requested action does not exist';
|
$res ['message'] = 'The requested action does not exist';
|
||||||
print G::json_encode ($res);
|
print G::json_encode ($res);
|
||||||
@@ -471,49 +471,49 @@ function expandNode()
|
|||||||
function sortContent()
|
function sortContent()
|
||||||
{
|
{
|
||||||
extract(getExtJSParams());
|
extract(getExtJSParams());
|
||||||
|
|
||||||
$rootFolder = "/";
|
$rootFolder = "/";
|
||||||
|
|
||||||
$oPMFolder = new AppFolder();
|
$oPMFolder = new AppFolder();
|
||||||
|
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
|
||||||
$user = ($RBAC->userCanAccess('PM_ALLCASES') == 1)? '' : $_SESSION['USER_LOGGED'];
|
$user = ($RBAC->userCanAccess('PM_ALLCASES') == 1)? '' : $_SESSION['USER_LOGGED'];
|
||||||
|
|
||||||
$totalItems = 0;
|
$totalItems = 0;
|
||||||
$totalFolders = 0;
|
$totalFolders = 0;
|
||||||
$totalDocuments = 0;
|
$totalDocuments = 0;
|
||||||
|
|
||||||
if (!(isset($_POST['sendWhat']))) {
|
if (!(isset($_POST['sendWhat']))) {
|
||||||
$_POST['sendWhat'] = "both";
|
$_POST['sendWhat'] = "both";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['renderTree'])) {
|
if (isset($_POST['renderTree'])) {
|
||||||
$limit = 1000000;
|
$limit = 1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
$direction = "DESC";
|
$direction = "DESC";
|
||||||
if (isset($_POST['dir'])) {
|
if (isset($_POST['dir'])) {
|
||||||
$direction = $_POST['dir'];
|
$direction = $_POST['dir'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($_POST['sendWhat'] == "dirs") || ($_POST['sendWhat'] == "both")) {
|
if (($_POST['sendWhat'] == "dirs") || ($_POST['sendWhat'] == "both")) {
|
||||||
$folderListObj = $oPMFolder->getFolderList(
|
$folderListObj = $oPMFolder->getFolderList(
|
||||||
($_POST["node"] != "root")? (($_POST["node"] == "NA")? "" : $_POST["node"]) : $rootFolder,
|
($_POST["node"] != "root")? (($_POST["node"] == "NA")? "" : $_POST["node"]) : $rootFolder,
|
||||||
$limit,
|
$limit,
|
||||||
$start
|
$start
|
||||||
);
|
);
|
||||||
|
|
||||||
$folderList=$folderListObj['folders'];
|
$folderList=$folderListObj['folders'];
|
||||||
$totalFolders=$folderListObj['totalFoldersCount'];
|
$totalFolders=$folderListObj['totalFoldersCount'];
|
||||||
$totalItems+=count($folderList);
|
$totalItems+=count($folderList);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($_POST['sendWhat'] == "files") || ($_POST['sendWhat'] == "both")) {
|
if (($_POST['sendWhat'] == "files") || ($_POST['sendWhat'] == "both")) {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
|
||||||
$user = ($RBAC->userCanAccess('PM_ALLCASES') == 1)? '' : $_SESSION['USER_LOGGED'];
|
$user = ($RBAC->userCanAccess('PM_ALLCASES') == 1)? '' : $_SESSION['USER_LOGGED'];
|
||||||
|
|
||||||
$folderContentObj = $oPMFolder->getDirectoryContentSortedBy(
|
$folderContentObj = $oPMFolder->getDirectoryContentSortedBy(
|
||||||
($_POST["node"] != "root")? (($_POST["node"] == "NA")? "" : $_POST["node"]) : $rootFolder,
|
($_POST["node"] != "root")? (($_POST["node"] == "NA")? "" : $_POST["node"]) : $rootFolder,
|
||||||
array(),
|
array(),
|
||||||
@@ -526,15 +526,15 @@ function sortContent()
|
|||||||
$direction,
|
$direction,
|
||||||
(isset($_POST["sort"]))? $_POST["sort"]:"appDocCreateDate"
|
(isset($_POST["sort"]))? $_POST["sort"]:"appDocCreateDate"
|
||||||
);
|
);
|
||||||
|
|
||||||
$folderContent = $folderContentObj['documents'];
|
$folderContent = $folderContentObj['documents'];
|
||||||
$totalDocuments = $folderContentObj['totalDocumentsCount'];
|
$totalDocuments = $folderContentObj['totalDocumentsCount'];
|
||||||
$totalItems += count($folderContent);
|
$totalItems += count($folderContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
$processListTree = array();
|
$processListTree = array();
|
||||||
$tempTree = array();
|
$tempTree = array();
|
||||||
|
|
||||||
if (isset($folderList) && sizeof($folderList)>0) {
|
if (isset($folderList) && sizeof($folderList)>0) {
|
||||||
//$tempTree=array();
|
//$tempTree=array();
|
||||||
foreach ($folderList as $key => $obj) {
|
foreach ($folderList as $key => $obj) {
|
||||||
@@ -554,7 +554,7 @@ function sortContent()
|
|||||||
$tempTree ['is_chmodable'] =true;
|
$tempTree ['is_chmodable'] =true;
|
||||||
$tempTree ['is_readable'] =true;
|
$tempTree ['is_readable'] =true;
|
||||||
$tempTree ['is_deletable'] =true;
|
$tempTree ['is_deletable'] =true;
|
||||||
|
|
||||||
if ((isset($_POST['option']) )&& ($_POST['option'] == "gridDocuments")) {
|
if ((isset($_POST['option']) )&& ($_POST['option'] == "gridDocuments")) {
|
||||||
$tempTree ['icon'] = "/images/documents/extension/folder.png";
|
$tempTree ['icon'] = "/images/documents/extension/folder.png";
|
||||||
}
|
}
|
||||||
@@ -565,16 +565,16 @@ function sortContent()
|
|||||||
if ($_POST ['node'] == '/') {
|
if ($_POST ['node'] == '/') {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($folderContent)) {
|
if (isset($folderContent)) {
|
||||||
foreach ($folderContent as $key => $obj) {
|
foreach ($folderContent as $key => $obj) {
|
||||||
$mimeInformation = getMime($obj["APP_DOC_FILENAME"]);
|
$mimeInformation = getMime($obj["APP_DOC_FILENAME"]);
|
||||||
|
|
||||||
$tempTree["text"] = $obj["APP_DOC_FILENAME"];
|
$tempTree["text"] = $obj["APP_DOC_FILENAME"];
|
||||||
$tempTree["name"] = $obj["APP_DOC_FILENAME"];
|
$tempTree["name"] = $obj["APP_DOC_FILENAME"];
|
||||||
$tempTree["type"] = $mimeInformation["description"];
|
$tempTree["type"] = $mimeInformation["description"];
|
||||||
$tempTree["icon"] = $mimeInformation["icon"];
|
$tempTree["icon"] = $mimeInformation["icon"];
|
||||||
|
|
||||||
$tempTree ['appdocid'] = $obj['APP_DOC_UID'];
|
$tempTree ['appdocid'] = $obj['APP_DOC_UID'];
|
||||||
$tempTree ['id'] = $obj['APP_DOC_UID_VERSION'];
|
$tempTree ['id'] = $obj['APP_DOC_UID_VERSION'];
|
||||||
$tempTree ['cls'] = 'file';
|
$tempTree ['cls'] = 'file';
|
||||||
@@ -615,7 +615,7 @@ function sortContent()
|
|||||||
$tempTree ['owner_lastname'] = "";
|
$tempTree ['owner_lastname'] = "";
|
||||||
}
|
}
|
||||||
$tempTree ['deletelabel'] = $obj['DELETE_LABEL'];
|
$tempTree ['deletelabel'] = $obj['DELETE_LABEL'];
|
||||||
|
|
||||||
if ((isset($obj['DOWNLOAD_LABEL'])) && ($obj['DOWNLOAD_LABEL']!="")) {
|
if ((isset($obj['DOWNLOAD_LABEL'])) && ($obj['DOWNLOAD_LABEL']!="")) {
|
||||||
$labelgen=strtoupper(str_replace(".","",$obj['DOWNLOAD_LABEL']));
|
$labelgen=strtoupper(str_replace(".","",$obj['DOWNLOAD_LABEL']));
|
||||||
$tempTree ['downloadLabel'.$labelgen] = $obj['DOWNLOAD_LABEL'];
|
$tempTree ['downloadLabel'.$labelgen] = $obj['DOWNLOAD_LABEL'];
|
||||||
@@ -623,7 +623,7 @@ function sortContent()
|
|||||||
}
|
}
|
||||||
$tempTree ['downloadLabel'] = $obj['DOWNLOAD_LABEL'];
|
$tempTree ['downloadLabel'] = $obj['DOWNLOAD_LABEL'];
|
||||||
$tempTree ['downloadLink'] = $obj['DOWNLOAD_LINK'];
|
$tempTree ['downloadLink'] = $obj['DOWNLOAD_LINK'];
|
||||||
|
|
||||||
if ((isset($obj['DOWNLOAD_LABEL1'])) && ($obj['DOWNLOAD_LABEL1']!="")) {
|
if ((isset($obj['DOWNLOAD_LABEL1'])) && ($obj['DOWNLOAD_LABEL1']!="")) {
|
||||||
$labelgen=strtoupper(str_replace(".","",$obj['DOWNLOAD_LABEL1']));
|
$labelgen=strtoupper(str_replace(".","",$obj['DOWNLOAD_LABEL1']));
|
||||||
$tempTree ['downloadLabel'.$labelgen] = $obj['DOWNLOAD_LABEL1'];
|
$tempTree ['downloadLabel'.$labelgen] = $obj['DOWNLOAD_LABEL1'];
|
||||||
@@ -631,30 +631,30 @@ function sortContent()
|
|||||||
}
|
}
|
||||||
$tempTree ['downloadLabel1'] = $obj['DOWNLOAD_LABEL1'];
|
$tempTree ['downloadLabel1'] = $obj['DOWNLOAD_LABEL1'];
|
||||||
$tempTree ['downloadLink1'] = $obj['DOWNLOAD_LINK1'];
|
$tempTree ['downloadLink1'] = $obj['DOWNLOAD_LINK1'];
|
||||||
|
|
||||||
$tempTree ['appDocUidVersion'] = $obj['APP_DOC_UID_VERSION'];
|
$tempTree ['appDocUidVersion'] = $obj['APP_DOC_UID_VERSION'];
|
||||||
|
|
||||||
$tempTree ['is_readable'] = true;
|
$tempTree ['is_readable'] = true;
|
||||||
$tempTree ['is_file'] = true;
|
$tempTree ['is_file'] = true;
|
||||||
$tempTree["outDocGenerate"] = "";
|
$tempTree["outDocGenerate"] = "";
|
||||||
|
|
||||||
if (isset($obj["OUT_DOC_GENERATE"])) {
|
if (isset($obj["OUT_DOC_GENERATE"])) {
|
||||||
switch ($obj["OUT_DOC_GENERATE"]) {
|
switch ($obj["OUT_DOC_GENERATE"]) {
|
||||||
case "PDF":
|
case "PDF":
|
||||||
case "DOC":
|
case "DOC":
|
||||||
$mimeInformation = getMime($obj["APP_DOC_FILENAME"] . "." . strtolower($obj["OUT_DOC_GENERATE"]));
|
$mimeInformation = getMime($obj["APP_DOC_FILENAME"] . "." . strtolower($obj["OUT_DOC_GENERATE"]));
|
||||||
|
|
||||||
$tempTree["text"] = $obj["APP_DOC_FILENAME"] . "." . strtolower($obj["OUT_DOC_GENERATE"]);
|
$tempTree["text"] = $obj["APP_DOC_FILENAME"] . "." . strtolower($obj["OUT_DOC_GENERATE"]);
|
||||||
$tempTree["name"] = $obj["APP_DOC_FILENAME"] . "." . strtolower($obj["OUT_DOC_GENERATE"]);
|
$tempTree["name"] = $obj["APP_DOC_FILENAME"] . "." . strtolower($obj["OUT_DOC_GENERATE"]);
|
||||||
$tempTree["type"] = $mimeInformation["description"];
|
$tempTree["type"] = $mimeInformation["description"];
|
||||||
$tempTree["icon"] = $mimeInformation["icon"];
|
$tempTree["icon"] = $mimeInformation["icon"];
|
||||||
$tempTree["appDocFileName"] = $tempTree["name"];
|
$tempTree["appDocFileName"] = $tempTree["name"];
|
||||||
|
|
||||||
$tempTree["downloadLabel"] = $tempTree["downloadLabel" . $obj["OUT_DOC_GENERATE"]];
|
$tempTree["downloadLabel"] = $tempTree["downloadLabel" . $obj["OUT_DOC_GENERATE"]];
|
||||||
$tempTree["downloadLink"] = $tempTree["downloadLink" . $obj["OUT_DOC_GENERATE"]];
|
$tempTree["downloadLink"] = $tempTree["downloadLink" . $obj["OUT_DOC_GENERATE"]];
|
||||||
|
|
||||||
$tempTree["id"] = $tempTree["id"] . "_" . $obj["OUT_DOC_GENERATE"];
|
$tempTree["id"] = $tempTree["id"] . "_" . $obj["OUT_DOC_GENERATE"];
|
||||||
|
|
||||||
$processListTree[] = $tempTree;
|
$processListTree[] = $tempTree;
|
||||||
break;
|
break;
|
||||||
case "BOTH":
|
case "BOTH":
|
||||||
@@ -664,20 +664,20 @@ function sortContent()
|
|||||||
$strExpander = $strExpander . "<br />";
|
$strExpander = $strExpander . "<br />";
|
||||||
$mimeInformation = getMime($obj["APP_DOC_FILENAME"] . ".doc");
|
$mimeInformation = getMime($obj["APP_DOC_FILENAME"] . ".doc");
|
||||||
$strExpander = $strExpander . "<a href=\"javascript:;\" onclick=\"openActionDialog(this, 'download', 'doc'); return false;\" style=\"color: #000000; text-decoration: none;\"><img src=\"/images/documents/extension/doc.png\" style=\"margin-left: 25px; border: 0;\" alt=\"\" /> <b>" . $obj["APP_DOC_FILENAME"] . ".doc</b> (" . $mimeInformation["description"] . ")</a>";
|
$strExpander = $strExpander . "<a href=\"javascript:;\" onclick=\"openActionDialog(this, 'download', 'doc'); return false;\" style=\"color: #000000; text-decoration: none;\"><img src=\"/images/documents/extension/doc.png\" style=\"margin-left: 25px; border: 0;\" alt=\"\" /> <b>" . $obj["APP_DOC_FILENAME"] . ".doc</b> (" . $mimeInformation["description"] . ")</a>";
|
||||||
|
|
||||||
$tempTree["outDocGenerate"] = $strExpander;
|
$tempTree["outDocGenerate"] = $strExpander;
|
||||||
|
|
||||||
$tempTree["text"] = $obj["APP_DOC_FILENAME"];
|
$tempTree["text"] = $obj["APP_DOC_FILENAME"];
|
||||||
$tempTree["name"] = $obj["APP_DOC_FILENAME"];
|
$tempTree["name"] = $obj["APP_DOC_FILENAME"];
|
||||||
$tempTree["type"] = "";
|
$tempTree["type"] = "";
|
||||||
$tempTree["icon"] = "/images/documents/extension/document.png";
|
$tempTree["icon"] = "/images/documents/extension/document.png";
|
||||||
$tempTree["appDocFileName"] = $tempTree["name"];
|
$tempTree["appDocFileName"] = $tempTree["name"];
|
||||||
|
|
||||||
//$tempTree["downloadLabel"] = $obj["DOWNLOAD_LABEL"];
|
//$tempTree["downloadLabel"] = $obj["DOWNLOAD_LABEL"];
|
||||||
//$tempTree["downloadLink"] = $obj["DOWNLOAD_LINK"];
|
//$tempTree["downloadLink"] = $obj["DOWNLOAD_LINK"];
|
||||||
|
|
||||||
$tempTree["id"] = $tempTree["id"] . "_" . $obj["OUT_DOC_GENERATE"];
|
$tempTree["id"] = $tempTree["id"] . "_" . $obj["OUT_DOC_GENERATE"];
|
||||||
|
|
||||||
$processListTree[] = $tempTree;
|
$processListTree[] = $tempTree;
|
||||||
break;
|
break;
|
||||||
//case "NOFILE":
|
//case "NOFILE":
|
||||||
@@ -690,27 +690,27 @@ function sortContent()
|
|||||||
) {
|
) {
|
||||||
$ext = $arrayMatch[1];
|
$ext = $arrayMatch[1];
|
||||||
$mimeInformation = getMime($obj["APP_DOC_FILENAME"] . ".$ext");
|
$mimeInformation = getMime($obj["APP_DOC_FILENAME"] . ".$ext");
|
||||||
|
|
||||||
$tempTree["text"] = $obj["APP_DOC_FILENAME"] . ".$ext";
|
$tempTree["text"] = $obj["APP_DOC_FILENAME"] . ".$ext";
|
||||||
$tempTree["name"] = $obj["APP_DOC_FILENAME"] . ".$ext";
|
$tempTree["name"] = $obj["APP_DOC_FILENAME"] . ".$ext";
|
||||||
$tempTree["type"] = $mimeInformation["description"];
|
$tempTree["type"] = $mimeInformation["description"];
|
||||||
$tempTree["icon"] = $mimeInformation["icon"];
|
$tempTree["icon"] = $mimeInformation["icon"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$processListTree[] = $tempTree;
|
$processListTree[] = $tempTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tempTree = array();
|
$tempTree = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((isset($_POST['option'])) && ($_POST['option'] == "gridDocuments")) {
|
if ((isset($_POST['option'])) && ($_POST['option'] == "gridDocuments")) {
|
||||||
$processListTreeTemp["totalCount"] = $totalFolders + $totalDocuments;
|
$processListTreeTemp["totalCount"] = $totalFolders + $totalDocuments;
|
||||||
$processListTreeTemp['msg']='correct reload';
|
$processListTreeTemp['msg']='correct reload';
|
||||||
$processListTreeTemp['items']=$processListTree;
|
$processListTreeTemp['items']=$processListTree;
|
||||||
$processListTree = $processListTreeTemp;
|
$processListTree = $processListTreeTemp;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo G::json_encode($processListTree);
|
echo G::json_encode($processListTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1513,7 +1513,7 @@ function uploadExternalDocument()
|
|||||||
$aID=array('INP_DOC_DESTINATION_PATH'=>$folderStructure['PATH']);
|
$aID=array('INP_DOC_DESTINATION_PATH'=>$folderStructure['PATH']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Get the Custom Folder ID (create if necessary)
|
//Get the Custom Folder ID (create if necessary)
|
||||||
$oFolder=new AppFolder();
|
$oFolder=new AppFolder();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ if (! isset( $_REQUEST['action'] )) {
|
|||||||
print G::json_encode( $res );
|
print G::json_encode( $res );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
if (! function_exists( $_REQUEST['action'] )) {
|
if (! function_exists( $_REQUEST['action'] ) || !G::isUserFunction($_REQUEST['action'])) {
|
||||||
$res['success'] = 'failure';
|
$res['success'] = 'failure';
|
||||||
$res['message'] = 'The requested action does not exist';
|
$res['message'] = 'The requested action does not exist';
|
||||||
header( "Content-Type: application/json" );
|
header( "Content-Type: application/json" );
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ if (! isset( $_REQUEST['action'] )) {
|
|||||||
print G::json_encode( $res );
|
print G::json_encode( $res );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
if (! function_exists( $_REQUEST['action'] )) {
|
if (! function_exists( $_REQUEST['action'] ) || !G::isUserFunction($_REQUEST['action'])) {
|
||||||
$res['success'] = 'failure';
|
$res['success'] = 'failure';
|
||||||
$res['message'] = G::LoadTranslation( 'ID_REQUEST_ACTION_NOT_EXIST' );
|
$res['message'] = G::LoadTranslation( 'ID_REQUEST_ACTION_NOT_EXIST' );
|
||||||
print G::json_encode( $res );
|
print G::json_encode( $res );
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ if (! isset( $_REQUEST['action'] )) {
|
|||||||
print G::json_encode( $return );
|
print G::json_encode( $return );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
if (! function_exists( $_REQUEST['action'] )) {
|
if (! function_exists( $_REQUEST['action'] ) || !G::isUserFunction($_REQUEST['action'])) {
|
||||||
$return['success'] = 'failure';
|
$return['success'] = 'failure';
|
||||||
$return['message'] = 'The requested action doesn\'t exists';
|
$return['message'] = 'The requested action doesn\'t exists';
|
||||||
print G::json_encode( $return );
|
print G::json_encode( $return );
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Ext.onReady(function(){
|
|||||||
clearTextButton = new Ext.Action({
|
clearTextButton = new Ext.Action({
|
||||||
text: 'X',
|
text: 'X',
|
||||||
ctCls:'pm_search_x_button',
|
ctCls:'pm_search_x_button',
|
||||||
handler: GridByDefault
|
handler: GridByDefault
|
||||||
});
|
});
|
||||||
|
|
||||||
//This loop loads columns and fields to store and column model
|
//This loop loads columns and fields to store and column model
|
||||||
@@ -463,14 +463,15 @@ onMessageContextMenu = function (grid, rowIndex, e) {
|
|||||||
/////JS FUNCTIONS
|
/////JS FUNCTIONS
|
||||||
|
|
||||||
//Do Search Function
|
//Do Search Function
|
||||||
|
|
||||||
DoSearch = function(){
|
DoSearch = function(){
|
||||||
infoGrid.store.load({params: {textFilter: searchText.getValue()}});
|
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
||||||
|
infoGrid.store.load({params: {start : 0 , limit : pageSize }});
|
||||||
};
|
};
|
||||||
|
|
||||||
//Load Grid By Default
|
//Load Grid By Default
|
||||||
GridByDefault = function(){
|
GridByDefault = function(){
|
||||||
searchText.reset();
|
searchText.reset();
|
||||||
|
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
||||||
infoGrid.store.load();
|
infoGrid.store.load();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user