PluginProbe
Smart Forms – when you need more than just a contact form / 0.5.5
Smart Forms – when you need more than just a contact form v0.5.5
trunk 0.5 0.5.5 0.6 0.7 0.8 0.8.5 0.9.1
smart-forms / js / editors / email-editor.js

email-editor.js in Smart Forms – when you need more than just a contact form 0.5.5, at js/editors/email-editor.js

54 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 function RedNaoEmailEditor()
2 {
3 rnJQuery( "#redNaoAccordion" ).accordion();
4 this.Dialog=rnJQuery("#redNaoEmailEditor").dialog(
5 { width:"800",
6 height:"680",
7 modal:true,
8 autoOpen:false,
9 create: function(event, ui){
10 rnJQuery('.ui-dialog').wrap('<div class="smartFormsSlider" />');
11 },
12 open: function(event, ui){
13 rnJQuery('.ui-widget-overlay').wrap('<div class="smartFormsSlider" />');
14
15 }
16
17
18 });
19
20
21 }
22
23 RedNaoEmailEditor.prototype.OpenEmailEditor=function(redNaoFormElements)
24 {
25 this.Dialog.dialog('open');
26 var formList=rnJQuery('#redNaoEmailFormFields');
27 formList.empty();
28 for(var i=0;i<redNaoFormElements.length;i++)
29 {
30 if(redNaoFormElements[i].StoresInformation())
31 {
32 formList.append('<li><button onclick="RedNaoEmailEditorVar.AddFieldToEmail(\''+redNaoFormElements[i].Options.Id+'\');">'+redNaoFormElements[i].Options.Label+'</button></li>');
33
34 }
35 }
36 }
37
38
39 RedNaoEmailEditor.prototype.CloseEmailEditor=function(redNaoFormElements)
40 {
41 this.Dialog.dialog('close');
42 }
43
44 RedNaoEmailEditor.prototype.AddFieldToEmail=function(id)
45 {
46 tinymce.activeEditor.execCommand('mceInsertContent', false, "[field "+id.trim()+"]");
47 }
48
49
50
51 var RedNaoEmailEditorVar=null;
52 rnJQuery(function(){
53 RedNaoEmailEditorVar=new RedNaoEmailEditor();
54 });