diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/VariablePicker.html b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/VariablePicker.html new file mode 100644 index 000000000..1210d28e6 --- /dev/null +++ b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/VariablePicker.html @@ -0,0 +1,66 @@ + + + + + + + + +
' +
+ + + + + + + + + + + + +
+ + +      + + +
+
+ +
+ +
+ + + + + + + + + +
Result@#SYS_LANG
DescriptionDescription @#SYS_LANG
+
+ +
+ +
+ +
+
+ + \ No newline at end of file diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/editor_plugin.js b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/editor_plugin.js new file mode 100644 index 000000000..655d90fd3 --- /dev/null +++ b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/editor_plugin.js @@ -0,0 +1,63 @@ +/** +* Name: editor_plugin_src.js (for pmGrids tinyMCE plugin) +**/ + +(function(){ + var strPluginURL; + tinymce.create('tinymce.plugins.pmGridsPlugin', { + init: function(ed, url) + { + strPluginURL = url; // store the URL for future use.. + ed.addCommand('mcepmGrids', function() { + pmGrids(); + }); + ed.addButton('pmGrids', { + title: 'pmGrids', + label : ' @# Grids', + cmd: 'mcepmGrids', + image: url + '/img/grids.png' + }); + }, + createControl: function(n, cm) { + return null; + }, + getPluginURL: function() { + return strPluginURL; + } + }); + tinymce.PluginManager.add('pmGrids', tinymce.plugins.pmGridsPlugin); +})(); + +// 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 pmGrids(field_name, url, type, win) { + //tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker' + tinyMCE.activeEditor.windowManager.open({ // open the plugin popup + file : '/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.html', + title : '', + 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); +} + diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/editor_plugin_src.js b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/editor_plugin_src.js new file mode 100644 index 000000000..655d90fd3 --- /dev/null +++ b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/editor_plugin_src.js @@ -0,0 +1,63 @@ +/** +* Name: editor_plugin_src.js (for pmGrids tinyMCE plugin) +**/ + +(function(){ + var strPluginURL; + tinymce.create('tinymce.plugins.pmGridsPlugin', { + init: function(ed, url) + { + strPluginURL = url; // store the URL for future use.. + ed.addCommand('mcepmGrids', function() { + pmGrids(); + }); + ed.addButton('pmGrids', { + title: 'pmGrids', + label : ' @# Grids', + cmd: 'mcepmGrids', + image: url + '/img/grids.png' + }); + }, + createControl: function(n, cm) { + return null; + }, + getPluginURL: function() { + return strPluginURL; + } + }); + tinymce.PluginManager.add('pmGrids', tinymce.plugins.pmGridsPlugin); +})(); + +// 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 pmGrids(field_name, url, type, win) { + //tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker' + tinyMCE.activeEditor.windowManager.open({ // open the plugin popup + file : '/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.html', + title : '', + 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); +} + diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/img/grids.png b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/img/grids.png new file mode 100644 index 000000000..dbac360f1 Binary files /dev/null and b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/img/grids.png differ diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/img/picker.png b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/img/picker.png new file mode 100644 index 000000000..0d1642339 Binary files /dev/null and b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/img/picker.png differ diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/langs/en.js b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/langs/en.js new file mode 100644 index 000000000..82cc06aa9 --- /dev/null +++ b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/langs/en.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.ccSimpleUploader', { + desc:"Upload File to Server" +}); diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.html b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.html new file mode 100644 index 000000000..003b4ebc7 --- /dev/null +++ b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.html @@ -0,0 +1,87 @@ + + + + + + + + + + + + + +
+
+
+ Chose a grid +
+
+
+ +
+
+
+
+
+ Prefix +
+
+
+ +
+
+
+
+
+ +
+
+
+ Border +
+
+
+
+
+ +
+
+
+ Headers +
+
+
+ +
+
+ +
+ + diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmVariablePicker/uploader.php b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.php similarity index 100% rename from gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmVariablePicker/uploader.php rename to gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/pmGrids.php diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/progress.gif b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/progress.gif new file mode 100644 index 000000000..2aea68c8e Binary files /dev/null and b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/progress.gif differ diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmVariablePicker/VariablePicker.html b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmVariablePicker/VariablePicker.html index 1210d28e6..32ce5319a 100644 --- a/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmVariablePicker/VariablePicker.html +++ b/gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmVariablePicker/VariablePicker.html @@ -3,6 +3,7 @@ + diff --git a/gulliver/system/class.wysiwygEditor.php b/gulliver/system/class.wysiwygEditor.php index b658f8362..28b75fe55 100644 --- a/gulliver/system/class.wysiwygEditor.php +++ b/gulliver/system/class.wysiwygEditor.php @@ -98,17 +98,17 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field tinyMCE.activeEditor.processID =formProcessID; }, onchange_callback: function(inst) { - if(inst.isDirty()) { - inst.save(); - } - return true; - }, + if(inst.isDirty()) { + inst.save(); + } + return true; + }, handle_event_callback : function(e) { - if(this.isDirty()) { - this.save(); - } - return true; - } + if(this.isDirty()) { + this.save(); + } + return true; + } }); '; break; @@ -118,7 +118,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field 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", + 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,pmGrids", mode : "specific_textareas", editor_selector : "tmceEditor", width : "770", diff --git a/workflow/engine/xmlform/processes/processes_FilesOptions.xml b/workflow/engine/xmlform/processes/processes_FilesOptions.xml index d2b0353d0..0f8147ab7 100755 --- a/workflow/engine/xmlform/processes/processes_FilesOptions.xml +++ b/workflow/engine/xmlform/processes/processes_FilesOptions.xml @@ -85,8 +85,7 @@ function editFile(pro_uid, fileName){ position : {x:50,y:50,center:true}, title : '', control : {close:true,resize:false}, - fx : {modal:true}, - fx : {shadow:true,modal:true} + fx : {shadow:true,modal:true} }; oPanel.make();