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
@@ -10,13 +10,14 @@
10
10
  <script type="text/javascript" src="js/image.js"></script>
11
11
  <link href="css/advimage.css" rel="stylesheet" type="text/css" />
12
12
  </head>
13
- <body id="advimage" style="display: none">
14
- <form onsubmit="ImageDialog.insert();return false;" action="#">
13
+ <body id="advimage" style="display: none" role="application" aria-labelledby="app_title">
14
+ <span id="app_title" style="display:none">{#advimage_dlg.dialog_title}</span>
15
+ <form onsubmit="ImageDialog.insert();return false;" action="#">
15
16
  <div class="tabs">
16
17
  <ul>
17
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
18
- <li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
19
- <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
18
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
19
+ <li id="appearance_tab" aria-controls="appearance_panel"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
20
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
20
21
  </ul>
21
22
  </div>
22
23
 
@@ -25,15 +26,15 @@
25
26
  <fieldset>
26
27
  <legend>{#advimage_dlg.general}</legend>
27
28
 
28
- <table class="properties">
29
+ <table role="presentation" class="properties">
29
30
  <tr>
30
31
  <td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
31
- <td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
32
+ <td colspan="2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
32
33
  <tr>
33
- <td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td>
34
- <td id="srcbrowsercontainer">&nbsp;</td>
34
+ <td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" aria-required="true" /></td>
35
+ <td id="srcbrowsercontainer">&nbsp;</td>
35
36
  </tr>
36
- </table></td>
37
+ </table></td>
37
38
  </tr>
38
39
  <tr>
39
40
  <td><label for="src_list">{#advimage_dlg.image_list}</label></td>
@@ -60,7 +61,7 @@
60
61
  <fieldset>
61
62
  <legend>{#advimage_dlg.tab_appearance}</legend>
62
63
 
63
- <table border="0" cellpadding="4" cellspacing="0">
64
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
64
65
  <tr>
65
66
  <td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
66
67
  <td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
@@ -86,17 +87,19 @@
86
87
  </td>
87
88
  </tr>
88
89
 
89
- <tr>
90
+ <tr role="group" aria-labelledby="widthlabel">
90
91
  <td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
91
92
  <td class="nowrap">
92
- <input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x
93
- <input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px
93
+ <span style="display:none" id="width_voiceLabel">{#advimage_dlg.width}</span>
94
+ <input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" aria-labelledby="width_voiceLabel" /> x
95
+ <span style="display:none" id="height_voiceLabel">{#advimage_dlg.height}</span>
96
+ <input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" aria-labelledby="height_voiceLabel" /> px
94
97
  </td>
95
98
  </tr>
96
99
 
97
100
  <tr>
98
101
  <td>&nbsp;</td>
99
- <td><table border="0" cellpadding="0" cellspacing="0">
102
+ <td><table role="presentation" border="0" cellpadding="0" cellspacing="0">
100
103
  <tr>
101
104
  <td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
102
105
  <td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
@@ -142,18 +145,18 @@
142
145
  <fieldset>
143
146
  <legend>{#advimage_dlg.swap_image}</legend>
144
147
 
145
- <input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" />
148
+ <input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" aria-controls="onmouseoversrc onmouseoutsrc" />
146
149
  <label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label>
147
150
 
148
- <table border="0" cellpadding="4" cellspacing="0" width="100%">
151
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
149
152
  <tr>
150
153
  <td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td>
151
- <td><table border="0" cellspacing="0" cellpadding="0">
154
+ <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
152
155
  <tr>
153
- <td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
154
- <td id="onmouseoversrccontainer">&nbsp;</td>
156
+ <td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
157
+ <td id="onmouseoversrccontainer">&nbsp;</td>
155
158
  </tr>
156
- </table></td>
159
+ </table></td>
157
160
  </tr>
158
161
  <tr>
159
162
  <td><label for="over_list">{#advimage_dlg.image_list}</label></td>
@@ -161,12 +164,12 @@
161
164
  </tr>
162
165
  <tr>
163
166
  <td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td>
164
- <td class="column2"><table border="0" cellspacing="0" cellpadding="0">
167
+ <td class="column2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
165
168
  <tr>
166
- <td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
167
- <td id="onmouseoutsrccontainer">&nbsp;</td>
169
+ <td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
170
+ <td id="onmouseoutsrccontainer">&nbsp;</td>
168
171
  </tr>
169
- </table></td>
172
+ </table></td>
170
173
  </tr>
171
174
  <tr>
172
175
  <td><label for="out_list">{#advimage_dlg.image_list}</label></td>
@@ -178,7 +181,7 @@
178
181
  <fieldset>
179
182
  <legend>{#advimage_dlg.misc}</legend>
180
183
 
181
- <table border="0" cellpadding="4" cellspacing="0">
184
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
182
185
  <tr>
183
186
  <td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
184
187
  <td><input id="id" name="id" type="text" value="" /></td>
@@ -211,12 +214,12 @@
211
214
 
212
215
  <tr>
213
216
  <td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td>
214
- <td><table border="0" cellspacing="0" cellpadding="0">
217
+ <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
215
218
  <tr>
216
- <td><input id="longdesc" name="longdesc" type="text" value="" /></td>
217
- <td id="longdesccontainer">&nbsp;</td>
219
+ <td><input id="longdesc" name="longdesc" type="text" value="" /></td>
220
+ <td id="longdesccontainer">&nbsp;</td>
218
221
  </tr>
219
- </table></td>
222
+ </table></td>
220
223
  </tr>
221
224
  </table>
222
225
  </fieldset>
@@ -227,6 +230,6 @@
227
230
  <input type="submit" id="insert" name="insert" value="{#insert}" />
228
231
  <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
229
232
  </div>
230
- </form>
233
+ </form>
231
234
  </body>
232
235
  </html>
@@ -142,7 +142,7 @@ var ImageDialog = {
142
142
  }
143
143
 
144
144
  tinymce.extend(args, {
145
- src : nl.src.value,
145
+ src : nl.src.value.replace(/ /g, '%20'),
146
146
  width : nl.width.value,
147
147
  height : nl.height.value,
148
148
  alt : nl.alt.value,
@@ -177,6 +177,8 @@ var ImageDialog = {
177
177
  ed.undoManager.add();
178
178
  }
179
179
 
180
+ tinyMCEPopup.editor.execCommand('mceRepaint');
181
+ tinyMCEPopup.editor.focus();
180
182
  tinyMCEPopup.close();
181
183
  },
182
184
 
@@ -359,7 +361,7 @@ var ImageDialog = {
359
361
  },
360
362
 
361
363
  updateStyle : function(ty) {
362
- var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
364
+ var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
363
365
 
364
366
  if (tinyMCEPopup.editor.settings.inline_styles) {
365
367
  // Handle align
@@ -378,14 +380,27 @@ var ImageDialog = {
378
380
 
379
381
  // Handle border
380
382
  if (ty == 'border') {
383
+ b = img.style.border ? img.style.border.split(' ') : [];
384
+ bStyle = dom.getStyle(img, 'border-style');
385
+ bColor = dom.getStyle(img, 'border-color');
386
+
381
387
  dom.setStyle(img, 'border', '');
382
388
 
383
389
  v = f.border.value;
384
390
  if (v || v == '0') {
385
391
  if (v == '0')
386
- img.style.border = '0';
387
- else
388
- img.style.border = v + 'px solid black';
392
+ img.style.border = isIE ? '0' : '0 none none';
393
+ else {
394
+ if (b.length == 3 && b[isIE ? 2 : 1])
395
+ bStyle = b[isIE ? 2 : 1];
396
+ else if (!bStyle || bStyle == 'none')
397
+ bStyle = 'solid';
398
+ if (b.length == 3 && b[isIE ? 0 : 2])
399
+ bColor = b[isIE ? 0 : 2];
400
+ else if (!bColor || bColor == 'none')
401
+ bColor = 'black';
402
+ img.style.border = v + 'px ' + bStyle + ' ' + bColor;
403
+ }
389
404
  }
390
405
  }
391
406
 
@@ -28,6 +28,8 @@ alt:"Image description",
28
28
  list:"Image list",
29
29
  border:"Border",
30
30
  dimensions:"Dimensions",
31
+ width:"Width",
32
+ height:"Height",
31
33
  vspace:"Vertical space",
32
34
  hspace:"Horizontal space",
33
35
  align:"Alignment",
@@ -30,8 +30,6 @@ function init() {
30
30
 
31
31
  document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
32
32
  document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
33
- document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href');
34
- document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href');
35
33
  document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
36
34
 
37
35
  // Link list
@@ -41,6 +39,13 @@ function init() {
41
39
  else
42
40
  document.getElementById("linklisthrefcontainer").innerHTML = html;
43
41
 
42
+ // Anchor list
43
+ html = getAnchorListHTML('anchorlist','href');
44
+ if (html == "")
45
+ document.getElementById("anchorlistrow").style.display = 'none';
46
+ else
47
+ document.getElementById("anchorlistcontainer").innerHTML = html;
48
+
44
49
  // Resize some elements
45
50
  if (isVisible('hrefbrowser'))
46
51
  document.getElementById('href').style.width = '260px';
@@ -360,20 +365,22 @@ function setAttrib(elm, attrib, value) {
360
365
  }
361
366
 
362
367
  function getAnchorListHTML(id, target) {
363
- var inst = tinyMCEPopup.editor;
364
- var nodes = inst.dom.select('a.mceItemAnchor,img.mceItemAnchor'), name, i;
365
- var html = "";
366
-
367
- html += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" o2nfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value=';
368
- html += 'this.options[this.selectedIndex].value;">';
369
- html += '<option value="">---</option>';
368
+ var ed = tinyMCEPopup.editor, nodes = ed.dom.select('a'), name, i, len, html = "";
370
369
 
371
- for (i=0; i<nodes.length; i++) {
372
- if ((name = inst.dom.getAttrib(nodes[i], "name")) != "")
370
+ for (i=0, len=nodes.length; i<len; i++) {
371
+ if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
373
372
  html += '<option value="#' + name + '">' + name + '</option>';
374
373
  }
375
374
 
376
- html += '</select>';
375
+ if (html == "")
376
+ return "";
377
+
378
+ html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
379
+ + ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
380
+ + '>'
381
+ + '<option value="">---</option>'
382
+ + html
383
+ + '</select>';
377
384
 
378
385
  return html;
379
386
  }
@@ -389,7 +396,6 @@ function insertAction() {
389
396
 
390
397
  // Remove element if there is no href
391
398
  if (!document.forms[0].href.value) {
392
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
393
399
  i = inst.selection.getBookmark();
394
400
  inst.dom.remove(elm, 1);
395
401
  inst.selection.moveToBookmark(i);
@@ -398,12 +404,10 @@ function insertAction() {
398
404
  return;
399
405
  }
400
406
 
401
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
402
-
403
407
  // Create new anchor elements
404
408
  if (elm == null) {
405
409
  inst.getDoc().execCommand("unlink", false, null);
406
- tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
410
+ tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
407
411
 
408
412
  elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
409
413
  for (i=0; i<elementArray.length; i++)
@@ -425,7 +429,7 @@ function insertAction() {
425
429
 
426
430
  function setAllAttribs(elm) {
427
431
  var formObj = document.forms[0];
428
- var href = formObj.href.value;
432
+ var href = formObj.href.value.replace(/ /g, '%20');
429
433
  var target = getSelectValue(formObj, 'targetlist');
430
434
 
431
435
  setAttrib(elm, 'href', href);
@@ -3,8 +3,8 @@ title:"Insert/edit link",
3
3
  url:"Link URL",
4
4
  target:"Target",
5
5
  titlefield:"Title",
6
- is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
7
- is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
6
+ is_email:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",
7
+ is_external:"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",
8
8
  list:"Link list",
9
9
  general_tab:"General",
10
10
  popup_tab:"Popup",
@@ -32,6 +32,8 @@ popup_location:"Show location bar",
32
32
  popup_resizable:"Make window resizable",
33
33
  popup_dependent:"Dependent (Mozilla/Firefox only)",
34
34
  popup_size:"Size",
35
+ width:"Width",
36
+ height:"Height",
35
37
  popup_position:"Position (X/Y)",
36
38
  id:"Id",
37
39
  style:"Style",
@@ -9,37 +9,38 @@
9
9
  <script type="text/javascript" src="js/advlink.js"></script>
10
10
  <link href="css/advlink.css" rel="stylesheet" type="text/css" />
11
11
  </head>
12
- <body id="advlink" style="display: none">
13
- <form onsubmit="insertAction();return false;" action="#">
14
- <div class="tabs">
12
+ <body id="advlink" style="display: none" role="application" onload="javascript:mcTabs.displayTab('general_tab','general_panel', true);" aria-labelledby="app_label">
13
+ <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advlink_dlg.title}</span>
14
+ <form onsubmit="insertAction();return false;" action="#">
15
+ <div class="tabs" role="presentation">
15
16
  <ul>
16
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
17
- <li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
18
- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
19
- <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
17
+ <li id="general_tab" class="current" aria-controls="general_panel" ><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
18
+ <li id="popup_tab" aria-controls="popup_panel" ><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
19
+ <li id="events_tab" aria-controls="events_panel"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
20
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
20
21
  </ul>
21
22
  </div>
22
23
 
23
- <div class="panel_wrapper">
24
+ <div class="panel_wrapper" role="presentation">
24
25
  <div id="general_panel" class="panel current">
25
26
  <fieldset>
26
27
  <legend>{#advlink_dlg.general_props}</legend>
27
28
 
28
- <table border="0" cellpadding="4" cellspacing="0">
29
+ <table border="0" cellpadding="4" cellspacing="0" role="presentation">
29
30
  <tr>
30
- <td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
31
- <td><table border="0" cellspacing="0" cellpadding="0">
32
- <tr>
33
- <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
34
- <td id="hrefbrowsercontainer">&nbsp;</td>
35
- </tr>
36
- </table></td>
31
+ <td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
32
+ <td><table border="0" cellspacing="0" cellpadding="0">
33
+ <tr>
34
+ <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" aria-required="true" /></td>
35
+ <td id="hrefbrowsercontainer">&nbsp;</td>
36
+ </tr>
37
+ </table></td>
37
38
  </tr>
38
39
  <tr id="linklisthrefrow">
39
40
  <td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
40
41
  <td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td>
41
42
  </tr>
42
- <tr>
43
+ <tr id="anchorlistrow">
43
44
  <td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
44
45
  <td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td>
45
46
  </tr>
@@ -70,7 +71,7 @@
70
71
  <input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
71
72
  <label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
72
73
 
73
- <table border="0" cellpadding="0" cellspacing="4">
74
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
74
75
  <tr>
75
76
  <td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label>&nbsp;</td>
76
77
  <td>
@@ -86,18 +87,22 @@
86
87
  <td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label>&nbsp;</td>
87
88
  <td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
88
89
  </tr>
89
- <tr>
90
- <td class="nowrap"><label>{#advlink_dlg.popup_size}</label>&nbsp;</td>
90
+ <tr role="group" aria-labelledby="popup_size_label">
91
+ <td class="nowrap"><label id="popup_size_label">{#advlink_dlg.popup_size}</label>&nbsp;</td>
91
92
  <td class="nowrap">
92
- <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
93
- <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
93
+ <span style="display:none" id="width_voiceLabel">{#advlink_dlg.width}</span>
94
+ <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" aria-labelledby="width_voiceLabel" /> x
95
+ <span style="display:none" id="height_voiceLabel">{#advlink_dlg.height}</span>
96
+ <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" aria-labelledby="height_voiceLabel" /> px
94
97
  </td>
95
98
  </tr>
96
- <tr>
97
- <td class="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label>&nbsp;</td>
99
+ <tr role="group" aria-labelledby="popup_position_label center_hint">
100
+ <td class="nowrap" id="labelleft"><label id="popup_position_label">{#advlink_dlg.popup_position}</label>&nbsp;</td>
98
101
  <td class="nowrap">
99
- <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /
100
- <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
102
+ <span style="display:none" id="x_voiceLabel">X</span>
103
+ <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" aria-labelledby="x_voiceLabel" /> /
104
+ <span style="display:none" id="y_voiceLabel">Y</span>
105
+ <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" aria-labelledby="y_voiceLabel" /> <span id="center_hint">(c /c = center)</span>
101
106
  </td>
102
107
  </tr>
103
108
  </table>
@@ -105,7 +110,7 @@
105
110
  <fieldset>
106
111
  <legend>{#advlink_dlg.popup_opts}</legend>
107
112
 
108
- <table border="0" cellpadding="0" cellspacing="4">
113
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
109
114
  <tr>
110
115
  <td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
111
116
  <td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
@@ -139,7 +144,7 @@
139
144
  <fieldset>
140
145
  <legend>{#advlink_dlg.advanced_props}</legend>
141
146
 
142
- <table border="0" cellpadding="0" cellspacing="4">
147
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
143
148
  <tr>
144
149
  <td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
145
150
  <td><input id="id" name="id" type="text" value="" /></td>
@@ -259,7 +264,7 @@
259
264
  <fieldset>
260
265
  <legend>{#advlink_dlg.event_props}</legend>
261
266
 
262
- <table border="0" cellpadding="0" cellspacing="4">
267
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
263
268
  <tr>
264
269
  <td class="column1"><label for="onfocus">onfocus</label></td>
265
270
  <td><input id="onfocus" name="onfocus" type="text" value="" /></td>
@@ -328,6 +333,6 @@
328
333
  <input type="submit" id="insert" name="insert" value="{#insert}" />
329
334
  <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
330
335
  </div>
331
- </form>
336
+ </form>
332
337
  </body>
333
338
  </html>
@@ -1 +1 @@
1
- (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square")},createControl:function(d,b){var f=this,e,h;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){h=f[d][0]}function c(i,k){var j=true;a(k.styles,function(m,l){if(f.editor.dom.getStyle(i,l)!=m){j=false;return false}});return j}function g(){var k,i=f.editor,l=i.dom,j=i.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,h)){i.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(h){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,h.styles);k.removeAttribute("_mce_style")}}}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){g()}});e.onRenderMenu.add(function(i,j){j.onShowMenu.add(function(){var m=f.editor.dom,l=m.getParent(f.editor.selection.getNode(),"ol,ul"),k;if(l||h){k=f[d];a(j.items,function(n){var o=true;n.setSelected(0);if(l&&!n.isDisabled()){a(k,function(p){if(p.id==n.id){if(!c(l,p)){o=false;return false}}});if(o){n.setSelected(1)}}});if(!l){j.items[h.id].setSelected(1)}}});j.add({id:f.editor.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle"}).setDisabled(1);a(f[d],function(k){k.id=f.editor.dom.uniqueId();j.add({id:k.id,title:k.title,onclick:function(){h=k;g()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})();
1
+ (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,h;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){h=f[d][0]}function c(i,k){var j=true;a(k.styles,function(m,l){if(f.editor.dom.getStyle(i,l)!=m){j=false;return false}});return j}function g(){var k,i=f.editor,l=i.dom,j=i.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,h)){i.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(h){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,h.styles);k.removeAttribute("data-mce-style")}}i.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){g()}});e.onRenderMenu.add(function(i,j){j.onShowMenu.add(function(){var m=f.editor.dom,l=m.getParent(f.editor.selection.getNode(),"ol,ul"),k;if(l||h){k=f[d];a(j.items,function(n){var o=true;n.setSelected(0);if(l&&!n.isDisabled()){a(k,function(p){if(p.id==n.id){if(!c(l,p)){o=false;return false}}});if(o){n.setSelected(1)}}});if(!l){j.items[h.id].setSelected(1)}}});j.add({id:f.editor.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(k){if(f.isIE7&&k.styles.listStyleType=="lower-greek"){return}k.id=f.editor.dom.uniqueId();j.add({id:k.id,title:k.title,onclick:function(){h=k;g()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})();