cable 0.9.16 → 0.9.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. data/VERSION +1 -1
  2. data/app/controllers/admin_controller.rb +1 -1
  3. data/app/views/layouts/admin.html.erb +3 -1
  4. data/lib/generators/cable/install_generator.rb +1 -0
  5. data/lib/generators/cable/menu/templates/erb/menus/_menu.html.erb +1 -1
  6. data/lib/generators/cable/menu/templates/erb/menus/_resources.html.erb +1 -1
  7. data/lib/generators/cable/menu/templates/erb/menus/show.html.erb +1 -1
  8. data/public/javascripts/admin.js +16 -16
  9. metadata +2 -254
  10. data/public/javascripts/tinymce/jquery.tinymce.js +0 -1
  11. data/public/javascripts/tinymce/langs/en.js +0 -222
  12. data/public/javascripts/tinymce/license.txt +0 -504
  13. data/public/javascripts/tinymce/plugins/advhr/css/advhr.css +0 -5
  14. data/public/javascripts/tinymce/plugins/advhr/editor_plugin.js +0 -1
  15. data/public/javascripts/tinymce/plugins/advhr/editor_plugin_src.js +0 -57
  16. data/public/javascripts/tinymce/plugins/advhr/js/rule.js +0 -43
  17. data/public/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +0 -7
  18. data/public/javascripts/tinymce/plugins/advhr/rule.htm +0 -58
  19. data/public/javascripts/tinymce/plugins/advimage/css/advimage.css +0 -13
  20. data/public/javascripts/tinymce/plugins/advimage/editor_plugin.js +0 -1
  21. data/public/javascripts/tinymce/plugins/advimage/editor_plugin_src.js +0 -50
  22. data/public/javascripts/tinymce/plugins/advimage/image.htm +0 -235
  23. data/public/javascripts/tinymce/plugins/advimage/img/sample.gif +0 -0
  24. data/public/javascripts/tinymce/plugins/advimage/js/image.js +0 -445
  25. data/public/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +0 -45
  26. data/public/javascripts/tinymce/plugins/advlink/css/advlink.css +0 -8
  27. data/public/javascripts/tinymce/plugins/advlink/editor_plugin.js +0 -1
  28. data/public/javascripts/tinymce/plugins/advlink/editor_plugin_src.js +0 -61
  29. data/public/javascripts/tinymce/plugins/advlink/js/advlink.js +0 -523
  30. data/public/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +0 -54
  31. data/public/javascripts/tinymce/plugins/advlink/link.htm +0 -338
  32. data/public/javascripts/tinymce/plugins/advlist/editor_plugin.js +0 -1
  33. data/public/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +0 -154
  34. data/public/javascripts/tinymce/plugins/autolink/editor_plugin.js +0 -1
  35. data/public/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +0 -169
  36. data/public/javascripts/tinymce/plugins/autoresize/editor_plugin.js +0 -1
  37. data/public/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +0 -119
  38. data/public/javascripts/tinymce/plugins/autosave/editor_plugin.js +0 -1
  39. data/public/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +0 -431
  40. data/public/javascripts/tinymce/plugins/autosave/langs/en.js +0 -4
  41. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin.js +0 -1
  42. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +0 -120
  43. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +0 -1
  44. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +0 -156
  45. data/public/javascripts/tinymce/plugins/directionality/editor_plugin.js +0 -1
  46. data/public/javascripts/tinymce/plugins/directionality/editor_plugin_src.js +0 -82
  47. data/public/javascripts/tinymce/plugins/emotions/editor_plugin.js +0 -1
  48. data/public/javascripts/tinymce/plugins/emotions/editor_plugin_src.js +0 -43
  49. data/public/javascripts/tinymce/plugins/emotions/emotions.htm +0 -41
  50. data/public/javascripts/tinymce/plugins/emotions/img/smiley-cool.gif +0 -0
  51. data/public/javascripts/tinymce/plugins/emotions/img/smiley-cry.gif +0 -0
  52. data/public/javascripts/tinymce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  53. data/public/javascripts/tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  54. data/public/javascripts/tinymce/plugins/emotions/img/smiley-frown.gif +0 -0
  55. data/public/javascripts/tinymce/plugins/emotions/img/smiley-innocent.gif +0 -0
  56. data/public/javascripts/tinymce/plugins/emotions/img/smiley-kiss.gif +0 -0
  57. data/public/javascripts/tinymce/plugins/emotions/img/smiley-laughing.gif +0 -0
  58. data/public/javascripts/tinymce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  59. data/public/javascripts/tinymce/plugins/emotions/img/smiley-sealed.gif +0 -0
  60. data/public/javascripts/tinymce/plugins/emotions/img/smiley-smile.gif +0 -0
  61. data/public/javascripts/tinymce/plugins/emotions/img/smiley-surprised.gif +0 -0
  62. data/public/javascripts/tinymce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  63. data/public/javascripts/tinymce/plugins/emotions/img/smiley-undecided.gif +0 -0
  64. data/public/javascripts/tinymce/plugins/emotions/img/smiley-wink.gif +0 -0
  65. data/public/javascripts/tinymce/plugins/emotions/img/smiley-yell.gif +0 -0
  66. data/public/javascripts/tinymce/plugins/emotions/js/emotions.js +0 -22
  67. data/public/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +0 -20
  68. data/public/javascripts/tinymce/plugins/example/dialog.htm +0 -22
  69. data/public/javascripts/tinymce/plugins/example/editor_plugin.js +0 -1
  70. data/public/javascripts/tinymce/plugins/example/editor_plugin_src.js +0 -84
  71. data/public/javascripts/tinymce/plugins/example/img/example.gif +0 -0
  72. data/public/javascripts/tinymce/plugins/example/js/dialog.js +0 -19
  73. data/public/javascripts/tinymce/plugins/example/langs/en.js +0 -3
  74. data/public/javascripts/tinymce/plugins/example/langs/en_dlg.js +0 -3
  75. data/public/javascripts/tinymce/plugins/fullpage/css/fullpage.css +0 -184
  76. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin.js +0 -1
  77. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +0 -198
  78. data/public/javascripts/tinymce/plugins/fullpage/fullpage.htm +0 -571
  79. data/public/javascripts/tinymce/plugins/fullpage/js/fullpage.js +0 -497
  80. data/public/javascripts/tinymce/plugins/fullpage/langs/en_dlg.js +0 -85
  81. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +0 -1
  82. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -159
  83. data/public/javascripts/tinymce/plugins/fullscreen/fullscreen.htm +0 -109
  84. data/public/javascripts/tinymce/plugins/iespell/editor_plugin.js +0 -1
  85. data/public/javascripts/tinymce/plugins/iespell/editor_plugin_src.js +0 -54
  86. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +0 -1
  87. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -696
  88. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  89. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  90. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  91. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  92. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  93. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  94. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  95. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -90
  96. data/public/javascripts/tinymce/plugins/inlinepopups/template.htm +0 -387
  97. data/public/javascripts/tinymce/plugins/insertdatetime/editor_plugin.js +0 -1
  98. data/public/javascripts/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -83
  99. data/public/javascripts/tinymce/plugins/layer/editor_plugin.js +0 -1
  100. data/public/javascripts/tinymce/plugins/layer/editor_plugin_src.js +0 -214
  101. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +0 -1
  102. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -139
  103. data/public/javascripts/tinymce/plugins/lists/editor_plugin.js +0 -1
  104. data/public/javascripts/tinymce/plugins/lists/editor_plugin_src.js +0 -617
  105. data/public/javascripts/tinymce/plugins/media/css/media.css +0 -17
  106. data/public/javascripts/tinymce/plugins/media/editor_plugin.js +0 -1
  107. data/public/javascripts/tinymce/plugins/media/editor_plugin_src.js +0 -770
  108. data/public/javascripts/tinymce/plugins/media/js/embed.js +0 -73
  109. data/public/javascripts/tinymce/plugins/media/js/media.js +0 -354
  110. data/public/javascripts/tinymce/plugins/media/langs/en_dlg.js +0 -109
  111. data/public/javascripts/tinymce/plugins/media/media.htm +0 -812
  112. data/public/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
  113. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +0 -1
  114. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -53
  115. data/public/javascripts/tinymce/plugins/noneditable/editor_plugin.js +0 -1
  116. data/public/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +0 -90
  117. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +0 -1
  118. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -74
  119. data/public/javascripts/tinymce/plugins/paste/editor_plugin.js +0 -1
  120. data/public/javascripts/tinymce/plugins/paste/editor_plugin_src.js +0 -930
  121. data/public/javascripts/tinymce/plugins/paste/js/pastetext.js +0 -36
  122. data/public/javascripts/tinymce/plugins/paste/js/pasteword.js +0 -51
  123. data/public/javascripts/tinymce/plugins/paste/langs/en_dlg.js +0 -5
  124. data/public/javascripts/tinymce/plugins/paste/pastetext.htm +0 -27
  125. data/public/javascripts/tinymce/plugins/paste/pasteword.htm +0 -21
  126. data/public/javascripts/tinymce/plugins/preview/editor_plugin.js +0 -1
  127. data/public/javascripts/tinymce/plugins/preview/editor_plugin_src.js +0 -53
  128. data/public/javascripts/tinymce/plugins/preview/example.html +0 -28
  129. data/public/javascripts/tinymce/plugins/preview/jscripts/embed.js +0 -73
  130. data/public/javascripts/tinymce/plugins/preview/preview.html +0 -17
  131. data/public/javascripts/tinymce/plugins/print/editor_plugin.js +0 -1
  132. data/public/javascripts/tinymce/plugins/print/editor_plugin_src.js +0 -34
  133. data/public/javascripts/tinymce/plugins/save/editor_plugin.js +0 -1
  134. data/public/javascripts/tinymce/plugins/save/editor_plugin_src.js +0 -101
  135. data/public/javascripts/tinymce/plugins/searchreplace/css/searchreplace.css +0 -6
  136. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +0 -1
  137. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -61
  138. data/public/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +0 -142
  139. data/public/javascripts/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -16
  140. data/public/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +0 -100
  141. data/public/javascripts/tinymce/plugins/spellchecker/css/content.css +0 -1
  142. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +0 -1
  143. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -435
  144. data/public/javascripts/tinymce/plugins/spellchecker/img/wline.gif +0 -0
  145. data/public/javascripts/tinymce/plugins/style/css/props.css +0 -13
  146. data/public/javascripts/tinymce/plugins/style/editor_plugin.js +0 -1
  147. data/public/javascripts/tinymce/plugins/style/editor_plugin_src.js +0 -55
  148. data/public/javascripts/tinymce/plugins/style/js/props.js +0 -635
  149. data/public/javascripts/tinymce/plugins/style/langs/en_dlg.js +0 -70
  150. data/public/javascripts/tinymce/plugins/style/props.htm +0 -838
  151. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +0 -1
  152. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -114
  153. data/public/javascripts/tinymce/plugins/table/cell.htm +0 -178
  154. data/public/javascripts/tinymce/plugins/table/css/cell.css +0 -17
  155. data/public/javascripts/tinymce/plugins/table/css/row.css +0 -25
  156. data/public/javascripts/tinymce/plugins/table/css/table.css +0 -13
  157. data/public/javascripts/tinymce/plugins/table/editor_plugin.js +0 -1
  158. data/public/javascripts/tinymce/plugins/table/editor_plugin_src.js +0 -1198
  159. data/public/javascripts/tinymce/plugins/table/js/cell.js +0 -284
  160. data/public/javascripts/tinymce/plugins/table/js/merge_cells.js +0 -27
  161. data/public/javascripts/tinymce/plugins/table/js/row.js +0 -232
  162. data/public/javascripts/tinymce/plugins/table/js/table.js +0 -450
  163. data/public/javascripts/tinymce/plugins/table/langs/en_dlg.js +0 -74
  164. data/public/javascripts/tinymce/plugins/table/merge_cells.htm +0 -32
  165. data/public/javascripts/tinymce/plugins/table/row.htm +0 -157
  166. data/public/javascripts/tinymce/plugins/table/table.htm +0 -188
  167. data/public/javascripts/tinymce/plugins/template/blank.htm +0 -12
  168. data/public/javascripts/tinymce/plugins/template/css/template.css +0 -23
  169. data/public/javascripts/tinymce/plugins/template/editor_plugin.js +0 -1
  170. data/public/javascripts/tinymce/plugins/template/editor_plugin_src.js +0 -159
  171. data/public/javascripts/tinymce/plugins/template/js/template.js +0 -106
  172. data/public/javascripts/tinymce/plugins/template/langs/en_dlg.js +0 -15
  173. data/public/javascripts/tinymce/plugins/template/template.htm +0 -31
  174. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin.js +0 -1
  175. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +0 -83
  176. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin.js +0 -1
  177. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +0 -114
  178. data/public/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +0 -142
  179. data/public/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +0 -142
  180. data/public/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +0 -149
  181. data/public/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +0 -142
  182. data/public/javascripts/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -11
  183. data/public/javascripts/tinymce/plugins/xhtmlxtras/css/popup.css +0 -9
  184. data/public/javascripts/tinymce/plugins/xhtmlxtras/del.htm +0 -162
  185. data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -1
  186. data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
  187. data/public/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +0 -162
  188. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -28
  189. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -28
  190. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -125
  191. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/cite.js +0 -28
  192. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +0 -53
  193. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -229
  194. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +0 -53
  195. data/public/javascripts/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -32
  196. data/public/javascripts/tinymce/themes/advanced/about.htm +0 -52
  197. data/public/javascripts/tinymce/themes/advanced/anchor.htm +0 -26
  198. data/public/javascripts/tinymce/themes/advanced/charmap.htm +0 -51
  199. data/public/javascripts/tinymce/themes/advanced/color_picker.htm +0 -74
  200. data/public/javascripts/tinymce/themes/advanced/editor_template.js +0 -1
  201. data/public/javascripts/tinymce/themes/advanced/editor_template_src.js +0 -1360
  202. data/public/javascripts/tinymce/themes/advanced/image.htm +0 -80
  203. data/public/javascripts/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
  204. data/public/javascripts/tinymce/themes/advanced/img/flash.gif +0 -0
  205. data/public/javascripts/tinymce/themes/advanced/img/icons.gif +0 -0
  206. data/public/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
  207. data/public/javascripts/tinymce/themes/advanced/img/pagebreak.gif +0 -0
  208. data/public/javascripts/tinymce/themes/advanced/img/quicktime.gif +0 -0
  209. data/public/javascripts/tinymce/themes/advanced/img/realmedia.gif +0 -0
  210. data/public/javascripts/tinymce/themes/advanced/img/shockwave.gif +0 -0
  211. data/public/javascripts/tinymce/themes/advanced/img/trans.gif +0 -0
  212. data/public/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
  213. data/public/javascripts/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
  214. data/public/javascripts/tinymce/themes/advanced/js/about.js +0 -73
  215. data/public/javascripts/tinymce/themes/advanced/js/anchor.js +0 -42
  216. data/public/javascripts/tinymce/themes/advanced/js/charmap.js +0 -355
  217. data/public/javascripts/tinymce/themes/advanced/js/color_picker.js +0 -329
  218. data/public/javascripts/tinymce/themes/advanced/js/image.js +0 -247
  219. data/public/javascripts/tinymce/themes/advanced/js/link.js +0 -153
  220. data/public/javascripts/tinymce/themes/advanced/js/source_editor.js +0 -56
  221. data/public/javascripts/tinymce/themes/advanced/langs/en.js +0 -68
  222. data/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +0 -54
  223. data/public/javascripts/tinymce/themes/advanced/link.htm +0 -57
  224. data/public/javascripts/tinymce/themes/advanced/shortcuts.htm +0 -47
  225. data/public/javascripts/tinymce/themes/advanced/skins/default/content.css +0 -47
  226. data/public/javascripts/tinymce/themes/advanced/skins/default/dialog.css +0 -117
  227. data/public/javascripts/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
  228. data/public/javascripts/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
  229. data/public/javascripts/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  230. data/public/javascripts/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  231. data/public/javascripts/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
  232. data/public/javascripts/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
  233. data/public/javascripts/tinymce/themes/advanced/skins/default/ui.css +0 -213
  234. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +0 -23
  235. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -105
  236. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -101
  237. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +0 -46
  238. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -117
  239. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  240. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  241. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  242. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +0 -216
  243. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -8
  244. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
  245. data/public/javascripts/tinymce/themes/advanced/source_editor.htm +0 -25
  246. data/public/javascripts/tinymce/themes/simple/editor_template.js +0 -1
  247. data/public/javascripts/tinymce/themes/simple/editor_template_src.js +0 -84
  248. data/public/javascripts/tinymce/themes/simple/img/icons.gif +0 -0
  249. data/public/javascripts/tinymce/themes/simple/langs/en.js +0 -11
  250. data/public/javascripts/tinymce/themes/simple/skins/default/content.css +0 -25
  251. data/public/javascripts/tinymce/themes/simple/skins/default/ui.css +0 -32
  252. data/public/javascripts/tinymce/themes/simple/skins/o2k7/content.css +0 -17
  253. data/public/javascripts/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  254. data/public/javascripts/tinymce/themes/simple/skins/o2k7/ui.css +0 -35
  255. data/public/javascripts/tinymce/tiny_mce.js +0 -1
  256. data/public/javascripts/tinymce/tiny_mce_popup.js +0 -5
  257. data/public/javascripts/tinymce/tiny_mce_src.js +0 -15752
  258. data/public/javascripts/tinymce/utils/editable_selects.js +0 -70
  259. data/public/javascripts/tinymce/utils/form_utils.js +0 -210
  260. data/public/javascripts/tinymce/utils/mctabs.js +0 -162
  261. data/public/javascripts/tinymce/utils/validate.js +0 -252
@@ -1,497 +0,0 @@
1
- /**
2
- * fullpage.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- tinyMCEPopup.requireLangPack();
12
-
13
- var doc;
14
-
15
- var defaultDocTypes =
16
- 'XHTML 1.0 Transitional=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">,' +
17
- 'XHTML 1.0 Frameset=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">,' +
18
- 'XHTML 1.0 Strict=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">,' +
19
- 'XHTML 1.1=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">,' +
20
- 'HTML 4.01 Transitional=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">,' +
21
- 'HTML 4.01 Strict=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">,' +
22
- 'HTML 4.01 Frameset=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';
23
-
24
- var defaultEncodings =
25
- 'Western european (iso-8859-1)=iso-8859-1,' +
26
- 'Central European (iso-8859-2)=iso-8859-2,' +
27
- 'Unicode (UTF-8)=utf-8,' +
28
- 'Chinese traditional (Big5)=big5,' +
29
- 'Cyrillic (iso-8859-5)=iso-8859-5,' +
30
- 'Japanese (iso-2022-jp)=iso-2022-jp,' +
31
- 'Greek (iso-8859-7)=iso-8859-7,' +
32
- 'Korean (iso-2022-kr)=iso-2022-kr,' +
33
- 'ASCII (us-ascii)=us-ascii';
34
-
35
- var defaultMediaTypes =
36
- 'all=all,' +
37
- 'screen=screen,' +
38
- 'print=print,' +
39
- 'tty=tty,' +
40
- 'tv=tv,' +
41
- 'projection=projection,' +
42
- 'handheld=handheld,' +
43
- 'braille=braille,' +
44
- 'aural=aural';
45
-
46
- var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
47
- var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px';
48
-
49
- function init() {
50
- var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, dir, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style, xmlVer, xmlEnc, docType;
51
-
52
- // Setup doctype select box
53
- doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(',');
54
- for (i=0; i<doctypes.length; i++) {
55
- p = doctypes[i].split('=');
56
-
57
- if (p.length > 1)
58
- addSelectValue(f, 'doctypes', p[0], p[1]);
59
- }
60
-
61
- // Setup fonts select box
62
- fonts = ed.getParam("fullpage_fonts", defaultFontNames).split(';');
63
- for (i=0; i<fonts.length; i++) {
64
- p = fonts[i].split('=');
65
-
66
- if (p.length > 1)
67
- addSelectValue(f, 'fontface', p[0], p[1]);
68
- }
69
-
70
- // Setup fontsize select box
71
- fonts = ed.getParam("fullpage_fontsizes", defaultFontSizes).split(',');
72
- for (i=0; i<fonts.length; i++)
73
- addSelectValue(f, 'fontsize', fonts[i], fonts[i]);
74
-
75
- // Setup mediatype select boxs
76
- mediaTypes = ed.getParam("fullpage_media_types", defaultMediaTypes).split(',');
77
- for (i=0; i<mediaTypes.length; i++) {
78
- p = mediaTypes[i].split('=');
79
-
80
- if (p.length > 1) {
81
- addSelectValue(f, 'element_style_media', p[0], p[1]);
82
- addSelectValue(f, 'element_link_media', p[0], p[1]);
83
- }
84
- }
85
-
86
- // Setup encodings select box
87
- encodings = ed.getParam("fullpage_encodings", defaultEncodings).split(',');
88
- for (i=0; i<encodings.length; i++) {
89
- p = encodings[i].split('=');
90
-
91
- if (p.length > 1) {
92
- addSelectValue(f, 'docencoding', p[0], p[1]);
93
- addSelectValue(f, 'element_script_charset', p[0], p[1]);
94
- addSelectValue(f, 'element_link_charset', p[0], p[1]);
95
- }
96
- }
97
-
98
- document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
99
- document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color');
100
- //document.getElementById('hover_color_pickcontainer').innerHTML = getColorPickerHTML('hover_color_pick','hover_color');
101
- document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color');
102
- document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color');
103
- document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor');
104
- document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage');
105
- document.getElementById('link_href_pickcontainer').innerHTML = getBrowserHTML('link_href_browser','element_link_href','file','fullpage');
106
- document.getElementById('script_src_pickcontainer').innerHTML = getBrowserHTML('script_src_browser','element_script_src','file','fullpage');
107
- document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage');
108
-
109
- // Resize some elements
110
- if (isVisible('stylesheetbrowser'))
111
- document.getElementById('stylesheet').style.width = '220px';
112
-
113
- if (isVisible('link_href_browser'))
114
- document.getElementById('element_link_href').style.width = '230px';
115
-
116
- if (isVisible('bgimage_browser'))
117
- document.getElementById('bgimage').style.width = '210px';
118
-
119
- // Add iframe
120
- dom.add(document.body, 'iframe', {id : 'documentIframe', src : 'javascript:""', style : {display : 'none'}});
121
- doc = dom.get('documentIframe').contentWindow.document;
122
- h = tinyMCEPopup.getWindowArg('head_html');
123
-
124
- // Preprocess the HTML disable scripts and urls
125
- h = h.replace(/<script>/gi, '<script type="text/javascript">');
126
- h = h.replace(/type=([\"\'])?/gi, 'type=$1-mce-');
127
- h = h.replace(/(src=|href=)/g, 'data-mce-$1');
128
-
129
- // Write in the content in the iframe
130
- doc.write(h + '</body></html>');
131
- doc.close();
132
-
133
- // Parse xml and doctype
134
- xmlVer = getReItem(/<\?\s*?xml.*?version\s*?=\s*?"(.*?)".*?\?>/gi, h, 1);
135
- xmlEnc = getReItem(/<\?\s*?xml.*?encoding\s*?=\s*?"(.*?)".*?\?>/gi, h, 1);
136
- docType = getReItem(/<\!DOCTYPE.*?>/gi, h.replace(/\n/g, ''), 0).replace(/ +/g, ' ');
137
- f.langcode.value = getReItem(/lang="(.*?)"/gi, h, 1);
138
-
139
- // Get direction and inherit it from the html-tag too (according to w3c recommandation)
140
- dir = getReItem(/dir\s*=\s*["']([^"']*)["']/i, h, 1);
141
- if(doc.body.hasAttribute('dir') && (doc.body.getAttribute('dir') != ''))
142
- dir = doc.body.getAttribute('dir');
143
-
144
- // Parse title
145
- if (e = doc.getElementsByTagName('title')[0])
146
- el.metatitle.value = e.textContent || e.text;
147
-
148
- // Parse meta
149
- tinymce.each(doc.getElementsByTagName('meta'), function(n) {
150
- var na = (n.getAttribute('name', 2) || '').toLowerCase(), va = n.getAttribute('content', 2), eq = n.getAttribute('http-equiv', 2) || '';
151
-
152
- e = el['meta' + na];
153
-
154
- if (na == 'robots') {
155
- selectByValue(f, 'metarobots', tinymce.trim(va), true, true);
156
- return;
157
- }
158
-
159
- switch (eq.toLowerCase()) {
160
- case "content-type":
161
- tmp = getReItem(/charset\s*=\s*(.*)\s*/gi, va, 1);
162
-
163
- // Override XML encoding
164
- if (tmp != "")
165
- xmlEnc = tmp;
166
-
167
- return;
168
- }
169
-
170
- if (e)
171
- e.value = va;
172
- });
173
-
174
- selectByValue(f, 'doctypes', docType, true, true);
175
- selectByValue(f, 'docencoding', xmlEnc, true, true);
176
- selectByValue(f, 'langdir', dir, true, true);
177
-
178
- if (xmlVer != '')
179
- el.xml_pi.checked = true;
180
-
181
- // Parse appearance
182
-
183
- // Parse primary stylesheet
184
- tinymce.each(doc.getElementsByTagName("link"), function(l) {
185
- var m = l.getAttribute('media', 2) || '', t = l.getAttribute('type', 2) || '';
186
-
187
- if (t == "-mce-text/css" && (m == "" || m == "screen" || m == "all") && (l.getAttribute('rel', 2) || '') == "stylesheet") {
188
- f.stylesheet.value = l.getAttribute('data-mce-href', 2) || '';
189
- return false;
190
- }
191
- });
192
-
193
- // Get from style elements
194
- tinymce.each(doc.getElementsByTagName("style"), function(st) {
195
- var tmp = parseStyleElement(st);
196
-
197
- for (x=0; x<tmp.length; x++) {
198
- if (tmp[x].rule.indexOf('a:visited') != -1 && tmp[x].data['color'])
199
- f.visited_color.value = tmp[x].data['color'];
200
-
201
- if (tmp[x].rule.indexOf('a:link') != -1 && tmp[x].data['color'])
202
- f.link_color.value = tmp[x].data['color'];
203
-
204
- if (tmp[x].rule.indexOf('a:active') != -1 && tmp[x].data['color'])
205
- f.active_color.value = tmp[x].data['color'];
206
- }
207
- });
208
-
209
- f.textcolor.value = tinyMCEPopup.dom.getAttrib(doc.body, "text");
210
- f.active_color.value = tinyMCEPopup.dom.getAttrib(doc.body, "alink");
211
- f.link_color.value = tinyMCEPopup.dom.getAttrib(doc.body, "link");
212
- f.visited_color.value = tinyMCEPopup.dom.getAttrib(doc.body, "vlink");
213
- f.bgcolor.value = tinyMCEPopup.dom.getAttrib(doc.body, "bgcolor");
214
- f.bgimage.value = tinyMCEPopup.dom.getAttrib(doc.body, "background");
215
-
216
- // Get from style info
217
- style = tinyMCEPopup.dom.parseStyle(tinyMCEPopup.dom.getAttrib(doc.body, 'style'));
218
-
219
- if (style['font-family'])
220
- selectByValue(f, 'fontface', style['font-family'], true, true);
221
- else
222
- selectByValue(f, 'fontface', ed.getParam("fullpage_default_fontface", ""), true, true);
223
-
224
- if (style['font-size'])
225
- selectByValue(f, 'fontsize', style['font-size'], true, true);
226
- else
227
- selectByValue(f, 'fontsize', ed.getParam("fullpage_default_fontsize", ""), true, true);
228
-
229
- if (style['color'])
230
- f.textcolor.value = convertRGBToHex(style['color']);
231
-
232
- if (style['background-image'])
233
- f.bgimage.value = style['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
234
-
235
- if (style['background-color'])
236
- f.bgcolor.value = style['background-color'];
237
-
238
- if (style['margin']) {
239
- tmp = style['margin'].replace(/[^0-9 ]/g, '');
240
- tmp = tmp.split(/ +/);
241
- f.topmargin.value = tmp.length > 0 ? tmp[0] : '';
242
- f.rightmargin.value = tmp.length > 1 ? tmp[1] : tmp[0];
243
- f.bottommargin.value = tmp.length > 2 ? tmp[2] : tmp[0];
244
- f.leftmargin.value = tmp.length > 3 ? tmp[3] : tmp[0];
245
- }
246
-
247
- if (style['margin-left'])
248
- f.leftmargin.value = style['margin-left'].replace(/[^0-9]/g, '');
249
-
250
- if (style['margin-right'])
251
- f.rightmargin.value = style['margin-right'].replace(/[^0-9]/g, '');
252
-
253
- if (style['margin-top'])
254
- f.topmargin.value = style['margin-top'].replace(/[^0-9]/g, '');
255
-
256
- if (style['margin-bottom'])
257
- f.bottommargin.value = style['margin-bottom'].replace(/[^0-9]/g, '');
258
-
259
- f.style.value = tinyMCEPopup.dom.serializeStyle(style);
260
-
261
- // Update colors
262
- updateColor('textcolor_pick', 'textcolor');
263
- updateColor('bgcolor_pick', 'bgcolor');
264
- updateColor('visited_color_pick', 'visited_color');
265
- updateColor('active_color_pick', 'active_color');
266
- updateColor('link_color_pick', 'link_color');
267
- }
268
-
269
- function getReItem(r, s, i) {
270
- var c = r.exec(s);
271
-
272
- if (c && c.length > i)
273
- return c[i];
274
-
275
- return '';
276
- }
277
-
278
- function updateAction() {
279
- var f = document.forms[0], nl, i, h, v, s, head, html, l, tmp, addlink = true, ser;
280
-
281
- head = doc.getElementsByTagName('head')[0];
282
-
283
- // Fix scripts without a type
284
- nl = doc.getElementsByTagName('script');
285
- for (i=0; i<nl.length; i++) {
286
- if (tinyMCEPopup.dom.getAttrib(nl[i], 'data-mce-type') == '')
287
- nl[i].setAttribute('mce-type', 'text/javascript');
288
- }
289
-
290
- // Get primary stylesheet
291
- nl = doc.getElementsByTagName("link");
292
- for (i=0; i<nl.length; i++) {
293
- l = nl[i];
294
-
295
- tmp = tinyMCEPopup.dom.getAttrib(l, 'media');
296
-
297
- if (tinyMCEPopup.dom.getAttrib(l, 'data-mce-type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCEPopup.dom.getAttrib(l, 'rel') == "stylesheet") {
298
- addlink = false;
299
-
300
- if (f.stylesheet.value == '')
301
- l.parentNode.removeChild(l);
302
- else
303
- l.setAttribute('data-mce-href', f.stylesheet.value);
304
-
305
- break;
306
- }
307
- }
308
-
309
- // Add new link
310
- if (f.stylesheet.value != '') {
311
- l = doc.createElement('link');
312
-
313
- l.setAttribute('type', 'text/css');
314
- l.setAttribute('data-mce-href', f.stylesheet.value);
315
- l.setAttribute('rel', 'stylesheet');
316
-
317
- head.appendChild(l);
318
- }
319
-
320
- setMeta(head, 'keywords', f.metakeywords.value);
321
- setMeta(head, 'description', f.metadescription.value);
322
- setMeta(head, 'author', f.metaauthor.value);
323
- setMeta(head, 'copyright', f.metacopyright.value);
324
- setMeta(head, 'robots', getSelectValue(f, 'metarobots'));
325
- setMeta(head, 'Content-Type', getSelectValue(f, 'docencoding'));
326
-
327
- setAttr(doc.body, 'dir', getSelectValue(f, 'langdir'));
328
- doc.body.style.cssText = f.style.value;
329
-
330
- function setAttr(elm, name, value) {
331
- value = "" + value;
332
-
333
- if (value.length > 0)
334
- elm.setAttribute(name, value);
335
- else
336
- elm.removeAttribute(name, value);
337
- }
338
-
339
- setAttr(doc.body, 'vLink', f.visited_color.value);
340
- setAttr(doc.body, 'link', f.link_color.value);
341
- setAttr(doc.body, 'aLink', f.active_color.value);
342
-
343
- doc.body.style.fontFamily = getSelectValue(f, 'fontface');
344
- doc.body.style.fontSize = getSelectValue(f, 'fontsize');
345
- doc.body.style.backgroundColor = f.bgcolor.value;
346
-
347
- // Bug #4216: Using deprecated text attribute does not work in all browsers
348
- doc.body.style.color = f.textcolor.value;
349
- setAttr(doc.body, 'text', '');
350
-
351
- if (f.leftmargin.value != '')
352
- doc.body.style.marginLeft = f.leftmargin.value + 'px';
353
-
354
- if (f.rightmargin.value != '')
355
- doc.body.style.marginRight = f.rightmargin.value + 'px';
356
-
357
- if (f.bottommargin.value != '')
358
- doc.body.style.marginBottom = f.bottommargin.value + 'px';
359
-
360
- if (f.topmargin.value != '')
361
- doc.body.style.marginTop = f.topmargin.value + 'px';
362
-
363
- html = doc.getElementsByTagName('html')[0];
364
- setAttr(html, 'lang', f.langcode.value);
365
- setAttr(html, 'xml:lang', f.langcode.value);
366
-
367
- if (f.bgimage.value != '')
368
- doc.body.style.backgroundImage = "url('" + f.bgimage.value + "')";
369
- else
370
- doc.body.style.backgroundImage = '';
371
-
372
- ser = tinyMCEPopup.editor.plugins.fullpage._createSerializer();
373
- ser.setRules('-title,meta[http-equiv|name|content],base[href|target],link[href|rel|type|title|media],style[type],script[type|language|src],html[lang|xml::lang|xmlns],body[style|dir|vlink|link|text|alink],head');
374
-
375
- h = ser.serialize(doc.documentElement);
376
- h = h.substring(0, h.lastIndexOf('</body>'));
377
-
378
- if (h.indexOf('<title>') == -1 && f.metatitle.value)
379
- h = h.replace(/<head.*?>/, '$&\n' + '<title>' + tinyMCEPopup.dom.encode(f.metatitle.value) + '</title>');
380
- else if (f.metatitle.value)
381
- h = h.replace(/<title>(.*?)<\/title>/, '<title>' + tinyMCEPopup.dom.encode(f.metatitle.value) + '</title>');
382
- else
383
- h = h.replace(/<title>(.*?)<\/title>\n*/, '');
384
-
385
- if(v = f.langcode.value)
386
- htmlt = '<html lang="' + v + '" xml:lang="' + v + '">';
387
- else
388
- htmlt = '<html>';
389
-
390
- h = h.replace(/<html.*?>/, htmlt);
391
-
392
- if ((v = getSelectValue(f, 'doctypes')) != '')
393
- h = v + '\n' + h;
394
-
395
- if (f.xml_pi.checked) {
396
- s = '<?xml version="1.0"';
397
-
398
- if ((v = getSelectValue(f, 'docencoding')) != '')
399
- s += ' encoding="' + v + '"';
400
-
401
- s += '?>\n';
402
- h = s + h;
403
- }
404
-
405
- h = h.replace(/type=\"\-mce\-/gi, 'type="');
406
-
407
- tinyMCEPopup.editor.plugins.fullpage.head = h;
408
- tinyMCEPopup.editor.plugins.fullpage._setBodyAttribs(tinyMCEPopup.editor, {});
409
- tinyMCEPopup.close();
410
- }
411
-
412
- function changedStyleField(field) {
413
- }
414
-
415
- function setMeta(he, k, v) {
416
- var nl, i, m;
417
-
418
- nl = he.getElementsByTagName('meta');
419
- for (i=0; i<nl.length; i++) {
420
- if (k == 'Content-Type' && tinyMCEPopup.dom.getAttrib(nl[i], 'http-equiv') == k) {
421
- if (v == '')
422
- nl[i].parentNode.removeChild(nl[i]);
423
- else
424
- nl[i].setAttribute('content', "text/html; charset=" + v);
425
-
426
- return;
427
- }
428
-
429
- if (tinyMCEPopup.dom.getAttrib(nl[i], 'name') == k) {
430
- if (v == '')
431
- nl[i].parentNode.removeChild(nl[i]);
432
- else
433
- nl[i].setAttribute('content', v);
434
- return;
435
- }
436
- }
437
-
438
- if (v == '')
439
- return;
440
-
441
- m = doc.createElement('meta');
442
-
443
- if (k == 'Content-Type')
444
- m.httpEquiv = k;
445
- else
446
- m.setAttribute('name', k);
447
-
448
- m.setAttribute('content', v);
449
- he.appendChild(m);
450
- }
451
-
452
- function parseStyleElement(e) {
453
- var v = e.innerHTML;
454
- var p, i, r;
455
-
456
- v = v.replace(/<!--/gi, '');
457
- v = v.replace(/-->/gi, '');
458
- v = v.replace(/[\n\r]/gi, '');
459
- v = v.replace(/\s+/gi, ' ');
460
-
461
- r = [];
462
- p = v.split(/{|}/);
463
-
464
- for (i=0; i<p.length; i+=2) {
465
- if (p[i] != "")
466
- r[r.length] = {rule : tinymce.trim(p[i]), data : tinyMCEPopup.dom.parseStyle(p[i+1])};
467
- }
468
-
469
- return r;
470
- }
471
-
472
- function serializeStyleElement(d) {
473
- var i, s, st;
474
-
475
- s = '<!--\n';
476
-
477
- for (i=0; i<d.length; i++) {
478
- s += d[i].rule + ' {\n';
479
-
480
- st = tinyMCE.serializeStyle(d[i].data);
481
-
482
- if (st != '')
483
- st += ';';
484
-
485
- s += st.replace(/;/g, ';\n');
486
- s += '}\n';
487
-
488
- if (i != d.length - 1)
489
- s += '\n';
490
- }
491
-
492
- s += '\n-->';
493
-
494
- return s;
495
- }
496
-
497
- tinyMCEPopup.onInit.add(init);