spree_editor 0.30.1 → 0.40.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. data/.gitignore +1 -0
  2. data/README.md +4 -10
  3. data/app/controllers/admin/editor_settings_controller.rb +14 -0
  4. data/app/views/admin/editor_settings/edit.html.erb +23 -0
  5. data/app/views/admin/editor_settings/show.html.erb +20 -0
  6. data/app/views/shared/_rich_editor_javascript.html.erb +8 -0
  7. data/app/views/shared/editor_engines/_tiny_mce.html.erb +56 -0
  8. data/app/views/shared/editor_engines/_wym_editor.html.erb +8 -0
  9. data/app/views/shared/editor_engines/_yui_rich_editor.html.erb +172 -0
  10. data/config/locales/en.yml +36 -11
  11. data/config/locales/ru.yml +41 -16
  12. data/config/routes.rb +3 -1
  13. data/lib/editor_configuration.rb +5 -0
  14. data/lib/spree/editor/config.rb +22 -0
  15. data/lib/spree_editor.rb +1 -5
  16. data/lib/spree_editor_hooks.rb +16 -1
  17. data/public/javascripts/jquery.ocupload.js +7 -6
  18. data/public/javascripts/tinymce/jquery.tinymce.js +1 -0
  19. data/public/javascripts/tinymce/langs/en.js +170 -0
  20. data/public/javascripts/tinymce/license.txt +504 -0
  21. data/public/javascripts/tinymce/plugins/advhr/css/advhr.css +5 -0
  22. data/public/javascripts/tinymce/plugins/advhr/editor_plugin.js +1 -0
  23. data/public/javascripts/tinymce/plugins/advhr/editor_plugin_src.js +57 -0
  24. data/public/javascripts/tinymce/plugins/advhr/js/rule.js +43 -0
  25. data/public/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +5 -0
  26. data/public/javascripts/tinymce/plugins/advhr/rule.htm +57 -0
  27. data/public/javascripts/tinymce/plugins/advimage/css/advimage.css +13 -0
  28. data/public/javascripts/tinymce/plugins/advimage/editor_plugin.js +1 -0
  29. data/public/javascripts/tinymce/plugins/advimage/editor_plugin_src.js +50 -0
  30. data/public/javascripts/tinymce/plugins/advimage/image.htm +232 -0
  31. data/public/javascripts/tinymce/plugins/advimage/img/sample.gif +0 -0
  32. data/public/javascripts/tinymce/plugins/advimage/js/image.js +443 -0
  33. data/public/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +43 -0
  34. data/public/javascripts/tinymce/plugins/advlink/css/advlink.css +8 -0
  35. data/public/javascripts/tinymce/plugins/advlink/editor_plugin.js +1 -0
  36. data/public/javascripts/tinymce/plugins/advlink/editor_plugin_src.js +61 -0
  37. data/public/javascripts/tinymce/plugins/advlink/js/advlink.js +528 -0
  38. data/public/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +52 -0
  39. data/public/javascripts/tinymce/plugins/advlink/link.htm +333 -0
  40. data/public/javascripts/tinymce/plugins/advlist/editor_plugin.js +1 -0
  41. data/public/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +154 -0
  42. data/public/javascripts/tinymce/plugins/autoresize/editor_plugin.js +1 -0
  43. data/public/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +119 -0
  44. data/public/javascripts/tinymce/plugins/autosave/editor_plugin.js +1 -0
  45. data/public/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +422 -0
  46. data/public/javascripts/tinymce/plugins/autosave/langs/en.js +4 -0
  47. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin.js +1 -0
  48. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +120 -0
  49. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +1 -0
  50. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +147 -0
  51. data/public/javascripts/tinymce/plugins/directionality/editor_plugin.js +1 -0
  52. data/public/javascripts/tinymce/plugins/directionality/editor_plugin_src.js +82 -0
  53. data/public/javascripts/tinymce/plugins/emotions/editor_plugin.js +1 -0
  54. data/public/javascripts/tinymce/plugins/emotions/editor_plugin_src.js +43 -0
  55. data/public/javascripts/tinymce/plugins/emotions/emotions.htm +40 -0
  56. data/public/javascripts/tinymce/plugins/emotions/img/smiley-cool.gif +0 -0
  57. data/public/javascripts/tinymce/plugins/emotions/img/smiley-cry.gif +0 -0
  58. data/public/javascripts/tinymce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  59. data/public/javascripts/tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  60. data/public/javascripts/tinymce/plugins/emotions/img/smiley-frown.gif +0 -0
  61. data/public/javascripts/tinymce/plugins/emotions/img/smiley-innocent.gif +0 -0
  62. data/public/javascripts/tinymce/plugins/emotions/img/smiley-kiss.gif +0 -0
  63. data/public/javascripts/tinymce/plugins/emotions/img/smiley-laughing.gif +0 -0
  64. data/public/javascripts/tinymce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  65. data/public/javascripts/tinymce/plugins/emotions/img/smiley-sealed.gif +0 -0
  66. data/public/javascripts/tinymce/plugins/emotions/img/smiley-smile.gif +0 -0
  67. data/public/javascripts/tinymce/plugins/emotions/img/smiley-surprised.gif +0 -0
  68. data/public/javascripts/tinymce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  69. data/public/javascripts/tinymce/plugins/emotions/img/smiley-undecided.gif +0 -0
  70. data/public/javascripts/tinymce/plugins/emotions/img/smiley-wink.gif +0 -0
  71. data/public/javascripts/tinymce/plugins/emotions/img/smiley-yell.gif +0 -0
  72. data/public/javascripts/tinymce/plugins/emotions/js/emotions.js +22 -0
  73. data/public/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +20 -0
  74. data/public/javascripts/tinymce/plugins/example/dialog.htm +22 -0
  75. data/public/javascripts/tinymce/plugins/example/editor_plugin.js +1 -0
  76. data/public/javascripts/tinymce/plugins/example/editor_plugin_src.js +84 -0
  77. data/public/javascripts/tinymce/plugins/example/img/example.gif +0 -0
  78. data/public/javascripts/tinymce/plugins/example/js/dialog.js +19 -0
  79. data/public/javascripts/tinymce/plugins/example/langs/en.js +3 -0
  80. data/public/javascripts/tinymce/plugins/example/langs/en_dlg.js +3 -0
  81. data/public/javascripts/tinymce/plugins/fullpage/css/fullpage.css +182 -0
  82. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin.js +1 -0
  83. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +153 -0
  84. data/public/javascripts/tinymce/plugins/fullpage/fullpage.htm +571 -0
  85. data/public/javascripts/tinymce/plugins/fullpage/js/fullpage.js +471 -0
  86. data/public/javascripts/tinymce/plugins/fullpage/langs/en_dlg.js +85 -0
  87. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +1 -0
  88. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +151 -0
  89. data/public/javascripts/tinymce/plugins/fullscreen/fullscreen.htm +109 -0
  90. data/public/javascripts/tinymce/plugins/iespell/editor_plugin.js +1 -0
  91. data/public/javascripts/tinymce/plugins/iespell/editor_plugin_src.js +54 -0
  92. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +1 -0
  93. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +635 -0
  94. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  95. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  96. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  97. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  98. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  99. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  100. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  101. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +100 -0
  102. data/public/javascripts/tinymce/plugins/inlinepopups/template.htm +387 -0
  103. data/public/javascripts/tinymce/plugins/insertdatetime/editor_plugin.js +1 -0
  104. data/public/javascripts/tinymce/plugins/insertdatetime/editor_plugin_src.js +83 -0
  105. data/public/javascripts/tinymce/plugins/layer/editor_plugin.js +1 -0
  106. data/public/javascripts/tinymce/plugins/layer/editor_plugin_src.js +212 -0
  107. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +1 -0
  108. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +136 -0
  109. data/public/javascripts/tinymce/plugins/media/css/content.css +6 -0
  110. data/public/javascripts/tinymce/plugins/media/css/media.css +16 -0
  111. data/public/javascripts/tinymce/plugins/media/editor_plugin.js +1 -0
  112. data/public/javascripts/tinymce/plugins/media/editor_plugin_src.js +414 -0
  113. data/public/javascripts/tinymce/plugins/media/img/flash.gif +0 -0
  114. data/public/javascripts/tinymce/plugins/media/img/flv_player.swf +0 -0
  115. data/public/javascripts/tinymce/plugins/media/img/quicktime.gif +0 -0
  116. data/public/javascripts/tinymce/plugins/media/img/realmedia.gif +0 -0
  117. data/public/javascripts/tinymce/plugins/media/img/shockwave.gif +0 -0
  118. data/public/javascripts/tinymce/plugins/media/img/trans.gif +0 -0
  119. data/public/javascripts/tinymce/plugins/media/img/windowsmedia.gif +0 -0
  120. data/public/javascripts/tinymce/plugins/media/js/embed.js +73 -0
  121. data/public/javascripts/tinymce/plugins/media/js/media.js +630 -0
  122. data/public/javascripts/tinymce/plugins/media/langs/en_dlg.js +103 -0
  123. data/public/javascripts/tinymce/plugins/media/media.htm +817 -0
  124. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +1 -0
  125. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +53 -0
  126. data/public/javascripts/tinymce/plugins/noneditable/editor_plugin.js +1 -0
  127. data/public/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +90 -0
  128. data/public/javascripts/tinymce/plugins/pagebreak/css/content.css +1 -0
  129. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +1 -0
  130. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +77 -0
  131. data/public/javascripts/tinymce/plugins/pagebreak/img/pagebreak.gif +0 -0
  132. data/public/javascripts/tinymce/plugins/pagebreak/img/trans.gif +0 -0
  133. data/public/javascripts/tinymce/plugins/paste/editor_plugin.js +1 -0
  134. data/public/javascripts/tinymce/plugins/paste/editor_plugin_src.js +952 -0
  135. data/public/javascripts/tinymce/plugins/paste/js/pastetext.js +36 -0
  136. data/public/javascripts/tinymce/plugins/paste/js/pasteword.js +51 -0
  137. data/public/javascripts/tinymce/plugins/paste/langs/en_dlg.js +5 -0
  138. data/public/javascripts/tinymce/plugins/paste/pastetext.htm +27 -0
  139. data/public/javascripts/tinymce/plugins/paste/pasteword.htm +21 -0
  140. data/public/javascripts/tinymce/plugins/preview/editor_plugin.js +1 -0
  141. data/public/javascripts/tinymce/plugins/preview/editor_plugin_src.js +53 -0
  142. data/public/javascripts/tinymce/plugins/preview/example.html +28 -0
  143. data/public/javascripts/tinymce/plugins/preview/jscripts/embed.js +73 -0
  144. data/public/javascripts/tinymce/plugins/preview/preview.html +17 -0
  145. data/public/javascripts/tinymce/plugins/print/editor_plugin.js +1 -0
  146. data/public/javascripts/tinymce/plugins/print/editor_plugin_src.js +34 -0
  147. data/public/javascripts/tinymce/plugins/save/editor_plugin.js +1 -0
  148. data/public/javascripts/tinymce/plugins/save/editor_plugin_src.js +101 -0
  149. data/public/javascripts/tinymce/plugins/searchreplace/css/searchreplace.css +6 -0
  150. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +1 -0
  151. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +57 -0
  152. data/public/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +138 -0
  153. data/public/javascripts/tinymce/plugins/searchreplace/langs/en_dlg.js +16 -0
  154. data/public/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +99 -0
  155. data/public/javascripts/tinymce/plugins/spellchecker/css/content.css +1 -0
  156. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +1 -0
  157. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +417 -0
  158. data/public/javascripts/tinymce/plugins/spellchecker/img/wline.gif +0 -0
  159. data/public/javascripts/tinymce/plugins/style/css/props.css +13 -0
  160. data/public/javascripts/tinymce/plugins/style/editor_plugin.js +1 -0
  161. data/public/javascripts/tinymce/plugins/style/editor_plugin_src.js +55 -0
  162. data/public/javascripts/tinymce/plugins/style/js/props.js +641 -0
  163. data/public/javascripts/tinymce/plugins/style/langs/en_dlg.js +63 -0
  164. data/public/javascripts/tinymce/plugins/style/props.htm +723 -0
  165. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +1 -0
  166. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +112 -0
  167. data/public/javascripts/tinymce/plugins/table/cell.htm +178 -0
  168. data/public/javascripts/tinymce/plugins/table/css/cell.css +17 -0
  169. data/public/javascripts/tinymce/plugins/table/css/row.css +25 -0
  170. data/public/javascripts/tinymce/plugins/table/css/table.css +13 -0
  171. data/public/javascripts/tinymce/plugins/table/editor_plugin.js +1 -0
  172. data/public/javascripts/tinymce/plugins/table/editor_plugin_src.js +1139 -0
  173. data/public/javascripts/tinymce/plugins/table/js/cell.js +286 -0
  174. data/public/javascripts/tinymce/plugins/table/js/merge_cells.js +27 -0
  175. data/public/javascripts/tinymce/plugins/table/js/row.js +237 -0
  176. data/public/javascripts/tinymce/plugins/table/js/table.js +454 -0
  177. data/public/javascripts/tinymce/plugins/table/langs/en_dlg.js +74 -0
  178. data/public/javascripts/tinymce/plugins/table/merge_cells.htm +32 -0
  179. data/public/javascripts/tinymce/plugins/table/row.htm +155 -0
  180. data/public/javascripts/tinymce/plugins/table/table.htm +187 -0
  181. data/public/javascripts/tinymce/plugins/template/blank.htm +12 -0
  182. data/public/javascripts/tinymce/plugins/template/css/template.css +23 -0
  183. data/public/javascripts/tinymce/plugins/template/editor_plugin.js +1 -0
  184. data/public/javascripts/tinymce/plugins/template/editor_plugin_src.js +159 -0
  185. data/public/javascripts/tinymce/plugins/template/js/template.js +106 -0
  186. data/public/javascripts/tinymce/plugins/template/langs/en_dlg.js +15 -0
  187. data/public/javascripts/tinymce/plugins/template/template.htm +31 -0
  188. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin.js +1 -0
  189. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +83 -0
  190. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin.js +1 -0
  191. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +98 -0
  192. data/public/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +141 -0
  193. data/public/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +141 -0
  194. data/public/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +148 -0
  195. data/public/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +141 -0
  196. data/public/javascripts/tinymce/plugins/xhtmlxtras/css/attributes.css +11 -0
  197. data/public/javascripts/tinymce/plugins/xhtmlxtras/css/popup.css +9 -0
  198. data/public/javascripts/tinymce/plugins/xhtmlxtras/del.htm +161 -0
  199. data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +1 -0
  200. data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +132 -0
  201. data/public/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +161 -0
  202. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/abbr.js +28 -0
  203. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/acronym.js +28 -0
  204. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +126 -0
  205. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/cite.js +28 -0
  206. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +53 -0
  207. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +231 -0
  208. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +52 -0
  209. data/public/javascripts/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
  210. data/public/javascripts/tinymce/themes/advanced/about.htm +54 -0
  211. data/public/javascripts/tinymce/themes/advanced/anchor.htm +26 -0
  212. data/public/javascripts/tinymce/themes/advanced/charmap.htm +52 -0
  213. data/public/javascripts/tinymce/themes/advanced/color_picker.htm +73 -0
  214. data/public/javascripts/tinymce/themes/advanced/editor_template.js +1 -0
  215. data/public/javascripts/tinymce/themes/advanced/editor_template_src.js +1229 -0
  216. data/public/javascripts/tinymce/themes/advanced/image.htm +80 -0
  217. data/public/javascripts/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
  218. data/public/javascripts/tinymce/themes/advanced/img/icons.gif +0 -0
  219. data/public/javascripts/tinymce/themes/advanced/js/about.js +72 -0
  220. data/public/javascripts/tinymce/themes/advanced/js/anchor.js +37 -0
  221. data/public/javascripts/tinymce/themes/advanced/js/charmap.js +335 -0
  222. data/public/javascripts/tinymce/themes/advanced/js/color_picker.js +253 -0
  223. data/public/javascripts/tinymce/themes/advanced/js/image.js +245 -0
  224. data/public/javascripts/tinymce/themes/advanced/js/link.js +156 -0
  225. data/public/javascripts/tinymce/themes/advanced/js/source_editor.js +56 -0
  226. data/public/javascripts/tinymce/themes/advanced/langs/en.js +62 -0
  227. data/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +51 -0
  228. data/public/javascripts/tinymce/themes/advanced/link.htm +58 -0
  229. data/public/javascripts/tinymce/themes/advanced/skins/default/content.css +36 -0
  230. data/public/javascripts/tinymce/themes/advanced/skins/default/dialog.css +117 -0
  231. data/public/javascripts/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
  232. data/public/javascripts/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
  233. data/public/javascripts/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  234. data/public/javascripts/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  235. data/public/javascripts/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
  236. data/public/javascripts/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
  237. data/public/javascripts/tinymce/themes/advanced/skins/default/ui.css +213 -0
  238. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +36 -0
  239. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +116 -0
  240. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  241. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  242. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  243. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +215 -0
  244. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +8 -0
  245. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
  246. data/public/javascripts/tinymce/themes/advanced/source_editor.htm +25 -0
  247. data/public/javascripts/tinymce/themes/simple/editor_template.js +1 -0
  248. data/public/javascripts/tinymce/themes/simple/editor_template_src.js +85 -0
  249. data/public/javascripts/tinymce/themes/simple/img/icons.gif +0 -0
  250. data/public/javascripts/tinymce/themes/simple/langs/en.js +11 -0
  251. data/public/javascripts/tinymce/themes/simple/skins/default/content.css +25 -0
  252. data/public/javascripts/tinymce/themes/simple/skins/default/ui.css +32 -0
  253. data/public/javascripts/tinymce/themes/simple/skins/o2k7/content.css +17 -0
  254. data/public/javascripts/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  255. data/public/javascripts/tinymce/themes/simple/skins/o2k7/ui.css +35 -0
  256. data/public/javascripts/tinymce/tiny_mce.js +1 -0
  257. data/public/javascripts/tinymce/tiny_mce_popup.js +5 -0
  258. data/public/javascripts/tinymce/tiny_mce_src.js +13394 -0
  259. data/public/javascripts/tinymce/utils/editable_selects.js +70 -0
  260. data/public/javascripts/tinymce/utils/form_utils.js +200 -0
  261. data/public/javascripts/tinymce/utils/mctabs.js +77 -0
  262. data/public/javascripts/tinymce/utils/validate.js +220 -0
  263. data/public/javascripts/wymeditor/iframe/default/lbl-blockquote.png +0 -0
  264. data/public/javascripts/wymeditor/iframe/default/lbl-h1.png +0 -0
  265. data/public/javascripts/wymeditor/iframe/default/lbl-h2.png +0 -0
  266. data/public/javascripts/wymeditor/iframe/default/lbl-h3.png +0 -0
  267. data/public/javascripts/wymeditor/iframe/default/lbl-h4.png +0 -0
  268. data/public/javascripts/wymeditor/iframe/default/lbl-h5.png +0 -0
  269. data/public/javascripts/wymeditor/iframe/default/lbl-h6.png +0 -0
  270. data/public/javascripts/wymeditor/iframe/default/lbl-p.png +0 -0
  271. data/public/javascripts/wymeditor/iframe/default/lbl-pre.png +0 -0
  272. data/public/javascripts/wymeditor/iframe/default/wymiframe.css +90 -0
  273. data/public/javascripts/wymeditor/iframe/default/wymiframe.html +26 -0
  274. data/public/javascripts/wymeditor/jquery.wymeditor.js +4688 -0
  275. data/public/javascripts/wymeditor/jquery.wymeditor.min.js +1 -0
  276. data/public/javascripts/wymeditor/jquery.wymeditor.pack.js +1 -0
  277. data/public/javascripts/wymeditor/lang/bg.js +45 -0
  278. data/public/javascripts/wymeditor/lang/ca.js +45 -0
  279. data/public/javascripts/wymeditor/lang/cs.js +45 -0
  280. data/public/javascripts/wymeditor/lang/cy.js +45 -0
  281. data/public/javascripts/wymeditor/lang/de.js +45 -0
  282. data/public/javascripts/wymeditor/lang/en.js +45 -0
  283. data/public/javascripts/wymeditor/lang/es.js +45 -0
  284. data/public/javascripts/wymeditor/lang/fa.js +46 -0
  285. data/public/javascripts/wymeditor/lang/fi.js +44 -0
  286. data/public/javascripts/wymeditor/lang/fr.js +45 -0
  287. data/public/javascripts/wymeditor/lang/gl.js +45 -0
  288. data/public/javascripts/wymeditor/lang/he.js +45 -0
  289. data/public/javascripts/wymeditor/lang/hr.js +45 -0
  290. data/public/javascripts/wymeditor/lang/hu.js +45 -0
  291. data/public/javascripts/wymeditor/lang/it.js +45 -0
  292. data/public/javascripts/wymeditor/lang/nb.js +45 -0
  293. data/public/javascripts/wymeditor/lang/nl.js +45 -0
  294. data/public/javascripts/wymeditor/lang/nn.js +45 -0
  295. data/public/javascripts/wymeditor/lang/pl.js +45 -0
  296. data/public/javascripts/wymeditor/lang/pt-br.js +45 -0
  297. data/public/javascripts/wymeditor/lang/pt.js +45 -0
  298. data/public/javascripts/wymeditor/lang/ru.js +45 -0
  299. data/public/javascripts/wymeditor/lang/sv.js +45 -0
  300. data/public/javascripts/wymeditor/lang/tr.js +45 -0
  301. data/public/javascripts/wymeditor/lang/zh_cn.js +47 -0
  302. data/public/javascripts/wymeditor/plugins/embed/jquery.wymeditor.embed.js +52 -0
  303. data/public/javascripts/wymeditor/plugins/fullscreen/icon_fullscreen.gif +0 -0
  304. data/public/javascripts/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js +127 -0
  305. data/public/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js +57 -0
  306. data/public/javascripts/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +91 -0
  307. data/public/javascripts/wymeditor/plugins/resizable/readme.txt +124 -0
  308. data/public/javascripts/wymeditor/plugins/tidy/README +19 -0
  309. data/public/javascripts/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +82 -0
  310. data/public/javascripts/wymeditor/plugins/tidy/tidy.php +36 -0
  311. data/public/javascripts/wymeditor/plugins/tidy/wand.png +0 -0
  312. data/public/javascripts/wymeditor/skins/compact/icons.png +0 -0
  313. data/public/javascripts/wymeditor/skins/compact/skin.css +134 -0
  314. data/public/javascripts/wymeditor/skins/compact/skin.js +35 -0
  315. data/public/javascripts/wymeditor/skins/default/icons.png +0 -0
  316. data/public/javascripts/wymeditor/skins/default/skin.css +133 -0
  317. data/public/javascripts/wymeditor/skins/default/skin.js +40 -0
  318. data/public/javascripts/wymeditor/skins/minimal/images/bg.header.gif +0 -0
  319. data/public/javascripts/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
  320. data/public/javascripts/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
  321. data/public/javascripts/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
  322. data/public/javascripts/wymeditor/skins/minimal/skin.css +131 -0
  323. data/public/javascripts/wymeditor/skins/minimal/skin.js +30 -0
  324. data/public/javascripts/wymeditor/skins/silver/COPYING +674 -0
  325. data/public/javascripts/wymeditor/skins/silver/README +27 -0
  326. data/public/javascripts/wymeditor/skins/silver/images/bg.header.gif +0 -0
  327. data/public/javascripts/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
  328. data/public/javascripts/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
  329. data/public/javascripts/wymeditor/skins/silver/images/icons.silver.gif +0 -0
  330. data/public/javascripts/wymeditor/skins/silver/skin.css +297 -0
  331. data/public/javascripts/wymeditor/skins/silver/skin.js +61 -0
  332. data/public/javascripts/wymeditor/skins/twopanels/icons.png +0 -0
  333. data/public/javascripts/wymeditor/skins/twopanels/skin.css +134 -0
  334. data/public/javascripts/wymeditor/skins/twopanels/skin.js +39 -0
  335. data/public/javascripts/wymeditor/skins/wymeditor_icon.png +0 -0
  336. data/public/stylesheets/editor.css +10 -2
  337. data/spree_editor.gemspec +6 -6
  338. metadata +338 -11
  339. data/app/views/shared/_editor.html.erb +0 -208
  340. data/lib/helpers/editor_helper.rb +0 -10
@@ -0,0 +1 @@
1
+ (function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(i){o=c.getParent(l.id,"form");n=o.elements;if(o){d(n,function(s,r){if(s.id==l.id){j=r;return false}});if(i>0){for(m=j+1;m<n.length;m++){if(n[m].type!="hidden"){return n[m]}}}else{for(m=j-1;m>=0;m--){if(n[m].type!="hidden"){return n[m]}}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(l=tinymce.get(n.id||n.name)){l.focus()}else{window.setTimeout(function(){window.focus();n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}f.onInit.add(function(){d(c.select("a:first,a:last",f.getContainer()),function(i){a.add(i,"focus",function(){f.focus()})})})},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})();
@@ -0,0 +1,112 @@
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
13
+
14
+ tinymce.create('tinymce.plugins.TabFocusPlugin', {
15
+ init : function(ed, url) {
16
+ function tabCancel(ed, e) {
17
+ if (e.keyCode === 9)
18
+ return Event.cancel(e);
19
+ };
20
+
21
+ function tabHandler(ed, e) {
22
+ var x, i, f, el, v;
23
+
24
+ function find(d) {
25
+ f = DOM.getParent(ed.id, 'form');
26
+ el = f.elements;
27
+
28
+ if (f) {
29
+ each(el, function(e, i) {
30
+ if (e.id == ed.id) {
31
+ x = i;
32
+ return false;
33
+ }
34
+ });
35
+
36
+ if (d > 0) {
37
+ for (i = x + 1; i < el.length; i++) {
38
+ if (el[i].type != 'hidden')
39
+ return el[i];
40
+ }
41
+ } else {
42
+ for (i = x - 1; i >= 0; i--) {
43
+ if (el[i].type != 'hidden')
44
+ return el[i];
45
+ }
46
+ }
47
+ }
48
+
49
+ return null;
50
+ };
51
+
52
+ if (e.keyCode === 9) {
53
+ v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
54
+
55
+ if (v.length == 1) {
56
+ v[1] = v[0];
57
+ v[0] = ':prev';
58
+ }
59
+
60
+ // Find element to focus
61
+ if (e.shiftKey) {
62
+ if (v[0] == ':prev')
63
+ el = find(-1);
64
+ else
65
+ el = DOM.get(v[0]);
66
+ } else {
67
+ if (v[1] == ':next')
68
+ el = find(1);
69
+ else
70
+ el = DOM.get(v[1]);
71
+ }
72
+
73
+ if (el) {
74
+ if (ed = tinymce.get(el.id || el.name))
75
+ ed.focus();
76
+ else
77
+ window.setTimeout(function() {window.focus();el.focus();}, 10);
78
+
79
+ return Event.cancel(e);
80
+ }
81
+ }
82
+ };
83
+
84
+ ed.onKeyUp.add(tabCancel);
85
+
86
+ if (tinymce.isGecko) {
87
+ ed.onKeyPress.add(tabHandler);
88
+ ed.onKeyDown.add(tabCancel);
89
+ } else
90
+ ed.onKeyDown.add(tabHandler);
91
+
92
+ ed.onInit.add(function() {
93
+ each(DOM.select('a:first,a:last', ed.getContainer()), function(n) {
94
+ Event.add(n, 'focus', function() {ed.focus();});
95
+ });
96
+ });
97
+ },
98
+
99
+ getInfo : function() {
100
+ return {
101
+ longname : 'Tabfocus',
102
+ author : 'Moxiecode Systems AB',
103
+ authorurl : 'http://tinymce.moxiecode.com',
104
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
105
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
106
+ };
107
+ }
108
+ });
109
+
110
+ // Register plugin
111
+ tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
112
+ })();
@@ -0,0 +1,178 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>{#table_dlg.cell_title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
9
+ <script type="text/javascript" src="js/cell.js"></script>
10
+ <link href="css/cell.css" rel="stylesheet" type="text/css" />
11
+ </head>
12
+ <body id="tablecell" style="display: none">
13
+ <form onsubmit="updateAction();return false;" action="#">
14
+ <div class="tabs">
15
+ <ul>
16
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
17
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
18
+ </ul>
19
+ </div>
20
+
21
+ <div class="panel_wrapper">
22
+ <div id="general_panel" class="panel current">
23
+ <fieldset>
24
+ <legend>{#table_dlg.general_props}</legend>
25
+
26
+ <table border="0" cellpadding="4" cellspacing="0">
27
+ <tr>
28
+ <td><label for="align">{#table_dlg.align}</label></td>
29
+ <td>
30
+ <select id="align" name="align" class="mceFocus">
31
+ <option value="">{#not_set}</option>
32
+ <option value="center">{#table_dlg.align_middle}</option>
33
+ <option value="left">{#table_dlg.align_left}</option>
34
+ <option value="right">{#table_dlg.align_right}</option>
35
+ </select>
36
+ </td>
37
+
38
+ <td><label for="celltype">{#table_dlg.cell_type}</label></td>
39
+ <td>
40
+ <select id="celltype" name="celltype">
41
+ <option value="td">{#table_dlg.td}</option>
42
+ <option value="th">{#table_dlg.th}</option>
43
+ </select>
44
+ </td>
45
+ </tr>
46
+
47
+ <tr>
48
+ <td><label for="valign">{#table_dlg.valign}</label></td>
49
+ <td>
50
+ <select id="valign" name="valign">
51
+ <option value="">{#not_set}</option>
52
+ <option value="top">{#table_dlg.align_top}</option>
53
+ <option value="middle">{#table_dlg.align_middle}</option>
54
+ <option value="bottom">{#table_dlg.align_bottom}</option>
55
+ </select>
56
+ </td>
57
+
58
+ <td><label for="scope">{#table_dlg.scope}</label></td>
59
+ <td>
60
+ <select id="scope" name="scope">
61
+ <option value="">{#not_set}</option>
62
+ <option value="col">{#table.col}</option>
63
+ <option value="row">{#table.row}</option>
64
+ <option value="rowgroup">{#table_dlg.rowgroup}</option>
65
+ <option value="colgroup">{#table_dlg.colgroup}</option>
66
+ </select>
67
+ </td>
68
+
69
+ </tr>
70
+
71
+ <tr>
72
+ <td><label for="width">{#table_dlg.width}</label></td>
73
+ <td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
74
+
75
+ <td><label for="height">{#table_dlg.height}</label></td>
76
+ <td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
77
+ </tr>
78
+
79
+ <tr id="styleSelectRow">
80
+ <td><label for="class">{#class_name}</label></td>
81
+ <td colspan="3">
82
+ <select id="class" name="class" class="mceEditableSelect">
83
+ <option value="" selected="selected">{#not_set}</option>
84
+ </select>
85
+ </td>
86
+ </tr>
87
+ </table>
88
+ </fieldset>
89
+ </div>
90
+
91
+ <div id="advanced_panel" class="panel">
92
+ <fieldset>
93
+ <legend>{#table_dlg.advanced_props}</legend>
94
+
95
+ <table border="0" cellpadding="0" cellspacing="4">
96
+ <tr>
97
+ <td class="column1"><label for="id">{#table_dlg.id}</label></td>
98
+ <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
99
+ </tr>
100
+
101
+ <tr>
102
+ <td><label for="style">{#table_dlg.style}</label></td>
103
+ <td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
104
+ </tr>
105
+
106
+ <tr>
107
+ <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
108
+ <td>
109
+ <select id="dir" name="dir" style="width: 200px">
110
+ <option value="">{#not_set}</option>
111
+ <option value="ltr">{#table_dlg.ltr}</option>
112
+ <option value="rtl">{#table_dlg.rtl}</option>
113
+ </select>
114
+ </td>
115
+ </tr>
116
+
117
+ <tr>
118
+ <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
119
+ <td>
120
+ <input id="lang" name="lang" type="text" value="" style="width: 200px" />
121
+ </td>
122
+ </tr>
123
+
124
+ <tr>
125
+ <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
126
+ <td>
127
+ <table border="0" cellpadding="0" cellspacing="0">
128
+ <tr>
129
+ <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
130
+ <td id="backgroundimagebrowsercontainer">&nbsp;</td>
131
+ </tr>
132
+ </table>
133
+ </td>
134
+ </tr>
135
+
136
+ <tr>
137
+ <td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td>
138
+ <td>
139
+ <table border="0" cellpadding="0" cellspacing="0">
140
+ <tr>
141
+ <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
142
+ <td id="bordercolor_pickcontainer">&nbsp;</td>
143
+ </tr>
144
+ </table>
145
+ </td>
146
+ </tr>
147
+
148
+ <tr>
149
+ <td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
150
+ <td>
151
+ <table border="0" cellpadding="0" cellspacing="0">
152
+ <tr>
153
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
154
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
155
+ </tr>
156
+ </table>
157
+ </td>
158
+ </tr>
159
+ </table>
160
+ </fieldset>
161
+ </div>
162
+ </div>
163
+
164
+ <div class="mceActionPanel">
165
+ <div>
166
+ <select id="action" name="action">
167
+ <option value="cell">{#table_dlg.cell_cell}</option>
168
+ <option value="row">{#table_dlg.cell_row}</option>
169
+ <option value="all">{#table_dlg.cell_all}</option>
170
+ </select>
171
+ </div>
172
+
173
+ <input type="submit" id="insert" name="insert" value="{#update}" />
174
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
175
+ </div>
176
+ </form>
177
+ </body>
178
+ </html>
@@ -0,0 +1,17 @@
1
+ /* CSS file for cell dialog in the table plugin */
2
+
3
+ .panel_wrapper div.current {
4
+ height: 200px;
5
+ }
6
+
7
+ .advfield {
8
+ width: 200px;
9
+ }
10
+
11
+ #action {
12
+ margin-bottom: 3px;
13
+ }
14
+
15
+ #class {
16
+ width: 150px;
17
+ }
@@ -0,0 +1,25 @@
1
+ /* CSS file for row dialog in the table plugin */
2
+
3
+ .panel_wrapper div.current {
4
+ height: 200px;
5
+ }
6
+
7
+ .advfield {
8
+ width: 200px;
9
+ }
10
+
11
+ #action {
12
+ margin-bottom: 3px;
13
+ }
14
+
15
+ #rowtype,#align,#valign,#class,#height {
16
+ width: 150px;
17
+ }
18
+
19
+ #height {
20
+ width: 50px;
21
+ }
22
+
23
+ .col2 {
24
+ padding-left: 20px;
25
+ }
@@ -0,0 +1,13 @@
1
+ /* CSS file for table dialog in the table plugin */
2
+
3
+ .panel_wrapper div.current {
4
+ height: 245px;
5
+ }
6
+
7
+ .advfield {
8
+ width: 200px;
9
+ }
10
+
11
+ #class {
12
+ width: 150px;
13
+ }
@@ -0,0 +1 @@
1
+ (function(c){var d=c.each;function b(f,g){var h=g.ownerDocument,e=h.createRange(),j;e.setStartBefore(g);e.setEnd(f.endContainer,f.endOffset);j=h.createElement("body");j.appendChild(e.cloneContents());return j.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(G,F,J){var f,K,C,o;s();o=F.getParent(J.getStart(),"th,td");if(o){K=E(o);C=H();o=w(K.x,K.y)}function z(M,L){M=M.cloneNode(L);M.removeAttribute("id");return M}function s(){var L=0;f=[];d(["thead","tbody","tfoot"],function(M){var N=F.select("> "+M+" tr",G);d(N,function(O,P){P+=L;d(F.select("> td, > th",O),function(V,Q){var R,S,T,U;if(f[P]){while(f[P][Q]){Q++}}T=h(V,"rowspan");U=h(V,"colspan");for(S=P;S<P+T;S++){if(!f[S]){f[S]=[]}for(R=Q;R<Q+U;R++){f[S][R]={part:M,real:S==P&&R==Q,elm:V,rowspan:T,colspan:U}}}})});L+=N.length})}function w(L,N){var M;M=f[N];if(M){return M[L]}}function h(M,L){return parseInt(M.getAttribute(L)||1)}function j(L){return F.hasClass(L.elm,"mceSelected")||L==o}function k(){var L=[];d(G.rows,function(M){d(M.cells,function(N){if(F.hasClass(N,"mceSelected")||N==o.elm){L.push(M);return false}})});return L}function r(){var L=F.createRng();L.setStartAfter(G);L.setEndAfter(G);J.setRng(L);F.remove(G)}function e(L){var M;c.walk(L,function(O){var N;if(O.nodeType==3){d(F.getParents(O.parentNode,null,L).reverse(),function(P){P=z(P,false);if(!M){M=N=P}else{if(N){N.appendChild(P)}}N=P});if(N){N.innerHTML=c.isIE?"&nbsp;":'<br _mce_bogus="1" />'}return false}},"childNodes");L=z(L,false);L.rowSpan=L.colSpan=1;if(M){L.appendChild(M)}else{if(!c.isIE){L.innerHTML='<br _mce_bogus="1" />'}}return L}function q(){var L=F.createRng();d(F.select("tr",G),function(M){if(M.cells.length==0){F.remove(M)}});if(F.select("tr",G).length==0){L.setStartAfter(G);L.setEndAfter(G);J.setRng(L);F.remove(G);return}d(F.select("thead,tbody,tfoot",G),function(M){if(M.rows.length==0){F.remove(M)}});s();row=f[Math.min(f.length-1,K.y)];if(row){J.select(row[Math.min(row.length-1,K.x)].elm,true);J.collapse(true)}}function t(R,P,T,Q){var O,M,L,N,S;O=f[P][R].elm.parentNode;for(L=1;L<=T;L++){O=F.getNext(O,"tr");if(O){for(M=R;M>=0;M--){S=f[P+L][M].elm;if(S.parentNode==O){for(N=1;N<=Q;N++){F.insertAfter(e(S),S)}break}}if(M==-1){for(N=1;N<=Q;N++){O.insertBefore(e(O.cells[0]),O.cells[0])}}}}}function B(){d(f,function(L,M){d(L,function(O,N){var R,Q,S,P;if(j(O)){O=O.elm;R=h(O,"colspan");Q=h(O,"rowspan");if(R>1||Q>1){O.colSpan=O.rowSpan=1;for(P=0;P<R-1;P++){F.insertAfter(e(O),O)}t(N,M,Q-1,R)}}})})}function p(T,Q,W){var O,N,V,U,S,P,R,L,T,M;if(T){pos=E(T);O=pos.x;N=pos.y;V=O+(Q-1);U=N+(W-1)}else{O=K.x;N=K.y;V=C.x;U=C.y}R=w(O,N);L=w(V,U);if(R&&L&&R.part==L.part){B();s();R=w(O,N).elm;R.colSpan=(V-O)+1;R.rowSpan=(U-N)+1;for(P=N;P<=U;P++){for(S=O;S<=V;S++){T=f[P][S].elm;if(T!=R){M=c.grep(T.childNodes);d(M,function(Y,X){if(Y.nodeName!="BR"||X!=M.length-1){R.appendChild(Y)}});F.remove(T)}}}q()}}function l(O){var L,Q,N,P,R,S,M,T;d(f,function(U,V){d(U,function(X,W){if(j(X)){X=X.elm;R=X.parentNode;S=z(R,false);L=V;if(O){return false}}});if(O){return !L}});for(P=0;P<f[0].length;P++){Q=f[L][P].elm;if(Q!=N){if(!O){rowSpan=h(Q,"rowspan");if(rowSpan>1){Q.rowSpan=rowSpan+1;continue}}else{if(L>0&&f[L-1][P]){T=f[L-1][P].elm;rowSpan=h(T,"rowspan");if(rowSpan>1){T.rowSpan=rowSpan+1;continue}}}M=e(Q);M.colSpan=Q.colSpan;S.appendChild(M);N=Q}}if(S.hasChildNodes()){if(!O){F.insertAfter(S,R)}else{R.parentNode.insertBefore(S,R)}}}function g(M){var N,L;d(f,function(O,P){d(O,function(R,Q){if(j(R)){N=Q;if(M){return false}}});if(M){return !N}});d(f,function(R,S){var O=R[N].elm,P,Q;if(O!=L){Q=h(O,"colspan");P=h(O,"rowspan");if(Q==1){if(!M){F.insertAfter(e(O),O);t(N,S,P-1,Q)}else{O.parentNode.insertBefore(e(O),O);t(N,S,P-1,Q)}}else{O.colSpan++}L=O}})}function n(){var L=[];d(f,function(M,N){d(M,function(P,O){if(j(P)&&c.inArray(L,O)===-1){d(f,function(S){var Q=S[O].elm,R;R=h(Q,"colspan");if(R>1){Q.colSpan=R-1}else{F.remove(Q)}});L.push(O)}})});q()}function m(){var M;function L(P){var O,Q,N;O=F.getNext(P,"tr");d(P.cells,function(R){var S=h(R,"rowspan");if(S>1){R.rowSpan=S-1;Q=E(R);t(Q.x,Q.y,1,1)}});Q=E(P.cells[0]);d(f[Q.y],function(R){var S;R=R.elm;if(R!=N){S=h(R,"rowspan");if(S<=1){F.remove(R)}else{R.rowSpan=S-1}N=R}})}M=k();d(M.reverse(),function(N){L(N)});q()}function D(){var L=k();F.remove(L);q();return L}function I(){var L=k();d(L,function(N,M){L[M]=z(N,true)});return L}function A(N,M){var O=k(),L=O[M?0:O.length-1],P=L.cells.length;d(f,function(R){var Q;P=0;d(R,function(T,S){if(T.real){P+=T.colspan}if(T.elm.parentNode==L){Q=1}});if(Q){return false}});if(!M){N.reverse()}d(N,function(S){var R=S.cells.length,Q;for(i=0;i<R;i++){Q=S.cells[i];Q.colSpan=Q.rowSpan=1}for(i=R;i<P;i++){S.appendChild(e(S.cells[R-1]))}for(i=P;i<R;i++){F.remove(S.cells[i])}if(M){L.parentNode.insertBefore(S,L)}else{F.insertAfter(S,L)}})}function E(L){var M;d(f,function(N,O){d(N,function(Q,P){if(Q.elm==L){M={x:P,y:O};return false}});return !M});return M}function v(L){K=E(L)}function H(){var N,M,L;M=L=0;d(f,function(O,P){d(O,function(R,Q){var T,S;if(j(R)){R=f[P][Q];if(Q>M){M=Q}if(P>L){L=P}if(R.real){T=R.colspan-1;S=R.rowspan-1;if(T){if(Q+T>M){M=Q+T}}if(S){if(P+S>L){L=P+S}}}}})});return{x:M,y:L}}function u(R){var O,N,T,S,M,L,P,Q;C=E(R);if(K&&C){O=Math.min(K.x,C.x);N=Math.min(K.y,C.y);T=Math.max(K.x,C.x);S=Math.max(K.y,C.y);M=T;L=S;for(y=N;y<=L;y++){R=f[y][O];if(!R.real){if(O-(R.colspan-1)<O){O-=R.colspan-1}}}for(x=O;x<=M;x++){R=f[N][x];if(!R.real){if(N-(R.rowspan-1)<N){N-=R.rowspan-1}}}for(y=N;y<=S;y++){for(x=O;x<=T;x++){R=f[y][x];if(R.real){P=R.colspan-1;Q=R.rowspan-1;if(P){if(x+P>M){M=x+P}}if(Q){if(y+Q>L){L=y+Q}}}}}F.removeClass(F.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=N;y<=L;y++){for(x=O;x<=M;x++){F.addClass(f[y][x].elm,"mceSelected")}}}}c.extend(this,{deleteTable:r,split:B,merge:p,insertRow:l,insertCol:g,deleteCols:n,deleteRows:m,cutRows:D,copyRows:I,pasteRows:A,getPos:E,setStartCell:v,setEndCell:u})}c.create("tinymce.plugins.TablePlugin",{init:function(f,g){var e,k;function j(n){var m=f.selection,l=f.dom.getParent(n||m.getNode(),"table");if(l){return new a(l,f.dom,m)}}function h(){f.getBody().style.webkitUserSelect="";f.dom.removeClass(f.dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}d([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(l){f.addButton(l[0],{title:l[1],cmd:l[2],ui:l[3]})});if(!c.isIE){f.onClick.add(function(l,m){m=m.target;if(m.nodeName==="TABLE"){l.selection.select(m)}})}f.onNodeChange.add(function(m,l,q){var o;q=m.selection.getStart();o=m.dom.getParent(q,"td,th,caption");l.setActive("table",q.nodeName==="TABLE"||!!o);if(o&&o.nodeName==="CAPTION"){o=0}l.setDisabled("delete_table",!o);l.setDisabled("delete_col",!o);l.setDisabled("delete_table",!o);l.setDisabled("delete_row",!o);l.setDisabled("col_after",!o);l.setDisabled("col_before",!o);l.setDisabled("row_after",!o);l.setDisabled("row_before",!o);l.setDisabled("row_props",!o);l.setDisabled("cell_props",!o);l.setDisabled("split_cells",!o);l.setDisabled("merge_cells",!o)});f.onInit.add(function(m){var l,p,q=m.dom,n;e=m.windowManager;m.onMouseDown.add(function(r,s){if(s.button!=2){h();p=q.getParent(s.target,"td,th");l=q.getParent(p,"table")}});q.bind(m.getDoc(),"mouseover",function(u){var s,r,t=u.target;if(p&&(n||t!=p)&&(t.nodeName=="TD"||t.nodeName=="TH")){r=q.getParent(t,"table");if(r==l){if(!n){n=j(r);n.setStartCell(p);m.getBody().style.webkitUserSelect="none"}n.setEndCell(t)}s=m.selection.getSel();if(s.removeAllRanges){s.removeAllRanges()}else{s.empty()}u.preventDefault()}});m.onMouseUp.add(function(A,B){var s,u=A.selection,C,D=u.getSel(),r,v,t,z;if(p){if(n){A.getBody().style.webkitUserSelect=""}function w(E,G){var F=new c.dom.TreeWalker(E,E);do{if(E.nodeType==3&&c.trim(E.nodeValue).length!=0){if(G){s.setStart(E,0)}else{s.setEnd(E,E.nodeValue.length)}return}if(E.nodeName=="BR"){if(G){s.setStartBefore(E)}else{s.setEndBefore(E)}return}}while(E=(G?F.next():F.prev()))}C=q.select("td.mceSelected,th.mceSelected");if(C.length>0){s=q.createRng();v=C[0];z=C[C.length-1];w(v,1);r=new c.dom.TreeWalker(v,q.getParent(C[0],"table"));do{if(v.nodeName=="TD"||v.nodeName=="TH"){if(!q.hasClass(v,"mceSelected")){break}t=v}}while(v=r.next());w(t);u.setRng(s)}A.nodeChanged();p=n=l=null}});m.onKeyUp.add(function(r,s){h()});if(m&&m.plugins.contextmenu){m.plugins.contextmenu.onContextMenu.add(function(t,r,v){var w,u=m.selection,s=u.getNode()||m.getBody();if(m.dom.getParent(v,"td")||m.dom.getParent(v,"th")||m.dom.select("td.mceSelected,th.mceSelected").length){r.removeAll();if(s.nodeName=="A"&&!m.dom.getAttrib(s,"name")){r.add({title:"advanced.link_desc",icon:"link",cmd:m.plugins.advlink?"mceAdvLink":"mceLink",ui:true});r.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});r.addSeparator()}if(s.nodeName=="IMG"&&s.className.indexOf("mceItem")==-1){r.add({title:"advanced.image_desc",icon:"image",cmd:m.plugins.advimage?"mceAdvImage":"mceImage",ui:true});r.addSeparator()}r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});r.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});r.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});r.addSeparator();w=r.addMenu({title:"table.cell"});w.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});w.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});w.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});w=r.addMenu({title:"table.row"});w.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});w.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});w.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});w.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});w.addSeparator();w.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});w.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});w.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!k);w.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!k);w=r.addMenu({title:"table.col"});w.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});w.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});w.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(!c.isIE){function o(){var r;for(r=m.getBody().lastChild;r&&r.nodeType==3&&!r.nodeValue.length;r=r.previousSibling){}if(r&&r.nodeName=="TABLE"){m.dom.add(m.getBody(),"p",null,'<br mce_bogus="1" />')}}if(c.isGecko){m.onKeyDown.add(function(s,u){var r,t,v=s.dom;if(u.keyCode==37||u.keyCode==38){r=s.selection.getRng();t=v.getParent(r.startContainer,"table");if(t&&s.getBody().firstChild==t){if(b(r,t)){r=v.createRng();r.setStartBefore(t);r.setEndBefore(t);s.selection.setRng(r);u.preventDefault()}}}})}m.onKeyUp.add(o);m.onSetContent.add(o);m.onVisualAid.add(o);m.onPreProcess.add(function(r,t){var s=t.node.lastChild;if(s&&s.childNodes.length==1&&s.firstChild.nodeName=="BR"){r.dom.remove(s)}});o()}});d({mceTableSplitCells:function(l){l.split()},mceTableMergeCells:function(m){var n,o,l;l=f.dom.getParent(f.selection.getNode(),"th,td");if(l){n=l.rowSpan;o=l.colSpan}if(!f.dom.select("td.mceSelected,th.mceSelected").length){e.open({url:g+"/merge_cells.htm",width:240+parseInt(f.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(f.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:n,cols:o,onaction:function(p){m.merge(l,p.cols,p.rows)},plugin_url:g})}else{m.merge()}},mceTableInsertRowBefore:function(l){l.insertRow(true)},mceTableInsertRowAfter:function(l){l.insertRow()},mceTableInsertColBefore:function(l){l.insertCol(true)},mceTableInsertColAfter:function(l){l.insertCol()},mceTableDeleteCol:function(l){l.deleteCols()},mceTableDeleteRow:function(l){l.deleteRows()},mceTableCutRow:function(l){k=l.cutRows()},mceTableCopyRow:function(l){k=l.copyRows()},mceTablePasteRowBefore:function(l){l.pasteRows(k,true)},mceTablePasteRowAfter:function(l){l.pasteRows(k)},mceTableDelete:function(l){l.deleteTable()}},function(m,l){f.addCommand(l,function(){var n=j();if(n){m(n);f.execCommand("mceRepaint");h()}})});d({mceInsertTable:function(l){e.open({url:g+"/table.htm",width:400+parseInt(f.getLang("table.table_delta_width",0)),height:320+parseInt(f.getLang("table.table_delta_height",0)),inline:1},{plugin_url:g,action:l?l.action:0})},mceTableRowProps:function(){e.open({url:g+"/row.htm",width:400+parseInt(f.getLang("table.rowprops_delta_width",0)),height:295+parseInt(f.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:g})},mceTableCellProps:function(){e.open({url:g+"/cell.htm",width:400+parseInt(f.getLang("table.cellprops_delta_width",0)),height:295+parseInt(f.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:g})}},function(m,l){f.addCommand(l,function(n,o){m(o)})})}});c.PluginManager.add("table",c.plugins.TablePlugin)})(tinymce);