Merge remote-tracking branch 'upstream/master' into pm_wysiwyg

This commit is contained in:
Gustavo Cruz
2012-12-03 17:27:14 -04:00
25 changed files with 892 additions and 166 deletions

View File

@@ -0,0 +1,69 @@
/**
* Name: editor_plugin_src.js (for pmSimpleUploader tinyMCE plugin)
**/
(function(){
var strPluginURL;
tinymce.create('tinymce.plugins.pmSimpleUploaderPlugin', {
init: function(ed, url)
{
strPluginURL = url; // store the URL for future use..
ed.addCommand('mcepmSimpleUploader', function() {
pmSimpleUploader();
});
ed.addButton('pmSimpleUploader', {
title: 'pmSimpleUploader',
label : 'Upload File',
cmd: 'mcepmSimpleUploader',
image: url + '/img/pmSimpleUploader.png'
});
},
createControl: function(n, cm) {
return null;
},
getPluginURL: function() {
return strPluginURL;
}
});
tinymce.PluginManager.add('pmSimpleUploader', tinymce.plugins.pmSimpleUploaderPlugin);
})();
// this function can get called from the plugin inint (above) or from the callback on advlink/advimg plugins..
// in the latter case, win and type will be set.. In the rist case, we will just update the main editor window
// with the path of the uploaded file
function pmSimpleUploader(field_name, url, type, win) {
var strPluginPath = tinyMCE.activeEditor.plugins.pmSimpleUploader.getPluginURL(); // get the path to the uploader plugin
var strUploaderURL = strPluginPath + "/uploader.php"; // generate the path to the uploader script
var strUploadPath = tinyMCE.activeEditor.getParam('plugin_pmSimpleUploader_upload_path'); // get the relative upload path
var strSubstitutePath = tinyMCE.activeEditor.getParam('plugin_pmSimpleUploader_upload_substitute_path'); // get the path we'll substitute for the for the upload path (i.e. fully qualified)
if (strUploaderURL.indexOf("?") < 0){ // if we were called without any GET params
strUploaderURL = strUploaderURL + "?type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath; // add our own params
} else {
strUploaderURL = strUploaderURL + "&type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath;
}
tinyMCE.activeEditor.windowManager.open({ // open the plugin popup
file : strUploaderURL,
title : 'Upload from file',
width : 500,
height : 100,
resizable : "yes",
inline : 1, // This parameter only has an effect if you use the inlinepopups plugin!
close_previous : "no"
}, {
window : win,
input : field_name
});
return false;
}
// This function will get called when the uploader is done uploading the file and ready to update
// calling dialog and close the upload popup
// strReturnURL should be the string with the path to the uploaded file
function closePluginPopup(){
tinyMCEPopup.close(); // close popup window
}
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceSetContent', false, serializedHTML);
}

View File

@@ -0,0 +1,83 @@
/**
* Name: editor_plugin_src.js (for pmVariablePicker tinyMCE plugin)
**/
(function(){
var strPluginURL;
tinymce.create('tinymce.plugins.pmVariablePickerPlugin', {
init: function(ed, url)
{
strPluginURL = url; // store the URL for future use..
ed.addCommand('mcepmVariablePicker', function() {
pmVariablePicker();
});
ed.addButton('pmVariablePicker', {
title: 'pmVariablePicker',
label : ' @#',
cmd: 'mcepmVariablePicker',
image: url + '/img/picker.png'
});
},
createControl: function(n, cm) {
return null;
},
getPluginURL: function() {
return strPluginURL;
}
});
tinymce.PluginManager.add('pmVariablePicker', tinymce.plugins.pmVariablePickerPlugin);
})();
// this function can get called from the plugin inint (above) or from the callback on advlink/advimg plugins..
// in the latter case, win and type will be set.. In the rist case, we will just update the main editor window
// with the path of the uploaded file
function pmVariablePicker(field_name, url, type, win) {
var uloc=String(location);
//alert(uloc);
var new_text = uloc.split('/');
var loc='/'+new_text[3]+'/'+new_text[4]+'/'+new_text[5]+'/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@&&sProcess='+tinyMCE.activeEditor.processID;
var strPluginPath = tinyMCE.activeEditor.plugins.pmVariablePicker.getPluginURL(); // get the path to the uploader plugin
var strUploaderURL = strPluginPath + "/uploader.php"; // generate the path to the uploader script
var strUploadPath = tinyMCE.activeEditor.getParam('plugin_pmVariablePicker_upload_path'); // get the relative upload path
var strSubstitutePath = tinyMCE.activeEditor.getParam('plugin_pmVariablePicker_upload_substitute_path'); // get the path we'll substitute for the for the upload path (i.e. fully qualified)
if (strUploaderURL.indexOf("?") < 0){ // if we were called without any GET params
strUploaderURL = strUploaderURL + "?type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath; // add our own params
} else {
strUploaderURL = strUploaderURL + "&type=" + type + "&d=" + strUploadPath + "&subs=" + strSubstitutePath;
}
//tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker'
tinyMCE.activeEditor.windowManager.open({ // open the plugin popup
//file : '/sysworkflow/en/classic/controls/varsAjax?displayOption=tinyMCE&sSymbol=@@',
file : loc,
title : 'Upload Variable',
width : '600px',
height : '330px',
resizable : "yes",
scrollbars : "no",
overflow : false,
inline : 1, // This parameter only has an effect if you use the inlinepopups plugin!
close_previous : "no"
}, {
window : win,
input : field_name
});
return false;
}
// This function will get called when the uploader is done uploading the file and ready to update
// calling dialog and close the upload popup
// strReturnURL should be the string with the path to the uploaded file
function closePluginPopup(){
tinyMCEPopup.close(); // close popup window
}
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
}
function insertFormVar(fieldName,serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
closePluginPopup();
}

View File

@@ -220,8 +220,8 @@ class Bootstrap
}
$smarty = new Smarty ();
$smarty->compile_dir = g::sys_get_temp_dir ();
$smarty->cache_dir = g::sys_get_temp_dir ();
$smarty->compile_dir = Bootstrap::sys_get_temp_dir ();
$smarty->cache_dir = Bootstrap::sys_get_temp_dir ();
$smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs';
$smarty->template_dir = PATH_TEMPLATE;
@@ -888,47 +888,37 @@ class Bootstrap
* @return string
*/
public function streamJSTranslationFile($filename, $locale = 'en') {
header ( 'Content-Type: text/javascript' );
$defaultTranslations = Array ();
$foreignTranslations = Array ();
if (! Bootstrap::LoadTranslationObject ( $locale )) {
header ( 'Cache-Control: no-cache' );
header ( 'Pragma: no-cache' );
return;
}
//if the default translations table doesn't exist we can't proceed
if (! is_file( PATH_LANGUAGECONT . 'translation.en' )) {
return ;
}
//load the translations table
require_once (PATH_LANGUAGECONT . 'translation.en');
$defaultTranslations = $translation;
global $translation;
//if some foreign language was requested and its translation file exists
if ($locale != 'en' && file_exists( PATH_LANGUAGECONT . 'translation.' . $locale )) {
require_once (PATH_LANGUAGECONT . 'translation.' . $locale); //load the foreign translations table
$foreignTranslations = $translation;
}
// if userAgent (BROWSER) is MSIE we need special headers to avoid MSIE
// behaivor.
$userAgent = strtolower ( $_SERVER ['HTTP_USER_AGENT'] );
if (file_exists ( $filename )) {
$mtime = filemtime ( $filename );
} else {
$mtime = date ( 'U' );
}
if (defined( "SHOW_UNTRANSLATED_AS_TAG" ) && SHOW_UNTRANSLATED_AS_TAG != 0) {
$translation = $foreignTranslations;
} else {
$translation = array_merge( $defaultTranslations, $foreignTranslations );
}
$gmt_mtime = gmdate ( "D, d M Y H:i:s", $mtime ) . " GMT";
header ( 'Pragma: cache' );
header ( 'ETag: "' . md5 ( $mtime . $filename ) . '"' );
header ( "Last-Modified: " . $gmt_mtime );
header ( 'Cache-Control: public' );
header ( "Expires: " . gmdate ( "D, d M Y H:i:s", time () + 30 * 60 * 60 * 24 ) . " GMT" ); // 1
// month
if (isset ( $_SERVER ['HTTP_IF_MODIFIED_SINCE'] )) {
if ($_SERVER ['HTTP_IF_MODIFIED_SINCE'] == $gmt_mtime) {
header ( 'HTTP/1.1 304 Not Modified' );
exit ();
}
}
$calendarJs = '';
$calendarJsFile = PATH_GULLIVER_HOME . "js/widgets/js-calendar/lang/" . $locale .".js";
if (! file_exists($calendarJsFile)) {
$calendarJsFile = PATH_GULLIVER_HOME . "js/widgets/js-calendar/lang/en.js";
}
$calendarJs = file_get_contents($calendarJsFile) . "\n";
if (isset ( $_SERVER ['HTTP_IF_NONE_MATCH'] )) {
if (str_replace ( '"', '', stripslashes ( $_SERVER ['HTTP_IF_NONE_MATCH'] ) ) == md5 ( $mtime . $filename )) {
header ( "HTTP/1.1 304 Not Modified" );
exit ();
}
}
return 'var TRANSLATIONS = ' . Bootstrap::json_encode ( $translation ) . ";\n";
return $calendarJs . 'var TRANSLATIONS = ' . Bootstrap::json_encode( $translation ) . ';' ;
}
/**

View File

@@ -76,14 +76,14 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
*/
public function attachEvents ($element)
{
$editorDefinition = 'tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce"; ';
switch ($this->editorType){
case 'EMAIL_TEMPLATE':
$editorDefinition .= '
// is necessary the process uid variable in order to load the picker correctly
var formProcessID = document.getElementById("form[pro_uid]").value;
var formProcessID = document.getElementById("form[pro_uid]").value;
tinyMCE.init({
theme : "advanced",
plugins : "advhr,advimage,advlink,advlist,autolink,autoresize,autosave,contextmenu,directionality,emotions,example,example_dependency,fullpage,fullscreen,iespell,inlinepopups,insertdatetime,layer,legacyoutput,lists,media,nonbreaking,noneditable,pagebreak,paste,preview,print,save,searchreplace,spellchecker,style,tabfocus,table,template,visualblocks,visualchars,wordcount,xhtmlxtras,pmSimpleUploader,pmVariablePicker",
@@ -91,9 +91,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
editor_selector : "tmceEditor",
width : 760,
height : "'.$this->height.'",
//theme_advanced_buttons1 : "pmSimpleUploader,|,pmVariablePicker,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull",
//theme_advanced_buttons2 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull",
theme_advanced_buttons1 : "pmSimpleUploader,|,pmVariablePicker,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,cut,copy,paste,|,bullist,numlist,|,outdent,indent,blockquote",
theme_advanced_buttons2 : "tablecontrols,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,code",
oninit: function (){
@@ -115,7 +113,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
';
break;
case 'OUTPUT_DOCUMENT':
$editorDefinition .= '
$editorDefinition .= '
// is necessary the process uid variable in order to load the picker correctly
var formProcessID = document.getElementById("form[PRO_UID]").value;
tinyMCE.init({
@@ -125,13 +123,11 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
editor_selector : "tmceEditor",
width : "770",
height : "305",
//theme_advanced_buttons1 : "pmSimpleUploader,|,pmVariablePicker",
//theme_advanced_buttons2 : "fontselect,bold,italic,underline,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,numlist,bullist,|,code",
theme_advanced_buttons1 : "pmSimpleUploader,|,pmVariablePicker,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,cut,copy,paste,|,bullist,numlist,|,outdent,indent,blockquote",
theme_advanced_buttons2 : "tablecontrols,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,code",
oninit: function (){
tinyMCE.activeEditor.processID=formProcessID;
tinyMCE.activeEditor.processID=formProcessID;
},
onchange_callback: function(inst) {
if(inst.isDirty()) {
@@ -154,9 +150,9 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
editor_selector : "tmceEditor",
width : "700",
height : "300",
theme_advanced_buttons1 : "pmSimpleUploader,|,pmVariablePicker,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,cut,copy,paste,|,bullist,numlist",
theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,cut,copy,paste,|,bullist,numlist",
theme_advanced_buttons2 : "outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,code",
skin : "o2k7",
skin_variant : "silver",
@@ -176,7 +172,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
return true;
}
});
';
break;
default:
@@ -188,7 +184,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
editor_selector : "tmceEditor",
width : "'. $this->width. '",
height : "'. $this->height. '",
theme_advanced_buttons3_add : "fullpage",
theme_advanced_buttons3_add : "fullpage",
handle_event_callback : function(e) {
if(this.isDirty()) {
this.save();

View File

@@ -86,8 +86,8 @@ class spoolRun
$this->ExceptionCode['WARNING'] = 2;
$this->ExceptionCode['NOTICE'] = 3;
$this->longMailEreg = '/(.*)(<([\w\-\.]+@[\w\-_\.]+\.\w{2,3})+>)/';
$this->mailEreg = '/^([\w\-_\.]+@[\w\-_\.]+\.\w{2,3}+)$/';
$this->longMailEreg = '/(.*)(<([\w\-\.]+@[\w\-_\.]+\.\w{2,5})+>)/';
$this->mailEreg = '/^([\w\-_\.]+@[\w\-_\.]+\.\w{2,5}+)$/';
}
/**
@@ -138,6 +138,10 @@ class spoolRun
*/
public function create ($aData)
{
if (is_array($aData['app_msg_attach'])) {
$attachment = implode(",", $aData['app_msg_attach']);
$aData['app_msg_attach'] = $attachment;
}
$aData['app_msg_show_message'] = (isset($aData['app_msg_show_message'])) ? $aData['app_msg_show_message'] : 1;
$sUID = $this->db_insert( $aData );
@@ -300,7 +304,7 @@ class spoolRun
$this->fileData['envelope_to'][] = "$val";
}
}
} else if ($text != '') {
} elseif ($text != '') {
$this->fileData['envelope_to'][] = "$text";
} else {
$this->fileData['envelope_to'] = Array ();
@@ -315,7 +319,7 @@ class spoolRun
$this->fileData['envelope_cc'][] = "$valcc";
}
}
} else if ($textcc != '') {
} elseif ($textcc != '') {
$this->fileData['envelope_cc'][] = "$textcc";
} else {
$this->fileData['envelope_cc'] = Array ();
@@ -330,7 +334,7 @@ class spoolRun
$this->fileData['envelope_bcc'][] = "$valbcc";
}
}
} else if ($textbcc != '') {
} elseif ($textbcc != '') {
$this->fileData['envelope_bcc'][] = "$textbcc";
} else {
$this->fileData['envelope_bcc'] = Array ();
@@ -542,10 +546,10 @@ class spoolRun
if ($aConfiguration["MESS_ENABLED"] == "1") {
require_once ("classes/model/AppMessage.php");
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
$aConfiguration['MESS_RAUTH'] = 0;
} else {
$aConfiguration['MESS_RAUTH'] = 1;
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
$aConfiguration['MESS_RAUTH'] = 0;
} else {
$aConfiguration['MESS_RAUTH'] = 1;
}
$this->setConfig( array ("MESS_ENGINE" => $aConfiguration["MESS_ENGINE"],"MESS_SERVER" => $aConfiguration["MESS_SERVER"],"MESS_PORT" => $aConfiguration["MESS_PORT"],"MESS_ACCOUNT" => $aConfiguration["MESS_ACCOUNT"],"MESS_PASSWORD" => $aConfiguration["MESS_PASSWORD"],"SMTPAuth" => $aConfiguration["MESS_RAUTH"],"SMTPSecure" => $aConfiguration["SMTPSecure"]

View File

@@ -88,8 +88,18 @@ class Tasks
{
try {
$aTasks = array ();
$sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( TaskPeer::PRO_UID, $sProUid );
$aConditions = array ();
$aConditions[] = array (TaskPeer::TAS_UID,ContentPeer::CON_ID
);
$aConditions[] = array (ContentPeer::CON_CATEGORY,$sDelimiter . 'TAS_TITLE' . $sDelimiter
);
$aConditions[] = array (ContentPeer::CON_LANG,$sDelimiter . SYS_LANG . $sDelimiter
);
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
$oCriteria->addAscendingOrderByColumn( ContentPeer::CON_VALUE );
$oDataset = TaskPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();

View File

@@ -12,7 +12,7 @@ include_once 'classes/model/OutputDocumentPeer.php';
/**
* Base class that represents a row from the 'OUTPUT_DOCUMENT' table.
*
*
*
*
* @package workflow.classes.model.om
*/
@@ -163,7 +163,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_uid] column value.
*
*
* @return string
*/
public function getOutDocUid()
@@ -174,7 +174,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [pro_uid] column value.
*
*
* @return string
*/
public function getProUid()
@@ -185,7 +185,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_report_generator] column value.
*
*
* @return string
*/
public function getOutDocReportGenerator()
@@ -196,7 +196,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_landscape] column value.
*
*
* @return int
*/
public function getOutDocLandscape()
@@ -207,7 +207,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_media] column value.
*
*
* @return string
*/
public function getOutDocMedia()
@@ -218,7 +218,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_left_margin] column value.
*
*
* @return int
*/
public function getOutDocLeftMargin()
@@ -229,7 +229,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_right_margin] column value.
*
*
* @return int
*/
public function getOutDocRightMargin()
@@ -240,7 +240,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_top_margin] column value.
*
*
* @return int
*/
public function getOutDocTopMargin()
@@ -251,7 +251,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_bottom_margin] column value.
*
*
* @return int
*/
public function getOutDocBottomMargin()
@@ -262,7 +262,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_generate] column value.
*
*
* @return string
*/
public function getOutDocGenerate()
@@ -273,7 +273,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_type] column value.
*
*
* @return string
*/
public function getOutDocType()
@@ -284,7 +284,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_current_revision] column value.
*
*
* @return int
*/
public function getOutDocCurrentRevision()
@@ -295,7 +295,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_field_mapping] column value.
*
*
* @return string
*/
public function getOutDocFieldMapping()
@@ -306,7 +306,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_versioning] column value.
*
*
* @return int
*/
public function getOutDocVersioning()
@@ -317,7 +317,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_destination_path] column value.
*
*
* @return string
*/
public function getOutDocDestinationPath()
@@ -328,7 +328,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_tags] column value.
*
*
* @return string
*/
public function getOutDocTags()
@@ -339,7 +339,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_pdf_security_enabled] column value.
*
*
* @return int
*/
public function getOutDocPdfSecurityEnabled()
@@ -350,7 +350,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_pdf_security_open_password] column value.
*
*
* @return string
*/
public function getOutDocPdfSecurityOpenPassword()
@@ -361,7 +361,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_pdf_security_owner_password] column value.
*
*
* @return string
*/
public function getOutDocPdfSecurityOwnerPassword()
@@ -372,7 +372,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Get the [out_doc_pdf_security_permissions] column value.
*
*
* @return string
*/
public function getOutDocPdfSecurityPermissions()
@@ -383,7 +383,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_uid] column.
*
*
* @param string $v new value
* @return void
*/
@@ -405,7 +405,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [pro_uid] column.
*
*
* @param string $v new value
* @return void
*/
@@ -427,7 +427,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_report_generator] column.
*
*
* @param string $v new value
* @return void
*/
@@ -449,7 +449,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_landscape] column.
*
*
* @param int $v new value
* @return void
*/
@@ -471,7 +471,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_media] column.
*
*
* @param string $v new value
* @return void
*/
@@ -493,7 +493,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_left_margin] column.
*
*
* @param int $v new value
* @return void
*/
@@ -515,7 +515,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_right_margin] column.
*
*
* @param int $v new value
* @return void
*/
@@ -537,7 +537,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_top_margin] column.
*
*
* @param int $v new value
* @return void
*/
@@ -559,7 +559,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_bottom_margin] column.
*
*
* @param int $v new value
* @return void
*/
@@ -581,7 +581,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_generate] column.
*
*
* @param string $v new value
* @return void
*/
@@ -603,7 +603,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_type] column.
*
*
* @param string $v new value
* @return void
*/
@@ -625,7 +625,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_current_revision] column.
*
*
* @param int $v new value
* @return void
*/
@@ -647,7 +647,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_field_mapping] column.
*
*
* @param string $v new value
* @return void
*/
@@ -669,7 +669,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_versioning] column.
*
*
* @param int $v new value
* @return void
*/
@@ -691,7 +691,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_destination_path] column.
*
*
* @param string $v new value
* @return void
*/
@@ -713,7 +713,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_tags] column.
*
*
* @param string $v new value
* @return void
*/
@@ -735,7 +735,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_pdf_security_enabled] column.
*
*
* @param int $v new value
* @return void
*/
@@ -757,7 +757,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_pdf_security_open_password] column.
*
*
* @param string $v new value
* @return void
*/
@@ -779,7 +779,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_pdf_security_owner_password] column.
*
*
* @param string $v new value
* @return void
*/
@@ -801,7 +801,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
/**
* Set the value of [out_doc_pdf_security_permissions] column.
*
*
* @param string $v new value
* @return void
*/
@@ -1038,7 +1038,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)

View File

@@ -2045,6 +2045,24 @@
<column name="LOG_END_DATE" type="TIMESTAMP" required="false"/>
<column name="LOG_CLIENT_HOSTNAME" type="VARCHAR" size="100" required="true" default=""/>
<column name="USR_UID" type="VARCHAR" size="32" required="true" default=""/>
<index name="indexLoginLog">
<index-column name="USR_UID"/>
<index-column name="LOG_INIT_DATE"/>
<vendor type="mysql">
<parameter name="Table" value="LOGIN_LOG"/>
<parameter name="Non_unique" value="1"/>
<parameter name="Key_name" value="indexLoginLog"/>
<parameter name="Seq_in_index" value="1"/>
<parameter name="Column_name" value="USR_UID"/>
<parameter name="Collation" value="A"/>
<parameter name="Cardinality" value=""/>
<parameter name="Sub_part" value=""/>
<parameter name="Packed" value=""/>
<parameter name="Null" value=""/>
<parameter name="Index_type" value="BTREE"/>
<parameter name="Comment" value=""/>
</vendor>
</index>
</table>
<table name="USERS_PROPERTIES">
<vendor type="mysql">

View File

@@ -26,7 +26,73 @@ class Dashboard extends Controller
public function index ($httpData)
{
try {
$this->setJSVar( 'dashletsInstances', $this->getDashletsInstancesForCurrentUser() );
$dashletsExist = $this->getDashletsInstancesForCurrentUser();
$dashletsHide = array();
$dashletColumns = 3;
G::LoadClass( 'configuration' );
$oConfiguration = new Configurations();
$aConfiguration = $oConfiguration->load('Dashboard', '', '', $_SESSION['USER_LOGGED']);
if (is_array($aConfiguration) && count($aConfiguration) != 0) {
if (isset($aConfiguration["COLUMNS"])) {
$dashletColumns = $aConfiguration["COLUMNS"];
}
if (isset($aConfiguration["ORDER"])) {
$listDashletAux = array();
$listDashletAuxShow = array();
foreach ($dashletsExist as $key => $value) {
$listDashletAux[$value['DAS_INS_UID']] = $key;
}
$dashletsShow['0'] = array();
foreach ($aConfiguration['ORDER']['0'] as $value) {
if (isset($listDashletAux[$value])) {
$listDashletAuxShow[] = $value;
$dashletsShow['0'][] = $dashletsExist[$listDashletAux[$value]];
}
}
$dashletsShow['1'] = array();
foreach ($aConfiguration['ORDER']['1'] as $value) {
if (isset($listDashletAux[$value])) {
$listDashletAuxShow[] = $value;
$dashletsShow['1'][] = $dashletsExist[$listDashletAux[$value]];
}
}
$dashletsShow['2'] = array();
foreach ($aConfiguration['ORDER']['2'] as $value) {
if (isset($listDashletAux[$value])) {
$listDashletAuxShow[] = $value;
$dashletsShow['2'][] = $dashletsExist[$listDashletAux[$value]];
}
}
} else {
$col = 0;
foreach ($dashletsExist as $value) {
$dashletsShow[$col][] = $value;
$col++;
if ($col == 3) {
$col = 0;
}
}
}
} else {
$col = 0;
foreach ($dashletsExist as $value) {
$dashletsShow[$col][] = $value;
$col++;
if ($col == 3) {
$col = 0;
}
}
}
$this->setJSVar( 'dashletsAll', $dashletsExist);
$this->setJSVar( 'dashletsInstances', $dashletsShow);
$this->setJSVar( 'dashletsColumns', $dashletColumns);
$this->includeExtJS( 'dashboard/index' );
$this->includeExtJSLib( 'ux/portal' );
G::RenderPage( 'publish', 'extJs' );
@@ -35,6 +101,40 @@ class Dashboard extends Controller
}
}
public function saveOrderDashlet ($data)
{
$this->setResponseType( 'json' );
try {
$orderDashlet[0] = Bootstrap::json_decode($data->positionCol0);
$orderDashlet[1] = Bootstrap::json_decode($data->positionCol1);
$orderDashlet[2] = Bootstrap::json_decode($data->positionCol2);
G::loadClass('configuration');
$oConfiguration = new Configurations();
$aConfiguration = $oConfiguration->load('Dashboard', '', '', $_SESSION['USER_LOGGED']);
$dataDashboard = array();
if (isset($aConfiguration["CFG_VALUE"])) {
$dataDashboard = $aConfiguration["CFG_VALUE"];
}
$dataNow['ORDER'] = $orderDashlet;
if (isset($data->columns)) {
$dataNow['COLUMNS'] = Bootstrap::json_decode($data->columns);
}
$dataDashboard = array_merge($dataDashboard, $dataNow);
$oConfiguration->aConfig = $dataDashboard;
$oConfiguration->saveConfig('Dashboard', '', '', $_SESSION['USER_LOGGED']);
$result->success = '1';
return $result;
} catch (Exception $error) {
//ToDo: Display a error message
}
}
public function renderDashletInstance ($data)
{
try {

View File

@@ -88,3 +88,8 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1) {
$G_TMP_MENU->AddIdRawOption('EMAILS', '../mails/emailList', ucfirst (strtolower ( G::LoadTranslation('ID_EMAILS'))), '', '', 'logs');
}
if ($RBAC->userCanAccess("PM_SETUP") == 1) {
$G_TMP_MENU->AddIdRawOption("PM_REQUIREMENTS", "../setup/systemInfo", G::LoadTranslation("ID_PROCESSMAKER_REQUIREMENTS_CHECK"), "", "", "settings");
$G_TMP_MENU->AddIdRawOption("PHP_INFO", "../setup/systemInfo?option=php", G::LoadTranslation("ID_PHP_INFO"), "", "", "settings");
}

View File

@@ -22,9 +22,9 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$_SERVER["QUERY_STRING"] = isset($_SERVER["QUERY_STRING"])?$_SERVER["QUERY_STRING"]:'';
$_POST["sProcess"] = isset($_POST["sProcess"])?$_POST["sProcess"]:$_SESSION['PROCESS'];
$_POST["sFieldName"] = isset($_POST["sFieldName"])?$_POST["sFieldName"]:'';
$_POST['sSymbol']= isset($_POST["sSymbol"])?$_POST["sSymbol"]:'';
$_REQUEST["sProcess"] = isset($_REQUEST["sProcess"])?$_REQUEST["sProcess"]:'';
$_REQUEST["sFieldName"] = isset($_REQUEST["sFieldName"])?$_REQUEST["sFieldName"]:'';
$_REQUEST['sSymbol']= isset($_REQUEST["sSymbol"])?$_REQUEST["sSymbol"]:'';
$html = '<form action="uploader.php?'.$_SERVER["QUERY_STRING"].'&q=upload" onLoad="onLoad()" method="post" enctype="multipart/form-data" onsubmit="">';
$html .= '<div id="d_variables">';

View File

@@ -5,9 +5,9 @@ G::LoadClass( "configuration" );
global $RBAC;
if ($RBAC->userCanAccess( "PM_SETUP_ADVANCE" ) != 1) {
G::SendTemporalMessage( "ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels" );
exit( 0 );
if ($RBAC->userCanAccess("PM_SETUP") != 1) {
G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels");
exit(0);
}
//Cron status

View File

@@ -0,0 +1,41 @@
<?php
$option = (isset($_GET["option"]))? $_GET["option"] : null;
switch ($option) {
case "phpinfo":
phpinfo();
break;
case "php":
$oHeadPublisher = &headPublisher::getSingleton();
$oHeadPublisher->addContent("setup/phpInfo"); //Adding a html file .html
$oHeadPublisher->addExtJsScript("setup/phpInfo", false); //Adding a javascript file .js
G::RenderPage("publish", "extJs");
break;
default:
require_once (PATH_CONTROLLERS . "installer.php");
$installer = new Installer();
$systemInfo = $installer->getSystemInfo();
$oHeadPublisher = &headPublisher::getSingleton();
$oHeadPublisher->addContent("setup/systemInfo"); //Adding a html file .html
$oHeadPublisher->addExtJsScript("setup/systemInfo", false); //Adding a javascript file .js
$oHeadPublisher->assign("SYSINFO_PHP", "\"" . $systemInfo->php->version . "\", " . $systemInfo->php->result);
$oHeadPublisher->assign("SYSINFO_MYSQL", "\"" . $systemInfo->mysql->version . "\", " . $systemInfo->mysql->result);
$oHeadPublisher->assign("SYSINFO_MSSQL", "\"" . $systemInfo->mssql->version . "\", " . $systemInfo->mssql->result);
$oHeadPublisher->assign("SYSINFO_CURL", "\"" . $systemInfo->curl->version . "\", " . $systemInfo->curl->result);
$oHeadPublisher->assign("SYSINFO_OPENSSL", "\"" . $systemInfo->openssl->version . "\", " . $systemInfo->openssl->result);
$oHeadPublisher->assign("SYSINFO_DOMXML", "\"" . $systemInfo->dom->version . "\", " . $systemInfo->dom->result);
$oHeadPublisher->assign("SYSINFO_GD", "\"" . $systemInfo->gd->version . "\", " . $systemInfo->gd->result);
$oHeadPublisher->assign("SYSINFO_MULTIBYTESTRING", "\"" . $systemInfo->multibyte->version . "\", " . $systemInfo->multibyte->result);
$oHeadPublisher->assign("SYSINFO_SOAP", "\"" . $systemInfo->soap->version . "\", " . $systemInfo->soap->result);
$oHeadPublisher->assign("SYSINFO_LDAP", "\"" . $systemInfo->ldap->version . "\", " . $systemInfo->ldap->result);
$oHeadPublisher->assign("SYSINFO_MEMORYLIMIT", "\"" . $systemInfo->memory->version . "\", " . $systemInfo->memory->result);
G::RenderPage("publish", "extJs");
break;
}

View File

@@ -799,6 +799,17 @@ antes funcionaba.
height:15px !important;
}
.ICON_PM_REQUIREMENTS{
/*ss_wrench*/
background-image: url(/images/icons_silk/sprites.png) !important;
background-position:0 -17821px !important
}
.ICON_PHP_INFO{
background-image: url(/images/documents/extension/php.png) !important;
width: 16px !important;
height: 16px !important;
}
/* Language Support module styles*/
.upload-icon {

View File

@@ -824,6 +824,17 @@ antes funcionaba.
height:15px !important;
}
.ICON_PM_REQUIREMENTS{
/*ss_wrench*/
background-image: url(/images/icons_silk/sprites.png) !important;
background-position:0 -17821px !important
}
.ICON_PHP_INFO{
background-image: url(/images/documents/extension/php.png) !important;
width: 16px !important;
height: 16px !important;
}
/* Language Support module styles*/
.upload-icon {

View File

@@ -796,6 +796,17 @@ antes funcionaba.
height:15px !important;
}
.ICON_PM_REQUIREMENTS{
/*ss_wrench*/
background-image: url(/images/icons_silk/sprites.png) !important;
background-position:0 -17821px !important
}
.ICON_PHP_INFO{
background-image: url(/images/documents/extension/php.png) !important;
width: 16px !important;
height: 16px !important;
}
/* Language Support module styles*/
.upload-icon {

View File

@@ -1,3 +1,22 @@
function generatedOrder () {
var orderNow = [];;
orderNow[0] = [];
orderNow[1] = [];
orderNow[2] = [];
for (var i = 0; i < Ext.getCmp('columnPos0').items.items.length; i++) {
orderNow[0][i] = Ext.getCmp('columnPos0').items.items[i].dasInsUid;
}
for (var i = 0; i < Ext.getCmp('columnPos1').items.items.length; i++) {
orderNow[1][i] = Ext.getCmp('columnPos1').items.items[i].dasInsUid;
}
for (var i = 0; i < Ext.getCmp('columnPos2').items.items.length; i++) {
orderNow[2][i] = Ext.getCmp('columnPos2').items.items[i].dasInsUid;
}
return orderNow;
}
Ext.onReady(function(){
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
@@ -22,13 +41,17 @@ Ext.onReady(function(){
xtype: 'tbbutton',
text : _("ID_DASHBOARD_BTNCOLUMNS3"),
handler : function(a) {
Ext.MessageBox.show({
msg: _('ID_LOADING'),
width:300,
wait:true,
waitConfig: {interval:200},
animEl: 'mb7'
});
var vp = Ext.getCmp('viewportDashboard');
var pd = Ext.getCmp('portalDashboard');
for (var i = 0; i <= dashletsInstances.length - 1; i++) {
pd.items.items[i % 3].add(pd.items.items[i % 2].items.items[0]);
}
pd.items.items[0].columnWidth = 0.33;
pd.items.items[1].columnWidth = 0.33;
pd.items.items[2].columnWidth = 0.33;
@@ -36,18 +59,57 @@ Ext.onReady(function(){
tbDashboard.items.items[0].setDisabled(true);
tbDashboard.items.items[1].setDisabled(false);
var orderNow = generatedOrder();
Ext.Ajax.request({
params: {
positionCol0: Ext.encode(orderNow[0]),
positionCol1: Ext.encode(orderNow[1]),
positionCol2: Ext.encode(orderNow[2]),
columns: 3
},
url: 'dashboard/saveOrderDashlet',
success: function (res) {
var data = Ext.decode(res.responseText);
if (data.success) {
Ext.MessageBox.hide();
}
},
failure: function () {
Ext.MessageBox.alert(_('ID_ERROR'), _('ID_IMPORTING_ERROR'));
}
});
}
},
{
xtype: 'tbbutton',
text : _("ID_DASHBOARD_BTNCOLUMNS2"),
handler : function(a) {
Ext.MessageBox.show({
msg: _('ID_LOADING'),
progressText: _('ID_SAVING'),
width:300,
wait:true,
waitConfig: {interval:200},
animEl: 'mb7'
});
var vp = Ext.getCmp('viewportDashboard');
var pd = Ext.getCmp('portalDashboard');
for (var i = 0; i <= dashletsInstances.length - 1; i++) {
pd.items.items[i % 2].add(pd.items.items[i % 3].items.items[0]);
var dashletMove = new Array();
for (var i = 0; i < Ext.getCmp('columnPos2').items.items.length; i++) {
dashletMove.push(Ext.getCmp('columnPos2').items.items[i].id);
}
var flag = 0;
for (var i = 0; i < dashletMove.length; i++) {
Ext.getCmp('columnPos' + flag).add(Ext.getCmp(dashletMove[i]));
if (flag == 0) {
flag = 1;
} else {
flag = 0;
}
};
pd.items.items[0].columnWidth = 0.49;
pd.items.items[1].columnWidth = 0.49;
@@ -56,6 +118,26 @@ Ext.onReady(function(){
tbDashboard.items.items[0].setDisabled(false);
tbDashboard.items.items[1].setDisabled(true);
var orderNow = generatedOrder();
Ext.Ajax.request({
params: {
positionCol0: Ext.encode(orderNow[0]),
positionCol1: Ext.encode(orderNow[1]),
positionCol2: Ext.encode(orderNow[2]),
columns: 2
},
url: 'dashboard/saveOrderDashlet',
success: function (res) {
var data = Ext.decode(res.responseText);
if (data.success) {
Ext.MessageBox.hide();
}
},
failure: function () {
Ext.MessageBox.alert(_('ID_ERROR'), _('ID_IMPORTING_ERROR'));
}
});
}
}
]
@@ -74,58 +156,112 @@ Ext.onReady(function(){
id : 'portalDashboard',
items:[{
columnWidth:.33,
id : 'columnPos0',
style:'padding:10px 0 10px 10px',
items:[]
},{
columnWidth:.33,
style:'padding:10px 0 10px 10px',
items:[]
columnWidth:.33,
id : 'columnPos1',
style:'padding:10px 0 10px 10px',
items:[]
},{
columnWidth:.33,
style:'padding:10px',
items:[]
}]
columnWidth:.33,
id : 'columnPos2',
style:'padding:10px',
items:[]
}],
listeners: {
'drop': function(e) {
var orderNow = generatedOrder();
Ext.MessageBox.show({
msg: _('ID_LOADING'),
progressText: _('ID_SAVING'),
width:300,
wait:true,
waitConfig: {interval:200},
animEl: 'mb7'
});
/*
* Uncomment this block to test handling of the drop event. You could use this
* to save portlet position state for example. The event arg e is the custom
* event defined in Ext.ux.Portal.DropZone.
*/
// ,listeners: {
// 'drop': function(e){
// Ext.Msg.alert('Portlet Dropped', e.panel.title + '<br />Column: ' +
// e.columnIndex + '<br />Position: ' + e.position);
// }
// }
if (tbDashboard.items.items[0].disabled == true) {
var colum = 3;
} else {
var colum = 2;
}
Ext.Ajax.request({
params: {
positionCol0: Ext.encode(orderNow[0]),
positionCol1: Ext.encode(orderNow[1]),
positionCol2: Ext.encode(orderNow[2]),
columns: colum
},
url: 'dashboard/saveOrderDashlet',
success: function (res) {
var data = Ext.decode(res.responseText);
if (data.success) {
Ext.MessageBox.hide();
}
},
failure: function () {
Ext.MessageBox.alert(_('ID_ERROR'), _('ID_IMPORTING_ERROR'));
}
});
}
}
}]
});
var pd = Ext.getCmp('portalDashboard');
var con = 0;
for (var i = 0; i < dashletsInstances.length; i++) {
var np = new Ext.ux.Portlet({
title: dashletsInstances[i].DAS_TITLE,
index: i,
dasInsUid : dashletsInstances[i].DAS_INS_UID,
html: 'Gauge Placeholder',
listeners: {
'resize': function(p, w, h) {
var template = new Ext.XTemplate(dashletsInstances[p.index].DAS_XTEMPLATE).apply({
id: p.dasInsUid,
page: 'dashboard/renderDashletInstance',
width: w - 12,
random: Math.floor(Math.random() * 1000000)
})
p.update(template);
}
}
});
for(var d = 0; d < dashletsInstances[i].length; d++) {
pd.items.items[i % 3].add(np);
var np = new Ext.ux.Portlet({
title: dashletsInstances[i][d].DAS_TITLE,
index: con,
indicei: i,
indiced: d,
dasInsUid : dashletsInstances[i][d].DAS_INS_UID,
html: 'Gauge Placeholder',
listeners: {
'resize': function(p, w, h) {
var template = new Ext.XTemplate(dashletsInstances[p.indicei][p.indiced].DAS_XTEMPLATE).apply({
id: p.dasInsUid,
page: 'dashboard/renderDashletInstance',
width: w - 12,
random: Math.floor(Math.random() * 1000000)
})
p.update(template);
}
}
});
pd.items.items[i].add(np);
con++;
}
}
pd.doLayout();
tbDashboard.items.items[0].setDisabled(true);
tbDashboard.items.items[1].setDisabled(false);
if (dashletsColumns == 2) {
tbDashboard.items.items[0].setDisabled(false);
tbDashboard.items.items[1].setDisabled(true);
var pd = Ext.getCmp('portalDashboard');
pd.items.items[0].columnWidth = 0.49;
pd.items.items[1].columnWidth = 0.49;
pd.items.items[2].columnWidth = 0.01;
pd.doLayout();
} else {
var pd = Ext.getCmp('portalDashboard');
pd.items.items[0].columnWidth = 0.33;
pd.items.items[1].columnWidth = 0.33;
pd.items.items[2].columnWidth = 0.33;
pd.doLayout();
tbDashboard.items.items[0].setDisabled(true);
tbDashboard.items.items[1].setDisabled(false);
}
});

View File

@@ -434,6 +434,8 @@ cron.application = {
],
bbar: pagingCron,
border: false,
title: _("ID_CRON_ACTIONS_LOG"),
listeners: {

View File

@@ -0,0 +1 @@
<div></div>

View File

@@ -0,0 +1,38 @@
Ext.namespace("phpInfo");
phpInfo.application = {
init: function ()
{
//Components
var pnlMain = new Ext.Panel({
id: "pnlMain",
layout: "border",
border: false,
title: _("ID_PHP_INFO"),
items: [
{
xtype: "panel",
region: "center",
margins: {top: 10, right: 10, bottom: 10, left: 10},
border: false,
html: "<iframe src=\"../setup/systemInfo?option=phpinfo\" width=\"100%\" height=\"100%\" frameborder=\"0\" style=\"border: 0;\"></iframe>"
}
]
});
//Load all panels
var viewport = new Ext.Viewport({
layout: "fit",
items: [pnlMain]
});
}
}
Ext.onReady(phpInfo.application.init, phpInfo.application);

View File

@@ -0,0 +1 @@
<div></div>

View File

@@ -0,0 +1,193 @@
Ext.namespace("systemInfo");
systemInfo.application = {
init: function ()
{
var loadMaskSystemInfo = new Ext.LoadMask(Ext.getBody(), {msg: _("ID_CHECKING")});
systemInfoProcessAjax = function (option)
{
var url = "";
loadMaskSystemInfo.show();
switch (option) {
case "SYS":
url = "../installer/getSystemInfo"
break;
}
Ext.Ajax.request({
url: url,
method: "POST",
success: function (response, opts)
{
var dataResponse = eval("(" + response.responseText + ")"); //json
switch (option) {
case "SYS":
Ext.getCmp("php").setValue(fieldFormatValue(dataResponse.php.version, dataResponse.php.result));
Ext.getCmp("mysql").setValue(fieldFormatValue(dataResponse.mysql.version, dataResponse.mysql.result));
//Ext.getCmp("mssql").setValue(fieldFormatValue(dataResponse.mssql.version, dataResponse.mssql.result));
Ext.getCmp("curl").setValue(fieldFormatValue(dataResponse.curl.version, dataResponse.curl.result));
Ext.getCmp("openssl").setValue(fieldFormatValue(dataResponse.openssl.version, dataResponse.openssl.result));
Ext.getCmp("dom").setValue(fieldFormatValue(dataResponse.dom.version, dataResponse.dom.result));
Ext.getCmp("gd").setValue(fieldFormatValue(dataResponse.gd.version, dataResponse.gd.result));
Ext.getCmp("multibyte").setValue(fieldFormatValue(dataResponse.multibyte.version, dataResponse.multibyte.result));
Ext.getCmp("soap").setValue(fieldFormatValue(dataResponse.soap.version, dataResponse.soap.result));
Ext.getCmp("ldap").setValue(fieldFormatValue(dataResponse.ldap.version, dataResponse.ldap.result));
Ext.getCmp("memory").setValue(fieldFormatValue(dataResponse.memory.version, dataResponse.memory.result));
break;
}
loadMaskSystemInfo.hide();
},
failure: function (response, opts)
{
loadMaskSystemInfo.hide();
}
});
};
fieldFormatValue = function (str, sw)
{
var img = "delete.png";
var size = "width=\"15\" height=\"15\"";
var color = "red";
if (sw == true || sw == 1) {
img = "dialog-ok-apply.png";
size = "width=\"12\" height=\"12\"";
color = "green";
}
return "<span style=\"color: " + color + ";\">" + str + "</span> <img src=\"/images/" + img + "\" " + size + " alt=\"\" />";
};
//Components
var pnlWest = new Ext.Panel({
id: "pnlWest",
region: "west",
margins: {top: 10, right: 0, bottom: 10, left: 10},
border: false,
bodyStyle: "padding: 10px; font: 0.80em arial;",
width: 250,
html: _("ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION")
});
var frmfsCenter = new Ext.form.FieldSet({
id: "frmfsCenter",
region: "center",
margins: {top: 10, right: 10, bottom: 10, left: 0},
border: false,
labelWidth: 200,
items: [
{
xtype: "displayfield",
id: "php",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_PHP"),
value: eval("fieldFormatValue(" + SYSINFO_PHP + ");")
},
{
xtype: "displayfield",
id: "mysql",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MYSQL"),
value: eval("fieldFormatValue(" + SYSINFO_MYSQL + ");")
},
/*
{
xtype: "displayfield",
id: "mssql",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MSSQL"),
value: eval("fieldFormatValue(" + SYSINFO_MSSQL + ");")
},
*/
{
xtype: "displayfield",
id: "curl",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_CURL"),
value: eval("fieldFormatValue(" + SYSINFO_CURL + ");")
},
{
xtype: "displayfield",
id: "openssl",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_OPENSSL"),
value: eval("fieldFormatValue(" + SYSINFO_OPENSSL + ");")
},
{
xtype: "displayfield",
id: "dom",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_DOMXML"),
value: eval("fieldFormatValue(" + SYSINFO_DOMXML + ");")
},
{
xtype: "displayfield",
id: "gd",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_GD"),
value: eval("fieldFormatValue(" + SYSINFO_GD + ");")
},
{
xtype: "displayfield",
id: "multibyte",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MULTIBYTESTRING"),
value: eval("fieldFormatValue(" + SYSINFO_MULTIBYTESTRING + ");")
},
{
xtype: "displayfield",
id: "soap",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_SOAP"),
value: eval("fieldFormatValue(" + SYSINFO_SOAP + ");")
},
{
xtype: "displayfield",
id: "ldap",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_LDAP"),
value: eval("fieldFormatValue(" + SYSINFO_LDAP + ");")
},
{
xtype: "displayfield",
id: "memory",
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MEMORYLIMIT"),
value: eval("fieldFormatValue(" + SYSINFO_MEMORYLIMIT + ");")
},
{
xtype: "displayfield",
fieldLabel: "",
},
new Ext.Button({
text: _("ID_CHECK_AGAIN"),
handler: function () {
systemInfoProcessAjax("SYS");
}
})
]
});
var pnlMain = new Ext.Panel({
id: "pnlMain",
layout: "border",
border: false,
title: _("ID_PROCESSMAKER_REQUIREMENTS_CHECK"),
items: [pnlWest, frmfsCenter]
});
//Load all panels
var viewport = new Ext.Viewport({
layout: "fit",
items: [pnlMain]
});
}
}
Ext.onReady(systemInfo.application.init, systemInfo.application);

View File

@@ -1043,6 +1043,14 @@ function saveUser()
return false;
}
}
if (USR_UID == '00000000000000000000000000000001') {
if (Ext.getCmp('USR_ROLE').getValue() != 'PROCESSMAKER_ADMIN') {
Ext.Msg.alert( _('ID_ERROR'), _('ID_ADMINISTRATOR_ROLE_CANT_CHANGED');
return false;
}
}
} else {
Ext.Msg.alert( _('ID_ERROR'), _('ID_MSG_ERROR_USR_USERNAME'));
return false;

View File

@@ -81,7 +81,7 @@ function editFile(pro_uid, fileName){
oPanel = new leimnud.module.panel();
oPanel.options={
limit : true,
size : {w:800,h:600},
size : {w:800,h:530},
position : {x:50,y:50,center:true},
title : '',
control : {close:true,resize:false},

View File

@@ -175,15 +175,10 @@ if (file_exists( FILE_PATHS_INSTALLED )) {
// smarty constants
define( 'PATH_SMARTY_C', PATH_C . 'smarty' . PATH_SEP . 'c' );
define( 'PATH_SMARTY_CACHE', PATH_C . 'smarty' . PATH_SEP . 'cache' );
/* To do:
if (! is_dir( PATH_SMARTY_C )) {
G::mk_dir( PATH_SMARTY_C );
}
if (! is_dir( PATH_SMARTY_CACHE )) {
G::mk_dir( PATH_SMARTY_CACHE );
}
*/
/* TO DO: put these line in other part of code*/
Bootstrap::verifyPath ( PATH_SMARTY_C, true );
Bootstrap::verifyPath ( PATH_SMARTY_CACHE, true );
}
// set include path
@@ -527,6 +522,9 @@ Bootstrap::registerClass('DynaformPeer', PATH_HOME . "engine/classes/model
Bootstrap::registerClass('BaseEvent', PATH_HOME . "engine/classes/model/om/BaseEvent.php");
Bootstrap::registerClass('Event', PATH_HOME . "engine/classes/model/Event.php");
Bootstrap::registerClass('BaseEventPeer', PATH_HOME . "engine/classes/model/om/BaseEventPeer.php");
Bootstrap::registerClass('EventPeer', PATH_HOME . "engine/classes/model/EventPeer.php");
Bootstrap::registerClass('BaseFields', PATH_HOME . "engine/classes/model/om/BaseFields.php");
Bootstrap::registerClass('Fields', PATH_HOME . "engine/classes/model/Fields.php");