tinymce-rails 3.5.11.1 → 4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (336) hide show
  1. data/LICENSE +1 -1
  2. data/README.md +40 -103
  3. data/Rakefile +10 -15
  4. data/app/assets/javascripts/tinymce-jquery.js +1 -1
  5. data/app/assets/javascripts/tinymce.js +1 -1
  6. data/app/assets/javascripts/tinymce/preinit.js.erb +1 -2
  7. data/lib/tasks/tinymce-assets.rake +3 -6
  8. data/lib/tinymce/rails.rb +1 -1
  9. data/lib/tinymce/rails/asset_installer.rb +36 -34
  10. data/lib/tinymce/rails/asset_manifest.rb +89 -108
  11. data/lib/tinymce/rails/configuration.rb +36 -29
  12. data/lib/tinymce/rails/engine.rb +1 -40
  13. data/lib/tinymce/rails/helper.rb +5 -9
  14. data/lib/tinymce/rails/version.rb +2 -2
  15. data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -1
  16. data/vendor/assets/javascripts/tinymce/langs/readme.md +3 -0
  17. data/vendor/assets/javascripts/tinymce/license.txt +504 -504
  18. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -0
  19. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -0
  20. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -0
  21. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -0
  22. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -0
  23. data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -0
  24. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -0
  25. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -0
  26. data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/editable_selects.js +70 -70
  27. data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/form_utils.js +210 -210
  28. data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/mctabs.js +161 -161
  29. data/vendor/assets/javascripts/tinymce/plugins/compat3x/tiny_mce_popup.js +435 -0
  30. data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/validate.js +252 -252
  31. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -0
  32. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -0
  33. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-cool.gif +0 -0
  34. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-cry.gif +0 -0
  35. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-embarassed.gif +0 -0
  36. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-foot-in-mouth.gif +0 -0
  37. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-frown.gif +0 -0
  38. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-innocent.gif +0 -0
  39. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-kiss.gif +0 -0
  40. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-laughing.gif +0 -0
  41. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-money-mouth.gif +0 -0
  42. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-sealed.gif +0 -0
  43. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-smile.gif +0 -0
  44. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-surprised.gif +0 -0
  45. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-tongue-out.gif +0 -0
  46. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-undecided.gif +0 -0
  47. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-wink.gif +0 -0
  48. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-yell.gif +0 -0
  49. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -0
  50. data/vendor/assets/javascripts/tinymce/plugins/example/plugin.js +1 -0
  51. data/vendor/assets/javascripts/tinymce/plugins/example_dependency/plugin.js +1 -0
  52. data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -0
  53. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -0
  54. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -0
  55. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -0
  56. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -0
  57. data/vendor/assets/javascripts/tinymce/plugins/layer/plugin.js +1 -0
  58. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -0
  59. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -0
  60. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -0
  61. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -0
  62. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -0
  63. data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -0
  64. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -0
  65. data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -0
  66. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -0
  67. data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -0
  68. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -0
  69. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -0
  70. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -0
  71. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -0
  72. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -0
  73. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -0
  74. data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -0
  75. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/css/visualblocks.css +114 -21
  76. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -0
  77. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -0
  78. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -0
  79. data/vendor/assets/javascripts/tinymce/skins/lightgray/content.inline.min.css +1 -0
  80. data/vendor/assets/javascripts/tinymce/skins/lightgray/content.min.css +1 -0
  81. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.eot +0 -0
  82. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.svg +166 -0
  83. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.ttf +0 -0
  84. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.woff +0 -0
  85. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.eot +0 -0
  86. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.svg +150 -0
  87. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.ttf +0 -0
  88. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.woff +0 -0
  89. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/readme.md +1 -0
  90. data/vendor/assets/javascripts/tinymce/skins/lightgray/img/anchor.gif +0 -0
  91. data/vendor/assets/javascripts/tinymce/skins/lightgray/img/loader.gif +0 -0
  92. data/vendor/assets/javascripts/tinymce/skins/lightgray/img/object.gif +0 -0
  93. data/vendor/assets/javascripts/tinymce/{themes/advanced → skins/lightgray}/img/trans.gif +0 -0
  94. data/vendor/assets/javascripts/tinymce/{plugins/spellchecker → skins/lightgray}/img/wline.gif +0 -0
  95. data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  96. data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +1 -0
  97. data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -0
  98. data/vendor/assets/javascripts/tinymce/tinymce.js +10 -0
  99. data/vendor/assets/javascripts/tinymce/tinymce_jquery.js +9 -0
  100. metadata +100 -272
  101. checksums.yaml +0 -7
  102. data/lib/tinymce/rails/asset_installer/compile.rb +0 -44
  103. data/lib/tinymce/rails/asset_installer/copy.rb +0 -52
  104. data/vendor/assets/javascripts/tinymce/langs/en.js +0 -1
  105. data/vendor/assets/javascripts/tinymce/plugins/advhr/css/advhr.css +0 -5
  106. data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin.js +0 -1
  107. data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin_src.js +0 -57
  108. data/vendor/assets/javascripts/tinymce/plugins/advhr/js/rule.js +0 -43
  109. data/vendor/assets/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +0 -1
  110. data/vendor/assets/javascripts/tinymce/plugins/advhr/rule.htm +0 -58
  111. data/vendor/assets/javascripts/tinymce/plugins/advimage/css/advimage.css +0 -13
  112. data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin.js +0 -1
  113. data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin_src.js +0 -50
  114. data/vendor/assets/javascripts/tinymce/plugins/advimage/image.htm +0 -235
  115. data/vendor/assets/javascripts/tinymce/plugins/advimage/img/sample.gif +0 -0
  116. data/vendor/assets/javascripts/tinymce/plugins/advimage/js/image.js +0 -464
  117. data/vendor/assets/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +0 -1
  118. data/vendor/assets/javascripts/tinymce/plugins/advlink/css/advlink.css +0 -8
  119. data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin.js +0 -1
  120. data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin_src.js +0 -61
  121. data/vendor/assets/javascripts/tinymce/plugins/advlink/js/advlink.js +0 -543
  122. data/vendor/assets/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +0 -1
  123. data/vendor/assets/javascripts/tinymce/plugins/advlink/link.htm +0 -338
  124. data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin.js +0 -1
  125. data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +0 -176
  126. data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin.js +0 -1
  127. data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +0 -184
  128. data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin.js +0 -1
  129. data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +0 -119
  130. data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin.js +0 -1
  131. data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +0 -433
  132. data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin.js +0 -1
  133. data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +0 -120
  134. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +0 -1
  135. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +0 -163
  136. data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin.js +0 -1
  137. data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin_src.js +0 -85
  138. data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin.js +0 -1
  139. data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin_src.js +0 -43
  140. data/vendor/assets/javascripts/tinymce/plugins/emotions/emotions.htm +0 -42
  141. data/vendor/assets/javascripts/tinymce/plugins/emotions/js/emotions.js +0 -43
  142. data/vendor/assets/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +0 -1
  143. data/vendor/assets/javascripts/tinymce/plugins/example/dialog.htm +0 -22
  144. data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin.js +0 -1
  145. data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin_src.js +0 -84
  146. data/vendor/assets/javascripts/tinymce/plugins/example/img/example.gif +0 -0
  147. data/vendor/assets/javascripts/tinymce/plugins/example/js/dialog.js +0 -19
  148. data/vendor/assets/javascripts/tinymce/plugins/example/langs/en.js +0 -3
  149. data/vendor/assets/javascripts/tinymce/plugins/example/langs/en_dlg.js +0 -3
  150. data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin.js +0 -1
  151. data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin_src.js +0 -50
  152. data/vendor/assets/javascripts/tinymce/plugins/fullpage/css/fullpage.css +0 -143
  153. data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin.js +0 -1
  154. data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +0 -405
  155. data/vendor/assets/javascripts/tinymce/plugins/fullpage/fullpage.htm +0 -259
  156. data/vendor/assets/javascripts/tinymce/plugins/fullpage/js/fullpage.js +0 -232
  157. data/vendor/assets/javascripts/tinymce/plugins/fullpage/langs/en_dlg.js +0 -1
  158. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +0 -1
  159. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -234
  160. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/fullscreen.htm +0 -117
  161. data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin.js +0 -1
  162. data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin_src.js +0 -54
  163. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +0 -1
  164. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -699
  165. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  166. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  167. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  168. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  169. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  170. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  171. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  172. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -90
  173. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/template.htm +0 -387
  174. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin.js +0 -1
  175. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -83
  176. data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin.js +0 -1
  177. data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin_src.js +0 -262
  178. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +0 -1
  179. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -139
  180. data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin.js +0 -1
  181. data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin_src.js +0 -955
  182. data/vendor/assets/javascripts/tinymce/plugins/media/css/media.css +0 -17
  183. data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin.js +0 -1
  184. data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin_src.js +0 -898
  185. data/vendor/assets/javascripts/tinymce/plugins/media/js/embed.js +0 -73
  186. data/vendor/assets/javascripts/tinymce/plugins/media/js/media.js +0 -513
  187. data/vendor/assets/javascripts/tinymce/plugins/media/langs/en_dlg.js +0 -1
  188. data/vendor/assets/javascripts/tinymce/plugins/media/media.htm +0 -922
  189. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +0 -1
  190. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -54
  191. data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin.js +0 -1
  192. data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +0 -537
  193. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +0 -1
  194. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -74
  195. data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin.js +0 -1
  196. data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin_src.js +0 -887
  197. data/vendor/assets/javascripts/tinymce/plugins/paste/js/pastetext.js +0 -36
  198. data/vendor/assets/javascripts/tinymce/plugins/paste/js/pasteword.js +0 -51
  199. data/vendor/assets/javascripts/tinymce/plugins/paste/langs/en_dlg.js +0 -1
  200. data/vendor/assets/javascripts/tinymce/plugins/paste/pastetext.htm +0 -27
  201. data/vendor/assets/javascripts/tinymce/plugins/paste/pasteword.htm +0 -21
  202. data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin.js +0 -1
  203. data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin_src.js +0 -53
  204. data/vendor/assets/javascripts/tinymce/plugins/preview/example.html +0 -28
  205. data/vendor/assets/javascripts/tinymce/plugins/preview/jscripts/embed.js +0 -73
  206. data/vendor/assets/javascripts/tinymce/plugins/preview/preview.html +0 -17
  207. data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin.js +0 -1
  208. data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin_src.js +0 -34
  209. data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin.js +0 -1
  210. data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin_src.js +0 -101
  211. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/css/searchreplace.css +0 -6
  212. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +0 -1
  213. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -61
  214. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +0 -152
  215. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -1
  216. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +0 -100
  217. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/css/content.css +0 -1
  218. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +0 -1
  219. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -471
  220. data/vendor/assets/javascripts/tinymce/plugins/style/css/props.css +0 -14
  221. data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin.js +0 -1
  222. data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin_src.js +0 -71
  223. data/vendor/assets/javascripts/tinymce/plugins/style/js/props.js +0 -709
  224. data/vendor/assets/javascripts/tinymce/plugins/style/langs/en_dlg.js +0 -1
  225. data/vendor/assets/javascripts/tinymce/plugins/style/props.htm +0 -845
  226. data/vendor/assets/javascripts/tinymce/plugins/style/readme.txt +0 -19
  227. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +0 -1
  228. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -122
  229. data/vendor/assets/javascripts/tinymce/plugins/table/cell.htm +0 -180
  230. data/vendor/assets/javascripts/tinymce/plugins/table/css/cell.css +0 -17
  231. data/vendor/assets/javascripts/tinymce/plugins/table/css/row.css +0 -25
  232. data/vendor/assets/javascripts/tinymce/plugins/table/css/table.css +0 -13
  233. data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin.js +0 -1
  234. data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin_src.js +0 -1456
  235. data/vendor/assets/javascripts/tinymce/plugins/table/js/cell.js +0 -319
  236. data/vendor/assets/javascripts/tinymce/plugins/table/js/merge_cells.js +0 -27
  237. data/vendor/assets/javascripts/tinymce/plugins/table/js/row.js +0 -254
  238. data/vendor/assets/javascripts/tinymce/plugins/table/js/table.js +0 -501
  239. data/vendor/assets/javascripts/tinymce/plugins/table/langs/en_dlg.js +0 -1
  240. data/vendor/assets/javascripts/tinymce/plugins/table/merge_cells.htm +0 -32
  241. data/vendor/assets/javascripts/tinymce/plugins/table/row.htm +0 -158
  242. data/vendor/assets/javascripts/tinymce/plugins/table/table.htm +0 -188
  243. data/vendor/assets/javascripts/tinymce/plugins/template/blank.htm +0 -12
  244. data/vendor/assets/javascripts/tinymce/plugins/template/css/template.css +0 -23
  245. data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin.js +0 -1
  246. data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin_src.js +0 -159
  247. data/vendor/assets/javascripts/tinymce/plugins/template/js/template.js +0 -106
  248. data/vendor/assets/javascripts/tinymce/plugins/template/langs/en_dlg.js +0 -1
  249. data/vendor/assets/javascripts/tinymce/plugins/template/template.htm +0 -31
  250. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin.js +0 -1
  251. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin_src.js +0 -63
  252. data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin.js +0 -1
  253. data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +0 -83
  254. data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin.js +0 -1
  255. data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +0 -122
  256. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +0 -142
  257. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +0 -142
  258. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +0 -149
  259. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +0 -142
  260. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -11
  261. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/popup.css +0 -9
  262. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/del.htm +0 -162
  263. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -1
  264. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
  265. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +0 -162
  266. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -28
  267. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -28
  268. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -111
  269. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/cite.js +0 -28
  270. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +0 -53
  271. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -229
  272. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +0 -53
  273. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -1
  274. data/vendor/assets/javascripts/tinymce/themes/advanced/about.htm +0 -52
  275. data/vendor/assets/javascripts/tinymce/themes/advanced/anchor.htm +0 -26
  276. data/vendor/assets/javascripts/tinymce/themes/advanced/charmap.htm +0 -55
  277. data/vendor/assets/javascripts/tinymce/themes/advanced/color_picker.htm +0 -70
  278. data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template.js +0 -1
  279. data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template_src.js +0 -1490
  280. data/vendor/assets/javascripts/tinymce/themes/advanced/image.htm +0 -80
  281. data/vendor/assets/javascripts/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
  282. data/vendor/assets/javascripts/tinymce/themes/advanced/img/flash.gif +0 -0
  283. data/vendor/assets/javascripts/tinymce/themes/advanced/img/icons.gif +0 -0
  284. data/vendor/assets/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
  285. data/vendor/assets/javascripts/tinymce/themes/advanced/img/pagebreak.gif +0 -0
  286. data/vendor/assets/javascripts/tinymce/themes/advanced/img/quicktime.gif +0 -0
  287. data/vendor/assets/javascripts/tinymce/themes/advanced/img/realmedia.gif +0 -0
  288. data/vendor/assets/javascripts/tinymce/themes/advanced/img/shockwave.gif +0 -0
  289. data/vendor/assets/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
  290. data/vendor/assets/javascripts/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
  291. data/vendor/assets/javascripts/tinymce/themes/advanced/js/about.js +0 -73
  292. data/vendor/assets/javascripts/tinymce/themes/advanced/js/anchor.js +0 -56
  293. data/vendor/assets/javascripts/tinymce/themes/advanced/js/charmap.js +0 -363
  294. data/vendor/assets/javascripts/tinymce/themes/advanced/js/color_picker.js +0 -345
  295. data/vendor/assets/javascripts/tinymce/themes/advanced/js/image.js +0 -253
  296. data/vendor/assets/javascripts/tinymce/themes/advanced/js/link.js +0 -159
  297. data/vendor/assets/javascripts/tinymce/themes/advanced/js/source_editor.js +0 -78
  298. data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en.js +0 -1
  299. data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en_dlg.js +0 -1
  300. data/vendor/assets/javascripts/tinymce/themes/advanced/link.htm +0 -57
  301. data/vendor/assets/javascripts/tinymce/themes/advanced/shortcuts.htm +0 -47
  302. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/content.css +0 -50
  303. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/dialog.css +0 -118
  304. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
  305. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
  306. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  307. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  308. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
  309. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
  310. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/ui.css +0 -219
  311. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +0 -24
  312. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -106
  313. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -106
  314. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +0 -48
  315. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -118
  316. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  317. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  318. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  319. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +0 -222
  320. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -8
  321. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
  322. data/vendor/assets/javascripts/tinymce/themes/advanced/source_editor.htm +0 -25
  323. data/vendor/assets/javascripts/tinymce/themes/simple/editor_template.js +0 -1
  324. data/vendor/assets/javascripts/tinymce/themes/simple/editor_template_src.js +0 -84
  325. data/vendor/assets/javascripts/tinymce/themes/simple/img/icons.gif +0 -0
  326. data/vendor/assets/javascripts/tinymce/themes/simple/langs/en.js +0 -1
  327. data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/content.css +0 -25
  328. data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/ui.css +0 -32
  329. data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/content.css +0 -17
  330. data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  331. data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/ui.css +0 -35
  332. data/vendor/assets/javascripts/tinymce/tiny_mce.js +0 -1
  333. data/vendor/assets/javascripts/tinymce/tiny_mce_jquery.js +0 -1
  334. data/vendor/assets/javascripts/tinymce/tiny_mce_jquery_src.js +0 -17942
  335. data/vendor/assets/javascripts/tinymce/tiny_mce_popup.js +0 -5
  336. data/vendor/assets/javascripts/tinymce/tiny_mce_src.js +0 -19156
@@ -1,345 +0,0 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
4
-
5
- var colors = [
6
- "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
7
- "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
8
- "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
9
- "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
10
- "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
11
- "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
12
- "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
13
- "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
14
- "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
15
- "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
16
- "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
17
- "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
18
- "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
19
- "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
20
- "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
21
- "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
22
- "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
23
- "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
24
- "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
25
- "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
26
- "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
27
- "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
28
- "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
29
- "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
30
- "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
31
- "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
32
- "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
33
- ];
34
-
35
- var named = {
36
- '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
37
- '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
38
- '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
39
- '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
40
- '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
41
- '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
42
- '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
43
- '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
44
- '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
45
- '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
46
- '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
47
- '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
48
- '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
49
- '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
50
- '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
51
- '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
52
- '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
53
- '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
54
- '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
55
- '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
56
- '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
57
- '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
58
- '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
59
- };
60
-
61
- var namedLookup = {};
62
-
63
- function init() {
64
- var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
65
-
66
- tinyMCEPopup.resizeToInnerSize();
67
-
68
- generatePicker();
69
- generateWebColors();
70
- generateNamedColors();
71
-
72
- if (inputColor) {
73
- changeFinalColor(inputColor);
74
-
75
- col = convertHexToRGB(inputColor);
76
-
77
- if (col)
78
- updateLight(col.r, col.g, col.b);
79
- }
80
-
81
- for (key in named) {
82
- value = named[key];
83
- namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
84
- }
85
- }
86
-
87
- function toHexColor(color) {
88
- var matches, red, green, blue, toInt = parseInt;
89
-
90
- function hex(value) {
91
- value = parseInt(value).toString(16);
92
-
93
- return value.length > 1 ? value : '0' + value; // Padd with leading zero
94
- };
95
-
96
- color = tinymce.trim(color);
97
- color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
98
- color = namedLookup[color] || color;
99
-
100
- matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
101
-
102
- if (matches) {
103
- red = toInt(matches[1]);
104
- green = toInt(matches[2]);
105
- blue = toInt(matches[3]);
106
- } else {
107
- matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
108
-
109
- if (matches) {
110
- red = toInt(matches[1], 16);
111
- green = toInt(matches[2], 16);
112
- blue = toInt(matches[3], 16);
113
- } else {
114
- matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
115
-
116
- if (matches) {
117
- red = toInt(matches[1] + matches[1], 16);
118
- green = toInt(matches[2] + matches[2], 16);
119
- blue = toInt(matches[3] + matches[3], 16);
120
- } else {
121
- return '';
122
- }
123
- }
124
- }
125
-
126
- return '#' + hex(red) + hex(green) + hex(blue);
127
- }
128
-
129
- function insertAction() {
130
- var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
131
-
132
- var hexColor = toHexColor(color);
133
-
134
- if (hexColor === '') {
135
- var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
136
- tinyMCEPopup.alert(text + ': ' + color);
137
- }
138
- else {
139
- tinyMCEPopup.restoreSelection();
140
-
141
- if (f)
142
- f(hexColor);
143
-
144
- tinyMCEPopup.close();
145
- }
146
- }
147
-
148
- function showColor(color, name) {
149
- if (name)
150
- document.getElementById("colorname").innerHTML = name;
151
-
152
- document.getElementById("preview").style.backgroundColor = color;
153
- document.getElementById("color").value = color.toUpperCase();
154
- }
155
-
156
- function convertRGBToHex(col) {
157
- var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
158
-
159
- if (!col)
160
- return col;
161
-
162
- var rgb = col.replace(re, "$1,$2,$3").split(',');
163
- if (rgb.length == 3) {
164
- r = parseInt(rgb[0]).toString(16);
165
- g = parseInt(rgb[1]).toString(16);
166
- b = parseInt(rgb[2]).toString(16);
167
-
168
- r = r.length == 1 ? '0' + r : r;
169
- g = g.length == 1 ? '0' + g : g;
170
- b = b.length == 1 ? '0' + b : b;
171
-
172
- return "#" + r + g + b;
173
- }
174
-
175
- return col;
176
- }
177
-
178
- function convertHexToRGB(col) {
179
- if (col.indexOf('#') != -1) {
180
- col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
181
-
182
- r = parseInt(col.substring(0, 2), 16);
183
- g = parseInt(col.substring(2, 4), 16);
184
- b = parseInt(col.substring(4, 6), 16);
185
-
186
- return {r : r, g : g, b : b};
187
- }
188
-
189
- return null;
190
- }
191
-
192
- function generatePicker() {
193
- var el = document.getElementById('light'), h = '', i;
194
-
195
- for (i = 0; i < detail; i++){
196
- h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
197
- + ' onclick="changeFinalColor(this.style.backgroundColor)"'
198
- + ' onmousedown="isMouseDown = true; return false;"'
199
- + ' onmouseup="isMouseDown = false;"'
200
- + ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
201
- + ' onmouseover="isMouseOver = true;"'
202
- + ' onmouseout="isMouseOver = false;"'
203
- + '></div>';
204
- }
205
-
206
- el.innerHTML = h;
207
- }
208
-
209
- function generateWebColors() {
210
- var el = document.getElementById('webcolors'), h = '', i;
211
-
212
- if (el.className == 'generated')
213
- return;
214
-
215
- // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
216
- h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
217
- + '<tr>';
218
-
219
- for (i=0; i<colors.length; i++) {
220
- h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
221
- + '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
222
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
223
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
224
- }
225
- h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
226
- h += '</a></td>';
227
- if ((i+1) % 18 == 0)
228
- h += '</tr><tr>';
229
- }
230
-
231
- h += '</table></div>';
232
-
233
- el.innerHTML = h;
234
- el.className = 'generated';
235
-
236
- paintCanvas(el);
237
- enableKeyboardNavigation(el.firstChild);
238
- }
239
-
240
- function paintCanvas(el) {
241
- tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
242
- var context;
243
- if (canvas.getContext && (context = canvas.getContext("2d"))) {
244
- context.fillStyle = canvas.getAttribute('data-color');
245
- context.fillRect(0, 0, 10, 10);
246
- }
247
- });
248
- }
249
- function generateNamedColors() {
250
- var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
251
-
252
- if (el.className == 'generated')
253
- return;
254
-
255
- for (n in named) {
256
- v = named[n];
257
- h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
258
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
259
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
260
- }
261
- h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
262
- h += '</a>';
263
- i++;
264
- }
265
-
266
- el.innerHTML = h;
267
- el.className = 'generated';
268
-
269
- paintCanvas(el);
270
- enableKeyboardNavigation(el);
271
- }
272
-
273
- function enableKeyboardNavigation(el) {
274
- tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
275
- root: el,
276
- items: tinyMCEPopup.dom.select('a', el)
277
- }, tinyMCEPopup.dom);
278
- }
279
-
280
- function dechex(n) {
281
- return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
282
- }
283
-
284
- function computeColor(e) {
285
- var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
286
-
287
- x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
288
- y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
289
-
290
- partWidth = document.getElementById('colors').width / 6;
291
- partDetail = detail / 2;
292
- imHeight = document.getElementById('colors').height;
293
-
294
- r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
295
- g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
296
- b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
297
-
298
- coef = (imHeight - y) / imHeight;
299
- r = 128 + (r - 128) * coef;
300
- g = 128 + (g - 128) * coef;
301
- b = 128 + (b - 128) * coef;
302
-
303
- changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
304
- updateLight(r, g, b);
305
- }
306
-
307
- function updateLight(r, g, b) {
308
- var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
309
-
310
- for (i=0; i<detail; i++) {
311
- if ((i>=0) && (i<partDetail)) {
312
- finalCoef = i / partDetail;
313
- finalR = dechex(255 - (255 - r) * finalCoef);
314
- finalG = dechex(255 - (255 - g) * finalCoef);
315
- finalB = dechex(255 - (255 - b) * finalCoef);
316
- } else {
317
- finalCoef = 2 - i / partDetail;
318
- finalR = dechex(r * finalCoef);
319
- finalG = dechex(g * finalCoef);
320
- finalB = dechex(b * finalCoef);
321
- }
322
-
323
- color = finalR + finalG + finalB;
324
-
325
- setCol('gs' + i, '#'+color);
326
- }
327
- }
328
-
329
- function changeFinalColor(color) {
330
- if (color.indexOf('#') == -1)
331
- color = convertRGBToHex(color);
332
-
333
- setCol('preview', color);
334
- document.getElementById('color').value = color;
335
- }
336
-
337
- function setCol(e, c) {
338
- try {
339
- document.getElementById(e).style.backgroundColor = c;
340
- } catch (ex) {
341
- // Ignore IE warning
342
- }
343
- }
344
-
345
- tinyMCEPopup.onInit.add(init);
@@ -1,253 +0,0 @@
1
- var ImageDialog = {
2
- preInit : function() {
3
- var url;
4
-
5
- tinyMCEPopup.requireLangPack();
6
-
7
- if (url = tinyMCEPopup.getParam("external_image_list_url"))
8
- document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
9
- },
10
-
11
- init : function() {
12
- var f = document.forms[0], ed = tinyMCEPopup.editor;
13
-
14
- // Setup browse button
15
- document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
16
- if (isVisible('srcbrowser'))
17
- document.getElementById('src').style.width = '180px';
18
-
19
- e = ed.selection.getNode();
20
-
21
- this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));
22
-
23
- if (e.nodeName == 'IMG') {
24
- f.src.value = ed.dom.getAttrib(e, 'src');
25
- f.alt.value = ed.dom.getAttrib(e, 'alt');
26
- f.border.value = this.getAttrib(e, 'border');
27
- f.vspace.value = this.getAttrib(e, 'vspace');
28
- f.hspace.value = this.getAttrib(e, 'hspace');
29
- f.width.value = ed.dom.getAttrib(e, 'width');
30
- f.height.value = ed.dom.getAttrib(e, 'height');
31
- f.insert.value = ed.getLang('update');
32
- this.styleVal = ed.dom.getAttrib(e, 'style');
33
- selectByValue(f, 'image_list', f.src.value);
34
- selectByValue(f, 'align', this.getAttrib(e, 'align'));
35
- this.updateStyle();
36
- }
37
- },
38
-
39
- fillFileList : function(id, l) {
40
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
41
-
42
- l = typeof(l) === 'function' ? l() : window[l];
43
-
44
- if (l && l.length > 0) {
45
- lst.options[lst.options.length] = new Option('', '');
46
-
47
- tinymce.each(l, function(o) {
48
- lst.options[lst.options.length] = new Option(o[0], o[1]);
49
- });
50
- } else
51
- dom.remove(dom.getParent(id, 'tr'));
52
- },
53
-
54
- update : function() {
55
- var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
56
-
57
- tinyMCEPopup.restoreSelection();
58
-
59
- if (f.src.value === '') {
60
- if (ed.selection.getNode().nodeName == 'IMG') {
61
- ed.dom.remove(ed.selection.getNode());
62
- ed.execCommand('mceRepaint');
63
- }
64
-
65
- tinyMCEPopup.close();
66
- return;
67
- }
68
-
69
- if (!ed.settings.inline_styles) {
70
- args = tinymce.extend(args, {
71
- vspace : nl.vspace.value,
72
- hspace : nl.hspace.value,
73
- border : nl.border.value,
74
- align : getSelectValue(f, 'align')
75
- });
76
- } else
77
- args.style = this.styleVal;
78
-
79
- tinymce.extend(args, {
80
- src : f.src.value.replace(/ /g, '%20'),
81
- alt : f.alt.value,
82
- width : f.width.value,
83
- height : f.height.value
84
- });
85
-
86
- el = ed.selection.getNode();
87
-
88
- if (el && el.nodeName == 'IMG') {
89
- ed.dom.setAttribs(el, args);
90
- tinyMCEPopup.editor.execCommand('mceRepaint');
91
- tinyMCEPopup.editor.focus();
92
- } else {
93
- tinymce.each(args, function(value, name) {
94
- if (value === "") {
95
- delete args[name];
96
- }
97
- });
98
-
99
- ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
100
- ed.undoManager.add();
101
- }
102
-
103
- tinyMCEPopup.close();
104
- },
105
-
106
- updateStyle : function() {
107
- var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0];
108
-
109
- if (tinyMCEPopup.editor.settings.inline_styles) {
110
- tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) {
111
- st[key] = value;
112
- });
113
-
114
- // Handle align
115
- v = getSelectValue(f, 'align');
116
- if (v) {
117
- if (v == 'left' || v == 'right') {
118
- st['float'] = v;
119
- delete st['vertical-align'];
120
- } else {
121
- st['vertical-align'] = v;
122
- delete st['float'];
123
- }
124
- } else {
125
- delete st['float'];
126
- delete st['vertical-align'];
127
- }
128
-
129
- // Handle border
130
- v = f.border.value;
131
- if (v || v == '0') {
132
- if (v == '0')
133
- st['border'] = '0';
134
- else
135
- st['border'] = v + 'px solid black';
136
- } else
137
- delete st['border'];
138
-
139
- // Handle hspace
140
- v = f.hspace.value;
141
- if (v) {
142
- delete st['margin'];
143
- st['margin-left'] = v + 'px';
144
- st['margin-right'] = v + 'px';
145
- } else {
146
- delete st['margin-left'];
147
- delete st['margin-right'];
148
- }
149
-
150
- // Handle vspace
151
- v = f.vspace.value;
152
- if (v) {
153
- delete st['margin'];
154
- st['margin-top'] = v + 'px';
155
- st['margin-bottom'] = v + 'px';
156
- } else {
157
- delete st['margin-top'];
158
- delete st['margin-bottom'];
159
- }
160
-
161
- // Merge
162
- st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
163
- this.styleVal = dom.serializeStyle(st, 'img');
164
- }
165
- },
166
-
167
- getAttrib : function(e, at) {
168
- var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
169
-
170
- if (ed.settings.inline_styles) {
171
- switch (at) {
172
- case 'align':
173
- if (v = dom.getStyle(e, 'float'))
174
- return v;
175
-
176
- if (v = dom.getStyle(e, 'vertical-align'))
177
- return v;
178
-
179
- break;
180
-
181
- case 'hspace':
182
- v = dom.getStyle(e, 'margin-left')
183
- v2 = dom.getStyle(e, 'margin-right');
184
- if (v && v == v2)
185
- return parseInt(v.replace(/[^0-9]/g, ''));
186
-
187
- break;
188
-
189
- case 'vspace':
190
- v = dom.getStyle(e, 'margin-top')
191
- v2 = dom.getStyle(e, 'margin-bottom');
192
- if (v && v == v2)
193
- return parseInt(v.replace(/[^0-9]/g, ''));
194
-
195
- break;
196
-
197
- case 'border':
198
- v = 0;
199
-
200
- tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
201
- sv = dom.getStyle(e, 'border-' + sv + '-width');
202
-
203
- // False or not the same as prev
204
- if (!sv || (sv != v && v !== 0)) {
205
- v = 0;
206
- return false;
207
- }
208
-
209
- if (sv)
210
- v = sv;
211
- });
212
-
213
- if (v)
214
- return parseInt(v.replace(/[^0-9]/g, ''));
215
-
216
- break;
217
- }
218
- }
219
-
220
- if (v = dom.getAttrib(e, at))
221
- return v;
222
-
223
- return '';
224
- },
225
-
226
- resetImageData : function() {
227
- var f = document.forms[0];
228
-
229
- f.width.value = f.height.value = "";
230
- },
231
-
232
- updateImageData : function() {
233
- var f = document.forms[0], t = ImageDialog;
234
-
235
- if (f.width.value == "")
236
- f.width.value = t.preloadImg.width;
237
-
238
- if (f.height.value == "")
239
- f.height.value = t.preloadImg.height;
240
- },
241
-
242
- getImageData : function() {
243
- var f = document.forms[0];
244
-
245
- this.preloadImg = new Image();
246
- this.preloadImg.onload = this.updateImageData;
247
- this.preloadImg.onerror = this.resetImageData;
248
- this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
249
- }
250
- };
251
-
252
- ImageDialog.preInit();
253
- tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);