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,124 @@
1
+
2
+
3
+ resizable plugin for WYMeditor
4
+ ##############################
5
+
6
+ The ``resizable`` plugin for WYMeditor_ enables vertical resizing of the
7
+ editor area. The plugin is based on the jQuery UI library.
8
+
9
+ Requirements
10
+ ============
11
+ The following packages are required for using the WYMeditor ``resizable``
12
+ plugin:
13
+
14
+ * jQuery (tested with jQuery ``jquery-1.2.4a.js`` from ``jquery.ui`` package)
15
+ * WYMeditor SVN trunk (Revision: 482)
16
+ * jQuery-UI (tested with ``jquery.ui-1.5b2``)
17
+
18
+ It should be possible to use this plugin with ``WYMeditor-0.4`` but I have not
19
+ tried.
20
+
21
+ Download
22
+ ========
23
+ You can download the WYMeditor ``resizable`` plugin here:
24
+
25
+ * wymeditor-resizable-plugin-0.2.tgz_
26
+ * wymeditor-resizable-plugin-0.1.tgz_
27
+
28
+ See the Changelog_ for more infos about the releases.
29
+
30
+ .. _wymeditor-resizable-plugin-0.2.tgz: http://pyjax.net/download/wymeditor-resizable-plugin-0.2.tgz
31
+ .. _wymeditor-resizable-plugin-0.1.tgz: http://pyjax.net/download/wymeditor-resizable-plugin-0.1.tgz
32
+
33
+ Installation
34
+ ============
35
+ Just extract the downloaded archive into your WYMeditor's ``plugin``
36
+ directory.
37
+
38
+ Usage
39
+ =====
40
+ For general instructions on WYMeditor plugins please refer to the `WYMeditor
41
+ plugin page`_.
42
+
43
+ To use the ``resizable`` plugin simply include the plugin's JavaScript file in
44
+ your code. You **do not** need to include the jQuery UI files - this is done
45
+ automatically by the plugin (see `Internals`_)::
46
+
47
+ <script type="text/javascript"
48
+ src="/js/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js">
49
+ </script>
50
+
51
+ Make sure to adjust the ``src`` attribute to your needs, then initialize the
52
+ plugin in WYMeditor's ``postInit`` function::
53
+
54
+ wymeditor({postInit: function(wym) {
55
+ wym.hovertools(); // other plugins...
56
+ wym.resizable({handles: "s,e",
57
+ maxHeight: 600});
58
+ }
59
+ })
60
+
61
+ The ``resizable`` plugin takes exactly one parameter, which is an object literal
62
+ containing the options of the plugin. The WYMeditor ``resizable`` plugin
63
+ supports all options of the jQuery UI ``resizable`` plugin. These are the
64
+ default values used by the plugin::
65
+
66
+ handles: "s,e,se",
67
+ minHeight: 250,
68
+ maxHeight: 600
69
+
70
+ See the `jQuery UI resizable plugin docs`_ for a list of all options.
71
+
72
+ That's it! You are now able to resize the WYMeditor vertically, horizontally or
73
+ both, depending on your options.
74
+
75
+ .. _jQuery UI resizable plugin docs: http://docs.jquery.com/UI/Resizables
76
+
77
+ Internals
78
+ =========
79
+ The plugin takes care of loading the necessary jQuery UI files (``base`` and
80
+ ``resizable``) from the same path the jQuery library was loaded. Here's how
81
+ it's done::
82
+
83
+ // Get the jQuery path from the editor, stripping away the jQuery file.
84
+ // see http://www.oreilly.com/catalog/regex/chapter/ch04.html
85
+ // The match result array contains the path and the filename.
86
+ var jQueryPath = wym.computeJqueryPath().match(/^(.*)\/(.*)$/)[1];
87
+
88
+ // Make an array of the external JavaScript files required by the plugin.
89
+ var jQueryPlugins = [jQueryPath + '/ui.base.js',
90
+ jQueryPath + '/ui.resizable.js'];
91
+
92
+ // First get the jQuery UI base file
93
+ $.getScript(jQueryPlugins[0]);
94
+
95
+ // Get the jQuery UI resizeable plugin and then init the wymeditor resizable
96
+ // plugin. It is import to do the initialisation after loading the
97
+ // necessary jQuery UI files has finished, otherwise the "resizable" method
98
+ // would not be available.
99
+ $.getScript(jQueryPlugins[1], function() {
100
+ jQuery(wym._box).resizable(final_options);
101
+ });
102
+
103
+ An alternative approach would be to use an AJAX queue when getting the script
104
+ files to ensure that all jQuery files are loaded before the initialisation code
105
+ of the plugin is executed. There is an `jQuery AJAX queue plugin`_ which does
106
+ that.
107
+
108
+ .. _jQuery AJAX queue plugin: http://plugins.jquery.com/project/ajaxqueue
109
+
110
+ Changelog
111
+ =========
112
+
113
+ 0.2
114
+ ---
115
+ - Added full support for all jQuery UI resizable plugin options.
116
+ - Refactored and documented code.
117
+ - Now contains a packed version (775 bytes).
118
+
119
+ 0.1
120
+ ---
121
+ - Initial release.
122
+
123
+ .. _WYMeditor: http://www.wymeditor.org/
124
+ .. _WYMeditor plugin page: http://trac.wymeditor.org/trac/wiki/0.4/Plugins
@@ -0,0 +1,19 @@
1
+ WYMeditor : what you see is What You Mean web-based editor
2
+ Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
3
+ Dual licensed under the MIT (MIT-license.txt)
4
+ and GPL (GPL-license.txt) licenses.
5
+
6
+ For further information visit:
7
+ http://www.wymeditor.org/
8
+
9
+ File Name:
10
+ README - HTML Tidy plugin for WYMeditor
11
+
12
+ File Authors:
13
+ Jean-François Hovinne (jf.hovinne a-t wymeditor dotorg)
14
+
15
+ Credits:
16
+ 'HTML Tidy' by Dave Ragget - http://tidy.sourceforge.net/
17
+ Icon 'wand' by Mark James - http://famfamfam.com/
18
+
19
+ WYMeditor documentation is available online at http://www.wymeditor.org/
@@ -0,0 +1,82 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * jquery.wymeditor.tidy.js
12
+ * HTML Tidy plugin for WYMeditor
13
+ *
14
+ * File Authors:
15
+ * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)
16
+ */
17
+
18
+ //Extend WYMeditor
19
+ WYMeditor.editor.prototype.tidy = function(options) {
20
+ var tidy = new WymTidy(options, this);
21
+ return(tidy);
22
+ };
23
+
24
+ //WymTidy constructor
25
+ function WymTidy(options, wym) {
26
+
27
+ options = jQuery.extend({
28
+
29
+ sUrl: wym._options.basePath + "plugins/tidy/tidy.php",
30
+ sButtonHtml: "<li class='wym_tools_tidy'>"
31
+ + "<a name='CleanUp' href='#'"
32
+ + " style='background-image:"
33
+ + " url(" + wym._options.basePath + "plugins/tidy/wand.png)'>"
34
+ + "Clean up HTML"
35
+ + "</a></li>",
36
+
37
+ sButtonSelector: "li.wym_tools_tidy a"
38
+
39
+ }, options);
40
+
41
+ this._options = options;
42
+ this._wym = wym;
43
+
44
+ };
45
+
46
+ //WymTidy initialization
47
+ WymTidy.prototype.init = function() {
48
+
49
+ var tidy = this;
50
+
51
+ jQuery(this._wym._box).find(
52
+ this._wym._options.toolsSelector + this._wym._options.toolsListSelector)
53
+ .append(this._options.sButtonHtml);
54
+
55
+ //handle click event
56
+ jQuery(this._wym._box).find(this._options.sButtonSelector).click(function() {
57
+ tidy.cleanup();
58
+ return(false);
59
+ });
60
+
61
+ };
62
+
63
+ //WymTidy cleanup
64
+ WymTidy.prototype.cleanup = function() {
65
+
66
+ var wym = this._wym;
67
+ var html = "<html><body>" + wym.xhtml() + "</body></html>";
68
+
69
+ jQuery.post(this._options.sUrl, { html: html}, function(data) {
70
+
71
+ if(data.length > 0 && data != '0') {
72
+ if(data.indexOf("<?php") == 0) {
73
+ wym.status("Ooops... Is PHP installed?");
74
+ } else {
75
+ wym.html(data);
76
+ wym.status("HTML has been cleaned up.");
77
+ }
78
+ } else {
79
+ wym.status("An error occurred.");
80
+ }
81
+ });
82
+ };
@@ -0,0 +1,36 @@
1
+ <?php
2
+
3
+ if (get_magic_quotes_gpc()) $html = stripslashes($_REQUEST['html']);
4
+ else $html = $_REQUEST['html'];
5
+
6
+ if(strlen($html) > 0) {
7
+
8
+ // Specify configuration
9
+ $config = array(
10
+ 'bare' => true,
11
+ 'clean' => true,
12
+ 'doctype' => 'strict',
13
+ 'drop-empty-paras' => true,
14
+ 'drop-font-tags' => true,
15
+ 'drop-proprietary-attributes' => true,
16
+ 'enclose-block-text' => true,
17
+ 'indent' => false,
18
+ 'join-classes' => true,
19
+ 'join-styles' => true,
20
+ 'logical-emphasis' => true,
21
+ 'output-xhtml' => true,
22
+ 'show-body-only' => true,
23
+ 'wrap' => 0);
24
+
25
+ // Tidy
26
+ $tidy = new tidy;
27
+ $tidy->parseString($html, $config, 'utf8');
28
+ $tidy->cleanRepair();
29
+
30
+ // Output
31
+ echo $tidy;
32
+ } else {
33
+
34
+ echo ('0');
35
+ }
36
+ ?>
@@ -0,0 +1,134 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * screen.css
12
+ * main stylesheet for the WYMeditor skin
13
+ * See the documentation for more info.
14
+ *
15
+ * File Authors:
16
+ * Daniel Reszka (d.reszka a-t wymeditor dotorg)
17
+ * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)
18
+ */
19
+
20
+ /*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/
21
+ .wym_skin_compact p, .wym_skin_compact h2, .wym_skin_compact h3,
22
+ .wym_skin_compact ul, .wym_skin_compact li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; }
23
+
24
+
25
+ /*HIDDEN BY DEFAULT*/
26
+ .wym_skin_compact .wym_area_left { display: none; }
27
+ .wym_skin_compact .wym_area_right { display: none; }
28
+
29
+
30
+ /*TYPO*/
31
+ .wym_skin_compact { font-size: 10px; font-family: Verdana, Arial, sans-serif; }
32
+ .wym_skin_compact h2 { font-size: 110%; /* = 11px */}
33
+ .wym_skin_compact h3 { font-size: 100%; /* = 10px */}
34
+ .wym_skin_compact li { font-size: 100%; /* = 10px */}
35
+
36
+
37
+ /*WYM_BOX*/
38
+ .wym_skin_compact { border: 1px solid gray; padding: 5px}
39
+
40
+ /*auto-clear the wym_box*/
41
+ .wym_skin_compact:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
42
+ * html .wym_skin_compact { height: 1%;}
43
+
44
+
45
+ /*WYM_HTML*/
46
+ .wym_skin_compact .wym_html { width: 98%;}
47
+ .wym_skin_compact .wym_html textarea { font-size: 120%; width: 100%; height: 200px; border: 1px solid gray; background: white; }
48
+
49
+
50
+ /*WYM_IFRAME*/
51
+ .wym_skin_compact .wym_iframe { width: 98%;}
52
+ .wym_skin_compact .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid gray; background: white }
53
+
54
+
55
+ /*AREAS*/
56
+ .wym_skin_compact .wym_area_left { width: 100px; float: left;}
57
+ .wym_skin_compact .wym_area_right { width: 150px; float: right;}
58
+ .wym_skin_compact .wym_area_bottom { height: 1%; clear: both;}
59
+ * html .wym_skin_compact .wym_area_main { height: 1%;}
60
+ * html .wym_skin_compact .wym_area_top { height: 1%;}
61
+ *+html .wym_skin_compact .wym_area_top { height: 1%;}
62
+
63
+ /*SECTIONS SYSTEM*/
64
+
65
+ /*common defaults for all sections*/
66
+ .wym_skin_compact .wym_section { margin-bottom: 5px; }
67
+ .wym_skin_compact .wym_section h2,
68
+ .wym_skin_compact .wym_section h3 { padding: 1px 3px; margin: 0; }
69
+ .wym_skin_compact .wym_section a { padding: 0 3px; display: block; text-decoration: none; color: black; }
70
+ .wym_skin_compact .wym_section a:hover { background-color: yellow; }
71
+ /*hide section titles by default*/
72
+ .wym_skin_compact .wym_section h2 { display: none; }
73
+ /*disable any margin-collapse*/
74
+ .wym_skin_compact .wym_section { padding-top: 1px; padding-bottom: 1px; }
75
+ /*auto-clear sections*/
76
+ .wym_skin_compact .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
77
+ * html .wym_skin_compact .wym_section ul { height: 1%;}
78
+
79
+ /*option: add this class to a section to make it render as a panel*/
80
+ .wym_skin_compact .wym_panel { }
81
+ .wym_skin_compact .wym_panel h2 { display: block; }
82
+
83
+ /*option: add this class to a section to make it render as a dropdown menu*/
84
+ .wym_skin_compact .wym_dropdown h2 { display: block; }
85
+ .wym_skin_compact .wym_dropdown ul { display: none; position: absolute; background: white; }
86
+ .wym_skin_compact .wym_dropdown:hover ul,
87
+ .wym_skin_compact .wym_dropdown.hover ul { display: block; }
88
+
89
+ /*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/
90
+ .wym_skin_compact .wym_buttons li { float:left;}
91
+ .wym_skin_compact .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px }
92
+ /*image replacements*/
93
+ .wym_skin_compact .wym_buttons li a { background: url(icons.png) no-repeat; text-indent: -9999px;}
94
+ .wym_skin_compact .wym_buttons li.wym_tools_strong a { background-position: 0 -382px;}
95
+ .wym_skin_compact .wym_buttons li.wym_tools_emphasis a { background-position: 0 -22px;}
96
+ .wym_skin_compact .wym_buttons li.wym_tools_superscript a { background-position: 0 -430px;}
97
+ .wym_skin_compact .wym_buttons li.wym_tools_subscript a { background-position: 0 -454px;}
98
+ .wym_skin_compact .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;}
99
+ .wym_skin_compact .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;}
100
+ .wym_skin_compact .wym_buttons li.wym_tools_indent a { background-position: 0 -574px;}
101
+ .wym_skin_compact .wym_buttons li.wym_tools_outdent a { background-position: 0 -598px;}
102
+ .wym_skin_compact .wym_buttons li.wym_tools_undo a { background-position: 0 -502px;}
103
+ .wym_skin_compact .wym_buttons li.wym_tools_redo a { background-position: 0 -526px;}
104
+ .wym_skin_compact .wym_buttons li.wym_tools_link a { background-position: 0 -96px;}
105
+ .wym_skin_compact .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;}
106
+ .wym_skin_compact .wym_buttons li.wym_tools_image a { background-position: 0 -121px;}
107
+ .wym_skin_compact .wym_buttons li.wym_tools_table a { background-position: 0 -144px;}
108
+ .wym_skin_compact .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;}
109
+ .wym_skin_compact .wym_buttons li.wym_tools_html a { background-position: 0 -193px;}
110
+ .wym_skin_compact .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;}
111
+
112
+ /*DECORATION*/
113
+ .wym_skin_compact .wym_section h2 { background: #f0f0f0; border: solid gray; border-width: 0 0 1px;}
114
+ .wym_skin_compact .wym_section h2 span { color: gray;}
115
+ .wym_skin_compact .wym_panel { padding: 0; border: solid gray; border-width: 1px; background: white;}
116
+ .wym_skin_compact .wym_panel ul { margin: 2px 0 5px; }
117
+ .wym_skin_compact .wym_dropdown { padding: 0; border: solid gray; border-width: 1px 1px 0 1px; }
118
+ .wym_skin_compact .wym_dropdown ul { border: solid gray; border-width: 0 1px 1px 1px; margin-left: -1px; padding: 5px 10px 5px 3px;}
119
+
120
+ /*DIALOGS*/
121
+ .wym_dialog div.row { margin-bottom: 5px;}
122
+ .wym_dialog div.row input { margin-right: 5px;}
123
+ .wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; }
124
+ .wym_dialog div.row-indent { padding-left: 160px; }
125
+ /*autoclearing*/
126
+ .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
127
+ .wym_dialog div.row { display: inline-block; }
128
+ /* Hides from IE-mac \*/
129
+ * html .wym_dialog div.row { height: 1%; }
130
+ .wym_dialog div.row { display: block; }
131
+ /* End hide from IE-mac */
132
+
133
+ /*WYMEDITOR_LINK*/
134
+ a.wym_wymeditor_link { text-indent: -9999px; float: right; display: block; width: 50px; height: 15px; background: url(../wymeditor_icon.png); overflow: hidden; text-decoration: none; }
@@ -0,0 +1,35 @@
1
+ WYMeditor.SKINS['compact'] = {
2
+
3
+ init: function(wym) {
4
+
5
+ //move the containers panel to the top area
6
+ jQuery(wym._options.containersSelector + ', '
7
+ + wym._options.classesSelector, wym._box)
8
+ .appendTo( jQuery("div.wym_area_top", wym._box) )
9
+ .addClass("wym_dropdown")
10
+ .css({"margin-right": "10px", "width": "120px", "float": "left"});
11
+
12
+ //render following sections as buttons
13
+ jQuery(wym._options.toolsSelector, wym._box)
14
+ .addClass("wym_buttons")
15
+ .css({"margin-right": "10px", "float": "left"});
16
+
17
+ //make hover work under IE < 7
18
+ jQuery(".wym_section", wym._box).hover(function(){
19
+ jQuery(this).addClass("hover");
20
+ },function(){
21
+ jQuery(this).removeClass("hover");
22
+ });
23
+
24
+ var postInit = wym._options.postInit;
25
+ wym._options.postInit = function(wym) {
26
+
27
+ if(postInit) postInit.call(wym, wym);
28
+ var rule = {
29
+ name: 'body',
30
+ css: 'background-color: #f0f0f0;'
31
+ };
32
+ wym.addCssRule( wym._doc.styleSheets[0], rule);
33
+ };
34
+ }
35
+ };
@@ -0,0 +1,133 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * skin.css
12
+ * main stylesheet for the default WYMeditor skin
13
+ * See the documentation for more info.
14
+ *
15
+ * File Authors:
16
+ * Daniel Reszka (d.reszka a-t wymeditor dotorg)
17
+ */
18
+
19
+ /*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/
20
+ .wym_skin_default p, .wym_skin_default h2, .wym_skin_default h3,
21
+ .wym_skin_default ul, .wym_skin_default li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; }
22
+
23
+
24
+ /*HIDDEN BY DEFAULT*/
25
+ .wym_skin_default .wym_area_left { display: none; }
26
+ .wym_skin_default .wym_area_right { display: block; }
27
+
28
+
29
+ /*TYPO*/
30
+ .wym_skin_default { font-size: 62.5%; font-family: Verdana, Arial, sans-serif; }
31
+ .wym_skin_default h2 { font-size: 110%; /* = 11px */}
32
+ .wym_skin_default h3 { font-size: 100%; /* = 10px */}
33
+ .wym_skin_default li { font-size: 100%; /* = 10px */}
34
+
35
+
36
+ /*WYM_BOX*/
37
+ .wym_skin_default { border: 1px solid gray; background: #f2f2f2; padding: 5px}
38
+
39
+ /*auto-clear the wym_box*/
40
+ .wym_skin_default:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
41
+ * html .wym_skin_default { height: 1%;}
42
+
43
+
44
+ /*WYM_HTML*/
45
+ .wym_skin_default .wym_html { width: 98%;}
46
+ .wym_skin_default .wym_html textarea { width: 100%; height: 200px; border: 1px solid gray; background: white; }
47
+
48
+
49
+ /*WYM_IFRAME*/
50
+ .wym_skin_default .wym_iframe { width: 98%;}
51
+ .wym_skin_default .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid gray; background: white }
52
+
53
+
54
+ /*AREAS*/
55
+ .wym_skin_default .wym_area_left { width: 150px; float: left;}
56
+ .wym_skin_default .wym_area_right { width: 150px; float: right;}
57
+ .wym_skin_default .wym_area_bottom { height: 1%; clear: both;}
58
+ * html .wym_skin_default .wym_area_main { height: 1%;}
59
+ * html .wym_skin_default .wym_area_top { height: 1%;}
60
+ *+html .wym_skin_default .wym_area_top { height: 1%;}
61
+
62
+ /*SECTIONS SYSTEM*/
63
+
64
+ /*common defaults for all sections*/
65
+ .wym_skin_default .wym_section { margin-bottom: 5px; }
66
+ .wym_skin_default .wym_section h2,
67
+ .wym_skin_default .wym_section h3 { padding: 1px 3px; margin: 0; }
68
+ .wym_skin_default .wym_section a { padding: 0 3px; display: block; text-decoration: none; color: black; }
69
+ .wym_skin_default .wym_section a:hover { background-color: yellow; }
70
+ /*hide section titles by default*/
71
+ .wym_skin_default .wym_section h2 { display: none; }
72
+ /*disable any margin-collapse*/
73
+ .wym_skin_default .wym_section { padding-top: 1px; padding-bottom: 1px; }
74
+ /*auto-clear sections*/
75
+ .wym_skin_default .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
76
+ * html .wym_skin_default .wym_section ul { height: 1%;}
77
+
78
+ /*option: add this class to a section to make it render as a panel*/
79
+ .wym_skin_default .wym_panel { }
80
+ .wym_skin_default .wym_panel h2 { display: block; }
81
+
82
+ /*option: add this class to a section to make it render as a dropdown menu*/
83
+ .wym_skin_default .wym_dropdown h2 { display: block; }
84
+ .wym_skin_default .wym_dropdown ul { display: none; position: absolute; background: white; }
85
+ .wym_skin_default .wym_dropdown:hover ul,
86
+ .wym_skin_default .wym_dropdown.hover ul { display: block; }
87
+
88
+ /*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/
89
+ .wym_skin_default .wym_buttons li { float:left;}
90
+ .wym_skin_default .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px }
91
+ /*image replacements*/
92
+ .wym_skin_default .wym_buttons li a { background: url(icons.png) no-repeat; text-indent: -9999px;}
93
+ .wym_skin_default .wym_buttons li.wym_tools_strong a { background-position: 0 -382px;}
94
+ .wym_skin_default .wym_buttons li.wym_tools_emphasis a { background-position: 0 -22px;}
95
+ .wym_skin_default .wym_buttons li.wym_tools_superscript a { background-position: 0 -430px;}
96
+ .wym_skin_default .wym_buttons li.wym_tools_subscript a { background-position: 0 -454px;}
97
+ .wym_skin_default .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;}
98
+ .wym_skin_default .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;}
99
+ .wym_skin_default .wym_buttons li.wym_tools_indent a { background-position: 0 -574px;}
100
+ .wym_skin_default .wym_buttons li.wym_tools_outdent a { background-position: 0 -598px;}
101
+ .wym_skin_default .wym_buttons li.wym_tools_undo a { background-position: 0 -502px;}
102
+ .wym_skin_default .wym_buttons li.wym_tools_redo a { background-position: 0 -526px;}
103
+ .wym_skin_default .wym_buttons li.wym_tools_link a { background-position: 0 -96px;}
104
+ .wym_skin_default .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;}
105
+ .wym_skin_default .wym_buttons li.wym_tools_image a { background-position: 0 -121px;}
106
+ .wym_skin_default .wym_buttons li.wym_tools_table a { background-position: 0 -144px;}
107
+ .wym_skin_default .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;}
108
+ .wym_skin_default .wym_buttons li.wym_tools_html a { background-position: 0 -193px;}
109
+ .wym_skin_default .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;}
110
+
111
+ /*DECORATION*/
112
+ .wym_skin_default .wym_section h2 { background: #ddd; border: solid gray; border-width: 0 0 1px;}
113
+ .wym_skin_default .wym_section h2 span { color: gray;}
114
+ .wym_skin_default .wym_panel { padding: 0; border: solid gray; border-width: 1px; background: white;}
115
+ .wym_skin_default .wym_panel ul { margin: 2px 0 5px; }
116
+ .wym_skin_default .wym_dropdown { padding: 0; border: solid gray; border-width: 1px 1px 0 1px; }
117
+ .wym_skin_default .wym_dropdown ul { border: solid gray; border-width: 0 1px 1px 1px; margin-left: -1px; padding: 5px 10px 5px 3px;}
118
+
119
+ /*DIALOGS*/
120
+ .wym_dialog div.row { margin-bottom: 5px;}
121
+ .wym_dialog div.row input { margin-right: 5px;}
122
+ .wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; }
123
+ .wym_dialog div.row-indent { padding-left: 160px; }
124
+ /*autoclearing*/
125
+ .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
126
+ .wym_dialog div.row { display: inline-block; }
127
+ /* Hides from IE-mac \*/
128
+ * html .wym_dialog div.row { height: 1%; }
129
+ .wym_dialog div.row { display: block; }
130
+ /* End hide from IE-mac */
131
+
132
+ /*WYMEDITOR_LINK*/
133
+ a.wym_wymeditor_link { text-indent: -9999px; float: right; display: block; width: 50px; height: 15px; background: url(../wymeditor_icon.png); overflow: hidden; text-decoration: none; }
@@ -0,0 +1,40 @@
1
+ WYMeditor.SKINS['default'] = {
2
+
3
+ init: function(wym) {
4
+
5
+ //render following sections as panels
6
+ jQuery(wym._box).find(wym._options.classesSelector)
7
+ .addClass("wym_panel");
8
+
9
+ //render following sections as buttons
10
+ jQuery(wym._box).find(wym._options.toolsSelector)
11
+ .addClass("wym_buttons");
12
+
13
+ //render following sections as dropdown menus
14
+ jQuery(wym._box).find(wym._options.containersSelector)
15
+ .addClass("wym_dropdown")
16
+ .find(WYMeditor.H2)
17
+ .append("<span>&#160;&gt;</span>");
18
+
19
+ // auto add some margin to the main area sides if left area
20
+ // or right area are not empty (if they contain sections)
21
+ jQuery(wym._box).find("div.wym_area_right ul")
22
+ .parents("div.wym_area_right").show()
23
+ .parents(wym._options.boxSelector)
24
+ .find("div.wym_area_main")
25
+ .css({"margin-right": "155px"});
26
+
27
+ jQuery(wym._box).find("div.wym_area_left ul")
28
+ .parents("div.wym_area_left").show()
29
+ .parents(wym._options.boxSelector)
30
+ .find("div.wym_area_main")
31
+ .css({"margin-left": "155px"});
32
+
33
+ //make hover work under IE < 7
34
+ jQuery(wym._box).find(".wym_section").hover(function(){
35
+ jQuery(this).addClass("hover");
36
+ },function(){
37
+ jQuery(this).removeClass("hover");
38
+ });
39
+ }
40
+ };