Esites_Editor - Version 0.4.0

Version Notes

Version 0.4.0 is quite a major release.

* Added standalone support for Transactional Emails
* Created the possibility to enable the editor for available WYSIWYG editors (including CMS, Catalog and Newsletter Templates)
* Transferred files to the community code pool
* Added Dutch translation (more coming!)
* Refactored large part of the JavaScript code

The GitHub repo can be found at: https://github.com/e-sites/magento-advanced-html-editor

Download this release

Release Info

Developer Boye Oomens
Extension Esites_Editor
Version 0.4.0
Comparing to
See all releases


Code changes from version 0.3.0 to 0.4.0

Files changed (39) hide show
  1. app/code/community/Esites/Editor/Block/Adminhtml/System/Email/Template/Edit/Form.php +221 -0
  2. app/code/{local → community}/Esites/Editor/Helper/Data.php +0 -0
  3. app/code/{local → community}/Esites/Editor/Model/Config.php +6 -4
  4. app/code/{local → community}/Esites/Editor/Model/Observer.php +1 -0
  5. app/code/community/Esites/Editor/Model/Source/Status.php +35 -0
  6. app/code/{local → community}/Esites/Editor/Model/System/Config/Source/Indentunit/Values.php +0 -0
  7. app/code/{local → community}/Esites/Editor/Model/System/Config/Source/Keymap/Values.php +0 -0
  8. app/code/community/Esites/Editor/Model/System/Config/Source/Sections/Values.php +45 -0
  9. app/code/{local → community}/Esites/Editor/Model/System/Config/Source/Theme/Values.php +0 -0
  10. app/code/{local → community}/Esites/Editor/etc/config.xml +21 -4
  11. app/code/{local → community}/Esites/Editor/etc/system.xml +44 -25
  12. app/code/local/Esites/Editor/Model/Source/Status.php +0 -17
  13. app/etc/modules/Esites_Editor.xml +1 -1
  14. app/locale/en_US/Esites_Editor.csv +24 -0
  15. app/locale/nl_NL/Esites_Editor.csv +23 -0
  16. js/tiny_mce/plugins/esites_editor/css/styles.css +17 -0
  17. js/tiny_mce/plugins/esites_editor/esites_editor.html +2 -2
  18. js/tiny_mce/plugins/esites_editor/esites_editor_plugin.js +1 -1
  19. js/tiny_mce/plugins/esites_editor/esites_editor_plugin_src.js +43 -16
  20. js/tiny_mce/plugins/esites_editor/js/app.js +15 -6
  21. js/tiny_mce/plugins/esites_editor/js/app/main.js +27 -91
  22. js/tiny_mce/plugins/esites_editor/js/app/module/code.js +94 -0
  23. js/tiny_mce/plugins/esites_editor/js/app/module/dialog.js +87 -0
  24. js/tiny_mce/plugins/esites_editor/js/app/module/editor.js +105 -31
  25. js/tiny_mce/plugins/esites_editor/js/app/module/popup.js +0 -42
  26. js/tiny_mce/plugins/esites_editor/js/app/module/setup.js +69 -0
  27. js/tiny_mce/plugins/esites_editor/js/app/module/standalone.js +98 -0
  28. js/tiny_mce/plugins/esites_editor/js/app/module/util.js +7 -0
  29. js/tiny_mce/plugins/esites_editor/js/app/var/addons.js +17 -4
  30. js/tiny_mce/plugins/esites_editor/js/app/var/cmOptions.js +27 -2
  31. js/tiny_mce/plugins/esites_editor/js/app/var/deps.js +7 -0
  32. js/tiny_mce/plugins/esites_editor/js/app/var/plugin.js +26 -2
  33. js/tiny_mce/plugins/esites_editor/js/app/var/textarea.js +9 -1
  34. js/tiny_mce/plugins/esites_editor/js/app/var/tinymcePopup.js +10 -0
  35. js/tiny_mce/plugins/esites_editor/js/vendor/codemirror/mode/handlebars/handlebars.js +53 -0
  36. js/tiny_mce/plugins/esites_editor/js/vendor/gator/gator.min.js +6 -0
  37. js/tiny_mce/plugins/esites_editor/js/vendor/requirejs/require.min.js +31 -31
  38. js/tiny_mce/plugins/esites_editor/langs/en.js +1 -1
  39. package.xml +11 -5
app/code/community/Esites/Editor/Block/Adminhtml/System/Email/Template/Edit/Form.php ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Esites
16
+ * @package Esites_Editor
17
+ * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ /**
22
+ * Adminhtml system template edit form
23
+ *
24
+ * @category Esites
25
+ * @package Esites_Editor
26
+ */
27
+ class Esites_Editor_Block_Adminhtml_System_Email_Template_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
28
+ {
29
+ /**
30
+ * Prepare layout.
31
+ * Add files to use dialog windows
32
+ *
33
+ * @return Mage_Adminhtml_Block_System_Email_Template_Edit_Form
34
+ */
35
+ protected function _prepareLayout()
36
+ {
37
+ if ($head = $this->getLayout()->getBlock('head')) {
38
+ $head->addItem('js', 'prototype/window.js')
39
+ ->addItem('js_css', 'prototype/windows/themes/default.css')
40
+ ->addCss('lib/prototype/windows/themes/magento.css')
41
+ ->addItem('js_css', 'tiny_mce/plugins/esites_editor/js/vendor/codemirror/lib/codemirror.css')
42
+ ->addItem('js_css', 'tiny_mce/plugins/esites_editor/css/styles.css')
43
+ ->addItem('js', 'tiny_mce/tiny_mce.js')
44
+ ->addItem('js', 'tiny_mce/plugins/esites_editor/js/vendor/requirejs/require.min.js')
45
+ ->addItem('js', 'mage/adminhtml/variables.js');
46
+ }
47
+ return parent::_prepareLayout();
48
+ }
49
+
50
+ /**
51
+ * Add additional settings to wysiwyg config
52
+ *
53
+ * @param Varien_Event_Observer $observer
54
+ *
55
+ * @return array
56
+ */
57
+ protected function getEditorConfig()
58
+ {
59
+
60
+ if (Mage::getStoreConfig('editor/general/enabled', Mage::app()->getStore())) {
61
+ $settings = Mage::getModel('editor/config')->getPluginSettings();
62
+ }
63
+
64
+ return $settings['plugins'][0]['config'];
65
+ }
66
+
67
+ /**
68
+ * Whether the email template sections are selected via the admin panel
69
+ *
70
+ * @return bool
71
+ */
72
+ protected function hasEmailTemplateSection()
73
+ {
74
+ $editorConf = $this->getEditorConfig();
75
+ $sections = explode(',', $editorConf['sections']);
76
+
77
+ return in_array('wysiwygtemplate_text', $sections);
78
+ }
79
+
80
+ /**
81
+ * Add fields to form and create template info form
82
+ *
83
+ * @return Mage_Adminhtml_Block_Widget_Form
84
+ */
85
+ protected function _prepareForm()
86
+ {
87
+ $form = new Varien_Data_Form();
88
+ $editorConf = $this->getEditorConfig();
89
+
90
+ $fieldset = $form->addFieldset('base_fieldset', array(
91
+ 'legend' => Mage::helper('adminhtml')->__('Template Information'),
92
+ 'class' => 'fieldset-wide'
93
+ ));
94
+
95
+ $templateId = $this->getEmailTemplate()->getId();
96
+ if ($templateId) {
97
+ $fieldset->addField('used_currently_for', 'label', array(
98
+ 'label' => Mage::helper('adminhtml')->__('Used Currently For'),
99
+ 'container_id' => 'used_currently_for',
100
+ 'after_element_html' =>
101
+ '<script type="text/javascript">' .
102
+ (!$this->getEmailTemplate()->getSystemConfigPathsWhereUsedCurrently()
103
+ ? '$(\'' . 'used_currently_for' . '\').hide(); ' : '') .
104
+ '</script>',
105
+ ));
106
+ }
107
+
108
+ if (!$templateId) {
109
+ $fieldset->addField('used_default_for', 'label', array(
110
+ 'label' => Mage::helper('adminhtml')->__('Used as Default For'),
111
+ 'container_id' => 'used_default_for',
112
+ 'after_element_html' =>
113
+ '<script type="text/javascript">' .
114
+ (!(bool)$this->getEmailTemplate()->getOrigTemplateCode()
115
+ ? '$(\'' . 'used_default_for' . '\').hide(); ' : '') .
116
+ '</script>',
117
+ ));
118
+ }
119
+
120
+ $fieldset->addField('template_code', 'text', array(
121
+ 'name'=>'template_code',
122
+ 'label' => Mage::helper('adminhtml')->__('Template Name'),
123
+ 'required' => true,
124
+ 'after_element_html' => ($this->hasEmailTemplateSection() ? '<script type="text/javascript">' .
125
+ 'var esites_editor = {settings: ' . json_encode($editorConf) . '};' .
126
+ 'requirejs(["/js/tiny_mce/plugins/esites_editor/js/app.js"]);' .
127
+ '</script>' : ''),
128
+ ));
129
+
130
+ $fieldset->addField('template_subject', 'text', array(
131
+ 'name'=>'template_subject',
132
+ 'label' => Mage::helper('adminhtml')->__('Template Subject'),
133
+ 'required' => true
134
+ ));
135
+
136
+ $fieldset->addField('orig_template_variables', 'hidden', array(
137
+ 'name' => 'orig_template_variables',
138
+ ));
139
+
140
+ $fieldset->addField('variables', 'hidden', array(
141
+ 'name' => 'variables',
142
+ 'value' => Zend_Json::encode($this->getVariables())
143
+ ));
144
+
145
+ $fieldset->addField('template_variables', 'hidden', array(
146
+ 'name' => 'template_variables',
147
+ ));
148
+
149
+ $insertVariableButton = $this->getLayout()
150
+ ->createBlock('adminhtml/widget_button', '', array(
151
+ 'type' => 'button',
152
+ 'label' => Mage::helper('adminhtml')->__('Insert Variable...'),
153
+ 'onclick' => 'templateControl.openVariableChooser();return false;'
154
+ ));
155
+
156
+ $fieldset->addField('insert_variable', 'note', array(
157
+ 'text' => $insertVariableButton->toHtml()
158
+ ));
159
+
160
+ $fieldset->addField('template_text', 'textarea', array(
161
+ 'name'=>'template_text',
162
+ 'label' => Mage::helper('adminhtml')->__('Template Content'),
163
+ 'title' => Mage::helper('adminhtml')->__('Template Content'),
164
+ 'required' => true,
165
+ 'style' => 'height:24em;',
166
+ ));
167
+
168
+ if (!$this->getEmailTemplate()->isPlain()) {
169
+ $fieldset->addField('template_styles', 'textarea', array(
170
+ 'name'=>'template_styles',
171
+ 'label' => Mage::helper('adminhtml')->__('Template Styles'),
172
+ 'container_id' => 'field_template_styles'
173
+ ));
174
+ }
175
+
176
+ if ($templateId) {
177
+ $form->addValues($this->getEmailTemplate()->getData());
178
+ }
179
+
180
+ if ($values = Mage::getSingleton('adminhtml/session')->getData('email_template_form_data', true)) {
181
+ $form->setValues($values);
182
+ }
183
+
184
+ $this->setForm($form);
185
+
186
+ return parent::_prepareForm();
187
+ }
188
+
189
+ /**
190
+ * Return current email template model
191
+ *
192
+ * @return Mage_Core_Model_Email_Template
193
+ */
194
+ public function getEmailTemplate()
195
+ {
196
+ return Mage::registry('current_email_template');
197
+ }
198
+
199
+ /**
200
+ * Retrieve variables to insert into email
201
+ *
202
+ * @return array
203
+ */
204
+ public function getVariables()
205
+ {
206
+ $variables = array();
207
+ $variables[] = Mage::getModel('core/source_email_variables')
208
+ ->toOptionArray(true);
209
+ $customVariables = Mage::getModel('core/variable')
210
+ ->getVariablesOptionArray(true);
211
+ if ($customVariables) {
212
+ $variables[] = $customVariables;
213
+ }
214
+ /* @var $template Mage_Core_Model_Email_Template */
215
+ $template = Mage::registry('current_email_template');
216
+ if ($template->getId() && $templateVariables = $template->getVariablesOptionArray(true)) {
217
+ $variables[] = $templateVariables;
218
+ }
219
+ return $variables;
220
+ }
221
+ }
app/code/{local → community}/Esites/Editor/Helper/Data.php RENAMED
File without changes
app/code/{local → community}/Esites/Editor/Model/Config.php RENAMED
@@ -33,10 +33,10 @@ class Esites_Editor_Model_Config extends Varien_Object
33
  *
34
  * @return array
35
  */
36
- public function getPluginSettings($config)
37
  {
38
  $store = Mage::app()->getStore();
39
- $configPlugins = $config->getData('plugins');
40
  $EsitesEditorPlugin = array(
41
  array(
42
  'name' => 'esites_editor',
@@ -46,8 +46,9 @@ class Esites_Editor_Model_Config extends Varien_Object
46
  'emmet' => (bool) Mage::getStoreConfig('editor/prefs/emmet', $store),
47
  'activeLine' => (bool) Mage::getStoreConfig('editor/prefs/activeLine', $store),
48
  'codeFolding' => (bool) Mage::getStoreConfig('editor/prefs/codeFolding', $store),
49
- 'indentUnit' => (int) Mage::getStoreConfig('editor/prefs/indentUnit', $store),
50
  'lineWrapping' => (bool) Mage::getStoreConfig('editor/prefs/lineWrapping', $store),
 
51
  'autoFormat' => (bool) Mage::getStoreConfig('editor/appearance/autoFormat', $store),
52
  'matchTags' => (bool) Mage::getStoreConfig('editor/prefs/matchTags', $store),
53
  'matchHighlight' => (bool) Mage::getStoreConfig('editor/prefs/matchHighlight', $store),
@@ -55,7 +56,8 @@ class Esites_Editor_Model_Config extends Varien_Object
55
  'search' => (bool) Mage::getStoreConfig('editor/prefs/search', $store),
56
  'completion' => (bool) Mage::getStoreConfig('editor/prefs/completion', $store),
57
  'fontSize' => (string) Mage::getStoreConfig('editor/appearance/fontSize', $store),
58
- 'keymap' => (string) Mage::getStoreConfig('editor/prefs/keymap', $store)
 
59
  )
60
  )
61
  );
33
  *
34
  * @return array
35
  */
36
+ public function getPluginSettings($config=array())
37
  {
38
  $store = Mage::app()->getStore();
39
+ $configPlugins = (is_object($config) ? $config->getData('plugins') : array());
40
  $EsitesEditorPlugin = array(
41
  array(
42
  'name' => 'esites_editor',
46
  'emmet' => (bool) Mage::getStoreConfig('editor/prefs/emmet', $store),
47
  'activeLine' => (bool) Mage::getStoreConfig('editor/prefs/activeLine', $store),
48
  'codeFolding' => (bool) Mage::getStoreConfig('editor/prefs/codeFolding', $store),
49
+ 'indentUnit' => (int) Mage::getStoreConfig('editor/appearance/indentUnit', $store),
50
  'lineWrapping' => (bool) Mage::getStoreConfig('editor/prefs/lineWrapping', $store),
51
+ 'lineLength' => (int) Mage::getStoreConfig('editor/appearance/lineLength', $store),
52
  'autoFormat' => (bool) Mage::getStoreConfig('editor/appearance/autoFormat', $store),
53
  'matchTags' => (bool) Mage::getStoreConfig('editor/prefs/matchTags', $store),
54
  'matchHighlight' => (bool) Mage::getStoreConfig('editor/prefs/matchHighlight', $store),
56
  'search' => (bool) Mage::getStoreConfig('editor/prefs/search', $store),
57
  'completion' => (bool) Mage::getStoreConfig('editor/prefs/completion', $store),
58
  'fontSize' => (string) Mage::getStoreConfig('editor/appearance/fontSize', $store),
59
+ 'keymap' => (string) Mage::getStoreConfig('editor/prefs/keymap', $store),
60
+ 'sections' => (string) Mage::getStoreConfig('editor/general/sections', $store)
61
  )
62
  )
63
  );
app/code/{local → community}/Esites/Editor/Model/Observer.php RENAMED
@@ -37,6 +37,7 @@ class Esites_Editor_Model_Observer
37
  public function prepareWidgetsPluginConfig(Varien_Event_Observer $observer)
38
  {
39
  $config = $observer->getEvent()->getConfig();
 
40
 
41
  if ($config->getData('add_widgets') && Mage::getStoreConfig('editor/general/enabled', Mage::app()->getStore())) {
42
  $settings = Mage::getModel('editor/config')->getPluginSettings($config);
37
  public function prepareWidgetsPluginConfig(Varien_Event_Observer $observer)
38
  {
39
  $config = $observer->getEvent()->getConfig();
40
+ $config->setAddWidgets('true');
41
 
42
  if ($config->getData('add_widgets') && Mage::getStoreConfig('editor/general/enabled', Mage::app()->getStore())) {
43
  $settings = Mage::getModel('editor/config')->getPluginSettings($config);
app/code/community/Esites/Editor/Model/Source/Status.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Esites
16
+ * @package Esites_Editor
17
+ * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class Esites_Editor_Model_Source_Status extends Varien_Object
22
+ {
23
+ const STATUS_QUEUED = -1;
24
+ const STATUS_RUNNING = 1;
25
+ const STATUS_DISABLED = 2;
26
+ const STATUS_ENDED = 3;
27
+
28
+ static public function getOptionArray()
29
+ {
30
+ return array(
31
+ self::STATUS_RUNNING => Mage::helper('catalog')->__('Enabled'),
32
+ self::STATUS_DISABLED => Mage::helper('catalog')->__('Disabled')
33
+ );
34
+ }
35
+ }
app/code/{local → community}/Esites/Editor/Model/System/Config/Source/Indentunit/Values.php RENAMED
File without changes
app/code/{local → community}/Esites/Editor/Model/System/Config/Source/Keymap/Values.php RENAMED
File without changes
app/code/community/Esites/Editor/Model/System/Config/Source/Sections/Values.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Esites
16
+ * @package Esites_Editor
17
+ * @copyright Copyright (c) 2015 E-sites (http://www.e-sites.nl)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class Esites_Editor_Model_System_Config_Source_Sections_Values extends Varien_Object
22
+ {
23
+ protected $keymaps = array(
24
+ 'wysiwygpage_content' => 'Pages',
25
+ 'wysiwygblock_content' => 'Static Blocks',
26
+ 'wysiwyggroup_4description_editor' => 'Categories',
27
+ 'wysiwygdescription_editor|wysiwygshort_description_editor' => 'Products',
28
+ 'wysiwygtext' => 'Newsletter Templates',
29
+ 'wysiwygtemplate_text' => 'Transactional Emails'
30
+ );
31
+
32
+ public function toOptionArray()
33
+ {
34
+ $values = array();
35
+
36
+ foreach ($this->keymaps as $key => $label) {
37
+ $values[] = array(
38
+ 'value' => $key,
39
+ 'label' => Mage::helper('adminhtml')->__($label)
40
+ );
41
+ }
42
+
43
+ return $values;
44
+ }
45
+ }
app/code/{local → community}/Esites/Editor/Model/System/Config/Source/Theme/Values.php RENAMED
File without changes
app/code/{local → community}/Esites/Editor/etc/config.xml RENAMED
@@ -22,7 +22,7 @@
22
  <config>
23
  <modules>
24
  <Esites_Editor>
25
- <version>0.3.0</version>
26
  </Esites_Editor>
27
  </modules>
28
 
@@ -37,19 +37,26 @@
37
  <class>Esites_Editor_Helper</class>
38
  </editor>
39
  </helpers>
 
 
 
 
 
 
 
40
  </global>
41
 
42
  <default>
43
  <editor>
44
  <general>
45
  <enabled>0</enabled>
 
46
  </general>
47
  <prefs>
48
  <keymap>default</keymap>
49
  <emmet>1</emmet>
50
  <activeLine>1</activeLine>
51
  <codeFolding>0</codeFolding>
52
- <indentUnit>4</indentUnit>
53
  <lineWrapping>1</lineWrapping>
54
  <matchTags>1</matchTags>
55
  <matchHighlight>0</matchHighlight>
@@ -60,12 +67,23 @@
60
  <appearance>
61
  <theme>default</theme>
62
  <fontSize>12</fontSize>
 
63
  <autoFormat>1</autoFormat>
 
64
  </appearance>
65
  </editor>
66
  </default>
67
 
68
  <adminhtml>
 
 
 
 
 
 
 
 
 
69
  <events>
70
  <cms_wysiwyg_config_prepare>
71
  <observers>
@@ -89,7 +107,7 @@
89
  <config>
90
  <children>
91
  <editor>
92
- <title>E-sites - All</title>
93
  </editor>
94
  </children>
95
  </config>
@@ -100,5 +118,4 @@
100
  </resources>
101
  </acl>
102
  </adminhtml>
103
-
104
  </config>
22
  <config>
23
  <modules>
24
  <Esites_Editor>
25
+ <version>0.4.0</version>
26
  </Esites_Editor>
27
  </modules>
28
 
37
  <class>Esites_Editor_Helper</class>
38
  </editor>
39
  </helpers>
40
+ <blocks>
41
+ <adminhtml>
42
+ <rewrite>
43
+ <system_email_template_edit_form>Esites_Editor_Block_Adminhtml_System_Email_Template_Edit_Form</system_email_template_edit_form>
44
+ </rewrite>
45
+ </adminhtml>
46
+ </blocks>
47
  </global>
48
 
49
  <default>
50
  <editor>
51
  <general>
52
  <enabled>0</enabled>
53
+ <sections>wysiwygpage_content</sections>
54
  </general>
55
  <prefs>
56
  <keymap>default</keymap>
57
  <emmet>1</emmet>
58
  <activeLine>1</activeLine>
59
  <codeFolding>0</codeFolding>
 
60
  <lineWrapping>1</lineWrapping>
61
  <matchTags>1</matchTags>
62
  <matchHighlight>0</matchHighlight>
67
  <appearance>
68
  <theme>default</theme>
69
  <fontSize>12</fontSize>
70
+ <indentUnit>4</indentUnit>
71
  <autoFormat>1</autoFormat>
72
+ <lineLength>100</lineLength>
73
  </appearance>
74
  </editor>
75
  </default>
76
 
77
  <adminhtml>
78
+ <translate>
79
+ <modules>
80
+ <Esites_Editor>
81
+ <files>
82
+ <default>Esites_Editor.csv</default>
83
+ </files>
84
+ </Esites_Editor>
85
+ </modules>
86
+ </translate>
87
  <events>
88
  <cms_wysiwyg_config_prepare>
89
  <observers>
107
  <config>
108
  <children>
109
  <editor>
110
+ <title>E-sites - Advanced HTML Editor</title>
111
  </editor>
112
  </children>
113
  </config>
118
  </resources>
119
  </acl>
120
  </adminhtml>
 
121
  </config>
app/code/{local → community}/Esites/Editor/etc/system.xml RENAMED
@@ -51,8 +51,19 @@
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
53
  <show_in_store>0</show_in_store>
54
- <comment><![CDATA[By enabling this feature a more advanced HTML editor, based on <a href="http://codemirror.net/" target="_blank">CodeMirror</a>, will appear]]></comment>
55
  </enabled>
 
 
 
 
 
 
 
 
 
 
 
 
56
  </fields>
57
  </general>
58
  <prefs translate="label" module="editor">
@@ -72,7 +83,7 @@
72
  <show_in_store>0</show_in_store>
73
  </codeFolding>
74
  <emmet translate="label">
75
- <label>Emmet plugin</label>
76
  <frontend_type>select</frontend_type>
77
  <source_model>adminhtml/system_config_source_yesno</source_model>
78
  <sort_order>0</sort_order>
@@ -82,14 +93,13 @@
82
  <comment><![CDATA[By enabling this plugin the HTML editor will be extended with <a href="https://github.com/emmetio/codemirror" target="_blank">Emmet</a> functionality]]></comment>
83
  </emmet>
84
  <activeLine translate="label">
85
- <label>Active line</label>
86
  <frontend_type>select</frontend_type>
87
  <source_model>adminhtml/system_config_source_yesno</source_model>
88
  <sort_order>0</sort_order>
89
  <show_in_default>1</show_in_default>
90
  <show_in_website>1</show_in_website>
91
  <show_in_store>0</show_in_store>
92
- <comment><![CDATA[Styles the current cursor line]]></comment>
93
  </activeLine>
94
  <keymap>
95
  <label>Keymap</label>
@@ -99,18 +109,8 @@
99
  <show_in_default>1</show_in_default>
100
  <show_in_website>1</show_in_website>
101
  <show_in_store>0</show_in_store>
102
- <comment><![CDATA[Key maps are ways to associate keys with functionality.]]></comment>
103
  </keymap>
104
- <indentUnit>
105
- <label>Indent unit</label>
106
- <frontend_type>select</frontend_type>
107
- <source_model>editor/system_config_source_indentunit_values</source_model>
108
- <sort_order>1</sort_order>
109
- <show_in_default>1</show_in_default>
110
- <show_in_website>1</show_in_website>
111
- <show_in_store>0</show_in_store>
112
- <comment><![CDATA[How many spaces a block should be indented.]]></comment>
113
- </indentUnit>
114
  <lineWrapping>
115
  <label>Line wrapping</label>
116
  <frontend_type>select</frontend_type>
@@ -119,10 +119,10 @@
119
  <show_in_default>1</show_in_default>
120
  <show_in_website>1</show_in_website>
121
  <show_in_store>0</show_in_store>
122
- <comment><![CDATA[Whether the editor should scroll or wrap for long lines.]]></comment>
123
  </lineWrapping>
124
  <matchTags>
125
- <label>Match tags</label>
126
  <frontend_type>select</frontend_type>
127
  <source_model>adminhtml/system_config_source_yesno</source_model>
128
  <sort_order>4</sort_order>
@@ -139,37 +139,34 @@
139
  <show_in_default>1</show_in_default>
140
  <show_in_website>1</show_in_website>
141
  <show_in_store>0</show_in_store>
142
- <comment><![CDATA[Search and highlight occurences of the selected text]]></comment>
143
  </matchHighlight>
144
  <closeTags>
145
- <label>Close tags</label>
146
  <frontend_type>select</frontend_type>
147
  <source_model>adminhtml/system_config_source_yesno</source_model>
148
  <sort_order>4</sort_order>
149
  <show_in_default>1</show_in_default>
150
  <show_in_website>1</show_in_website>
151
  <show_in_store>0</show_in_store>
152
- <comment><![CDATA[Will auto-close HTML tags]]></comment>
153
  </closeTags>
154
  <search>
155
- <label>Search</label>
156
  <frontend_type>select</frontend_type>
157
  <source_model>adminhtml/system_config_source_yesno</source_model>
158
  <sort_order>5</sort_order>
159
  <show_in_default>1</show_in_default>
160
  <show_in_website>1</show_in_website>
161
  <show_in_store>0</show_in_store>
162
- <comment><![CDATA[Provides a dialog to search through the code]]></comment>
163
  </search>
164
  <completion>
165
- <label>Autocomplete</label>
166
  <frontend_type>select</frontend_type>
167
  <source_model>adminhtml/system_config_source_yesno</source_model>
168
  <sort_order>6</sort_order>
169
  <show_in_default>1</show_in_default>
170
  <show_in_website>1</show_in_website>
171
  <show_in_store>0</show_in_store>
172
- <comment><![CDATA[HTML tag and attribute completion]]></comment>
173
  </completion>
174
  </fields>
175
  </prefs>
@@ -187,6 +184,7 @@
187
  <show_in_default>1</show_in_default>
188
  <show_in_website>1</show_in_website>
189
  <show_in_store>0</show_in_store>
 
190
  <comment><![CDATA[Font size of the editor (in pixels)]]></comment>
191
  </fontSize>
192
  <theme translate="label">
@@ -199,16 +197,37 @@
199
  <show_in_store>0</show_in_store>
200
  <comment><![CDATA[<a href="https://codemirror.net/demo/theme.html" target="_blank">Click here for a demo of all available themes</a>]]></comment>
201
  </theme>
 
 
 
 
 
 
 
 
 
 
202
  <autoFormat translate="label">
203
  <label>Auto format</label>
204
  <frontend_type>select</frontend_type>
205
  <source_model>adminhtml/system_config_source_yesno</source_model>
206
- <sort_order>1</sort_order>
207
  <show_in_default>1</show_in_default>
208
  <show_in_website>1</show_in_website>
209
  <show_in_store>0</show_in_store>
210
  <comment><![CDATA[Whether the HTML code should be auto formatted or not]]></comment>
211
  </autoFormat>
 
 
 
 
 
 
 
 
 
 
 
212
  </fields>
213
  </appearance>
214
  </groups>
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
53
  <show_in_store>0</show_in_store>
 
54
  </enabled>
55
+ <sections translate="label">
56
+ <label>Sections</label>
57
+ <frontend_type>multiselect</frontend_type>
58
+ <source_model>editor/system_config_source_sections_values</source_model>
59
+ <sort_order>1</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>0</show_in_store>
63
+ <depends><enabled>1</enabled></depends>
64
+ <validate>validate-select</validate>
65
+ <comment><![CDATA[Select the sections where the editor should be active]]></comment>
66
+ </sections>
67
  </fields>
68
  </general>
69
  <prefs translate="label" module="editor">
83
  <show_in_store>0</show_in_store>
84
  </codeFolding>
85
  <emmet translate="label">
86
+ <label>Activate Emmet plugin</label>
87
  <frontend_type>select</frontend_type>
88
  <source_model>adminhtml/system_config_source_yesno</source_model>
89
  <sort_order>0</sort_order>
93
  <comment><![CDATA[By enabling this plugin the HTML editor will be extended with <a href="https://github.com/emmetio/codemirror" target="_blank">Emmet</a> functionality]]></comment>
94
  </emmet>
95
  <activeLine translate="label">
96
+ <label>Highlight active line</label>
97
  <frontend_type>select</frontend_type>
98
  <source_model>adminhtml/system_config_source_yesno</source_model>
99
  <sort_order>0</sort_order>
100
  <show_in_default>1</show_in_default>
101
  <show_in_website>1</show_in_website>
102
  <show_in_store>0</show_in_store>
 
103
  </activeLine>
104
  <keymap>
105
  <label>Keymap</label>
109
  <show_in_default>1</show_in_default>
110
  <show_in_website>1</show_in_website>
111
  <show_in_store>0</show_in_store>
112
+ <comment><![CDATA[Keymaps are ways to associate keys with functionality]]></comment>
113
  </keymap>
 
 
 
 
 
 
 
 
 
 
114
  <lineWrapping>
115
  <label>Line wrapping</label>
116
  <frontend_type>select</frontend_type>
119
  <show_in_default>1</show_in_default>
120
  <show_in_website>1</show_in_website>
121
  <show_in_store>0</show_in_store>
122
+ <comment><![CDATA[Whether the editor should scroll or wrap for long lines]]></comment>
123
  </lineWrapping>
124
  <matchTags>
125
+ <label>Highlight tag matches</label>
126
  <frontend_type>select</frontend_type>
127
  <source_model>adminhtml/system_config_source_yesno</source_model>
128
  <sort_order>4</sort_order>
139
  <show_in_default>1</show_in_default>
140
  <show_in_website>1</show_in_website>
141
  <show_in_store>0</show_in_store>
142
+ <comment><![CDATA[Search and highlight occurrences of the selected text]]></comment>
143
  </matchHighlight>
144
  <closeTags>
145
+ <label>Auto-close tags</label>
146
  <frontend_type>select</frontend_type>
147
  <source_model>adminhtml/system_config_source_yesno</source_model>
148
  <sort_order>4</sort_order>
149
  <show_in_default>1</show_in_default>
150
  <show_in_website>1</show_in_website>
151
  <show_in_store>0</show_in_store>
 
152
  </closeTags>
153
  <search>
154
+ <label>Activate search dialog</label>
155
  <frontend_type>select</frontend_type>
156
  <source_model>adminhtml/system_config_source_yesno</source_model>
157
  <sort_order>5</sort_order>
158
  <show_in_default>1</show_in_default>
159
  <show_in_website>1</show_in_website>
160
  <show_in_store>0</show_in_store>
 
161
  </search>
162
  <completion>
163
+ <label>HTML autocomplete</label>
164
  <frontend_type>select</frontend_type>
165
  <source_model>adminhtml/system_config_source_yesno</source_model>
166
  <sort_order>6</sort_order>
167
  <show_in_default>1</show_in_default>
168
  <show_in_website>1</show_in_website>
169
  <show_in_store>0</show_in_store>
 
170
  </completion>
171
  </fields>
172
  </prefs>
184
  <show_in_default>1</show_in_default>
185
  <show_in_website>1</show_in_website>
186
  <show_in_store>0</show_in_store>
187
+ <validate>validate-number</validate>
188
  <comment><![CDATA[Font size of the editor (in pixels)]]></comment>
189
  </fontSize>
190
  <theme translate="label">
197
  <show_in_store>0</show_in_store>
198
  <comment><![CDATA[<a href="https://codemirror.net/demo/theme.html" target="_blank">Click here for a demo of all available themes</a>]]></comment>
199
  </theme>
200
+ <indentUnit>
201
+ <label>Indent unit</label>
202
+ <frontend_type>select</frontend_type>
203
+ <source_model>editor/system_config_source_indentunit_values</source_model>
204
+ <sort_order>1</sort_order>
205
+ <show_in_default>1</show_in_default>
206
+ <show_in_website>1</show_in_website>
207
+ <show_in_store>0</show_in_store>
208
+ <comment><![CDATA[How many spaces a block should be indented]]></comment>
209
+ </indentUnit>
210
  <autoFormat translate="label">
211
  <label>Auto format</label>
212
  <frontend_type>select</frontend_type>
213
  <source_model>adminhtml/system_config_source_yesno</source_model>
214
+ <sort_order>2</sort_order>
215
  <show_in_default>1</show_in_default>
216
  <show_in_website>1</show_in_website>
217
  <show_in_store>0</show_in_store>
218
  <comment><![CDATA[Whether the HTML code should be auto formatted or not]]></comment>
219
  </autoFormat>
220
+ <lineLength translate="label">
221
+ <label>Wrap line length</label>
222
+ <frontend_type>text</frontend_type>
223
+ <sort_order>3</sort_order>
224
+ <show_in_default>1</show_in_default>
225
+ <show_in_website>1</show_in_website>
226
+ <show_in_store>0</show_in_store>
227
+ <depends><autoFormat>1</autoFormat></depends>
228
+ <validate>validate-number</validate>
229
+ <comment><![CDATA[Wrap lines at next opportunity after N characters]]></comment>
230
+ </lineLength>
231
  </fields>
232
  </appearance>
233
  </groups>
app/code/local/Esites/Editor/Model/Source/Status.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
-
3
- class Esites_Editor_Model_Source_Status extends Varien_Object
4
- {
5
- const STATUS_QUEUED = -1;
6
- const STATUS_RUNNING = 1;
7
- const STATUS_DISABLED = 2;
8
- const STATUS_ENDED = 3;
9
-
10
- static public function getOptionArray()
11
- {
12
- return array(
13
- self::STATUS_RUNNING => Mage::helper('catalog')->__('Enabled'),
14
- self::STATUS_DISABLED => Mage::helper('catalog')->__('Disabled')
15
- );
16
- }
17
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/etc/modules/Esites_Editor.xml CHANGED
@@ -23,7 +23,7 @@
23
  <modules>
24
  <Esites_Editor>
25
  <active>true</active>
26
- <codePool>local</codePool>
27
  </Esites_Editor>
28
  </modules>
29
  </config>
23
  <modules>
24
  <Esites_Editor>
25
  <active>true</active>
26
+ <codePool>community</codePool>
27
  </Esites_Editor>
28
  </modules>
29
  </config>
app/locale/en_US/Esites_Editor.csv ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "General","General"
2
+ "Enable","Enable"
3
+ "Sections","Sections"
4
+ "In which sections the editor should appear","In which sections the editor should appear"
5
+ "Preferences","Preferences"
6
+ "Highlight active line","Highlight active line"
7
+ "Activate Emmet plugin","Activate Emmet plugin"
8
+ "By enabling this plugin the HTML editor will be extended with <a href=""https://github.com/emmetio/codemirror"" target=""_blank"">Emmet</a> functionality","By enabling this plugin the HTML editor will be extended with <a href=""https://github.com/emmetio/codemirror"" target=""_blank"">Emmet</a> functionality"
9
+ "Keymaps are ways to associate keys with functionality","Keymaps are ways to associate keys with functionality"
10
+ "How many spaces a block should be indented","How many spaces a block should be indented"
11
+ "Whether the editor should scroll or wrap for long lines","Whether the editor should scroll or wrap for long lines"
12
+ "Will cause HTML tags around the cursor to be highlighted","Will cause HTML tags around the cursor to be highlighted"
13
+ "Will auto-close HTML tags","Will auto-close HTML tags"
14
+ "Search and highlight occurrences of the selected text","Search and highlight occurrences of the selected text"
15
+ "Activate search dialog","Activate search dialog"
16
+ "HTML autocomplete","HTML autocomplete"
17
+ "Appearance","Appearance"
18
+ "Font size","Font size"
19
+ "Font size of the editor (in pixels)","Font size of the editor (in pixels)"
20
+ "Auto format","Auto format"
21
+ "Wrap lines at next opportunity after N characters","Wrap lines at next opportunity after N characters"
22
+ "Whether the HTML code should be auto formatted or not","Whether the HTML code should be auto formatted or not"
23
+ "Theme","Theme"
24
+ "<a href=""https://codemirror.net/demo/theme.html"" target=""_blank"">Click here for a demo of all available themes</a>","<a href=""https://codemirror.net/demo/theme.html"" target=""_blank"">Click here for a demo of all available themes</a>"
app/locale/nl_NL/Esites_Editor.csv ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "General","Algemeen"
2
+ "Enable","Inschakelen"
3
+ "Sections","Onderdelen"
4
+ "Select the sections where the editor should be active","Selecteer de onderdelen waar de editor getoond moet worden"
5
+ "Preferences","Voorkeuren"
6
+ "Highlight active line","Highlight actieve regel"
7
+ "Activate Emmet plugin","Activeer Emmet plugin"
8
+ "By enabling this plugin the HTML editor will be extended with <a href=""https://github.com/emmetio/codemirror"" target=""_blank"">Emmet</a> functionality","Door deze plugin te activeren wordt de editor uitgebreid met <a href=""https://github.com/emmetio/codemirror"" target=""_blank"">Emmet</a> functionaliteit"
9
+ "Keymaps are ways to associate keys with functionality","Keymaps worden gebruikt om toetsencombinaties aan bepaalde functionaliteit te koppelen"
10
+ "How many spaces a block should be indented","Hoeveel spaties een blok ingesprongen dient te worden vanaf de kantlijn"
11
+ "Whether the editor should scroll or wrap for long lines","Zorgt ervoor dat de editor lange regels afkapt"
12
+ "Will cause HTML tags around the cursor to be highlighted","Markeert tags waar de cursor staat"
13
+ "Search and highlight occurrences of the selected text","Zoekt en markeert teksten die overeenkomen met de geselecteerde tekst"
14
+ "Activate search dialog","Activeer zoekbox"
15
+ "HTML autocomplete","HTML auto-aanvullen"
16
+ "Appearance","Uiterlijk"
17
+ "Font size","Letter grootte"
18
+ "Font size of the editor (in pixels)","Letter grootte van de editor (in pixels)"
19
+ "Auto format","Auto format"
20
+ "Wrap lines at next opportunity after N characters","Kap regels af na een X-aantal karakters"
21
+ "Whether the HTML code should be auto formatted or not","Of de HTML code automatisch geformateerd dient te worden"
22
+ "Theme","Thema"
23
+ "<a href=""https://codemirror.net/demo/theme.html"" target=""_blank"">Click here for a demo of all available themes</a>","<a href=""https://codemirror.net/demo/theme.html"" target=""_blank"">Klik hier voor een demo van alle beschikbare thema's</a>"
js/tiny_mce/plugins/esites_editor/css/styles.css CHANGED
@@ -15,4 +15,21 @@ textarea {
15
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
16
  background-position: bottom;
17
  background-repeat: repeat-x;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  }
15
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
16
  background-position: bottom;
17
  background-repeat: repeat-x;
18
+ }
19
+
20
+ .CodeMirror-lines {
21
+ line-height: normal;
22
+ }
23
+
24
+ /**
25
+ * Needed for Transaction Emails
26
+ */
27
+
28
+ td.value textarea {
29
+ opacity: 1;
30
+ }
31
+
32
+ td.value .CodeMirror-wrap {
33
+ border: 1px solid;
34
+ border-color: #aaa #c8c8c8 #c8c8c8 #aaa;
35
  }
js/tiny_mce/plugins/esites_editor/esites_editor.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="utf-8">
5
  <title>Advanced HTML Editor</title>
6
- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Source+Code+Pro:400,700">
7
  <link rel="stylesheet" href="js/vendor/codemirror/lib/codemirror.css">
8
  <link rel="stylesheet" href="css/styles.css">
9
  </head>
@@ -19,7 +19,7 @@
19
  <script src="../../tiny_mce_popup.js"></script>
20
  <script>
21
  tinyMCEPopup.onInit.add(function () {
22
- requirejs(['js/app'])
23
  });
24
  </script>
25
  </body>
3
  <head>
4
  <meta charset="utf-8">
5
  <title>Advanced HTML Editor</title>
6
+ <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Code+Pro:400,700">
7
  <link rel="stylesheet" href="js/vendor/codemirror/lib/codemirror.css">
8
  <link rel="stylesheet" href="css/styles.css">
9
  </head>
19
  <script src="../../tiny_mce_popup.js"></script>
20
  <script>
21
  tinyMCEPopup.onInit.add(function () {
22
+ requirejs(['js/app']);
23
  });
24
  </script>
25
  </body>
js/tiny_mce/plugins/esites_editor/esites_editor_plugin.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var i,e,t,n="esites_editor",o=tinymce.each,d=["wysiwygpage_content","wysiwygblock_content","wysiwygtemplate_text"];o(d,function(e){window[e]&&(i=window[e])}),i&&(e=i.config.plugins,tinymce.PluginManager.requireLangPack(n),tinymce.create("tinymce.plugins.EsitesEditorPlugin",{defaults:{emmet:!1,theme:"default",codeFolding:!1},settings:{},init:function(i,d){t=this,t.editor=i,t.url=d,o(e,function(i){i.name===n&&(t.settings=tinymce.extend(t.defaults,i.config))}),t.editor.addCommand("mceEsitesEditor",t.showSourceEditor),t.editor.addButton(n,{image:t.url+"/img/icon-esites-editor.png",title:n+".editor_button",cmd:"mceEsitesEditor"})},showSourceEditor:function(){t.editor.windowManager.open({width:t.editor.getParam("code_dialog_width",900),height:t.editor.getParam("code_dialog_height",600),inline:!0,maximizable:!0,file:t.url+"/esites_editor.html"},{plugin_url:t.url})}}),tinymce.PluginManager.add("esites_editor",tinymce.plugins.EsitesEditorPlugin))}();
1
+ !function(){"use strict";var i,t,e,n="esites_editor",o=tinymce.each,d=["wysiwygtext","wysiwygpage_content","wysiwygblock_content","wysiwygtemplate_text","wysiwygdescription_editor","wysiwygshort_description_editor","wysiwyggroup_4description_editor"],r={};o(d,function(t){window[t]&&(i=window[t],i.name=t)}),i&&(o(i.config.plugins,function(i){i.name===n&&(r.config=i.config,e=r.config.sections,-1!==e.indexOf("|")&&(e=e.split("|").join(",")),-1!==e.indexOf(",")&&(e=e.split(",")),"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]))}),tinymce.inArray(e,i.name)<0||(tinymce.PluginManager.requireLangPack(n),tinymce.create("tinymce.plugins.EsitesEditorPlugin",{defaults:{emmet:!1,theme:"default",codeFolding:!1},settings:{},init:function(i,e){t=this,t.editor=i,t.url=e,t.settings=tinymce.extend(t.defaults,r.config),t.editor.addCommand("mceEsitesEditor",t.showSourceEditor),t.editor.addButton(n,{image:t.url+"/img/icon-esites-editor.png",title:n+".editor_button",cmd:"mceEsitesEditor"})},showSourceEditor:function(){t.editor.windowManager.open({width:t.editor.getParam("code_dialog_width",900),height:t.editor.getParam("code_dialog_height",600),inline:!0,maximizable:!0,file:t.url+"/esites_editor.html"},{plugin_url:t.url})}}),tinymce.PluginManager.add(n,tinymce.plugins.EsitesEditorPlugin)))}();
js/tiny_mce/plugins/esites_editor/esites_editor_plugin_src.js CHANGED
@@ -3,31 +3,38 @@
3
  * This is the TinyMCE plugin of the Magento extension that incorporates the CodeMirror library
4
  *
5
  * @author : Boye Oomens <boye@e-sites.nl>
6
- * @version : 0.3.0
7
  * @license : OSL 3.0
8
  * @see : https://github.com/e-sites/magento-advanced-html-editor
9
  * @see : http://codemirror.net/
10
  * @see : http://emmet.io/
11
  */
12
 
13
- /*global tinymce, wysiwygpage_content */
14
  (function () {
15
 
16
  'use strict';
17
 
18
- var section, plugins, tiny,
19
  pluginName = 'esites_editor',
20
  each = tinymce.each,
21
  sections = [
 
22
  'wysiwygpage_content',
23
  'wysiwygblock_content',
24
- 'wysiwygtemplate_text'
25
- ];
 
 
 
 
 
26
 
27
  // Determine which section is currently active
28
  each(sections, function (s) {
29
  if ( window[s] ) {
30
  section = window[s];
 
31
  }
32
  });
33
 
@@ -36,9 +43,36 @@
36
  return;
37
  }
38
 
39
- plugins = section.config.plugins;
40
- tinymce.PluginManager.requireLangPack(pluginName);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
 
 
 
 
 
 
42
  tinymce.create('tinymce.plugins.EsitesEditorPlugin', {
43
 
44
  /**
@@ -71,14 +105,7 @@
71
  tiny.editor = ed;
72
  tiny.url = url;
73
 
74
- // Loop through the available plugins in `wysiwygpage_content`
75
- // to extract and extend the config options from the Magento back-end
76
- // It feels a bit hacky, I am not sure if there is better way to do this...
77
- each(plugins, function (el) {
78
- if ( el.name === pluginName ) {
79
- tiny.settings = tinymce.extend(tiny.defaults, el.config);
80
- }
81
- });
82
 
83
  // Finally, register the command and add the button
84
  tiny.editor.addCommand('mceEsitesEditor', tiny.showSourceEditor);
@@ -106,5 +133,5 @@
106
  });
107
 
108
  // Register plugin
109
- tinymce.PluginManager.add('esites_editor', tinymce.plugins.EsitesEditorPlugin);
110
  }());
3
  * This is the TinyMCE plugin of the Magento extension that incorporates the CodeMirror library
4
  *
5
  * @author : Boye Oomens <boye@e-sites.nl>
6
+ * @version : 0.4.0
7
  * @license : OSL 3.0
8
  * @see : https://github.com/e-sites/magento-advanced-html-editor
9
  * @see : http://codemirror.net/
10
  * @see : http://emmet.io/
11
  */
12
 
13
+ /*global tinymce */
14
  (function () {
15
 
16
  'use strict';
17
 
18
+ var section, tiny,
19
  pluginName = 'esites_editor',
20
  each = tinymce.each,
21
  sections = [
22
+ 'wysiwygtext',
23
  'wysiwygpage_content',
24
  'wysiwygblock_content',
25
+ 'wysiwygtemplate_text',
26
+ 'wysiwygdescription_editor',
27
+ 'wysiwygshort_description_editor',
28
+ 'wysiwyggroup_4description_editor'
29
+ ],
30
+ allowedSections,
31
+ plugin = {};
32
 
33
  // Determine which section is currently active
34
  each(sections, function (s) {
35
  if ( window[s] ) {
36
  section = window[s];
37
+ section.name = s;
38
  }
39
  });
40
 
43
  return;
44
  }
45
 
46
+ // Loop through the available plugins to extract and extend
47
+ // the config options from the Magento back-end. It feels a bit hacky,
48
+ // I am not sure if there is better way to do this...
49
+ each(section.config.plugins, function (el) {
50
+ if ( el.name === pluginName ) {
51
+ plugin.config = el.config;
52
+ allowedSections = plugin.config.sections;
53
+
54
+ // Filter product editors first, these are concatenated with |
55
+ // e.g. wysiwygdescription_editor|wysiwygshort_description_editor
56
+ if ( allowedSections.indexOf('|') !== -1 ) {
57
+ allowedSections = allowedSections.split('|').join(',');
58
+ }
59
+
60
+ if ( allowedSections.indexOf(',') !== -1 ) {
61
+ allowedSections = allowedSections.split(',');
62
+ }
63
+
64
+ if ( Object.prototype.toString.call(allowedSections) !== '[object Array]' ) {
65
+ allowedSections = [allowedSections];
66
+ }
67
+ }
68
+ });
69
 
70
+ // Final check on the allowed sections
71
+ if ( tinymce.inArray(allowedSections, section.name) < 0 ) {
72
+ return;
73
+ }
74
+
75
+ tinymce.PluginManager.requireLangPack(pluginName);
76
  tinymce.create('tinymce.plugins.EsitesEditorPlugin', {
77
 
78
  /**
105
  tiny.editor = ed;
106
  tiny.url = url;
107
 
108
+ tiny.settings = tinymce.extend(tiny.defaults, plugin.config);
 
 
 
 
 
 
 
109
 
110
  // Finally, register the command and add the button
111
  tiny.editor.addCommand('mceEsitesEditor', tiny.showSourceEditor);
133
  });
134
 
135
  // Register plugin
136
+ tinymce.PluginManager.add(pluginName, tinymce.plugins.EsitesEditorPlugin);
137
  }());
js/tiny_mce/plugins/esites_editor/js/app.js CHANGED
@@ -5,23 +5,32 @@
5
  */
6
 
7
  /*global requirejs */
8
- (function (requirejs) {
9
 
10
  'use strict';
11
 
 
 
 
12
  requirejs.config({
13
- waitSeconds: 0,
14
- baseUrl: 'js/vendor',
15
  map: {
16
  '*': {
17
  'css': 'requirejs/css.min'
18
  }
19
  },
20
  paths: {
21
- app: '../app'
22
- }
 
 
 
 
 
 
 
23
  });
24
 
25
  requirejs(['app/main']);
26
 
27
- }(requirejs));
5
  */
6
 
7
  /*global requirejs */
8
+ (function (requirejs, tinyMCEPopup) {
9
 
10
  'use strict';
11
 
12
+ // Configure RequireJS in such a way that it points to an absolute baseUrl
13
+ // when being called in standalone mode. Also, prevent some weird errors
14
+ // by disabling the default timeout.
15
  requirejs.config({
16
+ baseUrl: (!tinyMCEPopup ? '/js/tiny_mce/plugins/esites_editor/js/vendor' : 'js/vendor'),
 
17
  map: {
18
  '*': {
19
  'css': 'requirejs/css.min'
20
  }
21
  },
22
  paths: {
23
+ app: '../app',
24
+ gator: 'gator/gator.min'
25
+ },
26
+ shim: {
27
+ 'gator': {
28
+ exports: 'Gator'
29
+ }
30
+ },
31
+ waitSeconds: 0
32
  });
33
 
34
  requirejs(['app/main']);
35
 
36
+ }(requirejs, window.tinyMCEPopup));
js/tiny_mce/plugins/esites_editor/js/app/main.js CHANGED
@@ -1,113 +1,49 @@
1
  /**
2
- * Main module that incorporates basic editor stuff
3
  *
4
  * @author Boye Oomens <boye@e-sites.nl>
5
  */
6
 
7
- /*global requirejs, define, tinymce, tinyMCEPopup */
8
- (function (document, tinyMCEPopup) {
9
 
10
  'use strict';
11
 
12
- /**
13
- * Reserved for the CodeMirror instance
14
- *
15
- * @type {Object}
16
- */
17
- var cm = null;
18
-
19
  define([
20
- '../app/var/textarea',
21
- '../app/var/addons',
22
- '../app/var/cmOptions',
23
  '../app/var/plugin',
 
24
  '../app/var/deps',
25
- '../app/module/popup',
26
- '../app/module/util',
 
 
27
  'codemirror/lib/codemirror',
28
- 'beautify/beautify',
29
- 'beautify/beautify-html',
30
- 'codemirror/mode/htmlmixed/htmlmixed',
31
- 'css!codemirror/addon/fold/foldgutter.css',
32
- 'css!codemirror/addon/search/matchesonscrollbar.css',
33
- 'css!codemirror/addon/dialog/dialog.css',
34
- 'css!codemirror/addon/hint/show-hint.css'
35
- ], function (textarea, addons, cmOptions, plugin, deps, popup, util, CodeMirror, js_beautify, formatter) {
36
 
37
- // Expose to global scope (needed for the formatting util)
 
38
  window.CodeMirror = CodeMirror;
39
 
40
- /**
41
- * Preps the editor by handling the proper value
42
- *
43
- * @private
44
- */
45
- function _prepareEditor() {
46
- /*jshint camelcase:false */
47
- var code = tinyMCEPopup.editor.getContent({source_view : true});
48
-
49
- // Auto-format code
50
- if ( plugin.settings.autoFormat ) {
51
- code = formatter.html_beautify(code, {
52
- indent_size: plugin.settings.indentUnit,
53
- wrap_line_length: 100
54
- });
55
- }
56
-
57
- textarea.value = code;
58
-
59
- // Set custom font-size if it differs from the default value
60
- if ( plugin.settings.fontSize !== '12' ) {
61
- util.addCSS('.CodeMirror {font-size: ' + plugin.settings.fontSize + 'px}');
62
- }
63
-
64
- // Resizes the dialog to the inner size of the window.
65
- // This is needed since various browsers have different border sizes on windows.
66
- tinyMCEPopup.resizeToInnerSize();
67
- popup.resize();
68
-
69
- // Load custom theme
70
- if ( plugin.settings.theme !== 'default' ) {
71
- requirejs(['css!codemirror/theme/' + plugin.settings.theme + '.css']);
72
- }
73
-
74
- // Determine what addons to load
75
- tinymce.each(plugin.settings, function (value, setting) {
76
- if ( addons.hasOwnProperty(setting) && !!value ) {
77
- deps = deps.concat(addons[setting].deps);
78
- cmOptions = tinymce.extend(cmOptions, addons[setting].options);
79
- }
80
- });
81
-
82
- // Load all dependencies and initialize CodeMirror
83
- requirejs(deps, _initCodeMirror);
84
  }
85
 
86
- /**
87
- * Initializes CodeMirror and some related actions
88
- *
89
- * @private
90
- */
91
- function _initCodeMirror() {
92
- cm = CodeMirror.fromTextArea(textarea, cmOptions);
93
- cm.setSize(null, tinyMCEPopup.dom.getViewPort(window).h - 65);
94
 
95
- // Load Emmet separately (if necessary)
96
- if ( plugin.settings.emmet ) {
97
- requirejs(['emmet/emmet'], function (emmetCodeMirror) {
98
- emmetCodeMirror(cm);
99
- });
100
  }
 
101
 
102
- // Handle a few basic editor interactions
103
- tinymce.DOM.bind(window, 'resize', popup.resize);
104
- tinymce.DOM.bind(util.getElem('form-editor'), 'submit', util.proxy(popup.save, cm));
105
- tinymce.DOM.bind(util.getElem('cancel'), 'click', popup.close);
106
-
107
- cm.focus();
108
- }
109
-
110
- _prepareEditor();
111
  });
112
 
113
- })(document, tinyMCEPopup);
1
  /**
2
+ * Main entrypoint that kickstarts the editor
3
  *
4
  * @author Boye Oomens <boye@e-sites.nl>
5
  */
6
 
7
+ /*global define, tinymce, requirejs */
8
+ (function () {
9
 
10
  'use strict';
11
 
 
 
 
 
 
 
 
12
  define([
 
 
 
13
  '../app/var/plugin',
14
+ '../app/var/addons',
15
  '../app/var/deps',
16
+ '../app/var/cmOptions',
17
+ '../app/module/editor',
18
+ '../app/module/dialog',
19
+ '../app/module/setup',
20
  'codemirror/lib/codemirror',
21
+ 'codemirror/mode/htmlmixed/htmlmixed'
22
+ ], function (plugin, addons, deps, options, editor, dialog, setup, CodeMirror) {
 
 
 
 
 
 
23
 
24
+ // Expose CodeMirror to global scope
25
+ // Which is needed for the Emmet plugin
26
  window.CodeMirror = CodeMirror;
27
 
28
+ // Resizes the dialog to the inner size of the window.
29
+ // This is needed since various browsers have different border sizes on windows.
30
+ if ( dialog ) {
31
+ dialog.resize();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
+ // Set editor source and apply appearance preferences
35
+ setup.init();
 
 
 
 
 
 
36
 
37
+ // Determine what addons to load
38
+ tinymce.each(plugin.settings, function (value, setting) {
39
+ if ( addons.hasOwnProperty(setting) && !!value ) {
40
+ deps = deps.concat(addons[setting].deps);
41
+ editor.options = tinymce.extend(options, addons[setting].options);
42
  }
43
+ });
44
 
45
+ // Load all dependencies and initialize CodeMirror
46
+ requirejs(deps, editor.init);
 
 
 
 
 
 
 
47
  });
48
 
49
+ })();
js/tiny_mce/plugins/esites_editor/js/app/module/code.js ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * All code related logic such as formatting and auto completion
3
+ *
4
+ * @see https://github.com/beautify-web/js-beautify
5
+ * @see http://jsbeautifier.org/
6
+ */
7
+
8
+ /* global define */
9
+ define([
10
+ 'codemirror/lib/codemirror',
11
+ 'beautify/beautify',
12
+ 'beautify/beautify-html',
13
+ 'beautify/beautify-css',
14
+ '../var/plugin'
15
+ ], function (CodeMirror, jsBeautify, htmlBeautify, cssBeautify, plugin) {
16
+
17
+ 'use strict';
18
+
19
+ var code = {
20
+
21
+ /**
22
+ * Small wrapper around the html/css beautifier
23
+ *
24
+ * @param {String} source
25
+ * @return {String}
26
+ */
27
+ format: function (type, source) {
28
+ /*jshint camelcase:false */
29
+ var beautifier = (type === 'html' ? htmlBeautify : cssBeautify);
30
+
31
+ return beautifier[type + '_beautify'](source, {
32
+ indent_size: plugin.settings.indentUnit,
33
+ wrap_line_length: plugin.settings.lineLength || 100
34
+ });
35
+ },
36
+
37
+ /**
38
+ * Shows box with all hints
39
+ *
40
+ * @param {Object} cm CodeMirror instance
41
+ * @param {Function} pred callback
42
+ * @return {Object}
43
+ */
44
+ completeAfter: function (cm, pred) {
45
+ if ( !pred || pred() ) {
46
+ setTimeout(function () {
47
+ if ( !cm.state.completionActive ) {
48
+ cm.showHint({
49
+ completeSingle: false
50
+ });
51
+ }
52
+ }, 100);
53
+ }
54
+
55
+ return CodeMirror.Pass;
56
+ },
57
+
58
+ /**
59
+ * Handles tag completion
60
+ *
61
+ * @param {Object} cm CodeMirror instance
62
+ * @return {String}
63
+ */
64
+ completeIfAfterLt: function (cm) {
65
+ return code.completeAfter(cm, function () {
66
+ var cur = cm.getCursor();
67
+ return cm.getRange(CodeMirror.Pos(cur.line, cur.ch - 1), cur) === '<';
68
+ });
69
+ },
70
+
71
+ /**
72
+ * Handles attribute completion
73
+ *
74
+ * @param {Object} cm CodeMirror instance
75
+ * @return {String}
76
+ */
77
+ completeIfInTag: function (cm) {
78
+ return code.completeAfter(cm, function () {
79
+ var inner,
80
+ tok = cm.getTokenAt(cm.getCursor());
81
+
82
+ if (tok.type === 'string' && (!/['"]/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length === 1)) {
83
+ return false;
84
+ }
85
+
86
+ inner = CodeMirror.innerMode(cm.getMode(), tok.state).state;
87
+
88
+ return inner.tagName;
89
+ });
90
+ }
91
+ };
92
+
93
+ return code;
94
+ });
js/tiny_mce/plugins/esites_editor/js/app/module/dialog.js ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Holds TinyMCE popup related logic
3
+ *
4
+ * @see http://www.tinymce.com/wiki.php/API3:class.tinyMCEPopup
5
+ */
6
+
7
+ /* global define, tinymce */
8
+ define([
9
+ '../var/tinymcePopup',
10
+ '../var/textarea',
11
+ './util'
12
+ ], function (tinyMCEPopup, textarea, util) {
13
+
14
+ 'use strict';
15
+
16
+ /**
17
+ * Local editor reference
18
+ *
19
+ * @type {Object}
20
+ */
21
+ var editor = null;
22
+
23
+ /**
24
+ * Dialog namespace
25
+ *
26
+ * @type {Object}
27
+ */
28
+ var dialog = {
29
+
30
+ /**
31
+ * Prepares the popup dialog by setting the proper height and
32
+ * handling all necessary events. It also sets the local `editor`
33
+ * reference so it can be used in other methods.
34
+ */
35
+ prepare: function (ed) {
36
+ editor = ed;
37
+ editor.cm.setSize(null, tinyMCEPopup.dom.getViewPort(window).h - 65);
38
+ dialog.setEvents();
39
+ },
40
+
41
+ /**
42
+ * Handles basic editor interactions such resize, update and cancel
43
+ */
44
+ setEvents: function () {
45
+ tinymce.DOM.bind(window, 'resize', dialog.resize);
46
+ tinymce.DOM.bind(util.getElem('form-editor'), 'submit', util.proxy(dialog.save, editor.cm));
47
+ tinymce.DOM.bind(util.getElem('cancel'), 'click', dialog.close);
48
+ },
49
+
50
+ /**
51
+ * Resizes the editor as well as the textarea element
52
+ */
53
+ resize: function () {
54
+ var vp = tinyMCEPopup.dom.getViewPort(window);
55
+
56
+ tinyMCEPopup.resizeToInnerSize();
57
+
58
+ if ( textarea ) {
59
+ textarea.style.height = (vp.h - 65) + 'px';
60
+ }
61
+ },
62
+
63
+ /**
64
+ * Closes the popup
65
+ *
66
+ * @return {Boolean}
67
+ */
68
+ close: function () {
69
+ tinyMCEPopup.close();
70
+ return false;
71
+ },
72
+
73
+ /**
74
+ * Saves the actual content
75
+ *
76
+ * @return {Boolean}
77
+ */
78
+ save: function () {
79
+ /*jshint camelcase:false */
80
+ tinyMCEPopup.editor.setContent(this.getValue(), {source_view: true});
81
+ tinyMCEPopup.close();
82
+ return false;
83
+ }
84
+ };
85
+
86
+ return tinyMCEPopup ? dialog : null;
87
+ });
js/tiny_mce/plugins/esites_editor/js/app/module/editor.js CHANGED
@@ -1,36 +1,110 @@
 
 
 
 
 
 
 
1
  define([
2
- 'codemirror/lib/codemirror'
3
- ], function (CodeMirror) {
4
- var ed = {
5
- completeAfter: function (cm, pred) {
6
- var cur = cm.getCursor();
7
-
8
- if (!pred || pred()) setTimeout(function () {
9
- if (!cm.state.completionActive)
10
- cm.showHint({
11
- completeSingle: false
12
- });
13
- }, 100);
14
-
15
- return CodeMirror.Pass;
16
- },
17
-
18
- completeIfAfterLt: function (cm) {
19
- return ed.completeAfter(cm, function () {
20
- var cur = cm.getCursor();
21
- return cm.getRange(CodeMirror.Pos(cur.line, cur.ch - 1), cur) == "<";
22
- });
23
- },
24
-
25
- completeIfInTag: function (cm) {
26
- return ed.completeAfter(cm, function () {
27
- var tok = cm.getTokenAt(cm.getCursor());
28
- if (tok.type == "string" && (!/['"]/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1)) return false;
29
- var inner = CodeMirror.innerMode(cm.getMode(), tok.state).state;
30
- return inner.tagName;
31
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  };
34
 
35
- return ed;
36
  });
1
+ /**
2
+ * Module that holds tailor made editor logic
3
+ *
4
+ * @see http://codemirror.net/
5
+ */
6
+
7
+ /* global define, requirejs, tinymce */
8
  define([
9
+ 'codemirror/lib/codemirror',
10
+ '../var/plugin',
11
+ '../var/textarea',
12
+ '../var/deps',
13
+ './dialog',
14
+ './standalone'
15
+ ], function (CodeMirror, plugin, textarea, deps, dialog, standalone) {
16
+
17
+ 'use strict';
18
+
19
+ /**
20
+ * Local namespace
21
+ *
22
+ * @type {Object}
23
+ */
24
+ var editor = {};
25
+
26
+ /**
27
+ * CodeMirror instance
28
+ *
29
+ * @type {Object}
30
+ */
31
+ editor.cm = null;
32
+
33
+ /**
34
+ * Options reference
35
+ *
36
+ * @type {Object}
37
+ */
38
+ editor.options = null;
39
+
40
+ /**
41
+ * Main init method that initiates CodeMirror
42
+ */
43
+ editor.init = function () {
44
+ editor.cm = CodeMirror.fromTextArea(textarea, editor.options);
45
+
46
+ // Prepare popup dialog
47
+ if ( dialog ) {
48
+ dialog.prepare(editor);
49
+ }
50
+
51
+ // Load Emmet separately (if necessary)
52
+ if ( plugin.settings.emmet ) {
53
+ editor.initEmmet(editor.cm);
54
+ }
55
+
56
+ // Handle template logic when dealing with standalone mode
57
+ if ( editor.isStandAlone() ) {
58
+ standalone.init(editor);
59
  }
60
+
61
+ editor.cm.focus();
62
+ };
63
+
64
+ /**
65
+ * Syncs the code with the corresponding textarea element
66
+ *
67
+ * @param {Object} cm CodeMirror instance
68
+ */
69
+ editor.syncValue = function (cm) {
70
+ cm.getTextArea().value = cm.getValue();
71
+ };
72
+
73
+ /**
74
+ * Initializes Emmet for the given CodeMirror instance
75
+ *
76
+ * @param {Object} cm CodeMirror instance
77
+ */
78
+ editor.initEmmet = function (cm) {
79
+ requirejs(['emmet/emmet'], function (emmetCodeMirror) {
80
+ emmetCodeMirror(cm);
81
+ });
82
+ };
83
+
84
+ /**
85
+ * Whether we are dealing with a standalone CodeMirror instance
86
+ * e.g. in case of the Transactional Emails
87
+ *
88
+ * @return {Boolean}
89
+ */
90
+ editor.isStandAlone = function () {
91
+ return tinymce.inArray(plugin.settings.sections, 'wysiwygtemplate_text') !== -1;
92
+ };
93
+
94
+ /**
95
+ * Handles variable insertation in Transactional Email section
96
+ *
97
+ * @param {Object} obj button
98
+ * @param {Object} cm CodeMirror instance
99
+ */
100
+ editor.insertVariable = function (obj, cm) {
101
+ var attr = obj.getAttribute('onclick'),
102
+ val = attr.match(/{{(.*?)[\|\|.*?]?}}/)[0],
103
+ doc = cm.getDoc(),
104
+ cursor = doc.getCursor();
105
+
106
+ doc.replaceRange(val, cursor);
107
  };
108
 
109
+ return editor;
110
  });
js/tiny_mce/plugins/esites_editor/js/app/module/popup.js DELETED
@@ -1,42 +0,0 @@
1
- (function (tinyMCEPopup) {
2
-
3
- 'use strict';
4
-
5
- define(['../var/textarea'], function (textarea) {
6
- return {
7
-
8
- /**
9
- * Resizes the editor
10
- */
11
- resize: function () {
12
- var vp = tinyMCEPopup.dom.getViewPort(window);
13
-
14
- if ( textarea ) {
15
- textarea.style.height = (vp.h - 65) + 'px';
16
- }
17
- },
18
-
19
- /**
20
- * Closes the popup
21
- *
22
- * @return {Boolean}
23
- */
24
- close: function () {
25
- tinyMCEPopup.close();
26
- return false;
27
- },
28
-
29
- /**
30
- * Saves the actual content
31
- *
32
- * @return {Boolean}
33
- */
34
- save: function () {
35
- tinyMCEPopup.editor.setContent(this.getValue(), {source_view: true});
36
- tinyMCEPopup.close();
37
- return false;
38
- }
39
- };
40
- });
41
-
42
- }(tinyMCEPopup));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/tiny_mce/plugins/esites_editor/js/app/module/setup.js ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Creates the setup by handling all editor settings
3
+ * Leverages RequireJS CSS loader plugin to load the additional stylesheets
4
+ *
5
+ * @see https://github.com/guybedford/require-css
6
+ */
7
+
8
+ /* global define, requirejs */
9
+ define([
10
+ '../var/plugin',
11
+ '../var/tinymcePopup',
12
+ '../var/textarea',
13
+ './util',
14
+ './code',
15
+ 'css!codemirror/addon/fold/foldgutter.css',
16
+ 'css!codemirror/addon/search/matchesonscrollbar.css',
17
+ 'css!codemirror/addon/dialog/dialog.css',
18
+ 'css!codemirror/addon/hint/show-hint.css'
19
+ ], function (plugin, tinyMCEPopup, textarea, util, code) {
20
+
21
+ 'use strict';
22
+
23
+ /**
24
+ * Applies the custom theme by loading the corresponding stylesheet
25
+ *
26
+ * @private
27
+ */
28
+ function _applyTheme() {
29
+ if ( plugin.settings.theme !== 'default' ) {
30
+ requirejs(['css!codemirror/theme/' + plugin.settings.theme + '.css']);
31
+ }
32
+ }
33
+
34
+ /**
35
+ * Sets custom font-size if it differs from the default value
36
+ *
37
+ * @private
38
+ */
39
+ function _setFontSize() {
40
+ if ( plugin.settings.fontSize !== '12' ) {
41
+ util.addCSS('.CodeMirror {font-size: ' + plugin.settings.fontSize + 'px}');
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Handles the editor initial source
47
+ *
48
+ * @private
49
+ */
50
+ function _setEditorValue() {
51
+ /*jshint camelcase:false */
52
+ var source = tinyMCEPopup ? tinyMCEPopup.editor.getContent({source_view : true}) : textarea.value;
53
+
54
+ // Auto-format code
55
+ if ( plugin.settings.autoFormat ) {
56
+ source = code.format('html', source);
57
+ }
58
+
59
+ textarea.value = source;
60
+ }
61
+
62
+ return {
63
+ init: function () {
64
+ _setEditorValue();
65
+ _applyTheme();
66
+ _setFontSize();
67
+ }
68
+ };
69
+ });
js/tiny_mce/plugins/esites_editor/js/app/module/standalone.js ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Handles all standalone logic
3
+ * This module still needs some work/refactoring
4
+ *
5
+ * @see https://craig.is/riding/gators
6
+ */
7
+
8
+ /* global define, tinymce */
9
+ define([
10
+ 'codemirror/lib/codemirror',
11
+ 'gator',
12
+ './code',
13
+ './util',
14
+ '../var/plugin',
15
+ '../var/textarea'
16
+ ], function (CodeMirror, Gator, code, util, plugin, textarea) {
17
+
18
+ 'use strict';
19
+
20
+ var cmStyles,
21
+ cssCode,
22
+ timer = null,
23
+ editor = null,
24
+ stylesEditor = util.getElem('template_styles');
25
+
26
+ /**
27
+ * Monitors changes and sets the corresponding value
28
+ *
29
+ * @private
30
+ */
31
+ function _monitorChanges() {
32
+ if ( textarea.value !== '' ) {
33
+ editor.cm.setValue(textarea.value);
34
+
35
+ if ( stylesEditor ) {
36
+ cssCode = stylesEditor.value;
37
+
38
+ // Auto-format code
39
+ if ( plugin.settings.autoFormat ) {
40
+ cssCode = code.format('css', stylesEditor.value);
41
+ }
42
+
43
+ cmStyles.setValue(cssCode);
44
+ }
45
+
46
+ clearInterval(timer);
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Create a separate CodeMirror instance for the template styles
52
+ *
53
+ * @private
54
+ */
55
+ function _createCssEditor() {
56
+ if ( stylesEditor ) {
57
+ cmStyles = CodeMirror.fromTextArea(stylesEditor, tinymce.extend(editor.options, {mode: 'css'}));
58
+ cmStyles.on('blur', editor.syncValue);
59
+
60
+ if ( plugin.settings.emmet ) {
61
+ editor.initEmmet(cmStyles);
62
+ }
63
+ }
64
+ }
65
+
66
+ /**
67
+ * Main init method that handles all necessary events
68
+ *
69
+ * @param {Object} ed editor
70
+ * @private
71
+ */
72
+ function _init(ed) {
73
+ // Create local reference
74
+ editor = ed;
75
+
76
+ // Handle preview template functionality by syncing values when
77
+ // the editor looses it's focus.
78
+ editor.cm.on('blur', editor.syncValue);
79
+
80
+ // Create instance for template styles
81
+ _createCssEditor();
82
+
83
+ // Variable insertation and template loading
84
+ Gator(document)
85
+ .on('click', '#variables-chooser_content a', function () {
86
+ editor.insertVariable(this, editor.cm);
87
+ })
88
+ .on('click', '#email_template_load_form button', function () {
89
+ textarea.value = '';
90
+ stylesEditor.value = '';
91
+ timer = setInterval(_monitorChanges, 250);
92
+ });
93
+ }
94
+
95
+ return {
96
+ init: _init
97
+ };
98
+ });
js/tiny_mce/plugins/esites_editor/js/app/module/util.js CHANGED
@@ -1,5 +1,12 @@
 
 
 
 
 
1
  define(function () {
2
 
 
 
3
  /**
4
  * Small collection of helper utilities
5
  *
1
+ /**
2
+ * Small helper / utility methods that are used throughout all modules
3
+ */
4
+
5
+ /* global define */
6
  define(function () {
7
 
8
+ 'use strict';
9
+
10
  /**
11
  * Small collection of helper utilities
12
  *
js/tiny_mce/plugins/esites_editor/js/app/var/addons.js CHANGED
@@ -1,4 +1,17 @@
1
- define(['./plugin', '../module/editor'], function (plugin, editor) {
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  return {
3
  'activeLine': {
4
  deps: [
@@ -27,9 +40,9 @@ define(['./plugin', '../module/editor'], function (plugin, editor) {
27
  ],
28
  options: {
29
  extraKeys: {
30
- "'<'": editor.completeAfter,
31
- "'/'": editor.completeIfAfterLt,
32
- "' '": editor.completeIfInTag,
33
  "Ctrl-Space": 'autocomplete'
34
  }
35
  }
1
+ /**
2
+ * Returns an object with all addons and their corresponding
3
+ * dependencies and options. Based on what the users selects in the
4
+ * admin panel, these addons will be loaded via RequireJS
5
+ */
6
+
7
+ /* global define */
8
+ define([
9
+ './plugin',
10
+ '../module/code'
11
+ ], function (plugin, code) {
12
+
13
+ 'use strict';
14
+
15
  return {
16
  'activeLine': {
17
  deps: [
40
  ],
41
  options: {
42
  extraKeys: {
43
+ "'<'": code.completeAfter,
44
+ "'/'": code.completeIfAfterLt,
45
+ "' '": code.completeIfInTag,
46
  "Ctrl-Space": 'autocomplete'
47
  }
48
  }
js/tiny_mce/plugins/esites_editor/js/app/var/cmOptions.js CHANGED
@@ -1,6 +1,31 @@
1
- define(['./plugin'], function (plugin) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  return {
3
- mode: 'htmlmixed',
4
  lineNumbers: true,
5
  indentUnit: plugin.settings.indentUnit,
6
  theme: plugin.settings.theme,
1
+ /**
2
+ * Default CodeMirror setup
3
+ */
4
+
5
+ /* global define */
6
+ define([
7
+ './plugin',
8
+ './tinymcePopup',
9
+ '../../codemirror/lib/codemirror',
10
+ '../../codemirror/addon/mode/multiplex'
11
+ ], function (plugin, tinyMCEPopup, CodeMirror) {
12
+
13
+ 'use strict';
14
+
15
+ // In case of email templates we apply a different mode
16
+ // This way we can process the {{template}} syntax as well
17
+ CodeMirror.defineMode('htmlhandlebars', function (config) {
18
+ return CodeMirror.multiplexingMode(
19
+ CodeMirror.getMode(config, 'text/html'),{
20
+ open: '{{',
21
+ close: '}}',
22
+ mode: CodeMirror.getMode(config, 'handlebars'),
23
+ parseDelimiters: true
24
+ });
25
+ });
26
+
27
  return {
28
+ mode: (tinyMCEPopup ? 'htmlmixed' : 'htmlhandlebars'),
29
  lineNumbers: true,
30
  indentUnit: plugin.settings.indentUnit,
31
  theme: plugin.settings.theme,
js/tiny_mce/plugins/esites_editor/js/app/var/deps.js CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
1
  define(function () {
 
2
  return [];
3
  });
1
+ /**
2
+ * Array reserved for the dependencies that are linked
3
+ * to all available addons
4
+ */
5
+
6
+ /* global define */
7
  define(function () {
8
+ 'use strict';
9
  return [];
10
  });
js/tiny_mce/plugins/esites_editor/js/app/var/plugin.js CHANGED
@@ -1,3 +1,27 @@
1
- define(function () {
2
- return tinyMCEPopup.editor.plugins.esites_editor;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  });
1
+ /**
2
+ * Returns plugin object including all settings
3
+ * Also, it formats the selected sections to an array
4
+ */
5
+
6
+ /* global define, esites_editor, tinymce */
7
+ define([
8
+ './tinymcePopup'
9
+ ], function (tinyMCEPopup) {
10
+ /*jshint camelcase:false */
11
+
12
+ 'use strict';
13
+
14
+ var p = tinyMCEPopup,
15
+ plugin = p ? p.editor.plugins.esites_editor : esites_editor,
16
+ sections = plugin.settings.sections;
17
+
18
+ if ( sections.indexOf(',') !== -1 ) {
19
+ plugin.settings.sections = sections.split(',');
20
+ }
21
+
22
+ if ( Object.prototype.toString.call(plugin.settings.sections) !== '[object Array]' ) {
23
+ plugin.settings.sections = [plugin.settings.sections];
24
+ }
25
+
26
+ return plugin;
27
  });
js/tiny_mce/plugins/esites_editor/js/app/var/textarea.js CHANGED
@@ -1,5 +1,13 @@
 
 
 
 
 
 
 
1
  define([
2
  '../module/util'
3
  ], function (util) {
4
- return util.getElem('htmlSource');
 
5
  });
1
+ /**
2
+ * Returns the textarea element that is used as source for the
3
+ * CodeMirror instance. In case #htmlSource doesn't exists we're
4
+ * dealing with a Transaction Email.
5
+ */
6
+
7
+ /* global define */
8
  define([
9
  '../module/util'
10
  ], function (util) {
11
+ 'use strict';
12
+ return util.getElem('htmlSource') || util.getElem('template_text');
13
  });
js/tiny_mce/plugins/esites_editor/js/app/var/tinymcePopup.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Returns the tinyMCEPopup object that handles all
3
+ * dialog related logic. Will be ignored in standalone mode.
4
+ */
5
+
6
+ /* global define */
7
+ define(function () {
8
+ 'use strict';
9
+ return window['tinyMCEPopup'];
10
+ });
js/tiny_mce/plugins/esites_editor/js/vendor/codemirror/mode/handlebars/handlebars.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"), require("../../addon/mode/simple"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror", "../../addon/mode/simple"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ CodeMirror.defineSimpleMode("handlebars", {
15
+ start: [
16
+ { regex: /\{\{!--/, push: "dash_comment", token: "comment" },
17
+ { regex: /\{\{!/, push: "comment", token: "comment" },
18
+ { regex: /\{\{/, push: "handlebars", token: "tag" }
19
+ ],
20
+ handlebars: [
21
+ { regex: /\}\}/, pop: true, token: "tag" },
22
+
23
+ // Double and single quotes
24
+ { regex: /"(?:[^\\]|\\.)*?"/, token: "string" },
25
+ { regex: /'(?:[^\\]|\\.)*?'/, token: "string" },
26
+
27
+ // Handlebars keywords
28
+ { regex: />|[#\/]([A-Za-z_]\w*)/, token: "keyword" },
29
+ { regex: /(?:else|this)\b/, token: "keyword" },
30
+
31
+ // Numeral
32
+ { regex: /\d+/i, token: "number" },
33
+
34
+ // Atoms like = and .
35
+ { regex: /=|~|@|true|false/, token: "atom" },
36
+
37
+ // Paths
38
+ { regex: /(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/, token: "variable-2" }
39
+ ],
40
+ dash_comment: [
41
+ { regex: /--\}\}/, pop: true, token: "comment" },
42
+
43
+ // Commented code
44
+ { regex: /./, token: "comment"}
45
+ ],
46
+ comment: [
47
+ { regex: /\}\}/, pop: true, token: "comment" },
48
+ { regex: /./, token: "comment" }
49
+ ]
50
+ });
51
+
52
+ CodeMirror.defineMIME("text/x-handlebars-template", "handlebars");
53
+ });
js/tiny_mce/plugins/esites_editor/js/vendor/gator/gator.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /* gator v1.2.4 craig.is/riding/gators */
2
+ (function(){function t(a){return k?k:a.matches?k=a.matches:a.webkitMatchesSelector?k=a.webkitMatchesSelector:a.mozMatchesSelector?k=a.mozMatchesSelector:a.msMatchesSelector?k=a.msMatchesSelector:a.oMatchesSelector?k=a.oMatchesSelector:k=e.matchesSelector}function q(a,b,c){if("_root"==b)return c;if(a!==c){if(t(a).call(a,b))return a;if(a.parentNode)return m++,q(a.parentNode,b,c)}}function u(a,b,c,e){d[a.id]||(d[a.id]={});d[a.id][b]||(d[a.id][b]={});d[a.id][b][c]||(d[a.id][b][c]=[]);d[a.id][b][c].push(e)}
3
+ function v(a,b,c,e){if(d[a.id])if(!b)for(var f in d[a.id])d[a.id].hasOwnProperty(f)&&(d[a.id][f]={});else if(!e&&!c)d[a.id][b]={};else if(!e)delete d[a.id][b][c];else if(d[a.id][b][c])for(f=0;f<d[a.id][b][c].length;f++)if(d[a.id][b][c][f]===e){d[a.id][b][c].splice(f,1);break}}function w(a,b,c){if(d[a][c]){var k=b.target||b.srcElement,f,g,h={},n=g=0;m=0;for(f in d[a][c])d[a][c].hasOwnProperty(f)&&(g=q(k,f,l[a].element))&&e.matchesEvent(c,l[a].element,g,"_root"==f,b)&&(m++,d[a][c][f].match=g,h[m]=d[a][c][f]);
4
+ b.stopPropagation=function(){b.cancelBubble=!0};for(g=0;g<=m;g++)if(h[g])for(n=0;n<h[g].length;n++){if(!1===h[g][n].call(h[g].match,b)){e.cancel(b);return}if(b.cancelBubble)return}}}function r(a,b,c,k){function f(a){return function(b){w(g,b,a)}}if(this.element){a instanceof Array||(a=[a]);c||"function"!=typeof b||(c=b,b="_root");var g=this.id,h;for(h=0;h<a.length;h++)k?v(this,a[h],b,c):(d[g]&&d[g][a[h]]||e.addEvent(this,a[h],f(a[h])),u(this,a[h],b,c));return this}}function e(a,b){if(!(this instanceof
5
+ e)){for(var c in l)if(l[c].element===a)return l[c];p++;l[p]=new e(a,p);return l[p]}this.element=a;this.id=b}var k,m=0,p=0,d={},l={};e.prototype.on=function(a,b,c){return r.call(this,a,b,c)};e.prototype.off=function(a,b,c){return r.call(this,a,b,c,!0)};e.matchesSelector=function(){};e.cancel=function(a){a.preventDefault();a.stopPropagation()};e.addEvent=function(a,b,c){a.element.addEventListener(b,c,"blur"==b||"focus"==b)};e.matchesEvent=function(){return!0};"undefined"!==typeof module&&module.exports&&
6
+ (module.exports=e);window.Gator=e})();
js/tiny_mce/plugins/esites_editor/js/vendor/requirejs/require.min.js CHANGED
@@ -1,36 +1,36 @@
1
  /*
2
- RequireJS 2.1.18 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
3
  Available via the MIT or new BSD license.
4
  see: http://github.com/jrburke/requirejs for details
5
  */
6
  var requirejs,require,define;
7
- (function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function T(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function t(b,c){return fa.call(b,c)}function m(b,c){return t(b,c)&&b[c]}function B(b,c){for(var d in b)if(t(b,d)&&c(b[d],d))break}function U(b,c,d,e){c&&B(c,function(c,g){if(d||!t(b,g))e&&"object"===typeof c&&c&&!H(c)&&!G(c)&&!(c instanceof
8
- RegExp)?(b[g]||(b[g]={}),U(b[g],c,d,e)):b[g]=c});return b}function u(b,c){return function(){return c.apply(b,arguments)}}function ca(b){throw b;}function da(b){if(!b)return b;var c=ba;v(b.split("."),function(b){c=c[b]});return c}function C(b,c,d,e){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=e;d&&(c.originalError=d);return c}function ga(b){function c(a,k,b){var f,l,c,d,e,g,i,p,k=k&&k.split("/"),h=j.map,n=h&&h["*"];if(a){a=a.split("/");l=a.length-1;j.nodeIdCompat&&
9
- Q.test(a[l])&&(a[l]=a[l].replace(Q,""));"."===a[0].charAt(0)&&k&&(l=k.slice(0,k.length-1),a=l.concat(a));l=a;for(c=0;c<l.length;c++)if(d=l[c],"."===d)l.splice(c,1),c-=1;else if(".."===d&&!(0===c||1===c&&".."===l[2]||".."===l[c-1])&&0<c)l.splice(c-1,2),c-=2;a=a.join("/")}if(b&&h&&(k||n)){l=a.split("/");c=l.length;a:for(;0<c;c-=1){e=l.slice(0,c).join("/");if(k)for(d=k.length;0<d;d-=1)if(b=m(h,k.slice(0,d).join("/")))if(b=m(b,e)){f=b;g=c;break a}!i&&(n&&m(n,e))&&(i=m(n,e),p=c)}!f&&i&&(f=i,g=p);f&&(l.splice(0,
10
- g,f),a=l.join("/"))}return(f=m(j.pkgs,a))?f:a}function d(a){z&&v(document.getElementsByTagName("script"),function(k){if(k.getAttribute("data-requiremodule")===a&&k.getAttribute("data-requirecontext")===i.contextName)return k.parentNode.removeChild(k),!0})}function e(a){var k=m(j.paths,a);if(k&&H(k)&&1<k.length)return k.shift(),i.require.undef(a),i.makeRequire(null,{skipMap:!0})([a]),!0}function n(a){var k,c=a?a.indexOf("!"):-1;-1<c&&(k=a.substring(0,c),a=a.substring(c+1,a.length));return[k,a]}function p(a,
11
- k,b,f){var l,d,e=null,g=k?k.name:null,j=a,p=!0,h="";a||(p=!1,a="_@r"+(K+=1));a=n(a);e=a[0];a=a[1];e&&(e=c(e,g,f),d=m(r,e));a&&(e?h=d&&d.normalize?d.normalize(a,function(a){return c(a,g,f)}):-1===a.indexOf("!")?c(a,g,f):a:(h=c(a,g,f),a=n(h),e=a[0],h=a[1],b=!0,l=i.nameToUrl(h)));b=e&&!d&&!b?"_unnormalized"+(O+=1):"";return{prefix:e,name:h,parentMap:k,unnormalized:!!b,url:l,originalName:j,isDefine:p,id:(e?e+"!"+h:h)+b}}function s(a){var k=a.id,b=m(h,k);b||(b=h[k]=new i.Module(a));return b}function q(a,
12
- k,b){var f=a.id,c=m(h,f);if(t(r,f)&&(!c||c.defineEmitComplete))"defined"===k&&b(r[f]);else if(c=s(a),c.error&&"error"===k)b(c.error);else c.on(k,b)}function w(a,b){var c=a.requireModules,f=!1;if(b)b(a);else if(v(c,function(b){if(b=m(h,b))b.error=a,b.events.error&&(f=!0,b.emit("error",a))}),!f)g.onError(a)}function x(){R.length&&(ha.apply(A,[A.length,0].concat(R)),R=[])}function y(a){delete h[a];delete V[a]}function F(a,b,c){var f=a.map.id;a.error?a.emit("error",a.error):(b[f]=!0,v(a.depMaps,function(f,
13
- d){var e=f.id,g=m(h,e);g&&(!a.depMatched[d]&&!c[e])&&(m(b,e)?(a.defineDep(d,r[e]),a.check()):F(g,b,c))}),c[f]=!0)}function D(){var a,b,c=(a=1E3*j.waitSeconds)&&i.startTime+a<(new Date).getTime(),f=[],l=[],g=!1,h=!0;if(!W){W=!0;B(V,function(a){var i=a.map,j=i.id;if(a.enabled&&(i.isDefine||l.push(a),!a.error))if(!a.inited&&c)e(j)?g=b=!0:(f.push(j),d(j));else if(!a.inited&&(a.fetched&&i.isDefine)&&(g=!0,!i.prefix))return h=!1});if(c&&f.length)return a=C("timeout","Load timeout for modules: "+f,null,
14
- f),a.contextName=i.contextName,w(a);h&&v(l,function(a){F(a,{},{})});if((!c||b)&&g)if((z||ea)&&!X)X=setTimeout(function(){X=0;D()},50);W=!1}}function E(a){t(r,a[0])||s(p(a[0],null,!0)).init(a[1],a[2])}function I(a){var a=a.currentTarget||a.srcElement,b=i.onScriptLoad;a.detachEvent&&!Y?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=i.onScriptError;(!a.detachEvent||Y)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function J(){var a;
15
- for(x();A.length;){a=A.shift();if(null===a[0])return w(C("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));E(a)}}var W,Z,i,L,X,j={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},h={},V={},$={},A=[],r={},S={},aa={},K=1,O=1;L={require:function(a){return a.require?a.require:a.require=i.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?r[a.map.id]=a.exports:a.exports=r[a.map.id]={}},module:function(a){return a.module?
16
- a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return m(j.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};Z=function(a){this.events=m($,a.id)||{};this.map=a;this.shim=m(j.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};Z.prototype={init:function(a,b,c,f){f=f||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=u(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=
17
- c;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim)i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=
18
- this.map.url;S[a]||(S[a]=!0,i.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var f=this.exports,l=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&&
19
- (f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=
20
- this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f);
21
- if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval",
22
- "fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.undefed||
23
- (this.defineDep(b,a),this.check())}));this.errback?q(a,"error",u(this,this.errback)):this.events.error&&q(a,"error",u(this,function(a){this.emit("error",a)}))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};
24
- i={config:j,contextName:b,registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p,nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=
25
- i.makeShimExports(a);b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b,a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b,null,!0))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,
26
- e){function j(c,d,m){var n,q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=!0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,
27
- {isBrowser:z,toUrl:function(b){var d,e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!==e&&(!("."===k||".."===k)||1<e))d=b.substring(e,b.length),b=b.substring(0,e);return i.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return t(r,p(b,a,!1,!0).id)},specified:function(b){b=p(b,a,!1,!0).id;return t(r,b)||t(h,b)}});a||(j.undef=function(b){x();var c=p(b,a,!0),e=m(h,b);e.undefed=!0;d(b);delete r[b];delete S[c.url];delete $[b];T(A,function(a,c){a[0]===b&&A.splice(c,1)});e&&(e.events.defined&&($[b]=e.events),
28
- y(b))});return j},enable:function(a){m(h,a.id)&&s(a).enable()},completeLoad:function(a){var b,c,d=m(j.shim,a)||{},g=d.exports;for(x();A.length;){c=A.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);E(c)}c=m(h,a);if(!b&&!t(r,a)&&c&&!c.inited){if(j.enforceDefine&&(!g||!da(g)))return e(a)?void 0:w(C("nodefine","No define call for "+a,null,[a]));E([a,d.deps||[],d.exportsFn])}D()},nameToUrl:function(a,b,c){var d,e,h;(d=m(j.pkgs,a))&&(a=d);if(d=m(aa,a))return i.nameToUrl(d,b,c);if(g.jsExtRegExp.test(a))d=
29
- a+(b||"");else{d=j.paths;a=a.split("/");for(e=a.length;0<e;e-=1)if(h=a.slice(0,e).join("/"),h=m(d,h)){H(h)&&(h=h[0]);a.splice(0,e,h);break}d=a.join("/");d+=b||(/^data\:|\?/.test(d)||c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":j.baseUrl)+d}return j.urlArgs?d+((-1===d.indexOf("?")?"?":"&")+j.urlArgs):d},load:function(a,b){g.load(i,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ja.test((a.currentTarget||a.srcElement).readyState))N=null,
30
- a=I(a),i.completeLoad(a.id)},onScriptError:function(a){var b=I(a);if(!e(b.id))return w(C("scripterror","Script error for: "+b.id,a,[b.id]))}};i.require=i.makeRequire();return i}var g,x,y,D,I,E,N,J,s,O,ka=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,la=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,Q=/\.js$/,ia=/^\.\//;x=Object.prototype;var K=x.toString,fa=x.hasOwnProperty,ha=Array.prototype.splice,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),ea=!z&&"undefined"!==
31
- typeof importScripts,ja=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,Y="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},q={},R=[],M=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(G(requirejs))return;q=requirejs;requirejs=void 0}"undefined"!==typeof require&&!G(require)&&(q=require,require=void 0);g=requirejs=function(b,c,d,e){var n,p="_";!H(b)&&"string"!==typeof b&&(n=b,H(c)?(b=c,c=d,d=e):b=[]);n&&n.context&&(p=n.context);
32
- (e=m(F,p))||(e=F[p]=g.s.newContext(p));n&&e.configure(n);return e.require(b,c,d)};g.config=function(b){return g(b)};g.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=g);g.version="2.1.18";g.jsExtRegExp=/^\/|:|\?|\.js$/;g.isBrowser=z;x=g.s={contexts:F,newContext:ga};g({});v(["toUrl","undef","defined","specified"],function(b){g[b]=function(){var c=F._;return c.require[b].apply(c,arguments)}});if(z&&(y=x.head=document.getElementsByTagName("head")[0],
33
- D=document.getElementsByTagName("base")[0]))y=x.head=D.parentNode;g.onError=ca;g.createNode=function(b){var c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};g.load=function(b,c,d){var e=b&&b.config||{};if(z)return e=g.createNode(e,c,d),e.setAttribute("data-requirecontext",b.contextName),e.setAttribute("data-requiremodule",c),e.attachEvent&&!(e.attachEvent.toString&&
34
- 0>e.attachEvent.toString().indexOf("[native code"))&&!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=
35
- I,q.baseUrl||(E=s.split("/"),s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),
36
- function(b){if("interactive"===b.readyState)return N=b}),e=N;e&&(b||(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this);
1
  /*
2
+ RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
3
  Available via the MIT or new BSD license.
4
  see: http://github.com/jrburke/requirejs for details
5
  */
6
  var requirejs,require,define;
7
+ (function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function T(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function t(b,c){return fa.call(b,c)}function n(b,c){return t(b,c)&&b[c]}function A(b,c){for(var d in b)if(t(b,d)&&c(b[d],d))break}function U(b,c,d,e){c&&A(c,function(c,i){if(d||!t(b,i))e&&"object"===typeof c&&c&&!H(c)&&!G(c)&&!(c instanceof
8
+ RegExp)?(b[i]||(b[i]={}),U(b[i],c,d,e)):b[i]=c});return b}function u(b,c){return function(){return c.apply(b,arguments)}}function ca(b){throw b;}function da(b){if(!b)return b;var c=ba;v(b.split("."),function(b){c=c[b]});return c}function B(b,c,d,e){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=e;d&&(c.originalError=d);return c}function ga(b){function c(a,j,b){var f,l,c,d,h,e,g,i,j=j&&j.split("/"),p=k.map,m=p&&p["*"];if(a){a=a.split("/");l=a.length-1;k.nodeIdCompat&&
9
+ Q.test(a[l])&&(a[l]=a[l].replace(Q,""));"."===a[0].charAt(0)&&j&&(l=j.slice(0,j.length-1),a=l.concat(a));l=a;for(c=0;c<l.length;c++)if(d=l[c],"."===d)l.splice(c,1),c-=1;else if(".."===d&&!(0===c||1===c&&".."===l[2]||".."===l[c-1])&&0<c)l.splice(c-1,2),c-=2;a=a.join("/")}if(b&&p&&(j||m)){l=a.split("/");c=l.length;a:for(;0<c;c-=1){h=l.slice(0,c).join("/");if(j)for(d=j.length;0<d;d-=1)if(b=n(p,j.slice(0,d).join("/")))if(b=n(b,h)){f=b;e=c;break a}!g&&(m&&n(m,h))&&(g=n(m,h),i=c)}!f&&g&&(f=g,e=i);f&&(l.splice(0,
10
+ e,f),a=l.join("/"))}return(f=n(k.pkgs,a))?f:a}function d(a){z&&v(document.getElementsByTagName("script"),function(j){if(j.getAttribute("data-requiremodule")===a&&j.getAttribute("data-requirecontext")===h.contextName)return j.parentNode.removeChild(j),!0})}function p(a){var j=n(k.paths,a);if(j&&H(j)&&1<j.length)return j.shift(),h.require.undef(a),h.makeRequire(null,{skipMap:!0})([a]),!0}function g(a){var j,c=a?a.indexOf("!"):-1;-1<c&&(j=a.substring(0,c),a=a.substring(c+1,a.length));return[j,a]}function i(a,
11
+ j,b,f){var l,d,e=null,i=j?j.name:null,k=a,p=!0,m="";a||(p=!1,a="_@r"+(K+=1));a=g(a);e=a[0];a=a[1];e&&(e=c(e,i,f),d=n(q,e));a&&(e?m=d&&d.normalize?d.normalize(a,function(a){return c(a,i,f)}):-1===a.indexOf("!")?c(a,i,f):a:(m=c(a,i,f),a=g(m),e=a[0],m=a[1],b=!0,l=h.nameToUrl(m)));b=e&&!d&&!b?"_unnormalized"+(O+=1):"";return{prefix:e,name:m,parentMap:j,unnormalized:!!b,url:l,originalName:k,isDefine:p,id:(e?e+"!"+m:m)+b}}function r(a){var j=a.id,b=n(m,j);b||(b=m[j]=new h.Module(a));return b}function s(a,
12
+ j,b){var f=a.id,c=n(m,f);if(t(q,f)&&(!c||c.defineEmitComplete))"defined"===j&&b(q[f]);else if(c=r(a),c.error&&"error"===j)b(c.error);else c.on(j,b)}function w(a,b){var c=a.requireModules,f=!1;if(b)b(a);else if(v(c,function(b){if(b=n(m,b))b.error=a,b.events.error&&(f=!0,b.emit("error",a))}),!f)e.onError(a)}function x(){R.length&&(v(R,function(a){var b=a[0];"string"===typeof b&&(h.defQueueMap[b]=!0);C.push(a)}),R=[])}function y(a){delete m[a];delete V[a]}function F(a,b,c){var f=a.map.id;a.error?a.emit("error",
13
+ a.error):(b[f]=!0,v(a.depMaps,function(f,d){var e=f.id,h=n(m,e);h&&(!a.depMatched[d]&&!c[e])&&(n(b,e)?(a.defineDep(d,q[e]),a.check()):F(h,b,c))}),c[f]=!0)}function D(){var a,b,c=(a=1E3*k.waitSeconds)&&h.startTime+a<(new Date).getTime(),f=[],l=[],e=!1,i=!0;if(!W){W=!0;A(V,function(a){var h=a.map,g=h.id;if(a.enabled&&(h.isDefine||l.push(a),!a.error))if(!a.inited&&c)p(g)?e=b=!0:(f.push(g),d(g));else if(!a.inited&&(a.fetched&&h.isDefine)&&(e=!0,!h.prefix))return i=!1});if(c&&f.length)return a=B("timeout",
14
+ "Load timeout for modules: "+f,null,f),a.contextName=h.contextName,w(a);i&&v(l,function(a){F(a,{},{})});if((!c||b)&&e)if((z||ea)&&!X)X=setTimeout(function(){X=0;D()},50);W=!1}}function E(a){t(q,a[0])||r(i(a[0],null,!0)).init(a[1],a[2])}function I(a){var a=a.currentTarget||a.srcElement,b=h.onScriptLoad;a.detachEvent&&!Y?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=h.onScriptError;(!a.detachEvent||Y)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}
15
+ function J(){var a;for(x();C.length;){a=C.shift();if(null===a[0])return w(B("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));E(a)}h.defQueueMap={}}var W,Z,h,L,X,k={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},m={},V={},$={},C=[],q={},S={},aa={},K=1,O=1;L={require:function(a){return a.require?a.require:a.require=h.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?q[a.map.id]=a.exports:a.exports=q[a.map.id]={}},
16
+ module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return n(k.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};Z=function(a){this.events=n($,a.id)||{};this.map=a;this.shim=n(k.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};Z.prototype={init:function(a,b,c,f){f=f||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=u(this,function(a){this.emit("error",a)}));
17
+ this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;h.startTime=(new Date).getTime();var a=this.map;if(this.shim)h.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?
18
+ this.callPlugin():this.load()}},load:function(){var a=this.map.url;S[a]||(S[a]=!0,h.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var f=this.exports,l=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||e.onError!==ca)try{f=h.execCb(c,l,b,f)}catch(d){a=d}else f=h.execCb(c,l,b,f);this.map.isDefine&&
19
+ void 0===f&&((b=this.module)?f=b.exports:this.usingExports&&(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(q[c]=f,e.onResourceLoad))e.onResourceLoad(h,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=
20
+ !0)}}else t(h.defQueueMap,c)||this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=i(a.prefix);this.depMaps.push(d);s(d,"defined",u(this,function(f){var l,d;d=n(aa,this.map.id);var g=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,p=h.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(g=f.normalize(g,function(a){return c(a,P,!0)})||""),f=i(a.prefix+"!"+g,this.map.parentMap),s(f,"defined",u(this,function(a){this.init([],function(){return a},
21
+ null,{enabled:!0,ignore:!0})})),d=n(m,f.id)){this.depMaps.push(f);if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=h.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];A(m,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,g=i(d),P=M;c&&(f=c);P&&
22
+ (M=!1);r(g);t(k.config,b)&&(k.config[d]=k.config[b]);try{e.exec(f)}catch(m){return w(B("fromtexteval","fromText eval for "+b+" failed: "+m,m,[b]))}P&&(M=!0);this.depMaps.push(g);h.completeLoad(d);p([d],l)}),f.load(a.name,p,l,k))}));h.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=i(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=
23
+ n(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;s(a,"defined",u(this,function(a){this.undefed||(this.defineDep(b,a),this.check())}));this.errback?s(a,"error",u(this,this.errback)):this.events.error&&s(a,"error",u(this,function(a){this.emit("error",a)}))}c=a.id;f=m[c];!t(L,c)&&(f&&!f.enabled)&&h.enable(a,this)}));A(this.pluginMaps,u(this,function(a){var b=n(m,a.id);b&&!b.enabled&&h.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=
24
+ []);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};h={config:k,contextName:b,registry:m,defined:q,urlFetched:S,defQueue:C,defQueueMap:{},Module:Z,makeModuleMap:i,nextTick:e.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=k.shim,c={paths:!0,bundles:!0,config:!0,map:!0};A(a,function(a,b){c[b]?(k[b]||(k[b]={}),U(k[b],a,!0,!0)):k[b]=a});a.bundles&&A(a.bundles,function(a,b){v(a,
25
+ function(a){a!==b&&(aa[a]=b)})});a.shim&&(A(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=h.makeShimExports(a);b[c]=a}),k.shim=b);a.packages&&v(a.packages,function(a){var b,a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(k.paths[b]=a.location);k.pkgs[b]=a.name+"/"+(a.main||"main").replace(ha,"").replace(Q,"")});A(m,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=i(b,null,!0))});if(a.deps||a.callback)h.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;
26
+ a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,j){function g(c,d,p){var k,n;j.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=!0);if("string"===typeof c){if(G(d))return w(B("requireargs","Invalid require call"),p);if(a&&t(L,c))return L[c](m[a.id]);if(e.get)return e.get(h,c,a,g);k=i(c,a,!1,!0);k=k.id;return!t(q,k)?w(B("notloaded",'Module name "'+k+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):q[k]}J();h.nextTick(function(){J();
27
+ n=r(i(null,a));n.skipMap=j.skipMap;n.init(c,d,p,{enabled:!0});D()});return g}j=j||{};U(g,{isBrowser:z,toUrl:function(b){var d,e=b.lastIndexOf("."),j=b.split("/")[0];if(-1!==e&&(!("."===j||".."===j)||1<e))d=b.substring(e,b.length),b=b.substring(0,e);return h.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return t(q,i(b,a,!1,!0).id)},specified:function(b){b=i(b,a,!1,!0).id;return t(q,b)||t(m,b)}});a||(g.undef=function(b){x();var c=i(b,a,!0),e=n(m,b);e.undefed=!0;d(b);delete q[b];delete S[c.url];
28
+ delete $[b];T(C,function(a,c){a[0]===b&&C.splice(c,1)});delete h.defQueueMap[b];e&&(e.events.defined&&($[b]=e.events),y(b))});return g},enable:function(a){n(m,a.id)&&r(a).enable()},completeLoad:function(a){var b,c,d=n(k.shim,a)||{},e=d.exports;for(x();C.length;){c=C.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);E(c)}h.defQueueMap={};c=n(m,a);if(!b&&!t(q,a)&&c&&!c.inited){if(k.enforceDefine&&(!e||!da(e)))return p(a)?void 0:w(B("nodefine","No define call for "+a,null,[a]));E([a,
29
+ d.deps||[],d.exportsFn])}D()},nameToUrl:function(a,b,c){var d,g,i;(d=n(k.pkgs,a))&&(a=d);if(d=n(aa,a))return h.nameToUrl(d,b,c);if(e.jsExtRegExp.test(a))d=a+(b||"");else{d=k.paths;a=a.split("/");for(g=a.length;0<g;g-=1)if(i=a.slice(0,g).join("/"),i=n(d,i)){H(i)&&(i=i[0]);a.splice(0,g,i);break}d=a.join("/");d+=b||(/^data\:|\?/.test(d)||c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":k.baseUrl)+d}return k.urlArgs?d+((-1===d.indexOf("?")?"?":"&")+k.urlArgs):d},load:function(a,b){e.load(h,
30
+ a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ia.test((a.currentTarget||a.srcElement).readyState))N=null,a=I(a),h.completeLoad(a.id)},onScriptError:function(a){var b=I(a);if(!p(b.id))return w(B("scripterror","Script error for: "+b.id,a,[b.id]))}};h.require=h.makeRequire();return h}var e,x,y,D,I,E,N,J,r,O,ja=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ka=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,Q=/\.js$/,ha=/^\.\//;x=Object.prototype;var K=
31
+ x.toString,fa=x.hasOwnProperty,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),ea=!z&&"undefined"!==typeof importScripts,ia=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,Y="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},s={},R=[],M=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(G(requirejs))return;s=requirejs;requirejs=void 0}"undefined"!==typeof require&&!G(require)&&(s=require,require=
32
+ void 0);e=requirejs=function(b,c,d,p){var g,i="_";!H(b)&&"string"!==typeof b&&(g=b,H(c)?(b=c,c=d,d=p):b=[]);g&&g.context&&(i=g.context);(p=n(F,i))||(p=F[i]=e.s.newContext(i));g&&p.configure(g);return p.require(b,c,d)};e.config=function(b){return e(b)};e.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=e);e.version="2.1.20";e.jsExtRegExp=/^\/|:|\?|\.js$/;e.isBrowser=z;x=e.s={contexts:F,newContext:ga};e({});v(["toUrl","undef","defined","specified"],
33
+ function(b){e[b]=function(){var c=F._;return c.require[b].apply(c,arguments)}});if(z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0]))y=x.head=D.parentNode;e.onError=ca;e.createNode=function(b){var c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};e.load=function(b,c,d){var p=b&&b.config||{},g;if(z){g=e.createNode(p,
34
+ c,d);if(p.onNodeCreated)p.onNodeCreated(g,p,c,d);g.setAttribute("data-requirecontext",b.contextName);g.setAttribute("data-requiremodule",c);g.attachEvent&&!(g.attachEvent.toString&&0>g.attachEvent.toString().indexOf("[native code"))&&!Y?(M=!0,g.attachEvent("onreadystatechange",b.onScriptLoad)):(g.addEventListener("load",b.onScriptLoad,!1),g.addEventListener("error",b.onScriptError,!1));g.src=d;J=g;D?y.insertBefore(g,D):y.appendChild(g);J=null;return g}if(ea)try{importScripts(d),b.completeLoad(c)}catch(i){b.onError(B("importscripts",
35
+ "importScripts failed for "+c+" at "+d,i,[c]))}};z&&!s.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return r=I,s.baseUrl||(E=r.split("/"),r=E.pop(),O=E.length?E.join("/")+"/":"./",s.baseUrl=O),r=r.replace(Q,""),e.jsExtRegExp.test(r)&&(r=I),s.deps=s.deps?s.deps.concat(r):[r],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ja,"").replace(ka,
36
+ function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b}),e=N;e&&(b||(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}g?(g.defQueue.push([b,c,d]),g.defQueueMap[b]=!0):R.push([b,c,d])};define.amd={jQuery:!0};e.exec=function(b){return eval(b)};e(s)}})(this);
js/tiny_mce/plugins/esites_editor/langs/en.js CHANGED
@@ -1,3 +1,3 @@
1
  tinyMCE.addI18n('en.esites_editor',{
2
- editor_button: "Edit source code"
3
  });
1
  tinyMCE.addI18n('en.esites_editor',{
2
+ editor_button: 'Edit source code'
3
  });
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Esites_Editor</name>
4
- <version>0.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -12,13 +12,19 @@
12
  Of course you can open up the default source editor and go from there. But you probably know that this will not be very pleasant as well, the code looks like a big bowl of tag soup and editing it can give you a real headache.&#xD;
13
  &#xD;
14
  This extension adds an additional editor to Magento's WYSIWYG editor that is similar to your favorite IDE. It offers several great features that will not only save you quite a bit of time but also makes editing HTML a lot easier.</description>
15
- <notes>Landed support for transactional emails, added a new code beautifier and implemented HTML autocompletion.&#xD;
 
 
 
 
 
 
16
  &#xD;
17
  The GitHub repo can be found at: https://github.com/e-sites/magento-advanced-html-editor</notes>
18
  <authors><author><name>Boye Oomens</name><user>boye</user><email>github@e-sites.nl</email></author></authors>
19
- <date>2015-07-31</date>
20
- <time>15:26:09</time>
21
- <contents><target name="magelocal"><dir name="Esites"><dir name="Editor"><dir name="Helper"><file name="Data.php" hash="cd176392637a27912dbc252d677404df"/></dir><dir name="Model"><file name="Config.php" hash="723641a31a6a022bab51996ccc92915d"/><file name="Observer.php" hash="f729901c9cafe572c3f5a845b92d8a56"/><dir name="Source"><file name="Status.php" hash="11f4bbfb91f7eb60192fe5dd314948bd"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Indentunit"><file name="Values.php" hash="6201a40c6cf6ff70a945d1f14e8a0c1c"/></dir><dir name="Keymap"><file name="Values.php" hash="439483ce69cbca9dd47265dcae8e14b2"/></dir><dir name="Theme"><file name="Values.php" hash="5a19d932e7d2ad93b2a328402c7bd2ce"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="d21882540da028dd0628b955d1227fd0"/><file name="system.xml" hash="39604c563125980fd66a0363dea2607d"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Esites_Editor.xml" hash="3898822a14ae51a3811da3e1e7b801ce"/></dir></target><target name="mageweb"><dir name="js"><dir name="tiny_mce"><dir name="plugins"><dir name="esites_editor"><dir name="css"><file name="styles.css" hash="494871d7e69ec65162a911ebdf0105b2"/></dir><file name="esites_editor.html" hash="4a7256de4f6df2cdbc638b2d13ba687a"/><file name="esites_editor_plugin.js" hash="d1abcf24fcfce69052251f8445c32934"/><file name="esites_editor_plugin_src.js" hash="5a627a3b4e80c53a54422b3b68dbb570"/><dir name="img"><file name="icon-esites-editor.png" hash="44c722d1cfa0465a94d0244583240812"/></dir><dir name="js"><dir name="app"><file name="main.js" hash="0205523c030ef7d45b448691a14f13e2"/><dir name="module"><file name="editor.js" hash="6d68259e5e9dceaef554bed53d50a37d"/><file name="popup.js" hash="8b81addc4d9805bbc6712839172e5160"/><file name="util.js" hash="3dbf3e610b473326520ee38586151041"/></dir><dir name="var"><file name="addons.js" hash="69fa2c02830d8e02e91635e005e2e677"/><file name="cmOptions.js" hash="48042cb268055222690517c760c247e7"/><file name="deps.js" hash="d55e678756fce3b17847f7ee3d1885af"/><file name="plugin.js" hash="413f3aa9f10ea8752980d4711d2f9dfb"/><file name="textarea.js" hash="ba1efdbacc078ce5fad017e7ad965678"/></dir></dir><file name="app.js" hash="63570f79b53e3d67b3831b5ac1301aaf"/><dir name="vendor"><dir name="beautify"><file name="beautify-css.js" hash="089b995a960dcba679e00ca9126b1485"/><file name="beautify-html.js" hash="da7b543b5e13a8a101709b26caf5c0bf"/><file name="beautify.js" hash="7db35ceb33c1453cfae1d4981079fe62"/></dir><dir name="codemirror"><dir name="addon"><dir name="comment"><file name="comment.js" hash="e1233ff2b2428c5078ecfafbea23b7a0"/><file name="continuecomment.js" hash="2bad52d5a0b57d8f43e0e5b90bb25725"/></dir><dir name="dialog"><file name="dialog.css" hash="c89dce10b44d2882a024e7befc2b63f5"/><file name="dialog.js" hash="3429ebaf286acb91f04b8d3433251c1d"/></dir><dir name="display"><file name="fullscreen.css" hash="1a278e72b51528270f8ce9ec991929a1"/><file name="fullscreen.js" hash="fb86184c4fb36398188f2199fd28f167"/><file name="panel.js" hash="56e9558f431d1dffd85bf18ff2c9cd8d"/><file name="placeholder.js" hash="a406cc1590d2683a0114de4784f5421d"/><file name="rulers.js" hash="ff4f724e824fe42d72404a4fe4a756fe"/></dir><dir name="edit"><file name="closebrackets.js" hash="135aee995c406ae952e50b374c545562"/><file name="closetag.js" hash="34bce5a9d67d751ab0e4a0309f6a8b73"/><file name="continuelist.js" hash="1f902d5931a4c5d75b3d2b13aff71168"/><file name="matchbrackets.js" hash="94c58e98823144e56932aa2611c51dff"/><file name="matchtags.js" hash="545127ffedea5d77c0f68c809c75c5b6"/><file name="trailingspace.js" hash="650f095b187881451b0166d16ffd4091"/></dir><dir name="fold"><file name="brace-fold.js" hash="13f986f14247d953551bdfe93b27699e"/><file name="comment-fold.js" hash="5e5bdebcd4acb30c3aed47164e2af6b3"/><file name="foldcode.js" hash="76c21fd4c3f14d1a61765324ec82266b"/><file name="foldgutter.css" hash="38bb68770b6f7ebaa7adea770a68e0b1"/><file name="foldgutter.js" hash="021b76e831daea34fb2dd2f300077be0"/><file name="indent-fold.js" hash="b17f35bdd388f737113271b9e9070ea3"/><file name="markdown-fold.js" hash="c8783b56c820030045a57f291660ea20"/><file name="xml-fold.js" hash="f173dec3ccb5d6df5f37b9a99ecc438a"/></dir><dir name="hint"><file name="anyword-hint.js" hash="00b7028e5978a14b543f99e04739fd10"/><file name="css-hint.js" hash="0331f17931864c79688b80c3a8fcf0bf"/><file name="html-hint.js" hash="6b398a6ef3473b9f889092495fcc1545"/><file name="javascript-hint.js" hash="8febf4d6664e133fac9da1da672564cd"/><file name="show-hint.css" hash="630e320a614e7732f6ce1bf37147f27f"/><file name="show-hint.js" hash="662c4c0a36f065a3851d947a33165db3"/><file name="sql-hint.js" hash="3320167f10ccb11e1fb6d43e10e0c4f8"/><file name="xml-hint.js" hash="21d019d58516804262957d8879576908"/></dir><dir name="lint"><file name="coffeescript-lint.js" hash="a867c61ab04b4309206ba371bdde9fb7"/><file name="css-lint.js" hash="fd09f81d97cf3eb681cc5742d76ec47f"/><file name="javascript-lint.js" hash="5576a5092afdae4e7990abcbc92d0425"/><file name="json-lint.js" hash="49afe4d1a791c115de21553c28f1a6cf"/><file name="lint.css" hash="5f5d243947ec3ae1b8f37d85f0fa2a2d"/><file name="lint.js" hash="4ddf18f1a8f1e743e0089773b37db7ef"/><file name="yaml-lint.js" hash="117815f724aa2c3d671801ccedaa86ac"/></dir><dir name="merge"><file name="merge.css" hash="842786722589d900ffaf32652e89dac9"/><file name="merge.js" hash="0a076a685071b988fc11c90799400ed4"/></dir><dir name="mode"><file name="loadmode.js" hash="bc3c29fecceff0785b086b6e1c6f6b7c"/><file name="multiplex.js" hash="2d862f9ff445de58743d57007dadf3a8"/><file name="multiplex_test.js" hash="6e9c20d5c89c34f9245e1e346edc027b"/><file name="overlay.js" hash="7abff7c501c40008fc541414e803d954"/><file name="simple.js" hash="b3f550bd7554a29d6929e20aba3456ac"/></dir><dir name="runmode"><file name="colorize.js" hash="b0d93d54ee9bf76b246ea7cae39d6e75"/><file name="runmode-standalone.js" hash="54b1bc5448bbdfb53fdb3cbdc6740ef7"/><file name="runmode.js" hash="3266201540178df80d191c73bbd88152"/><file name="runmode.node.js" hash="e0d6deb878b58ce2329eb676b1146a1d"/></dir><dir name="scroll"><file name="annotatescrollbar.js" hash="48c6d9945674a1f807d164190094090c"/><file name="scrollpastend.js" hash="68e06dd3d77a87661790bbb7ebe2f080"/><file name="simplescrollbars.css" hash="0352ba51fd6a422fe6cc44925e33ad88"/><file name="simplescrollbars.js" hash="3a02029c076fb34aac136dd8c745be94"/></dir><dir name="search"><file name="match-highlighter.js" hash="b59268b1e4b6872df69110776d7f7934"/><file name="matchesonscrollbar.css" hash="00ea2770c568a848190bcf52e4241276"/><file name="matchesonscrollbar.js" hash="2cece6de1e3ad73489c170c8f08dd561"/><file name="search.js" hash="c9f245200e0efa341e4180e86733bf5a"/><file name="searchcursor.js" hash="a11e9186f471515209a5583f1af6421c"/></dir><dir name="selection"><file name="active-line.js" hash="c7c0cb21951ca1ba74837a74bbcd4b47"/><file name="mark-selection.js" hash="49df440e41a6f54264bce4f7ed7d7d05"/><file name="selection-pointer.js" hash="394ed7c792ed1954c6473d72e17156f9"/></dir><dir name="tern"><file name="tern.css" hash="8f36b875b840601834dfed2b69de0078"/><file name="tern.js" hash="fff8e060e7f942c26e6ed70fcae47ca9"/><file name="worker.js" hash="d6b55f3e776aafc6b1d1cd5bdf148e1d"/></dir><dir name="wrap"><file name="hardwrap.js" hash="0c70cedbc3ecc9474b11a24e23fe7b16"/></dir></dir><dir name="keymap"><file name="emacs.js" hash="9f95a4ebee67bc15739d34c6ebf5f2cc"/><file name="sublime.js" hash="aed0301397ec5401808e3ce051bb83a7"/><file name="vim.js" hash="6ae9bc84b361ebf60778fa469cb26078"/></dir><dir name="lib"><file name="codemirror.css" hash="3bc68598b602fb4d93df6abaae6c34f0"/><file name="codemirror.js" hash="1c5918f6b8c21ecedfd1bd06e0013e6d"/></dir><dir name="mode"><dir name="css"><file name="css.js" hash="b68d20ce073c2a809415d5e3ea6c9c84"/></dir><dir name="htmlmixed"><file name="htmlmixed.js" hash="4c7ab27882547c9075bc3a92c6278fbb"/></dir><dir name="javascript"><file name="javascript.js" hash="51b0e74a915e10ed9498e6b0035ae4b3"/></dir><dir name="xml"><file name="xml.js" hash="4304a1cbddb1f976e42893f59de690a1"/></dir></dir><dir name="theme"><file name="3024-day.css" hash="894a32efb2cfa60e36c9cc768cc0098a"/><file name="3024-night.css" hash="f1a444a6a4b50deac6a39189954a301b"/><file name="ambiance-mobile.css" hash="256f2dd130b80c6afaa40fddf700d12a"/><file name="ambiance.css" hash="51c29d465f0cf05b700db7bb56de30ea"/><file name="base16-dark.css" hash="1fb9180ba997460d4d366f7f08c6fd4f"/><file name="base16-light.css" hash="f66849c18f3b37a6858a13ee1e35848e"/><file name="blackboard.css" hash="a8ab62c90ab85a9c37f0ec70b54fbe99"/><file name="cobalt.css" hash="78b4d41cb127c1bd68be016009abc403"/><file name="colorforth.css" hash="1c2ac3b8535beb8c8d72daefcf1f2e82"/><file name="eclipse.css" hash="7c2f7b4b44b33fc9a5f857f542d007ac"/><file name="elegant.css" hash="c98914a034be0b11803bd3c24fba25dd"/><file name="erlang-dark.css" hash="93e7bc00530872f75f2407f7765cf755"/><file name="lesser-dark.css" hash="32e03c52c65d99e8de86d621e8059663"/><file name="liquibyte.css" hash="e32c54ecb4723675927388e8527d6515"/><file name="mbo.css" hash="8337ba3e4b9452cfe4a810c18fb3990d"/><file name="mdn-like.css" hash="7beb83c3ff5dd949ebea5c6840dc9ef3"/><file name="midnight.css" hash="73ebc77d60adac9c1d61608c7dc1344e"/><file name="monokai.css" hash="4caf13aa81a21c285cd195b7c9b20fa7"/><file name="neat.css" hash="673552ecebac76569063801293e9c76c"/><file name="neo.css" hash="f65035d751bacec07f189e3477f50bda"/><file name="night.css" hash="6ab152690c686b5d60d6d3f27f56dd31"/><file name="paraiso-dark.css" hash="b35f03d48623abf2327776955dd7cb86"/><file name="paraiso-light.css" hash="bbd066b1fb000c8ea3c1ffdac1f6c81b"/><file name="pastel-on-dark.css" hash="06a23867d779a12d33ffdc2a4db14088"/><file name="rubyblue.css" hash="2012b905229fdc2535321b1df631391c"/><file name="solarized.css" hash="02827534862eabe50b6e323490b10695"/><file name="the-matrix.css" hash="78a2e1eb98e9b4fe66b4e0e62f20db35"/><file name="tomorrow-night-bright.css" hash="15536604543d76ec2e0d30f593363062"/><file name="tomorrow-night-eighties.css" hash="061bbc6ab97d3b88a44c559583d301cf"/><file name="ttcn.css" hash="71e8cf8f41b49c587a0678ab32f81f13"/><file name="twilight.css" hash="99c1f0abe436ef5b456a34f99e80e9bc"/><file name="vibrant-ink.css" hash="69156002e7897ad324441766e7ee99a5"/><file name="xq-dark.css" hash="285c0f80f69a0bca86ac22d69bd47e75"/><file name="xq-light.css" hash="481023ea9d2e1d4c1707a1867c500326"/><file name="zenburn.css" hash="8211c2d07e48ca8553f77756a8c35bfd"/></dir></dir><dir name="emmet"><file name="emmet.js" hash="20b8a23a66c4329d0498bea0bc3ab018"/></dir><dir name="requirejs"><file name="css.min.js" hash="e787572d95902ef09257cea1c5b33de2"/><file name="require.min.js" hash="7198d1fc16fe630bd9357819ee8b65ef"/></dir></dir></dir><dir name="langs"><file name="en.js" hash="fecd78b74204e7236827c75801dfc155"/></dir></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Esites_Editor</name>
4
+ <version>0.4.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
12
  Of course you can open up the default source editor and go from there. But you probably know that this will not be very pleasant as well, the code looks like a big bowl of tag soup and editing it can give you a real headache.&#xD;
13
  &#xD;
14
  This extension adds an additional editor to Magento's WYSIWYG editor that is similar to your favorite IDE. It offers several great features that will not only save you quite a bit of time but also makes editing HTML a lot easier.</description>
15
+ <notes>Version 0.4.0 is quite a major release.&#xD;
16
+ &#xD;
17
+ * Added standalone support for Transactional Emails&#xD;
18
+ * Created the possibility to enable the editor for available WYSIWYG editors (including CMS, Catalog and Newsletter Templates)&#xD;
19
+ * Transferred files to the community code pool&#xD;
20
+ * Added Dutch translation (more coming!)&#xD;
21
+ * Refactored large part of the JavaScript code&#xD;
22
  &#xD;
23
  The GitHub repo can be found at: https://github.com/e-sites/magento-advanced-html-editor</notes>
24
  <authors><author><name>Boye Oomens</name><user>boye</user><email>github@e-sites.nl</email></author></authors>
25
+ <date>2015-08-13</date>
26
+ <time>15:31:10</time>
27
+ <contents><target name="magecommunity"><dir name="Esites"><dir name="Editor"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Email"><dir name="Template"><dir name="Edit"><file name="Form.php" hash="324d6aa774428b83907fa99ae007796b"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="cd176392637a27912dbc252d677404df"/></dir><dir name="Model"><file name="Config.php" hash="2f07f98a86f9f82d2d07909fd0276bd1"/><file name="Observer.php" hash="e240c58023d2a803c0cda1c0f669ac81"/><dir name="Source"><file name="Status.php" hash="d39a6881e1dce9e85248414864ed81fc"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Indentunit"><file name="Values.php" hash="6201a40c6cf6ff70a945d1f14e8a0c1c"/></dir><dir name="Keymap"><file name="Values.php" hash="439483ce69cbca9dd47265dcae8e14b2"/></dir><dir name="Sections"><file name="Values.php" hash="ecc683806bfd751925df2adff0eec72c"/></dir><dir name="Theme"><file name="Values.php" hash="5a19d932e7d2ad93b2a328402c7bd2ce"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="f869705981ce6f1523ed04ede0c766e4"/><file name="system.xml" hash="6ba0a8436cfdc207baaf7a9a6ec6cebd"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Esites_Editor.xml" hash="71f3494666fd734e43eae430a4de79b5"/></dir></target><target name="mageweb"><dir name="js"><dir name="tiny_mce"><dir name="plugins"><dir name="esites_editor"><dir name="css"><file name="styles.css" hash="feac6a6b5da51a4ccf7d4b985edbae24"/></dir><file name="esites_editor.html" hash="1fe0e7ac32f7622d8d02d6eac1c383db"/><file name="esites_editor_plugin.js" hash="85985ad147e7abd8f6b70c9f85347802"/><file name="esites_editor_plugin_src.js" hash="7f483715de6bf2dc81c4756c4cc58f7d"/><dir name="img"><file name="icon-esites-editor.png" hash="44c722d1cfa0465a94d0244583240812"/></dir><dir name="js"><dir name="app"><file name="main.js" hash="1a156ebd2254d020bc0599464ece1f24"/><dir name="module"><file name="code.js" hash="eec523a16246e96163062c4b9c8ae268"/><file name="dialog.js" hash="be3345f0e45c9d9ba256099a3296fd6e"/><file name="editor.js" hash="e735da311ec4e77db3ee60505802c676"/><file name="setup.js" hash="fd02ee0f0f31f9a42c649ffbd4390466"/><file name="standalone.js" hash="8218772de2c3f275f5434c0e273316e5"/><file name="util.js" hash="1d3ba982556ac15587e963d430be2c43"/></dir><dir name="var"><file name="addons.js" hash="9399686abc1418ec8be63e433cc92517"/><file name="cmOptions.js" hash="f6de7afb7fca94a6bce03e349067b1d6"/><file name="deps.js" hash="3b2e65001c972324e9d17c7ca3a8f7d3"/><file name="plugin.js" hash="c7aedc578d8376336c90779c045314ad"/><file name="textarea.js" hash="213106905f1cb978acd6a141a77c2277"/><file name="tinymcePopup.js" hash="fb1df63a0968fcf2800ad05a92c1188c"/></dir></dir><file name="app.js" hash="e90a402158e136bae03db6060cb3e58a"/><dir name="vendor"><dir name="beautify"><file name="beautify-css.js" hash="089b995a960dcba679e00ca9126b1485"/><file name="beautify-html.js" hash="da7b543b5e13a8a101709b26caf5c0bf"/><file name="beautify.js" hash="7db35ceb33c1453cfae1d4981079fe62"/></dir><dir name="codemirror"><dir name="addon"><dir name="comment"><file name="comment.js" hash="e1233ff2b2428c5078ecfafbea23b7a0"/><file name="continuecomment.js" hash="2bad52d5a0b57d8f43e0e5b90bb25725"/></dir><dir name="dialog"><file name="dialog.css" hash="c89dce10b44d2882a024e7befc2b63f5"/><file name="dialog.js" hash="3429ebaf286acb91f04b8d3433251c1d"/></dir><dir name="display"><file name="fullscreen.css" hash="1a278e72b51528270f8ce9ec991929a1"/><file name="fullscreen.js" hash="fb86184c4fb36398188f2199fd28f167"/><file name="panel.js" hash="56e9558f431d1dffd85bf18ff2c9cd8d"/><file name="placeholder.js" hash="a406cc1590d2683a0114de4784f5421d"/><file name="rulers.js" hash="ff4f724e824fe42d72404a4fe4a756fe"/></dir><dir name="edit"><file name="closebrackets.js" hash="135aee995c406ae952e50b374c545562"/><file name="closetag.js" hash="34bce5a9d67d751ab0e4a0309f6a8b73"/><file name="continuelist.js" hash="1f902d5931a4c5d75b3d2b13aff71168"/><file name="matchbrackets.js" hash="94c58e98823144e56932aa2611c51dff"/><file name="matchtags.js" hash="545127ffedea5d77c0f68c809c75c5b6"/><file name="trailingspace.js" hash="650f095b187881451b0166d16ffd4091"/></dir><dir name="fold"><file name="brace-fold.js" hash="13f986f14247d953551bdfe93b27699e"/><file name="comment-fold.js" hash="5e5bdebcd4acb30c3aed47164e2af6b3"/><file name="foldcode.js" hash="76c21fd4c3f14d1a61765324ec82266b"/><file name="foldgutter.css" hash="38bb68770b6f7ebaa7adea770a68e0b1"/><file name="foldgutter.js" hash="021b76e831daea34fb2dd2f300077be0"/><file name="indent-fold.js" hash="b17f35bdd388f737113271b9e9070ea3"/><file name="markdown-fold.js" hash="c8783b56c820030045a57f291660ea20"/><file name="xml-fold.js" hash="f173dec3ccb5d6df5f37b9a99ecc438a"/></dir><dir name="hint"><file name="anyword-hint.js" hash="00b7028e5978a14b543f99e04739fd10"/><file name="css-hint.js" hash="0331f17931864c79688b80c3a8fcf0bf"/><file name="html-hint.js" hash="6b398a6ef3473b9f889092495fcc1545"/><file name="javascript-hint.js" hash="8febf4d6664e133fac9da1da672564cd"/><file name="show-hint.css" hash="630e320a614e7732f6ce1bf37147f27f"/><file name="show-hint.js" hash="662c4c0a36f065a3851d947a33165db3"/><file name="sql-hint.js" hash="3320167f10ccb11e1fb6d43e10e0c4f8"/><file name="xml-hint.js" hash="21d019d58516804262957d8879576908"/></dir><dir name="lint"><file name="coffeescript-lint.js" hash="a867c61ab04b4309206ba371bdde9fb7"/><file name="css-lint.js" hash="fd09f81d97cf3eb681cc5742d76ec47f"/><file name="javascript-lint.js" hash="5576a5092afdae4e7990abcbc92d0425"/><file name="json-lint.js" hash="49afe4d1a791c115de21553c28f1a6cf"/><file name="lint.css" hash="5f5d243947ec3ae1b8f37d85f0fa2a2d"/><file name="lint.js" hash="4ddf18f1a8f1e743e0089773b37db7ef"/><file name="yaml-lint.js" hash="117815f724aa2c3d671801ccedaa86ac"/></dir><dir name="merge"><file name="merge.css" hash="842786722589d900ffaf32652e89dac9"/><file name="merge.js" hash="0a076a685071b988fc11c90799400ed4"/></dir><dir name="mode"><file name="loadmode.js" hash="bc3c29fecceff0785b086b6e1c6f6b7c"/><file name="multiplex.js" hash="2d862f9ff445de58743d57007dadf3a8"/><file name="multiplex_test.js" hash="6e9c20d5c89c34f9245e1e346edc027b"/><file name="overlay.js" hash="7abff7c501c40008fc541414e803d954"/><file name="simple.js" hash="b3f550bd7554a29d6929e20aba3456ac"/></dir><dir name="runmode"><file name="colorize.js" hash="b0d93d54ee9bf76b246ea7cae39d6e75"/><file name="runmode-standalone.js" hash="54b1bc5448bbdfb53fdb3cbdc6740ef7"/><file name="runmode.js" hash="3266201540178df80d191c73bbd88152"/><file name="runmode.node.js" hash="e0d6deb878b58ce2329eb676b1146a1d"/></dir><dir name="scroll"><file name="annotatescrollbar.js" hash="48c6d9945674a1f807d164190094090c"/><file name="scrollpastend.js" hash="68e06dd3d77a87661790bbb7ebe2f080"/><file name="simplescrollbars.css" hash="0352ba51fd6a422fe6cc44925e33ad88"/><file name="simplescrollbars.js" hash="3a02029c076fb34aac136dd8c745be94"/></dir><dir name="search"><file name="match-highlighter.js" hash="b59268b1e4b6872df69110776d7f7934"/><file name="matchesonscrollbar.css" hash="00ea2770c568a848190bcf52e4241276"/><file name="matchesonscrollbar.js" hash="2cece6de1e3ad73489c170c8f08dd561"/><file name="search.js" hash="c9f245200e0efa341e4180e86733bf5a"/><file name="searchcursor.js" hash="a11e9186f471515209a5583f1af6421c"/></dir><dir name="selection"><file name="active-line.js" hash="c7c0cb21951ca1ba74837a74bbcd4b47"/><file name="mark-selection.js" hash="49df440e41a6f54264bce4f7ed7d7d05"/><file name="selection-pointer.js" hash="394ed7c792ed1954c6473d72e17156f9"/></dir><dir name="tern"><file name="tern.css" hash="8f36b875b840601834dfed2b69de0078"/><file name="tern.js" hash="fff8e060e7f942c26e6ed70fcae47ca9"/><file name="worker.js" hash="d6b55f3e776aafc6b1d1cd5bdf148e1d"/></dir><dir name="wrap"><file name="hardwrap.js" hash="0c70cedbc3ecc9474b11a24e23fe7b16"/></dir></dir><dir name="keymap"><file name="emacs.js" hash="9f95a4ebee67bc15739d34c6ebf5f2cc"/><file name="sublime.js" hash="aed0301397ec5401808e3ce051bb83a7"/><file name="vim.js" hash="6ae9bc84b361ebf60778fa469cb26078"/></dir><dir name="lib"><file name="codemirror.css" hash="3bc68598b602fb4d93df6abaae6c34f0"/><file name="codemirror.js" hash="1c5918f6b8c21ecedfd1bd06e0013e6d"/></dir><dir name="mode"><dir name="css"><file name="css.js" hash="b68d20ce073c2a809415d5e3ea6c9c84"/></dir><dir name="handlebars"><file name="handlebars.js" hash="403b3cb0991b36f46fd3497b7805f941"/></dir><dir name="htmlmixed"><file name="htmlmixed.js" hash="4c7ab27882547c9075bc3a92c6278fbb"/></dir><dir name="javascript"><file name="javascript.js" hash="51b0e74a915e10ed9498e6b0035ae4b3"/></dir><dir name="xml"><file name="xml.js" hash="4304a1cbddb1f976e42893f59de690a1"/></dir></dir><dir name="theme"><file name="3024-day.css" hash="894a32efb2cfa60e36c9cc768cc0098a"/><file name="3024-night.css" hash="f1a444a6a4b50deac6a39189954a301b"/><file name="ambiance-mobile.css" hash="256f2dd130b80c6afaa40fddf700d12a"/><file name="ambiance.css" hash="51c29d465f0cf05b700db7bb56de30ea"/><file name="base16-dark.css" hash="1fb9180ba997460d4d366f7f08c6fd4f"/><file name="base16-light.css" hash="f66849c18f3b37a6858a13ee1e35848e"/><file name="blackboard.css" hash="a8ab62c90ab85a9c37f0ec70b54fbe99"/><file name="cobalt.css" hash="78b4d41cb127c1bd68be016009abc403"/><file name="colorforth.css" hash="1c2ac3b8535beb8c8d72daefcf1f2e82"/><file name="eclipse.css" hash="7c2f7b4b44b33fc9a5f857f542d007ac"/><file name="elegant.css" hash="c98914a034be0b11803bd3c24fba25dd"/><file name="erlang-dark.css" hash="93e7bc00530872f75f2407f7765cf755"/><file name="lesser-dark.css" hash="32e03c52c65d99e8de86d621e8059663"/><file name="liquibyte.css" hash="e32c54ecb4723675927388e8527d6515"/><file name="mbo.css" hash="8337ba3e4b9452cfe4a810c18fb3990d"/><file name="mdn-like.css" hash="7beb83c3ff5dd949ebea5c6840dc9ef3"/><file name="midnight.css" hash="73ebc77d60adac9c1d61608c7dc1344e"/><file name="monokai.css" hash="4caf13aa81a21c285cd195b7c9b20fa7"/><file name="neat.css" hash="673552ecebac76569063801293e9c76c"/><file name="neo.css" hash="f65035d751bacec07f189e3477f50bda"/><file name="night.css" hash="6ab152690c686b5d60d6d3f27f56dd31"/><file name="paraiso-dark.css" hash="b35f03d48623abf2327776955dd7cb86"/><file name="paraiso-light.css" hash="bbd066b1fb000c8ea3c1ffdac1f6c81b"/><file name="pastel-on-dark.css" hash="06a23867d779a12d33ffdc2a4db14088"/><file name="rubyblue.css" hash="2012b905229fdc2535321b1df631391c"/><file name="solarized.css" hash="02827534862eabe50b6e323490b10695"/><file name="the-matrix.css" hash="78a2e1eb98e9b4fe66b4e0e62f20db35"/><file name="tomorrow-night-bright.css" hash="15536604543d76ec2e0d30f593363062"/><file name="tomorrow-night-eighties.css" hash="061bbc6ab97d3b88a44c559583d301cf"/><file name="ttcn.css" hash="71e8cf8f41b49c587a0678ab32f81f13"/><file name="twilight.css" hash="99c1f0abe436ef5b456a34f99e80e9bc"/><file name="vibrant-ink.css" hash="69156002e7897ad324441766e7ee99a5"/><file name="xq-dark.css" hash="285c0f80f69a0bca86ac22d69bd47e75"/><file name="xq-light.css" hash="481023ea9d2e1d4c1707a1867c500326"/><file name="zenburn.css" hash="8211c2d07e48ca8553f77756a8c35bfd"/></dir></dir><dir name="emmet"><file name="emmet.js" hash="20b8a23a66c4329d0498bea0bc3ab018"/></dir><dir name="gator"><file name="gator.min.js" hash="5d64860d250bb093b1e6a31ea1358700"/></dir><dir name="requirejs"><file name="css.min.js" hash="e787572d95902ef09257cea1c5b33de2"/><file name="require.min.js" hash="55d2b700d4075564f77d892ea08cf7f0"/></dir></dir></dir><dir name="langs"><file name="en.js" hash="7fe09959b21ac7394ff4fd1d3626ff13"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Esites_Editor.csv" hash="8daece7277a99e5af1c72b591016c112"/></dir><dir name="nl_NL"><file name="Esites_Editor.csv" hash="817bd8de0a88b1223837dbc424ea9e6d"/></dir></target></contents>
28
  <compatible/>
29
  <dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies>
30
  </package>