gluttonberg-core 2.5.4 → 2.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (300) hide show
  1. data/app/assets/images/{arrow.png → gb_arrow.png} +0 -0
  2. data/app/assets/images/{bg.png → gb_bg.png} +0 -0
  3. data/app/assets/images/{button_bkg_grey.gif → gb_button_bkg_grey.gif} +0 -0
  4. data/app/assets/images/{drag_handle.png → gb_drag_handle.png} +0 -0
  5. data/app/assets/images/{icon_add.png → gb_icon_add.png} +0 -0
  6. data/app/assets/images/{icon_asset.png → gb_icon_asset.png} +0 -0
  7. data/app/assets/images/{icon_blog.png → gb_icon_blog.png} +0 -0
  8. data/app/assets/images/{icon_collection.png → gb_icon_collection.png} +0 -0
  9. data/app/assets/images/{icon_content.png → gb_icon_content.png} +0 -0
  10. data/app/assets/images/{icon_content_2.png → gb_icon_content_2.png} +0 -0
  11. data/app/assets/images/{icon_dash.png → gb_icon_dash.png} +0 -0
  12. data/app/assets/images/{icon_dashboard.png → gb_icon_dashboard.png} +0 -0
  13. data/app/assets/images/{icon_default.png → gb_icon_default.png} +0 -0
  14. data/app/assets/images/{icon_group.png → gb_icon_group.png} +0 -0
  15. data/app/assets/images/{icon_library.png → gb_icon_library.png} +0 -0
  16. data/app/assets/images/{icon_library_2.png → gb_icon_library_2.png} +0 -0
  17. data/app/assets/images/{icon_member.png → gb_icon_member.png} +0 -0
  18. data/app/assets/images/{icon_members.png → gb_icon_members.png} +0 -0
  19. data/app/assets/images/{icon_pages.png → gb_icon_pages.png} +0 -0
  20. data/app/assets/images/{icon_settings.png → gb_icon_settings.png} +0 -0
  21. data/app/assets/images/{icon_upload.png → gb_icon_upload.png} +0 -0
  22. data/app/assets/images/{page_content_fillin.gif → gb_page_content_fillin.gif} +0 -0
  23. data/app/assets/images/{paginator.gif → gb_paginator.gif} +0 -0
  24. data/app/assets/images/{row_divider.jpg → gb_row_divider.jpg} +0 -0
  25. data/app/assets/images/{spinner.gif → gb_spinner.gif} +0 -0
  26. data/app/assets/images/{spinner_for_dialouge.gif → gb_spinner_for_dialouge.gif} +0 -0
  27. data/app/assets/images/{sub_nav_back_bkg.gif → gb_sub_nav_back_bkg.gif} +0 -0
  28. data/app/assets/images/{subnav_bkg.gif → gb_subnav_bkg.gif} +0 -0
  29. data/app/assets/images/{table_head_bkg.gif → gb_table_head_bkg.gif} +0 -0
  30. data/app/assets/images/{wrapper_bkg.png → gb_wrapper_bkg.png} +0 -0
  31. data/app/assets/images/help/{help.jpg → gb_help.jpg} +0 -0
  32. data/app/assets/images/icons/{collapsed.png → gb_collapsed.png} +0 -0
  33. data/app/assets/images/icons/{expanded.png → gb_expanded.png} +0 -0
  34. data/app/assets/images/library/{back.gif → gb_back.gif} +0 -0
  35. data/app/assets/images/library/{dialog_overlay.png → gb_dialog_overlay.png} +0 -0
  36. data/app/assets/images/library/{inactive_tab.jpg → gb_inactive_tab.jpg} +0 -0
  37. data/app/assets/images/library/{search_icon.gif → gb_search_icon.gif} +0 -0
  38. data/app/assets/images/library/{sort_by_asc.png → gb_sort_by_asc.png} +0 -0
  39. data/app/assets/images/library/{sort_by_desc.png → gb_sort_by_desc.png} +0 -0
  40. data/app/assets/javascripts/{ajaxfileupload.js → gb_ajaxfileupload.js} +0 -0
  41. data/app/assets/javascripts/gb_application.js +30 -30
  42. data/app/assets/javascripts/{bootstrap-datepicker.js → gb_bootstrap-datepicker.js} +0 -0
  43. data/app/assets/javascripts/{bootstrap.js → gb_bootstrap.js} +0 -0
  44. data/app/assets/javascripts/{expander.js → gb_expander.js} +0 -0
  45. data/app/assets/javascripts/{jeditable.js → gb_jeditable.js} +0 -0
  46. data/app/assets/javascripts/{jquery-dragTree.js → gb_jquery-dragTree.js} +0 -0
  47. data/app/assets/javascripts/{jquery-tagarea.js → gb_jquery-tagarea.js} +0 -0
  48. data/app/assets/javascripts/jcrop/css/{Jcrop.gif → gb_Jcrop.gif} +0 -0
  49. data/app/assets/javascripts/jcrop/css/{jquery-Jcrop.css → gb_jquery-Jcrop.css} +1 -1
  50. data/app/assets/stylesheets/{admin-ie6.sass → gb_admin-ie6.sass} +0 -0
  51. data/app/assets/stylesheets/{admin-ie7.sass → gb_admin-ie7.sass} +1 -1
  52. data/app/assets/stylesheets/{admin-override.sass → gb_admin-override.sass} +22 -22
  53. data/app/assets/stylesheets/{bootstrap-responsive.css → gb_bootstrap-responsive.css} +0 -0
  54. data/app/assets/stylesheets/{bootstrap.css → gb_bootstrap.css} +0 -0
  55. data/app/views/gluttonberg/admin/asset_library/assets/_browser_root.html.haml +1 -1
  56. data/app/views/gluttonberg/admin/content/galleries/_images_list.html.haml +1 -1
  57. data/app/views/gluttonberg/admin/settings/generic_settings/index.html.haml +2 -2
  58. data/app/views/gluttonberg/admin/shared/delete.html.haml +8 -8
  59. data/app/views/gluttonberg/public/members/_form.html.haml +17 -18
  60. data/app/views/gluttonberg/public/members/edit.html.haml +18 -18
  61. data/app/views/gluttonberg/public/members/show.html.haml +8 -8
  62. data/app/views/gluttonberg/public/pages/restrict_site_access.html.haml +12 -12
  63. data/app/views/layouts/bare.html.haml +5 -5
  64. data/app/views/layouts/gluttonberg.html.haml +4 -4
  65. data/lib/generators/gluttonberg/resource/templates/backend_view_index.html.haml +2 -0
  66. data/lib/gluttonberg/version.rb +1 -1
  67. metadata +55 -288
  68. data/app/assets/images/content/blogs.png +0 -0
  69. data/app/assets/images/content/pages.png +0 -0
  70. data/app/assets/images/form/field_bg.jpg +0 -0
  71. data/app/assets/images/form/field_bg_active.jpg +0 -0
  72. data/app/assets/images/form/input_bkg.gif +0 -0
  73. data/app/assets/images/form/input_bkg.jpg +0 -0
  74. data/app/assets/images/form/login_bg.png +0 -0
  75. data/app/assets/images/form/login_form_bg.jpg +0 -0
  76. data/app/assets/images/form/plus_and_minus.gif +0 -0
  77. data/app/assets/images/form/warning.gif +0 -0
  78. data/app/assets/images/icons/cross.png +0 -0
  79. data/app/assets/images/icons/folder.png +0 -0
  80. data/app/assets/images/icons/symbol-add.png +0 -0
  81. data/app/assets/images/library/all.png +0 -0
  82. data/app/assets/images/library/audio.png +0 -0
  83. data/app/assets/images/library/icon_document.jpg +0 -0
  84. data/app/assets/images/library/image.png +0 -0
  85. data/app/assets/images/library/other.png +0 -0
  86. data/app/assets/images/library/video.png +0 -0
  87. data/app/assets/images/settings/config.png +0 -0
  88. data/app/assets/images/settings/locale.jpg +0 -0
  89. data/app/assets/images/settings/stylesheet.gif +0 -0
  90. data/app/assets/images/settings/users.png +0 -0
  91. data/app/assets/images/sidebar/icon_content.png +0 -0
  92. data/app/assets/images/sidebar/icon_dashboard.png +0 -0
  93. data/app/assets/images/sidebar/icon_feedback.png +0 -0
  94. data/app/assets/images/sidebar/icon_library.png +0 -0
  95. data/app/assets/images/sidebar/icon_settings.png +0 -0
  96. data/app/assets/images/sidebar/menu_active.jpg +0 -0
  97. data/app/assets/images/sidebar/menu_expanded_bg.jpg +0 -0
  98. data/app/assets/images/sidebar/menu_off.jpg +0 -0
  99. data/app/assets/images/sidebar/menu_over.jpg +0 -0
  100. data/app/assets/images/sidebar/nav_closed.png +0 -0
  101. data/app/assets/images/sidebar/nav_open.png +0 -0
  102. data/app/assets/javascripts/bootstrap.min.js +0 -1
  103. data/app/assets/javascripts/jcrop/MIT-LICENSE.txt +0 -22
  104. data/app/assets/javascripts/jcrop/build/LICENSE +0 -7
  105. data/app/assets/javascripts/jcrop/build/README +0 -11
  106. data/app/assets/javascripts/jcrop/build/minimize.bash +0 -10
  107. data/app/assets/javascripts/jcrop/build/pre-commit.bash +0 -11
  108. data/app/assets/javascripts/jcrop/demos/crop.php +0 -106
  109. data/app/assets/javascripts/jcrop/demos/demo_files/demos.css +0 -36
  110. data/app/assets/javascripts/jcrop/demos/demo_files/flowers.jpg +0 -0
  111. data/app/assets/javascripts/jcrop/demos/demo_files/sago.jpg +0 -0
  112. data/app/assets/javascripts/jcrop/demos/demo_files/sagomod.jpg +0 -0
  113. data/app/assets/javascripts/jcrop/demos/demo_files/sagomod.png +0 -0
  114. data/app/assets/javascripts/jcrop/demos/tutorial1.html +0 -47
  115. data/app/assets/javascripts/jcrop/demos/tutorial2.html +0 -94
  116. data/app/assets/javascripts/jcrop/demos/tutorial3.html +0 -94
  117. data/app/assets/javascripts/jcrop/demos/tutorial4.html +0 -154
  118. data/app/assets/javascripts/jcrop/demos/tutorial5.html +0 -240
  119. data/app/assets/javascripts/jcrop/index.html +0 -63
  120. data/app/assets/javascripts/jcrop/js/jquery.Jcrop.js +0 -1605
  121. data/app/assets/javascripts/jcrop/js/jquery.color.js +0 -123
  122. data/app/assets/javascripts/jcrop/js/jquery.min.js +0 -18
  123. data/app/assets/javascripts/jquery-1-4-2-min.js +0 -154
  124. data/app/assets/javascripts/jquery-ui-1-8-1-custom-min.js +0 -756
  125. data/app/assets/javascripts/jquery-ui-1-8-18-custom-min.js +0 -356
  126. data/app/assets/javascripts/jquery-ui-1-8-18-custom2-min.js +0 -266
  127. data/app/assets/javascripts/jquery-ui-datetimepicker-min.js +0 -1060
  128. data/app/assets/javascripts/tiny_mce/license.txt +0 -504
  129. data/app/assets/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +0 -57
  130. data/app/assets/javascripts/tiny_mce/plugins/advimage/css/advimage.css +0 -13
  131. data/app/assets/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +0 -1
  132. data/app/assets/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +0 -50
  133. data/app/assets/javascripts/tiny_mce/plugins/advimage/image.htm +0 -235
  134. data/app/assets/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  135. data/app/assets/javascripts/tiny_mce/plugins/advimage/js/image.js +0 -458
  136. data/app/assets/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +0 -45
  137. data/app/assets/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +0 -61
  138. data/app/assets/javascripts/tiny_mce/plugins/advlist/editor_plugin_src.js +0 -161
  139. data/app/assets/javascripts/tiny_mce/plugins/autolink/editor_plugin_src.js +0 -172
  140. data/app/assets/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +0 -1
  141. data/app/assets/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +0 -137
  142. data/app/assets/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +0 -1
  143. data/app/assets/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +0 -431
  144. data/app/assets/javascripts/tiny_mce/plugins/autosave/langs/en.js +0 -4
  145. data/app/assets/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +0 -1
  146. data/app/assets/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +0 -120
  147. data/app/assets/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +0 -1
  148. data/app/assets/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +0 -160
  149. data/app/assets/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +0 -1
  150. data/app/assets/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +0 -82
  151. data/app/assets/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +0 -1
  152. data/app/assets/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +0 -43
  153. data/app/assets/javascripts/tiny_mce/plugins/emotions/emotions.htm +0 -41
  154. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  155. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  156. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  157. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  158. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  159. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  160. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  161. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  162. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  163. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  164. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  165. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  166. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  167. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  168. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  169. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  170. data/app/assets/javascripts/tiny_mce/plugins/emotions/js/emotions.js +0 -22
  171. data/app/assets/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +0 -20
  172. data/app/assets/javascripts/tiny_mce/plugins/example/dialog.htm +0 -22
  173. data/app/assets/javascripts/tiny_mce/plugins/example/editor_plugin.js +0 -1
  174. data/app/assets/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +0 -84
  175. data/app/assets/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
  176. data/app/assets/javascripts/tiny_mce/plugins/example/js/dialog.js +0 -19
  177. data/app/assets/javascripts/tiny_mce/plugins/example/langs/en.js +0 -3
  178. data/app/assets/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +0 -3
  179. data/app/assets/javascripts/tiny_mce/plugins/example_dependency/editor_plugin.js +0 -1
  180. data/app/assets/javascripts/tiny_mce/plugins/example_dependency/editor_plugin_src.js +0 -50
  181. data/app/assets/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +0 -143
  182. data/app/assets/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +0 -1
  183. data/app/assets/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +0 -399
  184. data/app/assets/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +0 -259
  185. data/app/assets/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +0 -232
  186. data/app/assets/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +0 -85
  187. data/app/assets/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +0 -159
  188. data/app/assets/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +0 -1
  189. data/app/assets/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +0 -54
  190. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +0 -696
  191. data/app/assets/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +0 -83
  192. data/app/assets/javascripts/tiny_mce/plugins/layer/editor_plugin.js +0 -1
  193. data/app/assets/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +0 -214
  194. data/app/assets/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +0 -1
  195. data/app/assets/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +0 -139
  196. data/app/assets/javascripts/tiny_mce/plugins/lists/editor_plugin_src.js +0 -688
  197. data/app/assets/javascripts/tiny_mce/plugins/media/css/media.css +0 -17
  198. data/app/assets/javascripts/tiny_mce/plugins/media/editor_plugin.js +0 -1
  199. data/app/assets/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +0 -777
  200. data/app/assets/javascripts/tiny_mce/plugins/media/js/embed.js +0 -73
  201. data/app/assets/javascripts/tiny_mce/plugins/media/js/media.js +0 -355
  202. data/app/assets/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +0 -109
  203. data/app/assets/javascripts/tiny_mce/plugins/media/media.htm +0 -812
  204. data/app/assets/javascripts/tiny_mce/plugins/media/moxieplayer.swf +0 -0
  205. data/app/assets/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +0 -1
  206. data/app/assets/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +0 -53
  207. data/app/assets/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +0 -1
  208. data/app/assets/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +0 -92
  209. data/app/assets/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +0 -1
  210. data/app/assets/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +0 -74
  211. data/app/assets/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +0 -941
  212. data/app/assets/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +0 -53
  213. data/app/assets/javascripts/tiny_mce/plugins/preview/example.html +0 -28
  214. data/app/assets/javascripts/tiny_mce/plugins/print/editor_plugin.js +0 -1
  215. data/app/assets/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +0 -34
  216. data/app/assets/javascripts/tiny_mce/plugins/save/editor_plugin.js +0 -1
  217. data/app/assets/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +0 -101
  218. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +0 -6
  219. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +0 -1
  220. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +0 -61
  221. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +0 -142
  222. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +0 -16
  223. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +0 -100
  224. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/css/content.css +0 -1
  225. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +0 -1
  226. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +0 -434
  227. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
  228. data/app/assets/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +0 -55
  229. data/app/assets/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +0 -1
  230. data/app/assets/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +0 -114
  231. data/app/assets/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +0 -1209
  232. data/app/assets/javascripts/tiny_mce/plugins/template/blank.htm +0 -12
  233. data/app/assets/javascripts/tiny_mce/plugins/template/css/template.css +0 -23
  234. data/app/assets/javascripts/tiny_mce/plugins/template/editor_plugin.js +0 -1
  235. data/app/assets/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +0 -159
  236. data/app/assets/javascripts/tiny_mce/plugins/template/js/template.js +0 -106
  237. data/app/assets/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +0 -15
  238. data/app/assets/javascripts/tiny_mce/plugins/template/template.htm +0 -31
  239. data/app/assets/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +0 -1
  240. data/app/assets/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +0 -83
  241. data/app/assets/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +0 -114
  242. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +0 -142
  243. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +0 -142
  244. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +0 -149
  245. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +0 -142
  246. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +0 -11
  247. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +0 -9
  248. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +0 -162
  249. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +0 -1
  250. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
  251. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +0 -162
  252. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +0 -28
  253. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +0 -28
  254. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +0 -111
  255. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +0 -28
  256. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +0 -53
  257. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +0 -229
  258. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +0 -53
  259. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +0 -32
  260. data/app/assets/javascripts/tiny_mce/themes/advanced/about.htm +0 -52
  261. data/app/assets/javascripts/tiny_mce/themes/advanced/charmap.htm +0 -51
  262. data/app/assets/javascripts/tiny_mce/themes/advanced/color_picker.htm +0 -74
  263. data/app/assets/javascripts/tiny_mce/themes/advanced/image.htm +0 -80
  264. data/app/assets/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  265. data/app/assets/javascripts/tiny_mce/themes/advanced/img/flash.gif +0 -0
  266. data/app/assets/javascripts/tiny_mce/themes/advanced/img/iframe.gif +0 -0
  267. data/app/assets/javascripts/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
  268. data/app/assets/javascripts/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
  269. data/app/assets/javascripts/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
  270. data/app/assets/javascripts/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
  271. data/app/assets/javascripts/tiny_mce/themes/advanced/img/video.gif +0 -0
  272. data/app/assets/javascripts/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
  273. data/app/assets/javascripts/tiny_mce/themes/advanced/js/about.js +0 -73
  274. data/app/assets/javascripts/tiny_mce/themes/advanced/js/charmap.js +0 -355
  275. data/app/assets/javascripts/tiny_mce/themes/advanced/js/color_picker.js +0 -329
  276. data/app/assets/javascripts/tiny_mce/themes/advanced/js/image.js +0 -247
  277. data/app/assets/javascripts/tiny_mce/themes/advanced/link.htm +0 -57
  278. data/app/assets/javascripts/tiny_mce/themes/advanced/shortcuts.htm +0 -47
  279. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/content.css +0 -23
  280. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +0 -105
  281. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/ui.css +0 -102
  282. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +0 -46
  283. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +0 -117
  284. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  285. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  286. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  287. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +0 -217
  288. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +0 -8
  289. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
  290. data/app/assets/javascripts/tiny_mce/themes/simple/editor_template.js +0 -1
  291. data/app/assets/javascripts/tiny_mce/themes/simple/editor_template_src.js +0 -84
  292. data/app/assets/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
  293. data/app/assets/javascripts/tiny_mce/themes/simple/langs/en.js +0 -11
  294. data/app/assets/javascripts/tiny_mce/themes/simple/skins/default/content.css +0 -25
  295. data/app/assets/javascripts/tiny_mce/themes/simple/skins/default/ui.css +0 -32
  296. data/app/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +0 -17
  297. data/app/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  298. data/app/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +0 -35
  299. data/app/assets/javascripts/tiny_mce/tiny_mce_src.js +0 -15216
  300. data/app/assets/stylesheets/admin.sass +0 -2919
@@ -1,941 +0,0 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- var each = tinymce.each,
13
- defs = {
14
- paste_auto_cleanup_on_paste : true,
15
- paste_enable_default_filters : true,
16
- paste_block_drop : false,
17
- paste_retain_style_properties : "none",
18
- paste_strip_class_attributes : "mso",
19
- paste_remove_spans : false,
20
- paste_remove_styles : false,
21
- paste_remove_styles_if_webkit : true,
22
- paste_convert_middot_lists : true,
23
- paste_convert_headers_to_strong : false,
24
- paste_dialog_width : "450",
25
- paste_dialog_height : "400",
26
- paste_text_use_dialog : false,
27
- paste_text_sticky : false,
28
- paste_text_sticky_default : false,
29
- paste_text_notifyalways : false,
30
- paste_text_linebreaktype : "p",
31
- paste_text_replacements : [
32
- [/\u2026/g, "..."],
33
- [/[\x93\x94\u201c\u201d]/g, '"'],
34
- [/[\x60\x91\x92\u2018\u2019]/g, "'"]
35
- ]
36
- };
37
-
38
- function getParam(ed, name) {
39
- return ed.getParam(name, defs[name]);
40
- }
41
-
42
- tinymce.create('tinymce.plugins.PastePlugin', {
43
- init : function(ed, url) {
44
- var t = this;
45
-
46
- t.editor = ed;
47
- t.url = url;
48
-
49
- // Setup plugin events
50
- t.onPreProcess = new tinymce.util.Dispatcher(t);
51
- t.onPostProcess = new tinymce.util.Dispatcher(t);
52
-
53
- // Register default handlers
54
- t.onPreProcess.add(t._preProcess);
55
- t.onPostProcess.add(t._postProcess);
56
-
57
- // Register optional preprocess handler
58
- t.onPreProcess.add(function(pl, o) {
59
- ed.execCallback('paste_preprocess', pl, o);
60
- });
61
-
62
- // Register optional postprocess
63
- t.onPostProcess.add(function(pl, o) {
64
- ed.execCallback('paste_postprocess', pl, o);
65
- });
66
-
67
- ed.onKeyDown.addToTop(function(ed, e) {
68
- // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that
69
- if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
70
- return false; // Stop other listeners
71
- });
72
-
73
- // Initialize plain text flag
74
- ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default');
75
-
76
- // This function executes the process handlers and inserts the contents
77
- // force_rich overrides plain text mode set by user, important for pasting with execCommand
78
- function process(o, force_rich) {
79
- var dom = ed.dom, rng;
80
-
81
- // Execute pre process handlers
82
- t.onPreProcess.dispatch(t, o);
83
-
84
- // Create DOM structure
85
- o.node = dom.create('div', 0, o.content);
86
-
87
- // If pasting inside the same element and the contents is only one block
88
- // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element
89
- if (tinymce.isGecko) {
90
- rng = ed.selection.getRng(true);
91
- if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) {
92
- // Is only one block node and it doesn't contain word stuff
93
- if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1)
94
- dom.remove(o.node.firstChild, true);
95
- }
96
- }
97
-
98
- // Execute post process handlers
99
- t.onPostProcess.dispatch(t, o);
100
-
101
- // Serialize content
102
- o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''});
103
-
104
- // Plain text option active?
105
- if ((!force_rich) && (ed.pasteAsPlainText)) {
106
- t._insertPlainText(ed, dom, o.content);
107
-
108
- if (!getParam(ed, "paste_text_sticky")) {
109
- ed.pasteAsPlainText = false;
110
- ed.controlManager.setActive("pastetext", false);
111
- }
112
- } else {
113
- t._insert(o.content);
114
- }
115
- }
116
-
117
- // Add command for external usage
118
- ed.addCommand('mceInsertClipboardContent', function(u, o) {
119
- process(o, true);
120
- });
121
-
122
- if (!getParam(ed, "paste_text_use_dialog")) {
123
- ed.addCommand('mcePasteText', function(u, v) {
124
- var cookie = tinymce.util.Cookie;
125
-
126
- ed.pasteAsPlainText = !ed.pasteAsPlainText;
127
- ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
128
-
129
- if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
130
- if (getParam(ed, "paste_text_sticky")) {
131
- ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
132
- } else {
133
- ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
134
- }
135
-
136
- if (!getParam(ed, "paste_text_notifyalways")) {
137
- cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31))
138
- }
139
- }
140
- });
141
- }
142
-
143
- ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
144
- ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
145
-
146
- // This function grabs the contents from the clipboard by adding a
147
- // hidden div and placing the caret inside it and after the browser paste
148
- // is done it grabs that contents and processes that
149
- function grabContent(e) {
150
- var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent;
151
-
152
- // Check if browser supports direct plaintext access
153
- if (e.clipboardData || dom.doc.dataTransfer) {
154
- textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text');
155
-
156
- if (ed.pasteAsPlainText) {
157
- e.preventDefault();
158
- process({content : textContent.replace(/\r?\n/g, '<br />')});
159
- return;
160
- }
161
- }
162
-
163
- if (dom.get('_mcePaste'))
164
- return;
165
-
166
- // Create container to paste into
167
- n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF');
168
-
169
- // If contentEditable mode we need to find out the position of the closest element
170
- if (body != ed.getDoc().body)
171
- posY = dom.getPos(ed.selection.getStart(), body).y;
172
- else
173
- posY = body.scrollTop + dom.getViewPort(ed.getWin()).y;
174
-
175
- // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles
176
- // If also needs to be in view on IE or the paste would fail
177
- dom.setStyles(n, {
178
- position : 'absolute',
179
- left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div
180
- top : posY - 25,
181
- width : 1,
182
- height : 1,
183
- overflow : 'hidden'
184
- });
185
-
186
- if (tinymce.isIE) {
187
- // Store away the old range
188
- oldRng = sel.getRng();
189
-
190
- // Select the container
191
- rng = dom.doc.body.createTextRange();
192
- rng.moveToElementText(n);
193
- rng.execCommand('Paste');
194
-
195
- // Remove container
196
- dom.remove(n);
197
-
198
- // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due
199
- // to IE security settings so we pass the junk though better than nothing right
200
- if (n.innerHTML === '\uFEFF\uFEFF') {
201
- ed.execCommand('mcePasteWord');
202
- e.preventDefault();
203
- return;
204
- }
205
-
206
- // Restore the old range and clear the contents before pasting
207
- sel.setRng(oldRng);
208
- sel.setContent('');
209
-
210
- // For some odd reason we need to detach the the mceInsertContent call from the paste event
211
- // It's like IE has a reference to the parent element that you paste in and the selection gets messed up
212
- // when it tries to restore the selection
213
- setTimeout(function() {
214
- // Process contents
215
- process({content : n.innerHTML});
216
- }, 0);
217
-
218
- // Block the real paste event
219
- return tinymce.dom.Event.cancel(e);
220
- } else {
221
- function block(e) {
222
- e.preventDefault();
223
- };
224
-
225
- // Block mousedown and click to prevent selection change
226
- dom.bind(ed.getDoc(), 'mousedown', block);
227
- dom.bind(ed.getDoc(), 'keydown', block);
228
-
229
- or = ed.selection.getRng();
230
-
231
- // Move select contents inside DIV
232
- n = n.firstChild;
233
- rng = ed.getDoc().createRange();
234
- rng.setStart(n, 0);
235
- rng.setEnd(n, 2);
236
- sel.setRng(rng);
237
-
238
- // Wait a while and grab the pasted contents
239
- window.setTimeout(function() {
240
- var h = '', nl;
241
-
242
- // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit
243
- if (!dom.select('div.mcePaste > div.mcePaste').length) {
244
- nl = dom.select('div.mcePaste');
245
-
246
- // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
247
- each(nl, function(n) {
248
- var child = n.firstChild;
249
-
250
- // WebKit inserts a DIV container with lots of odd styles
251
- if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) {
252
- dom.remove(child, 1);
253
- }
254
-
255
- // Remove apply style spans
256
- each(dom.select('span.Apple-style-span', n), function(n) {
257
- dom.remove(n, 1);
258
- });
259
-
260
- // Remove bogus br elements
261
- each(dom.select('br[data-mce-bogus]', n), function(n) {
262
- dom.remove(n);
263
- });
264
-
265
- // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV
266
- if (n.parentNode.className != 'mcePaste')
267
- h += n.innerHTML;
268
- });
269
- } else {
270
- // Found WebKit weirdness so force the content into plain text mode
271
- h = '<pre>' + dom.encode(textContent).replace(/\r?\n/g, '<br />') + '</pre>';
272
- }
273
-
274
- // Remove the nodes
275
- each(dom.select('div.mcePaste'), function(n) {
276
- dom.remove(n);
277
- });
278
-
279
- // Restore the old selection
280
- if (or)
281
- sel.setRng(or);
282
-
283
- process({content : h});
284
-
285
- // Unblock events ones we got the contents
286
- dom.unbind(ed.getDoc(), 'mousedown', block);
287
- dom.unbind(ed.getDoc(), 'keydown', block);
288
- }, 0);
289
- }
290
- }
291
-
292
- // Check if we should use the new auto process method
293
- if (getParam(ed, "paste_auto_cleanup_on_paste")) {
294
- // Is it's Opera or older FF use key handler
295
- if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
296
- ed.onKeyDown.addToTop(function(ed, e) {
297
- if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
298
- grabContent(e);
299
- });
300
- } else {
301
- // Grab contents on paste event on Gecko and WebKit
302
- ed.onPaste.addToTop(function(ed, e) {
303
- return grabContent(e);
304
- });
305
- }
306
- }
307
-
308
- ed.onInit.add(function() {
309
- ed.controlManager.setActive("pastetext", ed.pasteAsPlainText);
310
-
311
- // Block all drag/drop events
312
- if (getParam(ed, "paste_block_drop")) {
313
- ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
314
- e.preventDefault();
315
- e.stopPropagation();
316
-
317
- return false;
318
- });
319
- }
320
- });
321
-
322
- // Add legacy support
323
- t._legacySupport();
324
- },
325
-
326
- getInfo : function() {
327
- return {
328
- longname : 'Paste text/word',
329
- author : 'Moxiecode Systems AB',
330
- authorurl : 'http://tinymce.moxiecode.com',
331
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
332
- version : tinymce.majorVersion + "." + tinymce.minorVersion
333
- };
334
- },
335
-
336
- _preProcess : function(pl, o) {
337
- var ed = this.editor,
338
- h = o.content,
339
- grep = tinymce.grep,
340
- explode = tinymce.explode,
341
- trim = tinymce.trim,
342
- len, stripClass;
343
-
344
- //console.log('Before preprocess:' + o.content);
345
-
346
- function process(items) {
347
- each(items, function(v) {
348
- // Remove or replace
349
- if (v.constructor == RegExp)
350
- h = h.replace(v, '');
351
- else
352
- h = h.replace(v[0], v[1]);
353
- });
354
- }
355
-
356
- if (ed.settings.paste_enable_default_filters == false) {
357
- return;
358
- }
359
-
360
- // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
361
- if (tinymce.isIE && document.documentMode >= 9) {
362
- // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
363
- process([[/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g, '$1']]);
364
-
365
- // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break
366
- process([
367
- [/<br><br>/g, '<BR><BR>'], // Replace multiple BR elements with uppercase BR to keep them intact
368
- [/<br>/g, ' '], // Replace single br elements with space since they are word wrap BR:s
369
- [/<BR><BR>/g, '<br>'], // Replace back the double brs but into a single BR
370
- ]);
371
- }
372
-
373
- // Detect Word content and process it more aggressive
374
- if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
375
- o.wordContent = true; // Mark the pasted contents as word specific content
376
- //console.log('Word contents detected.');
377
-
378
- // Process away some basic content
379
- process([
380
- /^\s*(&nbsp;)+/gi, // &nbsp; entities at the start of contents
381
- /(&nbsp;|<br[^>]*>)+\s*$/gi // &nbsp; entities at the end of contents
382
- ]);
383
-
384
- if (getParam(ed, "paste_convert_headers_to_strong")) {
385
- h = h.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>");
386
- }
387
-
388
- if (getParam(ed, "paste_convert_middot_lists")) {
389
- process([
390
- [/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
391
- [/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers
392
- [/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF)
393
- ]);
394
- }
395
-
396
- process([
397
- // Word comments like conditional comments etc
398
- /<!--[\s\S]+?-->/gi,
399
-
400
- // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
401
- /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
402
-
403
- // Convert <s> into <strike> for line-though
404
- [/<(\/?)s>/gi, "<$1strike>"],
405
-
406
- // Replace nsbp entites to char since it's easier to handle
407
- [/&nbsp;/gi, "\u00a0"]
408
- ]);
409
-
410
- // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
411
- // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
412
- do {
413
- len = h.length;
414
- h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
415
- } while (len != h.length);
416
-
417
- // Remove all spans if no styles is to be retained
418
- if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
419
- h = h.replace(/<\/?span[^>]*>/gi, "");
420
- } else {
421
- // We're keeping styles, so at least clean them up.
422
- // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
423
-
424
- process([
425
- // Convert <span style="mso-spacerun:yes">___</span> to string of alternating breaking/non-breaking spaces of same length
426
- [/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
427
- function(str, spaces) {
428
- return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
429
- }
430
- ],
431
-
432
- // Examine all styles: delete junk, transform some, and keep the rest
433
- [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
434
- function(str, tag, style) {
435
- var n = [],
436
- i = 0,
437
- s = explode(trim(style).replace(/&quot;/gi, "'"), ";");
438
-
439
- // Examine each style definition within the tag's style attribute
440
- each(s, function(v) {
441
- var name, value,
442
- parts = explode(v, ":");
443
-
444
- function ensureUnits(v) {
445
- return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
446
- }
447
-
448
- if (parts.length == 2) {
449
- name = parts[0].toLowerCase();
450
- value = parts[1].toLowerCase();
451
-
452
- // Translate certain MS Office styles into their CSS equivalents
453
- switch (name) {
454
- case "mso-padding-alt":
455
- case "mso-padding-top-alt":
456
- case "mso-padding-right-alt":
457
- case "mso-padding-bottom-alt":
458
- case "mso-padding-left-alt":
459
- case "mso-margin-alt":
460
- case "mso-margin-top-alt":
461
- case "mso-margin-right-alt":
462
- case "mso-margin-bottom-alt":
463
- case "mso-margin-left-alt":
464
- case "mso-table-layout-alt":
465
- case "mso-height":
466
- case "mso-width":
467
- case "mso-vertical-align-alt":
468
- n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
469
- return;
470
-
471
- case "horiz-align":
472
- n[i++] = "text-align:" + value;
473
- return;
474
-
475
- case "vert-align":
476
- n[i++] = "vertical-align:" + value;
477
- return;
478
-
479
- case "font-color":
480
- case "mso-foreground":
481
- n[i++] = "color:" + value;
482
- return;
483
-
484
- case "mso-background":
485
- case "mso-highlight":
486
- n[i++] = "background:" + value;
487
- return;
488
-
489
- case "mso-default-height":
490
- n[i++] = "min-height:" + ensureUnits(value);
491
- return;
492
-
493
- case "mso-default-width":
494
- n[i++] = "min-width:" + ensureUnits(value);
495
- return;
496
-
497
- case "mso-padding-between-alt":
498
- n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
499
- return;
500
-
501
- case "text-line-through":
502
- if ((value == "single") || (value == "double")) {
503
- n[i++] = "text-decoration:line-through";
504
- }
505
- return;
506
-
507
- case "mso-zero-height":
508
- if (value == "yes") {
509
- n[i++] = "display:none";
510
- }
511
- return;
512
- }
513
-
514
- // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
515
- if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) {
516
- return;
517
- }
518
-
519
- // If it reached this point, it must be a valid CSS style
520
- n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case
521
- }
522
- });
523
-
524
- // If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
525
- if (i > 0) {
526
- return tag + ' style="' + n.join(';') + '"';
527
- } else {
528
- return tag;
529
- }
530
- }
531
- ]
532
- ]);
533
- }
534
- }
535
-
536
- // Replace headers with <strong>
537
- if (getParam(ed, "paste_convert_headers_to_strong")) {
538
- process([
539
- [/<h[1-6][^>]*>/gi, "<p><strong>"],
540
- [/<\/h[1-6][^>]*>/gi, "</strong></p>"]
541
- ]);
542
- }
543
-
544
- process([
545
- // Copy paste from Java like Open Office will produce this junk on FF
546
- [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, '']
547
- ]);
548
-
549
- // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso").
550
- // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
551
- stripClass = getParam(ed, "paste_strip_class_attributes");
552
-
553
- if (stripClass !== "none") {
554
- function removeClasses(match, g1) {
555
- if (stripClass === "all")
556
- return '';
557
-
558
- var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
559
- function(v) {
560
- return (/^(?!mso)/i.test(v));
561
- }
562
- );
563
-
564
- return cls.length ? ' class="' + cls.join(" ") + '"' : '';
565
- };
566
-
567
- h = h.replace(/ class="([^"]+)"/gi, removeClasses);
568
- h = h.replace(/ class=([\-\w]+)/gi, removeClasses);
569
- }
570
-
571
- // Remove spans option
572
- if (getParam(ed, "paste_remove_spans")) {
573
- h = h.replace(/<\/?span[^>]*>/gi, "");
574
- }
575
-
576
- //console.log('After preprocess:' + h);
577
-
578
- o.content = h;
579
- },
580
-
581
- /**
582
- * Various post process items.
583
- */
584
- _postProcess : function(pl, o) {
585
- var t = this, ed = t.editor, dom = ed.dom, styleProps;
586
-
587
- if (ed.settings.paste_enable_default_filters == false) {
588
- return;
589
- }
590
-
591
- if (o.wordContent) {
592
- // Remove named anchors or TOC links
593
- each(dom.select('a', o.node), function(a) {
594
- if (!a.href || a.href.indexOf('#_Toc') != -1)
595
- dom.remove(a, 1);
596
- });
597
-
598
- if (getParam(ed, "paste_convert_middot_lists")) {
599
- t._convertLists(pl, o);
600
- }
601
-
602
- // Process styles
603
- styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
604
-
605
- // Process only if a string was specified and not equal to "all" or "*"
606
- if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
607
- styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
608
-
609
- // Retains some style properties
610
- each(dom.select('*', o.node), function(el) {
611
- var newStyle = {}, npc = 0, i, sp, sv;
612
-
613
- // Store a subset of the existing styles
614
- if (styleProps) {
615
- for (i = 0; i < styleProps.length; i++) {
616
- sp = styleProps[i];
617
- sv = dom.getStyle(el, sp);
618
-
619
- if (sv) {
620
- newStyle[sp] = sv;
621
- npc++;
622
- }
623
- }
624
- }
625
-
626
- // Remove all of the existing styles
627
- dom.setAttrib(el, 'style', '');
628
-
629
- if (styleProps && npc > 0)
630
- dom.setStyles(el, newStyle); // Add back the stored subset of styles
631
- else // Remove empty span tags that do not have class attributes
632
- if (el.nodeName == 'SPAN' && !el.className)
633
- dom.remove(el, true);
634
- });
635
- }
636
- }
637
-
638
- // Remove all style information or only specifically on WebKit to avoid the style bug on that browser
639
- if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
640
- each(dom.select('*[style]', o.node), function(el) {
641
- el.removeAttribute('style');
642
- el.removeAttribute('data-mce-style');
643
- });
644
- } else {
645
- if (tinymce.isWebKit) {
646
- // We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." />
647
- // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
648
- each(dom.select('*', o.node), function(el) {
649
- el.removeAttribute('data-mce-style');
650
- });
651
- }
652
- }
653
- },
654
-
655
- /**
656
- * Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
657
- */
658
- _convertLists : function(pl, o) {
659
- var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;
660
-
661
- // Convert middot lists into real semantic lists
662
- each(dom.select('p', o.node), function(p) {
663
- var sib, val = '', type, html, idx, parents;
664
-
665
- // Get text node value at beginning of paragraph
666
- for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
667
- val += sib.nodeValue;
668
-
669
- val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/&nbsp;/g, '\u00a0');
670
-
671
- // Detect unordered lists look for bullets
672
- if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val))
673
- type = 'ul';
674
-
675
- // Detect ordered lists 1., a. or ixv.
676
- if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
677
- type = 'ol';
678
-
679
- // Check if node value matches the list pattern: o&nbsp;&nbsp;
680
- if (type) {
681
- margin = parseFloat(p.style.marginLeft || 0);
682
-
683
- if (margin > lastMargin)
684
- levels.push(margin);
685
-
686
- if (!listElm || type != lastType) {
687
- listElm = dom.create(type);
688
- dom.insertAfter(listElm, p);
689
- } else {
690
- // Nested list element
691
- if (margin > lastMargin) {
692
- listElm = li.appendChild(dom.create(type));
693
- } else if (margin < lastMargin) {
694
- // Find parent level based on margin value
695
- idx = tinymce.inArray(levels, margin);
696
- parents = dom.getParents(listElm.parentNode, type);
697
- listElm = parents[parents.length - 1 - idx] || listElm;
698
- }
699
- }
700
-
701
- // Remove middot or number spans if they exists
702
- each(dom.select('span', p), function(span) {
703
- var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');
704
-
705
- // Remove span with the middot or the number
706
- if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
707
- dom.remove(span);
708
- else if (/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(html))
709
- dom.remove(span);
710
- });
711
-
712
- html = p.innerHTML;
713
-
714
- // Remove middot/list items
715
- if (type == 'ul')
716
- html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/, '');
717
- else
718
- html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/, '');
719
-
720
- // Create li and add paragraph data into the new li
721
- li = listElm.appendChild(dom.create('li', 0, html));
722
- dom.remove(p);
723
-
724
- lastMargin = margin;
725
- lastType = type;
726
- } else
727
- listElm = lastMargin = 0; // End list element
728
- });
729
-
730
- // Remove any left over makers
731
- html = o.node.innerHTML;
732
- if (html.indexOf('__MCE_ITEM__') != -1)
733
- o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
734
- },
735
-
736
- /**
737
- * Inserts the specified contents at the caret position.
738
- */
739
- _insert : function(h, skip_undo) {
740
- var ed = this.editor, r = ed.selection.getRng();
741
-
742
- // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells.
743
- if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer)
744
- ed.getDoc().execCommand('Delete', false, null);
745
-
746
- ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo});
747
- },
748
-
749
- /**
750
- * Instead of the old plain text method which tried to re-create a paste operation, the
751
- * new approach adds a plain text mode toggle switch that changes the behavior of paste.
752
- * This function is passed the same input that the regular paste plugin produces.
753
- * It performs additional scrubbing and produces (and inserts) the plain text.
754
- * This approach leverages all of the great existing functionality in the paste
755
- * plugin, and requires minimal changes to add the new functionality.
756
- * Speednet - June 2009
757
- */
758
- _insertPlainText : function(ed, dom, h) {
759
- var i, len, pos, rpos, node, breakElms, before, after,
760
- w = ed.getWin(),
761
- d = ed.getDoc(),
762
- sel = ed.selection,
763
- is = tinymce.is,
764
- inArray = tinymce.inArray,
765
- linebr = getParam(ed, "paste_text_linebreaktype"),
766
- rl = getParam(ed, "paste_text_replacements");
767
-
768
- function process(items) {
769
- each(items, function(v) {
770
- if (v.constructor == RegExp)
771
- h = h.replace(v, "");
772
- else
773
- h = h.replace(v[0], v[1]);
774
- });
775
- };
776
-
777
- if ((typeof(h) === "string") && (h.length > 0)) {
778
- // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
779
- if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(h)) {
780
- process([
781
- /[\n\r]+/g
782
- ]);
783
- } else {
784
- // Otherwise just get rid of carriage returns (only need linefeeds)
785
- process([
786
- /\r+/g
787
- ]);
788
- }
789
-
790
- process([
791
- [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
792
- [/<br[^>]*>|<\/tr>/gi, "\n"], // Single linebreak for <br /> tags and table rows
793
- [/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
794
- /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
795
- [/&nbsp;/gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
796
- [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"], // Cool little RegExp deletes whitespace around linebreak chars.
797
- [/\n{3,}/g, "\n\n"], // Max. 2 consecutive linebreaks
798
- /^\s+|\s+$/g // Trim the front & back
799
- ]);
800
-
801
- h = dom.decode(tinymce.html.Entities.encodeRaw(h));
802
-
803
- // Delete any highlighted text before pasting
804
- if (!sel.isCollapsed()) {
805
- d.execCommand("Delete", false, null);
806
- }
807
-
808
- // Perform default or custom replacements
809
- if (is(rl, "array") || (is(rl, "array"))) {
810
- process(rl);
811
- }
812
- else if (is(rl, "string")) {
813
- process(new RegExp(rl, "gi"));
814
- }
815
-
816
- // Treat paragraphs as specified in the config
817
- if (linebr == "none") {
818
- process([
819
- [/\n+/g, " "]
820
- ]);
821
- }
822
- else if (linebr == "br") {
823
- process([
824
- [/\n/g, "<br />"]
825
- ]);
826
- }
827
- else {
828
- process([
829
- /^\s+|\s+$/g,
830
- [/\n\n/g, "</p><p>"],
831
- [/\n/g, "<br />"]
832
- ]);
833
- }
834
-
835
- // This next piece of code handles the situation where we're pasting more than one paragraph of plain
836
- // text, and we are pasting the content into the middle of a block node in the editor. The block
837
- // node gets split at the selection point into "Para A" and "Para B" (for the purposes of explaining).
838
- // The first paragraph of the pasted text is appended to "Para A", and the last paragraph of the
839
- // pasted text is prepended to "Para B". Any other paragraphs of pasted text are placed between
840
- // "Para A" and "Para B". This code solves a host of problems with the original plain text plugin and
841
- // now handles styles correctly. (Pasting plain text into a styled paragraph is supposed to make the
842
- // plain text take the same style as the existing paragraph.)
843
- if ((pos = h.indexOf("</p><p>")) != -1) {
844
- rpos = h.lastIndexOf("</p><p>");
845
- node = sel.getNode();
846
- breakElms = []; // Get list of elements to break
847
-
848
- do {
849
- if (node.nodeType == 1) {
850
- // Don't break tables and break at body
851
- if (node.nodeName == "TD" || node.nodeName == "BODY") {
852
- break;
853
- }
854
-
855
- breakElms[breakElms.length] = node;
856
- }
857
- } while (node = node.parentNode);
858
-
859
- // Are we in the middle of a block node?
860
- if (breakElms.length > 0) {
861
- before = h.substring(0, pos);
862
- after = "";
863
-
864
- for (i=0, len=breakElms.length; i<len; i++) {
865
- before += "</" + breakElms[i].nodeName.toLowerCase() + ">";
866
- after += "<" + breakElms[breakElms.length-i-1].nodeName.toLowerCase() + ">";
867
- }
868
-
869
- if (pos == rpos) {
870
- h = before + after + h.substring(pos+7);
871
- }
872
- else {
873
- h = before + h.substring(pos+4, rpos+4) + after + h.substring(rpos+7);
874
- }
875
- }
876
- }
877
-
878
- // Insert content at the caret, plus add a marker for repositioning the caret
879
- ed.execCommand("mceInsertRawHTML", false, h + '<span id="_plain_text_marker">&nbsp;</span>');
880
-
881
- // Reposition the caret to the marker, which was placed immediately after the inserted content.
882
- // Needs to be done asynchronously (in window.setTimeout) or else it doesn't work in all browsers.
883
- // The second part of the code scrolls the content up if the caret is positioned off-screen.
884
- // This is only necessary for WebKit browsers, but it doesn't hurt to use for all.
885
- window.setTimeout(function() {
886
- var marker = dom.get('_plain_text_marker'),
887
- elm, vp, y, elmHeight;
888
-
889
- sel.select(marker, false);
890
- d.execCommand("Delete", false, null);
891
- marker = null;
892
-
893
- // Get element, position and height
894
- elm = sel.getStart();
895
- vp = dom.getViewPort(w);
896
- y = dom.getPos(elm).y;
897
- elmHeight = elm.clientHeight;
898
-
899
- // Is element within viewport if not then scroll it into view
900
- if ((y < vp.y) || (y + elmHeight > vp.y + vp.h)) {
901
- d.body.scrollTop = y < vp.y ? y : y - vp.h + 25;
902
- }
903
- }, 0);
904
- }
905
- },
906
-
907
- /**
908
- * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
909
- */
910
- _legacySupport : function() {
911
- var t = this, ed = t.editor;
912
-
913
- // Register command(s) for backwards compatibility
914
- ed.addCommand("mcePasteWord", function() {
915
- ed.windowManager.open({
916
- file: t.url + "/pasteword.htm",
917
- width: parseInt(getParam(ed, "paste_dialog_width")),
918
- height: parseInt(getParam(ed, "paste_dialog_height")),
919
- inline: 1
920
- });
921
- });
922
-
923
- if (getParam(ed, "paste_text_use_dialog")) {
924
- ed.addCommand("mcePasteText", function() {
925
- ed.windowManager.open({
926
- file : t.url + "/pastetext.htm",
927
- width: parseInt(getParam(ed, "paste_dialog_width")),
928
- height: parseInt(getParam(ed, "paste_dialog_height")),
929
- inline : 1
930
- });
931
- });
932
- }
933
-
934
- // Register button for backwards compatibility
935
- ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
936
- }
937
- });
938
-
939
- // Register plugin
940
- tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
941
- })();