Commit of some changes, adding the styles plugin to all editors, with this plugin settings like backgroud color, or other styles settings can be added more easily, color picker included in the background options of this plugin
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{* this is the xmlform template *}
|
||||
<form id="{$form->id}" name="{$form->name}" action="{$form->action}" class="{$form->className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit="{$form->onsubmit}">
|
||||
<div class="borderForm" style="width:{$form->width}; padding-left:0; padding-right:0; border-width:{$form->border};">
|
||||
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
<div class="boxTop"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
||||
<div class="content" style="height:{$form->height};" >
|
||||
<table width="99%">
|
||||
<tr>
|
||||
@@ -64,7 +64,7 @@
|
||||
</table>
|
||||
{if $hasRequiredFields}<div class="FormRequiredTextMessage"><font color="red">* </font>{php}echo (G::LoadTranslation('ID_REQUIRED_FIELD'));{/php}</div>{/if}
|
||||
</div>
|
||||
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
<div class="boxBottom"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
||||
</div>
|
||||
{foreach from=$form->fields item=field}
|
||||
{if ($field->type==='javascript')}
|
||||
|
||||
@@ -405,7 +405,7 @@ else
|
||||
{this.load(this.current-1);}},left:function()
|
||||
{this.Null=true;new this.parent.module.fx.algorithm().make({transition:"sineInOut",duration:1000,begin:this.toolbar.scrollLeft,end:this.toolbar.scrollLeft-((this.options.thumbnail.size.w*4)+(4*4)),onTransition:function(fx){this.toolbar.scrollLeft=fx.result;}.extend(this),onFinish:function(fx){this.toolbar.scrollLeft=fx.options.end;this.load(this.current-1);this.Null=false;}.extend(this)});},right:function()
|
||||
{this.Null=true;new this.parent.module.fx.algorithm().make({transition:"sineInOut",duration:1000,begin:this.toolbar.scrollLeft,end:this.toolbar.scrollLeft+((this.options.thumbnail.size.w*4)+(4*4)),onTransition:function(fx){this.toolbar.scrollLeft=fx.result;}.extend(this),onFinish:function(fx){this.toolbar.scrollLeft=fx.options.end;var t=this.current+1;this.load(t);this.Null=false;}.extend(this)});}}.expand(this);this.expand(this);},box:function()
|
||||
{this.panel=new this.parent.module.panel();this.panel.options={size:{w:300,h:200},title:"Prueba panel",headerBar:true,titleBar:false,elementToDrag:"backend",position:{x:5,y:5,center:true},fx:{shadow:false,modal:true,opacity:false}};this.panel.setStyle={containerWindow:{border:"0px solid red"},frontend:{backgroundColor:"transparent"},content:{margin:0,border:"0px solid red",borderLeft:"1px solid #DADADA",borderRight:"1px solid #DADADA",backgroundColor:"white"},headerBar:{display:''},statusBar:{}};this.panel.styles.fx.opacityModal.Static=0;this.panel.make();this.panel.elements.headerBar.className="boxTopPanel";this.panel.elements.headerBar.innerHTML="<div class='a'></div><div class='b'></div><div class='c'></div>";this.panel.elements.statusBar.className="boxBottom";this.panel.elements.statusBar.innerHTML="<div class='a'></div><div class='b'></div><div class='c'></div>";return this.panel;},confirm:function()
|
||||
{this.panel=new this.parent.module.panel();this.panel.options={size:{w:300,h:200},title:"Prueba panel",headerBar:true,titleBar:false,elementToDrag:"backend",position:{x:5,y:5,center:true},fx:{shadow:false,modal:true,opacity:false}};this.panel.setStyle={containerWindow:{border:"0px solid red"},frontend:{backgroundColor:"transparent"},content:{margin:0,border:"0px solid red",borderLeft:"1px solid #DADADA",borderRight:"1px solid #DADADA",backgroundColor:"white"},headerBar:{display:''},statusBar:{}};this.panel.styles.fx.opacityModal.Static=0;this.panel.make();this.panel.elements.headerBar.className="boxTopPanel";this.panel.elements.headerBar.innerHTML="<div class='a'> </div><div class='b'> </div><div class='c'> </div>";this.panel.elements.statusBar.className="boxBottom";this.panel.elements.statusBar.innerHTML="<div class='a'> </div><div class='b'> </div><div class='c'> </div>";return this.panel;},confirm:function()
|
||||
{this.make=function(options)
|
||||
{var lb=(typeof G_STRINGS!=='undefined')?G_STRINGS:{};var label={accept:lb.ACCEPT||"Aceptar",cancel:lb.CANCEL||"Cancelar"};this.panel=new this.parent.module.panel();this.options={action:function(){}}.concat(options||{});this.panel.options={statusBarButtons:[{value:label.accept},{value:label.cancel}],position:{center:true},size:{w:(typeof(options.width)!='undefined')?options.width:350,h:(typeof(options.height)!='undefined')?options.height:100},control:{close:true,resize:false},fx:{modal:true}};this.panel.setStyle={content:{padding:10,paddingBottom:2,textAlign:"left",paddingLeft:50,background:"url("+this.parent.info.images+"question.png)",backgroundRepeat:"no-repeat",backgroundPosition:"10 50%",backgroundColor:"transparent",borderWidth:0}};this.panel.make();this.panel.addContent(this.options.label||"");this.panel.fixContent();this.panel.elements.statusBarButtons[0].onmouseup=function()
|
||||
{this.options.action();this.panel.remove();return false;}.extend(this);this.panel.elements.statusBarButtons[1].onmouseup=function()
|
||||
|
||||
@@ -1342,10 +1342,10 @@ leimnud.Package.Public({
|
||||
this.panel.styles.fx.opacityModal.Static=0;
|
||||
this.panel.make();
|
||||
this.panel.elements.headerBar.className="boxTopPanel";
|
||||
this.panel.elements.headerBar.innerHTML="<div class='a'></div><div class='b'></div><div class='c'></div>";
|
||||
this.panel.elements.headerBar.innerHTML="<div class='a'> </div><div class='b'> </div><div class='c'> </div>";
|
||||
|
||||
this.panel.elements.statusBar.className="boxBottom";
|
||||
this.panel.elements.statusBar.innerHTML="<div class='a'></div><div class='b'></div><div class='c'></div>";
|
||||
this.panel.elements.statusBar.innerHTML="<div class='a'> </div><div class='b'> </div><div class='c'> </div>";
|
||||
return this.panel;
|
||||
},
|
||||
confirm:function()
|
||||
|
||||
@@ -82,14 +82,14 @@ 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,style",
|
||||
mode : "specific_textareas",
|
||||
editor_selector : "tmceEditor",
|
||||
width : 760,
|
||||
height : "'.$this->height.'",
|
||||
|
||||
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",
|
||||
theme_advanced_buttons2 : "tablecontrols,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,styleprops,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,code",
|
||||
popup_css : "/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css",
|
||||
oninit: function (){
|
||||
tinyMCE.activeEditor.processID = formProcessID;
|
||||
@@ -117,14 +117,14 @@ 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,pmGrids",
|
||||
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,style",
|
||||
mode : "specific_textareas",
|
||||
editor_selector : "tmceEditor",
|
||||
width : "770",
|
||||
height : "305",
|
||||
verify_html : false,
|
||||
theme_advanced_buttons1 : "pmSimpleUploader,|,pmVariablePicker,|,pmGrids,|,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",
|
||||
theme_advanced_buttons2 : "tablecontrols,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,styleprops,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,code",
|
||||
popup_css : "/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css",
|
||||
oninit: function () {
|
||||
tinyMCE.activeEditor.processID = formProcessID;
|
||||
@@ -144,15 +144,15 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
|
||||
$editorDefinition.= '
|
||||
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",
|
||||
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,style",
|
||||
mode : "specific_textareas",
|
||||
//apply_source_formatting : true,
|
||||
//remove_linebreaks: false,
|
||||
editor_selector : "tmceEditor",
|
||||
width : "700",
|
||||
height : "300",
|
||||
width : 850,
|
||||
height : 300,
|
||||
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",
|
||||
theme_advanced_buttons2 : "outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,|,forecolor,backcolor,styleprops,|,hr,removeformat,visualaid,|,sub,sup,|,ltr,rtl,|,code",
|
||||
popup_css : "/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css",
|
||||
skin : "o2k7",
|
||||
skin_variant : "silver",
|
||||
|
||||
@@ -845,6 +845,8 @@ var dynaformEditor={
|
||||
},
|
||||
restoreHTML:function()
|
||||
{
|
||||
var htmlContent = this.ajax.restore_html(this.A);
|
||||
tinyMCE.activeEditor.execCommand('mceSetContent', false, htmlContent);
|
||||
// window._editorHTML.doc.body.innerHTML = this.ajax.restore_html(this.A);
|
||||
// html_html2();
|
||||
// html2_html();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{if $printTemplate}
|
||||
{* this is the xmlform template *}
|
||||
<form id="{$form->id}" name="{$form->name}" action="{$form->action}" class="{$form->className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit="return validateForm('{$form->objectRequiredFields}');"> <div class="borderForm" style="width:{$form->width}; padding-left:0; padding-right:0; border-width:{$form->border};">
|
||||
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
<div class="boxTop"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
||||
<div class="content" style="height:{$form->height};" >
|
||||
<table width="99%">
|
||||
<tr>
|
||||
@@ -66,7 +66,7 @@
|
||||
</table>
|
||||
{if $hasRequiredFields}<div class="FormRequiredTextMessage"><font color="red">* </font>{php}echo (G::LoadTranslation('ID_REQUIRED_FIELD'));{/php}</div>{/if}
|
||||
</div>
|
||||
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
<div class="boxBottom"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
||||
</div>
|
||||
{foreach from=$form->fields item=field}
|
||||
{if ($field->type==='javascript')}
|
||||
|
||||
Reference in New Issue
Block a user