PluginProbe
Contact Forms by Cimatti / 1.9.2
Contact Forms by Cimatti v1.9.2
2.3.6 2.3.5 2.3.0 2.2.32 2.2.4 2.2.0 2.1.2 2.1.1 trunk 1.0 1.1 1.2 1.2.1 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 All 62 releases
← All changes | PFBC/Element/TinyMCE.php +53 -53 1.01.9.2 View file →
@@ -1,53 +1,53 @@
1 -<?php
2 -class Element_TinyMCE extends Element_Textarea {
3 - protected $basic;
4 -
5 - public function jQueryDocumentReady() {
6 - echo 'jQuery("#', $this->attributes["id"], '").width(jQuery("#', $this->attributes["id"], '").width());';
7 - }
8 -
9 - function renderJS() {
10 - echo <<<JS
11 -tinyMCE.init({
12 - mode: "exact",
13 - elements: "{$this->attributes["id"]}",
14 -JS;
15 - if(empty($this->basic)) {
16 - echo <<<JS
17 - theme: "advanced",
18 - plugins: "safari,table,paste,inlinepopups,preview,fullscreen",
19 - dialog_type: "modal",
20 - theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,|,formatselect,fontselect,fontsizeselect",
21 - theme_advanced_buttons2: "link,unlink,anchor,image,charmap,hr,|,tablecontrols,|,pastetext,pasteword,|,cleanup,code,preview,fullscreen,|,undo,redo",
22 - theme_advanced_buttons3: "",
23 - theme_advanced_toolbar_location: "top",
24 - theme_advanced_toolbar_align : "left",
25 - theme_advanced_resizing : true,
26 -JS;
27 - }
28 - else
29 - echo 'theme: "simple",';
30 - echo <<<JS
31 - forced_root_block: false,
32 - force_br_newlines: true,
33 - force_p_newlines: false
34 -});
35 -JS;
36 -
37 - $ajax = $this->form->getAjax();
38 - $id = $this->form->getID();
39 - if(!empty($ajax)) {
40 - echo <<<JS
41 - jQuery("#$id").bind("submit", function() {
42 - tinyMCE.triggerSave();
43 - });
44 -JS;
45 - }
46 - }
47 -
48 - function getJSFiles() {
49 - return array(
50 - $this->form->getResourcesPath() . "/tiny_mce/tiny_mce.js"
51 - );
52 - }
53 -}
1 +<?php
2 +class Element_TinyMCE extends Element_Textarea {
3 + protected $basic;
4 +
5 + public function jQueryDocumentReady() {
6 + echo 'jQuery("#', $this->attributes["id"], '").width(jQuery("#', $this->attributes["id"], '").width());';
7 + }
8 +
9 + function renderJS() {
10 + echo <<<JS
11 +tinyMCE.init({
12 + mode: "exact",
13 + elements: "{$this->attributes["id"]}",
14 +JS;
15 + if(empty($this->basic)) {
16 + echo <<<JS
17 + theme: "advanced",
18 + plugins: "safari,table,paste,inlinepopups,preview,fullscreen",
19 + dialog_type: "modal",
20 + theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,|,formatselect,fontselect,fontsizeselect",
21 + theme_advanced_buttons2: "link,unlink,anchor,image,charmap,hr,|,tablecontrols,|,pastetext,pasteword,|,cleanup,code,preview,fullscreen,|,undo,redo",
22 + theme_advanced_buttons3: "",
23 + theme_advanced_toolbar_location: "top",
24 + theme_advanced_toolbar_align : "left",
25 + theme_advanced_resizing : true,
26 +JS;
27 + }
28 + else
29 + echo 'theme: "simple",';
30 + echo <<<JS
31 + forced_root_block: false,
32 + force_br_newlines: true,
33 + force_p_newlines: false
34 +});
35 +JS;
36 +
37 + $ajax = $this->form->getAjax();
38 + $id = $this->form->getID();
39 + if(!empty($ajax)) {
40 + echo <<<JS
41 + jQuery("#$id").bind("submit", function() {
42 + tinyMCE.triggerSave();
43 + });
44 +JS;
45 + }
46 + }
47 +
48 + function getJSFiles() {
49 + return array(
50 + $this->form->getResourcesPath() . "/tiny_mce/tiny_mce.js"
51 + );
52 + }
53 +}