Fixed the variable picker in the wysiwyg editor now correctly shows the process variables, and also the maborak.js has been rebuild in order to add the tinymce library
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -36,8 +36,7 @@ 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=@@';
|
||||
|
||||
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
|
||||
|
||||
@@ -42,6 +42,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
|
||||
public $height = '300';
|
||||
public $defaultValue = '<br/>';
|
||||
public $editorType = '';
|
||||
public $processID = '';
|
||||
/**
|
||||
* render function returns the HTML definition for the Dynaform Field
|
||||
*
|
||||
@@ -81,6 +82,8 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
|
||||
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;
|
||||
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",
|
||||
@@ -93,7 +96,9 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
|
||||
|
||||
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;
|
||||
},
|
||||
onchange_callback: function(inst) {
|
||||
if(inst.isDirty()) {
|
||||
inst.save();
|
||||
@@ -110,9 +115,9 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
|
||||
';
|
||||
break;
|
||||
case 'OUTPUT_DOCUMENT':
|
||||
|
||||
$editorDefinition .= '
|
||||
tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce"
|
||||
// is necessary the process uid variable in order to load the picker correctly
|
||||
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",
|
||||
@@ -121,11 +126,13 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
|
||||
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_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;
|
||||
},
|
||||
onchange_callback: function(inst) {
|
||||
if(inst.isDirty()) {
|
||||
inst.save();
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
"full": "gulliver/js/widgets/tooltip/pmtooltip.js",
|
||||
"mini": "gulliver/js/widgets/tooltip/pmtooltip.js",
|
||||
"minify": true
|
||||
},
|
||||
{
|
||||
"name": "tinymce",
|
||||
"full": "gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js",
|
||||
"mini": "gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js",
|
||||
"minify": true
|
||||
}
|
||||
],
|
||||
"build" : true,
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
*/
|
||||
G::pr($_SERVER);
|
||||
$_SERVER["QUERY_STRING"] = isset($_SERVER["QUERY_STRING"])?$_SERVER["QUERY_STRING"]:'';
|
||||
$_REQUEST["sProcess"] = isset($_REQUEST["sProcess"])?$_REQUEST["sProcess"]:'';
|
||||
$_REQUEST["sFieldName"] = isset($_REQUEST["sFieldName"])?$_REQUEST["sFieldName"]:'';
|
||||
$_REQUEST['sSymbol']= isset($_REQUEST["sSymbol"])?$_REQUEST["sSymbol"]:'';
|
||||
$_POST["sProcess"] = isset($_POST["sProcess"])?$_POST["sProcess"]:$_SESSION['PROCESS'];
|
||||
$_POST["sFieldName"] = isset($_POST["sFieldName"])?$_POST["sFieldName"]:'';
|
||||
$_POST['sSymbol']= isset($_POST["sSymbol"])?$_POST["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">';
|
||||
|
||||
@@ -79,10 +79,19 @@ getField("PME_HTML_ENABLETEMPLATE","dynaforms_HtmlEditor").onclick=function()
|
||||
/*getField("ENABLETEMPLATE","dynaforms_Properties").checked=this.checked;
|
||||
dynaformEditor.saveProperties();*/
|
||||
|
||||
|
||||
//if (getField("PME_HTML_ENABLETEMPLATE","dynaforms_HtmlEditor").checked == true) {
|
||||
/*if (getField("PME_HTML_ENABLETEMPLATE","dynaforms_HtmlEditor").checked == true) {
|
||||
new leimnud.module.app.confirm().make(
|
||||
{
|
||||
label: "@G::LoadTranslation(ID_MSG_ENABLE_HTML_EDITING)",
|
||||
size:{ w: 350, h: 150 },
|
||||
action: function() { },
|
||||
cancel: function () {
|
||||
getField("PME_HTML_ENABLETEMPLATE","dynaforms_HtmlEditor").checked = false;
|
||||
}
|
||||
});
|
||||
*/
|
||||
dynaformEditor.setEnableTemplate(this.checked);
|
||||
//}
|
||||
// }
|
||||
}
|
||||
]]></PME_RESIZE_JS>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user