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
@@ -11,10 +11,14 @@
11
11
  var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
12
12
 
13
13
  function getColorPickerHTML(id, target_form_element) {
14
- var h = "";
14
+ var h = "", dom = tinyMCEPopup.dom;
15
15
 
16
- h += '<a id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
17
- h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
16
+ if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
17
+ label.id = label.id || dom.uniqueId();
18
+ }
19
+
20
+ h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
21
+ h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;<span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';
18
22
 
19
23
  return h;
20
24
  }
@@ -67,6 +71,9 @@ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
67
71
  if (!form_obj || !form_obj.elements[field_name])
68
72
  return;
69
73
 
74
+ if (!value)
75
+ value = "";
76
+
70
77
  var sel = form_obj.elements[field_name];
71
78
 
72
79
  var found = false;
@@ -171,7 +178,7 @@ function convertHexToRGB(col) {
171
178
  }
172
179
 
173
180
  function trimSize(size) {
174
- return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2');
181
+ return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
175
182
  }
176
183
 
177
184
  function getCSSSize(size) {
@@ -183,6 +190,9 @@ function getCSSSize(size) {
183
190
  // Add px
184
191
  if (/^[0-9]+$/.test(size))
185
192
  size += 'px';
193
+ // Sanity check, IE doesn't like broken values
194
+ else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size)))
195
+ return "";
186
196
 
187
197
  return size;
188
198
  }
@@ -10,6 +10,7 @@
10
10
 
11
11
  function MCTabs() {
12
12
  this.settings = [];
13
+ this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
13
14
  };
14
15
 
15
16
  MCTabs.prototype.init = function(settings) {
@@ -28,26 +29,62 @@ MCTabs.prototype.getParam = function(name, default_value) {
28
29
  return value;
29
30
  };
30
31
 
31
- MCTabs.prototype.displayTab = function(tab_id, panel_id) {
32
- var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i;
32
+ MCTabs.prototype.showTab =function(tab){
33
+ tab.className = 'current';
34
+ tab.setAttribute("aria-selected", true);
35
+ tab.setAttribute("aria-expanded", true);
36
+ tab.tabIndex = 0;
37
+ };
38
+
39
+ MCTabs.prototype.hideTab =function(tab){
40
+ var t=this;
41
+
42
+ tab.className = '';
43
+ tab.setAttribute("aria-selected", false);
44
+ tab.setAttribute("aria-expanded", false);
45
+ tab.tabIndex = -1;
46
+ };
47
+
48
+ MCTabs.prototype.showPanel = function(panel) {
49
+ panel.className = 'current';
50
+ panel.setAttribute("aria-hidden", false);
51
+ };
52
+
53
+ MCTabs.prototype.hidePanel = function(panel) {
54
+ panel.className = 'panel';
55
+ panel.setAttribute("aria-hidden", true);
56
+ };
57
+
58
+ MCTabs.prototype.getPanelForTab = function(tabElm) {
59
+ return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
60
+ };
61
+
62
+ MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
63
+ var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
64
+
65
+ tabElm = document.getElementById(tab_id);
66
+
67
+ if (panel_id === undefined) {
68
+ panel_id = t.getPanelForTab(tabElm);
69
+ }
33
70
 
34
71
  panelElm= document.getElementById(panel_id);
35
72
  panelContainerElm = panelElm ? panelElm.parentNode : null;
36
- tabElm = document.getElementById(tab_id);
37
73
  tabContainerElm = tabElm ? tabElm.parentNode : null;
38
- selectionClass = this.getParam('selection_class', 'current');
74
+ selectionClass = t.getParam('selection_class', 'current');
39
75
 
40
76
  if (tabElm && tabContainerElm) {
41
77
  nodes = tabContainerElm.childNodes;
42
78
 
43
79
  // Hide all other tabs
44
80
  for (i = 0; i < nodes.length; i++) {
45
- if (nodes[i].nodeName == "LI")
46
- nodes[i].className = '';
81
+ if (nodes[i].nodeName == "LI") {
82
+ t.hideTab(nodes[i]);
83
+ }
47
84
  }
48
85
 
49
86
  // Show selected tab
50
- tabElm.className = 'current';
87
+ t.showTab(tabElm);
51
88
  }
52
89
 
53
90
  if (panelElm && panelContainerElm) {
@@ -56,11 +93,15 @@ MCTabs.prototype.displayTab = function(tab_id, panel_id) {
56
93
  // Hide all other panels
57
94
  for (i = 0; i < nodes.length; i++) {
58
95
  if (nodes[i].nodeName == "DIV")
59
- nodes[i].className = 'panel';
96
+ t.hidePanel(nodes[i]);
97
+ }
98
+
99
+ if (!avoid_focus) {
100
+ tabElm.focus();
60
101
  }
61
102
 
62
103
  // Show selected panel
63
- panelElm.className = 'current';
104
+ t.showPanel(panelElm);
64
105
  }
65
106
  };
66
107
 
@@ -73,5 +114,49 @@ MCTabs.prototype.getAnchor = function() {
73
114
  return "";
74
115
  };
75
116
 
76
- // Global instance
117
+
118
+ //Global instance
77
119
  var mcTabs = new MCTabs();
120
+
121
+ tinyMCEPopup.onInit.add(function() {
122
+ var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
123
+
124
+ each(dom.select('div.tabs'), function(tabContainerElm) {
125
+ var keyNav;
126
+
127
+ dom.setAttrib(tabContainerElm, "role", "tablist");
128
+
129
+ var items = tinyMCEPopup.dom.select('li', tabContainerElm);
130
+ var action = function(id) {
131
+ mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
132
+ mcTabs.onChange.dispatch(id);
133
+ };
134
+
135
+ each(items, function(item) {
136
+ dom.setAttrib(item, 'role', 'tab');
137
+ dom.bind(item, 'click', function(evt) {
138
+ action(item.id);
139
+ });
140
+ });
141
+
142
+ dom.bind(dom.getRoot(), 'keydown', function(evt) {
143
+ if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
144
+ keyNav.moveFocus(evt.shiftKey ? -1 : 1);
145
+ tinymce.dom.Event.cancel(evt);
146
+ }
147
+ });
148
+
149
+ each(dom.select('a', tabContainerElm), function(a) {
150
+ dom.setAttrib(a, 'tabindex', '-1');
151
+ });
152
+
153
+ keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
154
+ root: tabContainerElm,
155
+ items: items,
156
+ onAction: action,
157
+ actOnFocus: true,
158
+ enableLeftRight: true,
159
+ enableUpDown: true
160
+ }, tinyMCEPopup.dom);
161
+ });
162
+ });
@@ -32,7 +32,7 @@ var Validator = {
32
32
  },
33
33
 
34
34
  isSize : function(s) {
35
- return this.test(s, '^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
35
+ return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
36
36
  },
37
37
 
38
38
  isId : function(s) {
@@ -96,8 +96,10 @@ var AutoValidator = {
96
96
  var i, nl, s = this.settings, c = 0;
97
97
 
98
98
  nl = this.tags(f, 'label');
99
- for (i=0; i<nl.length; i++)
99
+ for (i=0; i<nl.length; i++) {
100
100
  this.removeClass(nl[i], s.invalid_cls);
101
+ nl[i].setAttribute('aria-invalid', false);
102
+ }
101
103
 
102
104
  c += this.validateElms(f, 'input');
103
105
  c += this.validateElms(f, 'select');
@@ -109,6 +111,33 @@ var AutoValidator = {
109
111
  invalidate : function(n) {
110
112
  this.mark(n.form, n);
111
113
  },
114
+
115
+ getErrorMessages : function(f) {
116
+ var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
117
+ nl = this.tags(f, "label");
118
+ for (i=0; i<nl.length; i++) {
119
+ if (this.hasClass(nl[i], s.invalid_cls)) {
120
+ field = document.getElementById(nl[i].getAttribute("for"));
121
+ values = { field: nl[i].textContent };
122
+ if (this.hasClass(field, s.min_cls, true)) {
123
+ message = ed.getLang('invalid_data_min');
124
+ values.min = this.getNum(field, s.min_cls);
125
+ } else if (this.hasClass(field, s.number_cls)) {
126
+ message = ed.getLang('invalid_data_number');
127
+ } else if (this.hasClass(field, s.size_cls)) {
128
+ message = ed.getLang('invalid_data_size');
129
+ } else {
130
+ message = ed.getLang('invalid_data');
131
+ }
132
+
133
+ message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
134
+ return values[b] || '{#' + b + '}';
135
+ });
136
+ messages.push(message);
137
+ }
138
+ }
139
+ return messages;
140
+ },
112
141
 
113
142
  reset : function(e) {
114
143
  var t = ['label', 'input', 'select', 'textarea'];
@@ -119,8 +148,10 @@ var AutoValidator = {
119
148
 
120
149
  for (i=0; i<t.length; i++) {
121
150
  nl = this.tags(e.form ? e.form : e, t[i]);
122
- for (j=0; j<nl.length; j++)
151
+ for (j=0; j<nl.length; j++) {
123
152
  this.removeClass(nl[j], s.invalid_cls);
153
+ nl[j].setAttribute('aria-invalid', false);
154
+ }
124
155
  }
125
156
  },
126
157
 
@@ -201,6 +232,7 @@ var AutoValidator = {
201
232
  var s = this.settings;
202
233
 
203
234
  this.addClass(n, s.invalid_cls);
235
+ n.setAttribute('aria-invalid', 'true');
204
236
  this.markLabels(f, n, s.invalid_cls);
205
237
 
206
238
  return false;
@@ -42,4 +42,27 @@
42
42
 
43
43
  .yui-toolbar-group-undoredo h3, .yui-toolbar-group-insertitem h3, .yui-toolbar-group-indentlist h3 {
44
44
  width: auto;
45
+ }
46
+
47
+ .yui-skin-sam .yui-toolbar-container .yui-toolbar-editcode span.yui-toolbar-icon {
48
+ background-image: url("/images/html_editor.gif");
49
+ background-position: 0 1px;
50
+ left: 5px;
51
+ }
52
+ .yui-skin-sam .yui-toolbar-container .yui-button-editcode-selected span.yui-toolbar-icon {
53
+ background-image: url("/images/html_editor.gif");
54
+ background-position: 0 1px;
55
+ left: 5px;
56
+ }
57
+
58
+ .editor-hidden {
59
+ visibility: hidden;
60
+ top: -9999px;
61
+ left: -9999px;
62
+ position: absolute !important;
63
+ }
64
+ textarea {
65
+ border: 0;
66
+ margin: 0;
67
+ padding: 0;
45
68
  }
data/spree_editor.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = Gem::Platform::RUBY
3
3
  s.name = 'spree_editor'
4
- s.version = '0.50.0'
4
+ s.version = '0.50.1'
5
5
  s.summary = 'Adds support of several WYSIWYG editors to Spree'
6
6
  s.description = 'Atm supported: YUIRichEditor, WYMEditor, TinyMCE'
7
7
  s.required_ruby_version = '>= 1.8.7'
8
8
 
9
9
  s.authors = ['Alexander Shuhin', 'Roman Smirnov', 'divineforest']
10
10
  # s.email = 'david@loudthinking.com'
11
- s.homepage = 'http://github.com/romul/spree_editor'
11
+ s.homepage = 'http://github.com/spree/spree_editor'
12
12
  # s.rubyforge_project = 'actionmailer'
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 50
8
- - 0
9
- version: 0.50.0
8
+ - 1
9
+ version: 0.50.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alexander Shuhin
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-04-27 00:00:00 +04:00
19
+ date: 2011-06-25 00:00:00 +04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -46,6 +46,7 @@ files:
46
46
  - LICENSE
47
47
  - README.md
48
48
  - Rakefile
49
+ - Versionfile
49
50
  - app/controllers/admin/editor_settings_controller.rb
50
51
  - app/controllers/content_files_controller.rb
51
52
  - app/controllers/content_images_controller.rb
@@ -58,6 +59,7 @@ files:
58
59
  - app/views/shared/editor_engines/_wym_editor.html.erb
59
60
  - app/views/shared/editor_engines/_yui_rich_editor.html.erb
60
61
  - config/locales/en.yml
62
+ - config/locales/es.yml
61
63
  - config/locales/ru.yml
62
64
  - config/routes.rb
63
65
  - lib/editor_configuration.rb
@@ -66,6 +68,7 @@ files:
66
68
  - lib/spree_editor_hooks.rb
67
69
  - lib/tasks/install.rake
68
70
  - lib/tasks/spree_editor.rake
71
+ - public/images/html_editor.gif
69
72
  - public/images/upload_file.png
70
73
  - public/images/upload_image.png
71
74
  - public/javascripts/jquery.ocupload.js
@@ -97,6 +100,8 @@ files:
97
100
  - public/javascripts/tinymce/plugins/advlink/link.htm
98
101
  - public/javascripts/tinymce/plugins/advlist/editor_plugin.js
99
102
  - public/javascripts/tinymce/plugins/advlist/editor_plugin_src.js
103
+ - public/javascripts/tinymce/plugins/autolink/editor_plugin.js
104
+ - public/javascripts/tinymce/plugins/autolink/editor_plugin_src.js
100
105
  - public/javascripts/tinymce/plugins/autoresize/editor_plugin.js
101
106
  - public/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js
102
107
  - public/javascripts/tinymce/plugins/autosave/editor_plugin.js
@@ -166,6 +171,8 @@ files:
166
171
  - public/javascripts/tinymce/plugins/layer/editor_plugin_src.js
167
172
  - public/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js
168
173
  - public/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js
174
+ - public/javascripts/tinymce/plugins/lists/editor_plugin.js
175
+ - public/javascripts/tinymce/plugins/lists/editor_plugin_src.js
169
176
  - public/javascripts/tinymce/plugins/media/css/content.css
170
177
  - public/javascripts/tinymce/plugins/media/css/media.css
171
178
  - public/javascripts/tinymce/plugins/media/editor_plugin.js
@@ -182,6 +189,7 @@ files:
182
189
  - public/javascripts/tinymce/plugins/media/langs/en_dlg.js
183
190
  - public/javascripts/tinymce/plugins/media/langs/ru_dlg.js
184
191
  - public/javascripts/tinymce/plugins/media/media.htm
192
+ - public/javascripts/tinymce/plugins/media/moxieplayer.swf
185
193
  - public/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js
186
194
  - public/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js
187
195
  - public/javascripts/tinymce/plugins/noneditable/editor_plugin.js
@@ -282,7 +290,16 @@ files:
282
290
  - public/javascripts/tinymce/themes/advanced/editor_template_src.js
283
291
  - public/javascripts/tinymce/themes/advanced/image.htm
284
292
  - public/javascripts/tinymce/themes/advanced/img/colorpicker.jpg
293
+ - public/javascripts/tinymce/themes/advanced/img/flash.gif
285
294
  - public/javascripts/tinymce/themes/advanced/img/icons.gif
295
+ - public/javascripts/tinymce/themes/advanced/img/iframe.gif
296
+ - public/javascripts/tinymce/themes/advanced/img/pagebreak.gif
297
+ - public/javascripts/tinymce/themes/advanced/img/quicktime.gif
298
+ - public/javascripts/tinymce/themes/advanced/img/realmedia.gif
299
+ - public/javascripts/tinymce/themes/advanced/img/shockwave.gif
300
+ - public/javascripts/tinymce/themes/advanced/img/trans.gif
301
+ - public/javascripts/tinymce/themes/advanced/img/video.gif
302
+ - public/javascripts/tinymce/themes/advanced/img/windowsmedia.gif
286
303
  - public/javascripts/tinymce/themes/advanced/js/about.js
287
304
  - public/javascripts/tinymce/themes/advanced/js/anchor.js
288
305
  - public/javascripts/tinymce/themes/advanced/js/charmap.js
@@ -295,6 +312,7 @@ files:
295
312
  - public/javascripts/tinymce/themes/advanced/langs/ru.js
296
313
  - public/javascripts/tinymce/themes/advanced/langs/ru_dlg.js
297
314
  - public/javascripts/tinymce/themes/advanced/link.htm
315
+ - public/javascripts/tinymce/themes/advanced/shortcuts.htm
298
316
  - public/javascripts/tinymce/themes/advanced/skins/default/content.css
299
317
  - public/javascripts/tinymce/themes/advanced/skins/default/dialog.css
300
318
  - public/javascripts/tinymce/themes/advanced/skins/default/img/buttons.png
@@ -304,6 +322,9 @@ files:
304
322
  - public/javascripts/tinymce/themes/advanced/skins/default/img/progress.gif
305
323
  - public/javascripts/tinymce/themes/advanced/skins/default/img/tabs.gif
306
324
  - public/javascripts/tinymce/themes/advanced/skins/default/ui.css
325
+ - public/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css
326
+ - public/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css
327
+ - public/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css
307
328
  - public/javascripts/tinymce/themes/advanced/skins/o2k7/content.css
308
329
  - public/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css
309
330
  - public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg.png
@@ -389,7 +410,7 @@ files:
389
410
  - spec/spec_helper.rb
390
411
  - spree_editor.gemspec
391
412
  has_rdoc: true
392
- homepage: http://github.com/romul/spree_editor
413
+ homepage: http://github.com/spree/spree_editor
393
414
  licenses: []
394
415
 
395
416
  post_install_message: