spree_editor 0.50.0 → 0.50.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. data/Versionfile +3 -0
  2. data/app/controllers/admin/editor_settings_controller.rb +5 -11
  3. data/app/views/admin/editor_settings/edit.html.erb +20 -19
  4. data/app/views/shared/editor_engines/_tiny_mce.html.erb +16 -33
  5. data/app/views/shared/editor_engines/_yui_rich_editor.html.erb +60 -7
  6. data/config/locales/en.yml +1 -0
  7. data/config/locales/es.yml +45 -0
  8. data/config/locales/ru.yml +2 -0
  9. data/lib/editor_configuration.rb +2 -2
  10. data/public/images/html_editor.gif +0 -0
  11. data/public/javascripts/tinymce/langs/en.js +56 -3
  12. data/public/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +2 -0
  13. data/public/javascripts/tinymce/plugins/advhr/rule.htm +30 -29
  14. data/public/javascripts/tinymce/plugins/advimage/image.htm +34 -31
  15. data/public/javascripts/tinymce/plugins/advimage/js/image.js +20 -5
  16. data/public/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +2 -0
  17. data/public/javascripts/tinymce/plugins/advlink/js/advlink.js +21 -17
  18. data/public/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +4 -2
  19. data/public/javascripts/tinymce/plugins/advlink/link.htm +35 -30
  20. data/public/javascripts/tinymce/plugins/advlist/editor_plugin.js +1 -1
  21. data/public/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +10 -3
  22. data/public/javascripts/tinymce/plugins/autolink/editor_plugin.js +1 -0
  23. data/public/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +169 -0
  24. data/public/javascripts/tinymce/plugins/autoresize/editor_plugin.js +1 -1
  25. data/public/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +12 -3
  26. data/public/javascripts/tinymce/plugins/autosave/editor_plugin.js +1 -1
  27. data/public/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +13 -4
  28. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin.js +1 -1
  29. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +1 -1
  30. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +1 -1
  31. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +30 -16
  32. data/public/javascripts/tinymce/plugins/emotions/emotions.htm +15 -14
  33. data/public/javascripts/tinymce/plugins/fullpage/css/fullpage.css +3 -42
  34. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin.js +1 -1
  35. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +309 -63
  36. data/public/javascripts/tinymce/plugins/fullpage/fullpage.htm +18 -330
  37. data/public/javascripts/tinymce/plugins/fullpage/js/fullpage.js +199 -438
  38. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +1 -1
  39. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +10 -2
  40. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +1 -1
  41. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +76 -15
  42. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -10
  43. data/public/javascripts/tinymce/plugins/layer/editor_plugin.js +1 -1
  44. data/public/javascripts/tinymce/plugins/layer/editor_plugin_src.js +2 -0
  45. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +1 -1
  46. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +31 -28
  47. data/public/javascripts/tinymce/plugins/lists/editor_plugin.js +1 -0
  48. data/public/javascripts/tinymce/plugins/lists/editor_plugin_src.js +617 -0
  49. data/public/javascripts/tinymce/plugins/media/css/media.css +5 -4
  50. data/public/javascripts/tinymce/plugins/media/editor_plugin.js +1 -1
  51. data/public/javascripts/tinymce/plugins/media/editor_plugin_src.js +652 -296
  52. data/public/javascripts/tinymce/plugins/media/js/media.js +327 -603
  53. data/public/javascripts/tinymce/plugins/media/langs/en_dlg.js +8 -2
  54. data/public/javascripts/tinymce/plugins/media/media.htm +283 -288
  55. data/public/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
  56. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +1 -1
  57. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +1 -1
  58. data/public/javascripts/tinymce/plugins/noneditable/editor_plugin.js +1 -1
  59. data/public/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +2 -0
  60. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +1 -1
  61. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +1 -4
  62. data/public/javascripts/tinymce/plugins/paste/editor_plugin.js +1 -1
  63. data/public/javascripts/tinymce/plugins/paste/editor_plugin_src.js +118 -137
  64. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +1 -1
  65. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +4 -0
  66. data/public/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +14 -10
  67. data/public/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +17 -16
  68. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +1 -1
  69. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +55 -37
  70. data/public/javascripts/tinymce/plugins/style/js/props.js +2 -8
  71. data/public/javascripts/tinymce/plugins/style/langs/en_dlg.js +8 -1
  72. data/public/javascripts/tinymce/plugins/style/props.htm +513 -398
  73. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +1 -1
  74. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +30 -28
  75. data/public/javascripts/tinymce/plugins/table/cell.htm +12 -12
  76. data/public/javascripts/tinymce/plugins/table/editor_plugin.js +1 -1
  77. data/public/javascripts/tinymce/plugins/table/editor_plugin_src.js +97 -34
  78. data/public/javascripts/tinymce/plugins/table/js/cell.js +9 -11
  79. data/public/javascripts/tinymce/plugins/table/js/row.js +13 -18
  80. data/public/javascripts/tinymce/plugins/table/js/table.js +8 -12
  81. data/public/javascripts/tinymce/plugins/table/langs/en_dlg.js +1 -1
  82. data/public/javascripts/tinymce/plugins/table/merge_cells.htm +11 -11
  83. data/public/javascripts/tinymce/plugins/table/row.htm +10 -8
  84. data/public/javascripts/tinymce/plugins/table/table.htm +54 -53
  85. data/public/javascripts/tinymce/plugins/template/js/template.js +1 -1
  86. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin.js +1 -1
  87. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +1 -1
  88. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin.js +1 -1
  89. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +35 -19
  90. data/public/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +6 -5
  91. data/public/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +6 -5
  92. data/public/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +6 -5
  93. data/public/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +5 -4
  94. data/public/javascripts/tinymce/plugins/xhtmlxtras/del.htm +9 -8
  95. data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +1 -1
  96. data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +6 -6
  97. data/public/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +11 -10
  98. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +1 -16
  99. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +2 -2
  100. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +3 -5
  101. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +4 -3
  102. data/public/javascripts/tinymce/themes/advanced/about.htm +3 -5
  103. data/public/javascripts/tinymce/themes/advanced/anchor.htm +5 -5
  104. data/public/javascripts/tinymce/themes/advanced/charmap.htm +39 -40
  105. data/public/javascripts/tinymce/themes/advanced/color_picker.htm +10 -9
  106. data/public/javascripts/tinymce/themes/advanced/editor_template.js +1 -1
  107. data/public/javascripts/tinymce/themes/advanced/editor_template_src.js +172 -41
  108. data/public/javascripts/tinymce/themes/advanced/image.htm +51 -51
  109. data/public/javascripts/tinymce/themes/advanced/img/flash.gif +0 -0
  110. data/public/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
  111. data/public/javascripts/tinymce/themes/advanced/img/pagebreak.gif +0 -0
  112. data/public/javascripts/tinymce/themes/advanced/img/quicktime.gif +0 -0
  113. data/public/javascripts/tinymce/themes/advanced/img/realmedia.gif +0 -0
  114. data/public/javascripts/tinymce/themes/advanced/img/shockwave.gif +0 -0
  115. data/public/javascripts/tinymce/themes/advanced/img/trans.gif +0 -0
  116. data/public/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
  117. data/public/javascripts/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
  118. data/public/javascripts/tinymce/themes/advanced/js/about.js +1 -0
  119. data/public/javascripts/tinymce/themes/advanced/js/anchor.js +5 -0
  120. data/public/javascripts/tinymce/themes/advanced/js/charmap.js +26 -6
  121. data/public/javascripts/tinymce/themes/advanced/js/color_picker.js +108 -32
  122. data/public/javascripts/tinymce/themes/advanced/js/image.js +3 -1
  123. data/public/javascripts/tinymce/themes/advanced/js/link.js +4 -7
  124. data/public/javascripts/tinymce/themes/advanced/js/source_editor.js +1 -1
  125. data/public/javascripts/tinymce/themes/advanced/langs/en.js +8 -2
  126. data/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +6 -3
  127. data/public/javascripts/tinymce/themes/advanced/link.htm +27 -28
  128. data/public/javascripts/tinymce/themes/advanced/shortcuts.htm +47 -0
  129. data/public/javascripts/tinymce/themes/advanced/skins/default/content.css +11 -0
  130. data/public/javascripts/tinymce/themes/advanced/skins/default/ui.css +4 -4
  131. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +23 -0
  132. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +105 -0
  133. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +101 -0
  134. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +10 -0
  135. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +1 -0
  136. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +5 -4
  137. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +1 -1
  138. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +1 -1
  139. data/public/javascripts/tinymce/themes/advanced/source_editor.htm +3 -3
  140. data/public/javascripts/tinymce/themes/simple/editor_template.js +1 -1
  141. data/public/javascripts/tinymce/themes/simple/editor_template_src.js +1 -2
  142. data/public/javascripts/tinymce/tiny_mce.js +1 -1
  143. data/public/javascripts/tinymce/tiny_mce_popup.js +1 -1
  144. data/public/javascripts/tinymce/tiny_mce_src.js +6488 -4070
  145. data/public/javascripts/tinymce/utils/form_utils.js +14 -4
  146. data/public/javascripts/tinymce/utils/mctabs.js +95 -10
  147. data/public/javascripts/tinymce/utils/validate.js +35 -3
  148. data/public/stylesheets/editor.css +23 -0
  149. data/spree_editor.gemspec +2 -2
  150. metadata +25 -4
data/Versionfile ADDED
@@ -0,0 +1,3 @@
1
+ "0.60.x" => { :version => '0.50.0', :ref => 'da5c7fcb980d39a2e0f71a7f132463c28ef8c665' }
2
+ "0.50.x" => { :version => '0.50.0', :ref => 'da5c7fcb980d39a2e0f71a7f132463c28ef8c665' }
3
+ "0.40.x" => { :version => '0.50.0', :ref => 'da5c7fcb980d39a2e0f71a7f132463c28ef8c665' }
@@ -1,14 +1,8 @@
1
1
  class Admin::EditorSettingsController < Admin::BaseController
2
2
  def update
3
- preferences = params[:preferences] || {}
4
- enable_editor = preferences[:enabled].nil? ? false : true;
5
- preferences.update(:enabled => enable_editor)
6
- Spree::Editor::Config.set(preferences)
7
-
8
- respond_to do |format|
9
- format.html {
10
- redirect_to admin_editor_settings_path
11
- }
12
- end
3
+ @config = Spree::Editor::Config.instance
4
+ @config.update_attributes(params[@config.class.name.underscore])
5
+ Rails.cache.delete("configuration_#{@config.class.name}".to_sym)
6
+ redirect_to admin_editor_settings_path
13
7
  end
14
- end
8
+ end
@@ -2,22 +2,23 @@
2
2
 
3
3
  <h1><%= t('rich_editor') %></h1>
4
4
 
5
- <%= form_tag(admin_editor_settings_path, :method => :put) do %>
6
- <p>
7
- <label><%= t('enable_rich_editor') %>:</label>
8
- <%= check_box_tag('preferences[enabled]', '1', Spree::Editor::Config[:enabled]) %>
9
- </p>
10
- <p>
11
- <label><%= t('rich_editor_engine') %>:</label>
12
- <%= select_tag 'preferences[current_editor]', options_for_select(SpreeEditor::EditorEngines, Spree::Editor::Config[:current_editor]) %>
13
- </p>
14
- <p>
15
- <label><%= t('rich_editor_ids') %>:</label>
16
- <%= text_field_tag 'preferences[ids]', Spree::Editor::Config[:ids] %>
17
- <small><%= t('rich_editor_ids_description') %></small>
18
- </p>
19
- <p class="form-buttons">
20
- <%= button t('update') %>
21
- <%= t("or") %> <%= link_to t("cancel"), admin_editor_settings_url %>
22
- </p>
23
- <% end %>
5
+ <%= form_for(Spree::Editor::Config.instance, :url => admin_editor_settings_path) do |form| %>
6
+ <fieldset id="preferences">
7
+ <%= form.field_container :preferred_current_editor do %>
8
+ <%= form.label(:preferred_current_editor, t('rich_editor_engine')) %>
9
+ <%= form.select :preferred_current_editor, options_for_select(SpreeEditor::EditorEngines, Spree::Editor::Config[:current_editor]) %>
10
+ <% end %>
11
+ <%= form.field_container :preferred_enabled do %>
12
+ <%= preference_field(form, :preferred_enabled, :type => :boolean) %>
13
+ <%= form.label(:preferred_enabled, t(:enable_rich_editor)) %>
14
+ <% end %>
15
+ <%= form.field_container :preferred_ids do %>
16
+ <%= form.label(:preferred_ids, t(:rich_editor_ids_description)+": ") + tag(:br) %>
17
+ <%= preference_field(form, :preferred_ids, :type => :text) %>
18
+ <% end %>
19
+ </fieldset>
20
+ <p class="form-buttons">
21
+ <%= button t('update') %>
22
+ <%= t("or") %> <%= link_to t("cancel"), admin_editor_settings_url %>
23
+ </p>
24
+ <% end %>
@@ -6,19 +6,19 @@
6
6
  var myConfig = { dompath: true };
7
7
  var ids = [<%= ids.map{|id| "'#{id}'"}.join(', ') %>]
8
8
  $.each(ids, function(index, id) {
9
- if ($('textarea#' + id)) {
9
+ if ($('textarea#' + id).length) {
10
10
  tinyMCE.init({
11
- // General options
12
- language : '<%= I18n.locale.to_s.downcase %>',
13
- element : id,
14
- mode : "textareas",
11
+ mode : "exact",
12
+ elements : id,
15
13
  theme : "advanced",
16
- plugins : "table,inlinepopups",
14
+ language : '<%= I18n.locale.to_s.downcase %>',
15
+ skin : "o2k7",
16
+ plugins : "safari,style,layer,table,advhr,advimage,inlinepopups,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
17
17
 
18
18
  // Theme options
19
- theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,|,table,removeformat,code",
20
- theme_advanced_buttons2 : "",
21
- theme_advanced_buttons3 : "",
19
+ theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,fullscreen,|,charmap,media,advhr,|,visualchars,nonbreaking,blockquote",
20
+ theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,sub,sup,|,bullist,numlist,|,outdent,indent,blockquote,|,styleselect,formatselect,fontselect,fontsizeselect,|,forecolor,backcolor",
21
+ theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid",
22
22
  theme_advanced_buttons4 : "",
23
23
  theme_advanced_toolbar_location : "top",
24
24
  theme_advanced_toolbar_align : "left",
@@ -26,32 +26,15 @@
26
26
  theme_advanced_resizing : true,
27
27
 
28
28
  // Example content CSS (should be your site CSS)
29
- content_css : "/js/tinymce/examples/css/content.css",
30
-
31
- // Style formats
32
- style_formats : [
33
- {title : 'Bold text', inline : 'b'},
34
- {title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
35
- {title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
36
- {title : 'Example 1', inline : 'span', classes : 'example1'},
37
- {title : 'Example 2', inline : 'span', classes : 'example2'},
38
- {title : 'Table styles'},
39
- {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
40
- ],
29
+ content_css : "css/example.css",
41
30
 
42
- formats : {
43
- alignleft : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'left'},
44
- aligncenter : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'center'},
45
- alignright : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'right'},
46
- alignfull : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'full'},
47
- bold : {inline : 'span', 'classes' : 'bold'},
48
- italic : {inline : 'span', 'classes' : 'italic'},
49
- underline : {inline : 'span', 'classes' : 'underline', exact : true},
50
- strikethrough : {inline : 'del'},
51
- customformat : {inline : 'span', styles : {color : '#00ff00', fontSize : '20px'}, attributes : {title : 'My custom format'}}
52
- }
31
+ // Drop lists for link/image/media/template dialogs
32
+ template_external_list_url : "js/template_list.js",
33
+ external_link_list_url : "js/link_list.js",
34
+ external_image_list_url : "js/image_list.js",
35
+ media_external_list_url : "js/media_list.js",
53
36
  });
54
37
  }
55
38
  });
56
39
  });
57
- </script>
40
+ </script>
@@ -25,11 +25,14 @@
25
25
 
26
26
  <script type="text/javascript">
27
27
  $(function() {
28
+ var Dom = YAHOO.util.Dom,
29
+ Event = YAHOO.util.Event;
28
30
  var myConfig = { dompath: true };
29
31
  var ids = [<%= ids.map{|id| "'#{id}'"}.join(', ') %>];
30
32
  $.each(ids, function(index, id) {
31
- if ($('textarea#' + id)) {
32
- window[id + '_editor'] = new YAHOO.widget.Editor(id, {
33
+ if ($('textarea#' + id).length) {
34
+ var state = 'off';
35
+ var newEditor = window[id + '_editor'] = new YAHOO.widget.Editor(id, {
33
36
  height: '350px',
34
37
  width: 'auto',
35
38
  animate: true,
@@ -113,7 +116,8 @@
113
116
  { group: 'insertitem', label: '<%= t("editor.insert_item") %>',
114
117
  buttons: [
115
118
  { type: 'push', label: '<%= t("editor.html_link") %> CTRL + SHIFT + L', value: 'createlink', disabled: true },
116
- { type: 'push', label: '<%= t("editor.insert_image") %>', value: 'insertimage' }
119
+ { type: 'push', label: '<%= t("editor.insert_image") %>', value: 'insertimage' },
120
+ { type: 'push', label: '<%= t("editor.edit_html_code") %>', value: 'editcode' }
117
121
  ]
118
122
  },
119
123
  { type: 'separator' },
@@ -128,7 +132,7 @@
128
132
  }
129
133
  });
130
134
 
131
- window[id + '_editor'].addListener('editorContentLoaded', function() {
135
+ newEditor.addListener('editorContentLoaded', function() {
132
136
  $(".yui-toolbar-imageUpload").upload({
133
137
  name: 'content_image[attachment]',
134
138
  action: '/content_images',
@@ -140,7 +144,7 @@
140
144
  },
141
145
  onComplete: function(image_src) {
142
146
  var img_html = "<img src='" + image_src + "'/>";
143
- window[id + '_editor'].execCommand('inserthtml', img_html);
147
+ newEditor.execCommand('inserthtml', img_html);
144
148
  $(".editor-mask-container").removeClass("active");
145
149
  }
146
150
  });
@@ -160,12 +164,61 @@
160
164
  $(".editor-mask-container").removeClass("active");
161
165
  var file_name = prompt('<%= t("editor.enter_file_name") %>', file_name_original);
162
166
  var link_html = "<a href='" + file_url + "'/>" + file_name + "</a>";
163
- window[id + '_editor'].execCommand('inserthtml', link_html);
167
+ newEditor.execCommand('inserthtml', link_html);
164
168
  }
165
169
  });
166
170
  });
167
171
 
168
- window[id + '_editor'].render();
172
+
173
+ newEditor.on('toolbarLoaded', function() {
174
+ this.toolbar.on('editcodeClick', function() {
175
+ var ta = this.get('element'),
176
+ iframe = this.get('iframe').get('element');
177
+
178
+ if (state == 'on') {
179
+ state = 'off';
180
+ this.toolbar.set('disabled', false);
181
+ this.setEditorHTML(ta.value);
182
+ if (!this.browser.ie) {
183
+ this._setDesignMode('on');
184
+ }
185
+
186
+ Dom.removeClass(iframe, 'editor-hidden');
187
+ Dom.addClass(ta, 'editor-hidden');
188
+ this.show();
189
+ this._focusWindow();
190
+ } else {
191
+ state = 'on';
192
+ this.cleanHTML();
193
+ Dom.addClass(iframe, 'editor-hidden');
194
+ Dom.removeClass(ta, 'editor-hidden');
195
+ this.toolbar.set('disabled', true);
196
+ this.toolbar.getButtonByValue('editcode').set('disabled', false);
197
+ this.toolbar.selectButton('editcode');
198
+ this.dompath.innerHTML = 'Editing HTML Code';
199
+ this.hide();
200
+ }
201
+ return false;
202
+ }, this, true);
203
+
204
+ this.on('cleanHTML', function(ev) {
205
+ this.get('element').value = ev.html;
206
+ }, this, true);
207
+
208
+ this.on('afterRender', function() {
209
+ var wrapper = this.get('editor_wrapper');
210
+ wrapper.appendChild(this.get('element'));
211
+ this.setStyle('width', '100%');
212
+ this.setStyle('height', '100%');
213
+ this.setStyle('visibility', '');
214
+ this.setStyle('top', '');
215
+ this.setStyle('left', '');
216
+ this.setStyle('position', '');
217
+
218
+ this.addClass('editor-hidden');
219
+ }, this, true);
220
+ }, newEditor, true);
221
+ newEditor.render();
169
222
  }
170
223
  });
171
224
  });
@@ -9,6 +9,7 @@ en:
9
9
  bold: Bold
10
10
  create_an_ordered_list: Create an Ordered List
11
11
  create_an_unordered_list: Create an Unordered List
12
+ edit_html_code: Edit HTML code
12
13
  enter_file_name: Enter file name
13
14
  font_name_and_size: Font Name and Size
14
15
  font_color: Font Color
@@ -0,0 +1,45 @@
1
+ es:
2
+ editor:
3
+ align_center: Centrado
4
+ align_left: Alineación izquierda
5
+ align_right: Alineación derecha
6
+ alignment: Alineación
7
+ background_color: Color de fondo
8
+ bold: Negrita
9
+ create_an_ordered_list: Crear lista ordenada
10
+ create_an_unordered_list: Crear lista desordenada
11
+ enter_file_name: Nombre del archivo
12
+ font_name_and_size: Nombre y tamaño de la fuente
13
+ font_color: Color de la fuente
14
+ font_style: Estilo de la fuente
15
+ footer: Pie
16
+ header: Cabecera
17
+ hide_more_fields: Ocultar más campos
18
+ html_link: Enlace HTML
19
+ indenting_and_lists: "Tabulaciones y listas"
20
+ insert_item: Insertar elemento
21
+ insert_image: Insertar imagen
22
+ indent: Tabular hacia dentro
23
+ italic: Cursiva
24
+ justify: Justificar
25
+ loading: Cargando
26
+ normal: Normal
27
+ outdent: Tabular hacia fuera
28
+ paragraph_style: Estilo de párrafo
29
+ remove_formatting: Eliminar formato
30
+ show_hide_hidden_elements: "Mostrar/ocultar elementos ocultos"
31
+ show_more_fields: Mostrar más campos
32
+ sidebar: Barra lateral
33
+ subscript: Subíndice
34
+ superscript: Superíndice
35
+ underline: Subrayar
36
+ upload: Subir
37
+ upload_image: Subir imagen
38
+ upload_file: Subir fichero
39
+
40
+ enable_rich_editor: "Activar editor avanzado"
41
+ rich_editor: "Editor avanzado"
42
+ rich_editor_description: "Configurar opciones del editor."
43
+ rich_editor_engine: "Motor del editor avanzado"
44
+ rich_editor_ids: "Identificadores del editor avanzado"
45
+ rich_editor_ids_description: "Listar aquí los ids de los textareas, separados por espacios"
@@ -9,10 +9,12 @@ ru:
9
9
  bold: Полужирный
10
10
  create_an_ordered_list: Нумерованный список
11
11
  create_an_unordered_list: Ненумерованный список
12
+ edit_html_code: Редактировать HTML код
12
13
  enter_file_name: Введите имя файла
13
14
  font_name_and_size: Шрифт и размер
14
15
  font_color: Цвет шрифта
15
16
  font_style: Стиль шрифта
17
+ footer: Сноска
16
18
  header: Заголовок
17
19
  hide_more_fields: Скрыть дополнительные поля
18
20
  html_link: HTML ссылка
@@ -1,5 +1,5 @@
1
1
  class EditorConfiguration < Configuration
2
2
  preference :enabled, :boolean, :default => true
3
3
  preference :current_editor, :string, :default => 'YUIRichEditor'
4
- preference :ids, :string, :default => 'product_description page_body'
5
- end
4
+ preference :ids, :text, :default => 'product_description page_body'
5
+ end
Binary file
@@ -12,9 +12,54 @@ not_set:"-- Not set --",
12
12
  clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
13
13
  clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
14
14
  popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
15
- invalid_data:"Error: Invalid values entered, these are marked in red.",
15
+ invalid_data:"{#field} is invalid",
16
+ invalid_data_number:"{#field} must be a number",
17
+ invalid_data_min:"{#field} must be a number greater than {#min}",
18
+ invalid_data_size:"{#field} must be a number or percentage",
16
19
  more_colors:"More colors"
17
20
  },
21
+ colors:{
22
+ '000000':'Black',
23
+ '993300':'Burnt orange',
24
+ '333300':'Dark olive',
25
+ '003300':'Dark green',
26
+ '003366':'Dark azure',
27
+ '000080':'Navy Blue',
28
+ '333399':'Indigo',
29
+ '333333':'Very dark gray',
30
+ '800000':'Maroon',
31
+ 'FF6600':'Orange',
32
+ '808000':'Olive',
33
+ '008000':'Green',
34
+ '008080':'Teal',
35
+ '0000FF':'Blue',
36
+ '666699':'Grayish blue',
37
+ '808080':'Gray',
38
+ 'FF0000':'Red',
39
+ 'FF9900':'Amber',
40
+ '99CC00':'Yellow green',
41
+ '339966':'Sea green',
42
+ '33CCCC':'Turquoise',
43
+ '3366FF':'Royal blue',
44
+ '800080':'Purple',
45
+ '999999':'Medium gray',
46
+ 'FF00FF':'Magenta',
47
+ 'FFCC00':'Gold',
48
+ 'FFFF00':'Yellow',
49
+ '00FF00':'Lime',
50
+ '00FFFF':'Aqua',
51
+ '00CCFF':'Sky blue',
52
+ '993366':'Brown',
53
+ 'C0C0C0':'Silver',
54
+ 'FF99CC':'Pink',
55
+ 'FFCC99':'Peach',
56
+ 'FFFF99':'Light yellow',
57
+ 'CCFFCC':'Pale green',
58
+ 'CCFFFF':'Pale cyan',
59
+ '99CCFF':'Light sky blue',
60
+ 'CC99FF':'Plum',
61
+ 'FFFFFF':'White'
62
+ },
18
63
  contextmenu:{
19
64
  align:"Alignment",
20
65
  left:"Left",
@@ -151,7 +196,8 @@ langs:"Languages",
151
196
  wait:"Please wait...",
152
197
  sug:"Suggestions",
153
198
  no_sug:"No suggestions",
154
- no_mpell:"No misspellings found."
199
+ no_mpell:"No misspellings found.",
200
+ learn_word:"Learn word"
155
201
  },
156
202
  pagebreak:{
157
203
  desc:"Insert page break."
@@ -167,4 +213,11 @@ upper_roman:"Upper roman",
167
213
  circle:"Circle",
168
214
  disc:"Disc",
169
215
  square:"Square"
170
- }}});
216
+ },
217
+ aria:{
218
+ rich_text_area:"Rich Text Area"
219
+ },
220
+ wordcount:{
221
+ words: 'Words: '
222
+ }
223
+ }});
@@ -1,5 +1,7 @@
1
1
  tinyMCE.addI18n('en.advhr_dlg',{
2
+ normal:"Normal",
2
3
  width:"Width",
4
+ widthunits:"Units",
3
5
  size:"Height",
4
6
  noshade:"No shadow"
5
7
  });
@@ -8,43 +8,44 @@
8
8
  <script type="text/javascript" src="../../utils/form_utils.js"></script>
9
9
  <link href="css/advhr.css" rel="stylesheet" type="text/css" />
10
10
  </head>
11
- <body>
11
+ <body role="application">
12
12
  <form onsubmit="AdvHRDialog.update();return false;" action="#">
13
13
  <div class="tabs">
14
14
  <ul>
15
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
15
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
16
16
  </ul>
17
17
  </div>
18
18
 
19
19
  <div class="panel_wrapper">
20
20
  <div id="general_panel" class="panel current">
21
- <table border="0" cellpadding="4" cellspacing="0">
22
- <tr>
23
- <td><label for="width">{#advhr_dlg.width}</label></td>
24
- <td class="nowrap">
25
- <input id="width" name="width" type="text" value="" class="mceFocus" />
26
- <select name="width2" id="width2">
27
- <option value="">px</option>
28
- <option value="%">%</option>
29
- </select>
30
- </td>
31
- </tr>
32
- <tr>
33
- <td><label for="size">{#advhr_dlg.size}</label></td>
34
- <td><select id="size" name="size">
35
- <option value="">Normal</option>
36
- <option value="1">1</option>
37
- <option value="2">2</option>
38
- <option value="3">3</option>
39
- <option value="4">4</option>
40
- <option value="5">5</option>
41
- </select></td>
42
- </tr>
43
- <tr>
44
- <td><label for="noshade">{#advhr_dlg.noshade}</label></td>
45
- <td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
46
- </tr>
47
- </table>
21
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
22
+ <tr role="group" aria-labelledby="width_label">
23
+ <td><label id="width_label" for="width">{#advhr_dlg.width}</label></td>
24
+ <td class="nowrap">
25
+ <input id="width" name="width" type="text" value="" class="mceFocus" />
26
+ <span style="display:none;" id="width_unit_label">{#advhr_dlg.widthunits}</span>
27
+ <select name="width2" id="width2" aria-labelledby="width_unit_label">
28
+ <option value="">px</option>
29
+ <option value="%">%</option>
30
+ </select>
31
+ </td>
32
+ </tr>
33
+ <tr>
34
+ <td><label for="size">{#advhr_dlg.size}</label></td>
35
+ <td><select id="size" name="size">
36
+ <option value="">{#advhr_dlg.normal}</option>
37
+ <option value="1">1</option>
38
+ <option value="2">2</option>
39
+ <option value="3">3</option>
40
+ <option value="4">4</option>
41
+ <option value="5">5</option>
42
+ </select></td>
43
+ </tr>
44
+ <tr>
45
+ <td><label for="noshade">{#advhr_dlg.noshade}</label></td>
46
+ <td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
47
+ </tr>
48
+ </table>
48
49
  </div>
49
50
  </div>
50
51