WYSIWYG EDITOR json changes
WYSIWYG EDITOR json changes
This commit is contained in:
@@ -39,7 +39,7 @@ try {
|
|||||||
//$oJSON = new Services_JSON();
|
//$oJSON = new Services_JSON();
|
||||||
|
|
||||||
if (isset( $_REQUEST['data'] )) {
|
if (isset( $_REQUEST['data'] )) {
|
||||||
$oData = G::json_decode( stripslashes( $_REQUEST['data'] ) );
|
$oData = Bootstrap::json_decode( stripslashes( $_REQUEST['data'] ) );
|
||||||
//$oData = $oJSON->decode( stripslashes( $_REQUEST['data'] ) );
|
//$oData = $oJSON->decode( stripslashes( $_REQUEST['data'] ) );
|
||||||
$sOutput = '';
|
$sOutput = '';
|
||||||
$sTask = '';
|
$sTask = '';
|
||||||
@@ -319,7 +319,7 @@ try {
|
|||||||
$oProcessMap->processFilesManager( $oData->pro_uid );
|
$oProcessMap->processFilesManager( $oData->pro_uid );
|
||||||
break;
|
break;
|
||||||
case 'exploreDirectory':
|
case 'exploreDirectory':
|
||||||
$objData = G::json_decode( $_REQUEST['data'] );
|
$objData = Bootstrap::json_decode( $_REQUEST['data'] );
|
||||||
$_SESSION['PFMDirectory'] = $objData->{'main_directory'};
|
$_SESSION['PFMDirectory'] = $objData->{'main_directory'};
|
||||||
$oProcessMap->exploreDirectory( $oData->pro_uid, $oData->main_directory, $oData->directory );
|
$oProcessMap->exploreDirectory( $oData->pro_uid, $oData->main_directory, $oData->directory );
|
||||||
break;
|
break;
|
||||||
@@ -421,8 +421,7 @@ try {
|
|||||||
$oResponse->sLink = '../processes/downloadPML?id=' . $oData->pro_uid . '&s=' . $sessionId;
|
$oResponse->sLink = '../processes/downloadPML?id=' . $oData->pro_uid . '&s=' . $sessionId;
|
||||||
}
|
}
|
||||||
$oResponse->bExists = $bExists;
|
$oResponse->bExists = $bExists;
|
||||||
$oJSON = new Services_JSON();
|
echo Bootstrap::json_encode( $oResponse );
|
||||||
echo $oJSON->encode( $oResponse );
|
|
||||||
break;
|
break;
|
||||||
case 'editFile':
|
case 'editFile':
|
||||||
//echo $_REQUEST['filename'];
|
//echo $_REQUEST['filename'];
|
||||||
@@ -450,7 +449,7 @@ try {
|
|||||||
// $oHeadPublisher->clearScripts();
|
// $oHeadPublisher->clearScripts();
|
||||||
// $oHeadPublisher->addScriptFile( '/js/tinymce/jscripts/tiny_mce/tiny_mce.js' );
|
// $oHeadPublisher->addScriptFile( '/js/tinymce/jscripts/tiny_mce/tiny_mce.js' );
|
||||||
// $jscriptCode .= '
|
// $jscriptCode .= '
|
||||||
//
|
//
|
||||||
//// var tmpArrToStr = Array.prototype.toStr;
|
//// var tmpArrToStr = Array.prototype.toStr;
|
||||||
//// var tmpObjToStr = Object.prototype.toStr;
|
//// var tmpObjToStr = Object.prototype.toStr;
|
||||||
//// var tmpObjConcat = Object.prototype.concat;
|
//// var tmpObjConcat = Object.prototype.concat;
|
||||||
@@ -470,24 +469,24 @@ try {
|
|||||||
//// document.body.onload = function(){
|
//// document.body.onload = function(){
|
||||||
// alert ("hello");
|
// alert ("hello");
|
||||||
// tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce";
|
// tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce";
|
||||||
// tinyMCE.init({
|
// tinyMCE.init({
|
||||||
// theme : "advanced",
|
// theme : "advanced",
|
||||||
// plugins : "fullpage",
|
// plugins : "fullpage",
|
||||||
// mode : "specific_textareas",
|
// mode : "specific_textareas",
|
||||||
// editor_selector : "tmceEditor",
|
// editor_selector : "tmceEditor",
|
||||||
// width : "640",
|
// width : "640",
|
||||||
// height : "300",
|
// height : "300",
|
||||||
// theme_advanced_buttons3_add : "fullpage"
|
// theme_advanced_buttons3_add : "fullpage"
|
||||||
// });
|
// });
|
||||||
//// alert ("goodbye");
|
//// alert ("goodbye");
|
||||||
//// }
|
//// }
|
||||||
// ';
|
// ';
|
||||||
// $oHeadPublisher->addScriptCode($jscriptCode);
|
// $oHeadPublisher->addScriptCode($jscriptCode);
|
||||||
$_REQUEST['fcontent'] = $fcontent;
|
$_REQUEST['fcontent'] = $fcontent;
|
||||||
//if($extion[count($extion)-1]=='html' || $extion[count($extion)-1]=='txt'){
|
//if($extion[count($extion)-1]=='html' || $extion[count($extion)-1]=='txt'){
|
||||||
$aData = Array ( 'pro_uid' => $_REQUEST['pro_uid'],'fcontent' => $fcontent,'filename' => $_REQUEST['filename'] );
|
$aData = Array ( 'pro_uid' => $_REQUEST['pro_uid'],'fcontent' => $fcontent,'filename' => $_REQUEST['filename'] );
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'processes/processes_FileEdit', '', $aData );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'processes/processes_FileEdit', '', $aData );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
// $G_PUBLISH->AddContent( 'view', 'processes/processesFileEditEmail' );
|
// $G_PUBLISH->AddContent( 'view', 'processes/processesFileEditEmail' );
|
||||||
// G::RenderPage( 'publish', 'blank' );
|
// G::RenderPage( 'publish', 'blank' );
|
||||||
break;
|
break;
|
||||||
@@ -525,7 +524,7 @@ try {
|
|||||||
case 'getVariableList':
|
case 'getVariableList':
|
||||||
G::LoadClass('xmlfield_InputPM');
|
G::LoadClass('xmlfield_InputPM');
|
||||||
$proUid= isset( $_REQUEST['process'] )?$_REQUEST['process']:'';
|
$proUid= isset( $_REQUEST['process'] )?$_REQUEST['process']:'';
|
||||||
$queryText= isset( $_REQUEST['queryText'] )?$_REQUEST['queryText']:'';
|
$queryText= isset( $_REQUEST['queryText'] )?$_REQUEST['queryText']:'';
|
||||||
if ($_REQUEST['type']=='system'){
|
if ($_REQUEST['type']=='system'){
|
||||||
$isSystem = true;
|
$isSystem = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -545,9 +544,8 @@ try {
|
|||||||
} else {
|
} else {
|
||||||
$aVariables[] = $aFields[$key];
|
$aVariables[] = $aFields[$key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$oJSON = new Services_JSON();
|
echo Bootstrap::json_encode( $aVariables );
|
||||||
echo $oJSON->encode( $aVariables );
|
|
||||||
break;
|
break;
|
||||||
case 'getVariablePrefix':
|
case 'getVariablePrefix':
|
||||||
$_REQUEST['prefix'] = $_REQUEST['prefix']!=null?$_REQUEST['prefix']:'ID_TO_STRING';
|
$_REQUEST['prefix'] = $_REQUEST['prefix']!=null?$_REQUEST['prefix']:'ID_TO_STRING';
|
||||||
@@ -607,8 +605,7 @@ try {
|
|||||||
}
|
}
|
||||||
$response = new stdclass();
|
$response = new stdclass();
|
||||||
$response->casesNumRec = $casesNumRec;
|
$response->casesNumRec = $casesNumRec;
|
||||||
$json = new Services_JSON();
|
echo Bootstrap::json_encode( $response );
|
||||||
$sOutput = $json->encode( $response );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (isset( $sOutput )) {
|
if (isset( $sOutput )) {
|
||||||
|
|||||||
Reference in New Issue
Block a user