tinymce_rails 3.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +4 -0
  3. data/README.md +14 -0
  4. data/Rakefile +1 -0
  5. data/lib/tinymce_rails.rb +11 -0
  6. data/lib/tinymce_rails/version.rb +3 -0
  7. data/tinymce_rails.gemspec +24 -0
  8. data/vendor/assets/javascripts/tiny_mce/jquery.tinymce.js +1 -0
  9. data/vendor/assets/javascripts/tiny_mce/langs/en.js +218 -0
  10. data/vendor/assets/javascripts/tiny_mce/license.txt +504 -0
  11. data/vendor/assets/javascripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
  12. data/vendor/assets/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
  13. data/vendor/assets/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
  14. data/vendor/assets/javascripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
  15. data/vendor/assets/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +7 -0
  16. data/vendor/assets/javascripts/tiny_mce/plugins/advhr/rule.htm +58 -0
  17. data/vendor/assets/javascripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
  18. data/vendor/assets/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
  19. data/vendor/assets/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
  20. data/vendor/assets/javascripts/tiny_mce/plugins/advimage/image.htm +235 -0
  21. data/vendor/assets/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  22. data/vendor/assets/javascripts/tiny_mce/plugins/advimage/js/image.js +445 -0
  23. data/vendor/assets/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +45 -0
  24. data/vendor/assets/javascripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
  25. data/vendor/assets/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
  26. data/vendor/assets/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
  27. data/vendor/assets/javascripts/tiny_mce/plugins/advlink/js/advlink.js +528 -0
  28. data/vendor/assets/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +54 -0
  29. data/vendor/assets/javascripts/tiny_mce/plugins/advlink/link.htm +338 -0
  30. data/vendor/assets/javascripts/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
  31. data/vendor/assets/javascripts/tiny_mce/plugins/advlist/editor_plugin_src.js +154 -0
  32. data/vendor/assets/javascripts/tiny_mce/plugins/autolink/editor_plugin.js +1 -0
  33. data/vendor/assets/javascripts/tiny_mce/plugins/autolink/editor_plugin_src.js +156 -0
  34. data/vendor/assets/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
  35. data/vendor/assets/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +119 -0
  36. data/vendor/assets/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
  37. data/vendor/assets/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +422 -0
  38. data/vendor/assets/javascripts/tiny_mce/plugins/autosave/langs/en.js +4 -0
  39. data/vendor/assets/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
  40. data/vendor/assets/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
  41. data/vendor/assets/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
  42. data/vendor/assets/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +156 -0
  43. data/vendor/assets/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
  44. data/vendor/assets/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
  45. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
  46. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
  47. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/emotions.htm +41 -0
  48. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  49. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  50. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  51. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  52. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  53. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  54. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  55. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  56. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  57. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  58. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  59. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  60. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  61. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  62. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  63. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  64. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
  65. data/vendor/assets/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
  66. data/vendor/assets/javascripts/tiny_mce/plugins/example/dialog.htm +22 -0
  67. data/vendor/assets/javascripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
  68. data/vendor/assets/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
  69. data/vendor/assets/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
  70. data/vendor/assets/javascripts/tiny_mce/plugins/example/js/dialog.js +19 -0
  71. data/vendor/assets/javascripts/tiny_mce/plugins/example/langs/en.js +3 -0
  72. data/vendor/assets/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
  73. data/vendor/assets/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +182 -0
  74. data/vendor/assets/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
  75. data/vendor/assets/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +182 -0
  76. data/vendor/assets/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +571 -0
  77. data/vendor/assets/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +471 -0
  78. data/vendor/assets/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
  79. data/vendor/assets/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
  80. data/vendor/assets/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +151 -0
  81. data/vendor/assets/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
  82. data/vendor/assets/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
  83. data/vendor/assets/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
  84. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
  85. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +696 -0
  86. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  87. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  88. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  89. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  90. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  91. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  92. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  93. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +100 -0
  94. data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
  95. data/vendor/assets/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
  96. data/vendor/assets/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
  97. data/vendor/assets/javascripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
  98. data/vendor/assets/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +212 -0
  99. data/vendor/assets/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
  100. data/vendor/assets/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +136 -0
  101. data/vendor/assets/javascripts/tiny_mce/plugins/lists/editor_plugin.js +1 -0
  102. data/vendor/assets/javascripts/tiny_mce/plugins/lists/editor_plugin_src.js +617 -0
  103. data/vendor/assets/javascripts/tiny_mce/plugins/media/css/content.css +6 -0
  104. data/vendor/assets/javascripts/tiny_mce/plugins/media/css/media.css +16 -0
  105. data/vendor/assets/javascripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
  106. data/vendor/assets/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +414 -0
  107. data/vendor/assets/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
  108. data/vendor/assets/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
  109. data/vendor/assets/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
  110. data/vendor/assets/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
  111. data/vendor/assets/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
  112. data/vendor/assets/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
  113. data/vendor/assets/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
  114. data/vendor/assets/javascripts/tiny_mce/plugins/media/js/embed.js +73 -0
  115. data/vendor/assets/javascripts/tiny_mce/plugins/media/js/media.js +630 -0
  116. data/vendor/assets/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
  117. data/vendor/assets/javascripts/tiny_mce/plugins/media/media.htm +818 -0
  118. data/vendor/assets/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
  119. data/vendor/assets/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
  120. data/vendor/assets/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
  121. data/vendor/assets/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +90 -0
  122. data/vendor/assets/javascripts/tiny_mce/plugins/pagebreak/css/content.css +1 -0
  123. data/vendor/assets/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
  124. data/vendor/assets/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +77 -0
  125. data/vendor/assets/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
  126. data/vendor/assets/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
  127. data/vendor/assets/javascripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
  128. data/vendor/assets/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +1035 -0
  129. data/vendor/assets/javascripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
  130. data/vendor/assets/javascripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
  131. data/vendor/assets/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
  132. data/vendor/assets/javascripts/tiny_mce/plugins/paste/pastetext.htm +27 -0
  133. data/vendor/assets/javascripts/tiny_mce/plugins/paste/pasteword.htm +21 -0
  134. data/vendor/assets/javascripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
  135. data/vendor/assets/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
  136. data/vendor/assets/javascripts/tiny_mce/plugins/preview/example.html +28 -0
  137. data/vendor/assets/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
  138. data/vendor/assets/javascripts/tiny_mce/plugins/preview/preview.html +17 -0
  139. data/vendor/assets/javascripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
  140. data/vendor/assets/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
  141. data/vendor/assets/javascripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
  142. data/vendor/assets/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
  143. data/vendor/assets/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
  144. data/vendor/assets/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
  145. data/vendor/assets/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +57 -0
  146. data/vendor/assets/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +140 -0
  147. data/vendor/assets/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
  148. data/vendor/assets/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +100 -0
  149. data/vendor/assets/javascripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
  150. data/vendor/assets/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
  151. data/vendor/assets/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +417 -0
  152. data/vendor/assets/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
  153. data/vendor/assets/javascripts/tiny_mce/plugins/style/css/props.css +13 -0
  154. data/vendor/assets/javascripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
  155. data/vendor/assets/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
  156. data/vendor/assets/javascripts/tiny_mce/plugins/style/js/props.js +641 -0
  157. data/vendor/assets/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +70 -0
  158. data/vendor/assets/javascripts/tiny_mce/plugins/style/props.htm +838 -0
  159. data/vendor/assets/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
  160. data/vendor/assets/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +114 -0
  161. data/vendor/assets/javascripts/tiny_mce/plugins/table/cell.htm +178 -0
  162. data/vendor/assets/javascripts/tiny_mce/plugins/table/css/cell.css +17 -0
  163. data/vendor/assets/javascripts/tiny_mce/plugins/table/css/row.css +25 -0
  164. data/vendor/assets/javascripts/tiny_mce/plugins/table/css/table.css +13 -0
  165. data/vendor/assets/javascripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
  166. data/vendor/assets/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +1139 -0
  167. data/vendor/assets/javascripts/tiny_mce/plugins/table/js/cell.js +286 -0
  168. data/vendor/assets/javascripts/tiny_mce/plugins/table/js/merge_cells.js +27 -0
  169. data/vendor/assets/javascripts/tiny_mce/plugins/table/js/row.js +237 -0
  170. data/vendor/assets/javascripts/tiny_mce/plugins/table/js/table.js +454 -0
  171. data/vendor/assets/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
  172. data/vendor/assets/javascripts/tiny_mce/plugins/table/merge_cells.htm +32 -0
  173. data/vendor/assets/javascripts/tiny_mce/plugins/table/row.htm +157 -0
  174. data/vendor/assets/javascripts/tiny_mce/plugins/table/table.htm +188 -0
  175. data/vendor/assets/javascripts/tiny_mce/plugins/template/blank.htm +12 -0
  176. data/vendor/assets/javascripts/tiny_mce/plugins/template/css/template.css +23 -0
  177. data/vendor/assets/javascripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
  178. data/vendor/assets/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
  179. data/vendor/assets/javascripts/tiny_mce/plugins/template/js/template.js +106 -0
  180. data/vendor/assets/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
  181. data/vendor/assets/javascripts/tiny_mce/plugins/template/template.htm +31 -0
  182. data/vendor/assets/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
  183. data/vendor/assets/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +83 -0
  184. data/vendor/assets/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
  185. data/vendor/assets/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +98 -0
  186. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +142 -0
  187. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +142 -0
  188. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +149 -0
  189. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +142 -0
  190. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
  191. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
  192. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +162 -0
  193. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
  194. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +132 -0
  195. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +162 -0
  196. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
  197. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
  198. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +126 -0
  199. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
  200. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +53 -0
  201. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +231 -0
  202. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +52 -0
  203. data/vendor/assets/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
  204. data/vendor/assets/javascripts/tiny_mce/themes/advanced/about.htm +48 -0
  205. data/vendor/assets/javascripts/tiny_mce/themes/advanced/anchor.htm +26 -0
  206. data/vendor/assets/javascripts/tiny_mce/themes/advanced/charmap.htm +53 -0
  207. data/vendor/assets/javascripts/tiny_mce/themes/advanced/color_picker.htm +74 -0
  208. data/vendor/assets/javascripts/tiny_mce/themes/advanced/editor_template.js +1 -0
  209. data/vendor/assets/javascripts/tiny_mce/themes/advanced/editor_template_src.js +1326 -0
  210. data/vendor/assets/javascripts/tiny_mce/themes/advanced/image.htm +80 -0
  211. data/vendor/assets/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  212. data/vendor/assets/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
  213. data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/about.js +73 -0
  214. data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/anchor.js +37 -0
  215. data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/charmap.js +353 -0
  216. data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/color_picker.js +329 -0
  217. data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/image.js +247 -0
  218. data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/link.js +156 -0
  219. data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/source_editor.js +56 -0
  220. data/vendor/assets/javascripts/tiny_mce/themes/advanced/langs/en.js +68 -0
  221. data/vendor/assets/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +53 -0
  222. data/vendor/assets/javascripts/tiny_mce/themes/advanced/link.htm +58 -0
  223. data/vendor/assets/javascripts/tiny_mce/themes/advanced/shortcuts.htm +47 -0
  224. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/content.css +37 -0
  225. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
  226. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  227. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  228. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  229. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  230. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  231. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  232. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +213 -0
  233. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/content.css +23 -0
  234. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +105 -0
  235. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/ui.css +101 -0
  236. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +36 -0
  237. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +116 -0
  238. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  239. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  240. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  241. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +215 -0
  242. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
  243. data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
  244. data/vendor/assets/javascripts/tiny_mce/themes/advanced/source_editor.htm +25 -0
  245. data/vendor/assets/javascripts/tiny_mce/themes/simple/editor_template.js +1 -0
  246. data/vendor/assets/javascripts/tiny_mce/themes/simple/editor_template_src.js +85 -0
  247. data/vendor/assets/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
  248. data/vendor/assets/javascripts/tiny_mce/themes/simple/langs/en.js +11 -0
  249. data/vendor/assets/javascripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
  250. data/vendor/assets/javascripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
  251. data/vendor/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
  252. data/vendor/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  253. data/vendor/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
  254. data/vendor/assets/javascripts/tiny_mce/tiny_mce.js +1 -0
  255. data/vendor/assets/javascripts/tiny_mce/tiny_mce_popup.js +5 -0
  256. data/vendor/assets/javascripts/tiny_mce/tiny_mce_src.js +13913 -0
  257. data/vendor/assets/javascripts/tiny_mce/utils/editable_selects.js +70 -0
  258. data/vendor/assets/javascripts/tiny_mce/utils/form_utils.js +206 -0
  259. data/vendor/assets/javascripts/tiny_mce/utils/mctabs.js +151 -0
  260. data/vendor/assets/javascripts/tiny_mce/utils/validate.js +252 -0
  261. metadata +305 -0
@@ -0,0 +1,162 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>{#xhtmlxtras_dlg.title_ins_element}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
8
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
9
+ <script type="text/javascript" src="js/element_common.js"></script>
10
+ <script type="text/javascript" src="js/ins.js"></script>
11
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
12
+ </head>
13
+ <body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
14
+ <span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_ins_element}</span>
15
+ <form onsubmit="insertIns();return false;" action="#">
16
+ <div class="tabs">
17
+ <ul>
18
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
19
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
20
+ </ul>
21
+ </div>
22
+
23
+ <div class="panel_wrapper">
24
+ <div id="general_panel" class="panel current">
25
+ <fieldset>
26
+ <legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
27
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
28
+ <tr >
29
+ <td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
30
+ <td >
31
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
32
+ <tr >
33
+ <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
34
+ <td ><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse" role="button" aria-labelledby="datetimelabel"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
35
+ </tr>
36
+ </table>
37
+ </td>
38
+ </tr>
39
+ <tr >
40
+ <td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
41
+ <td ><input id="cite" name="cite" type="text" value="" class="field" /></td>
42
+ </tr>
43
+ </table>
44
+ </fieldset>
45
+ <fieldset>
46
+ <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
47
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
48
+ <tr >
49
+ <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
50
+ <td ><input id="title" name="title" type="text" value="" class="field" /></td>
51
+ </tr>
52
+ <tr>
53
+ <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
54
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
55
+ </tr>
56
+ <tr>
57
+ <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
58
+ <td>
59
+ <select id="class" name="class" class="field mceEditableSelect">
60
+ <option value="">{#not_set}</option>
61
+ </select>
62
+ </td>
63
+ </tr>
64
+ <tr>
65
+ <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
66
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
67
+ </tr>
68
+ <tr>
69
+ <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
70
+ <td>
71
+ <select id="dir" name="dir" class="field">
72
+ <option value="">{#not_set}</option>
73
+ <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
74
+ <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
75
+ </select>
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
80
+ <td>
81
+ <input id="lang" name="lang" type="text" value="" class="field" />
82
+ </td>
83
+ </tr>
84
+ </table>
85
+ </fieldset>
86
+ </div>
87
+ <div id="events_panel" class="panel">
88
+ <fieldset>
89
+ <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
90
+
91
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
92
+ <tr>
93
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
94
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
95
+ </tr>
96
+
97
+ <tr>
98
+ <td class="label"><label for="onblur">onblur</label>:</td>
99
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
100
+ </tr>
101
+
102
+ <tr>
103
+ <td class="label"><label for="onclick">onclick</label>:</td>
104
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
105
+ </tr>
106
+
107
+ <tr>
108
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
109
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
110
+ </tr>
111
+
112
+ <tr>
113
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
114
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
115
+ </tr>
116
+
117
+ <tr>
118
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
119
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
120
+ </tr>
121
+
122
+ <tr>
123
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
124
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
125
+ </tr>
126
+
127
+ <tr>
128
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
129
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
130
+ </tr>
131
+
132
+ <tr>
133
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
134
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
135
+ </tr>
136
+
137
+ <tr>
138
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
139
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
140
+ </tr>
141
+
142
+ <tr>
143
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
144
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
145
+ </tr>
146
+
147
+ <tr>
148
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
149
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
150
+ </tr>
151
+ </table>
152
+ </fieldset>
153
+ </div>
154
+ </div>
155
+ <div class="mceActionPanel">
156
+ <input type="submit" id="insert" name="insert" value="{#update}" />
157
+ <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" />
158
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
159
+ </div>
160
+ </form>
161
+ </body>
162
+ </html>
@@ -0,0 +1,28 @@
1
+ /**
2
+ * abbr.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 init() {
12
+ SXE.initElementDialog('abbr');
13
+ if (SXE.currentAction == "update") {
14
+ SXE.showRemoveButton();
15
+ }
16
+ }
17
+
18
+ function insertAbbr() {
19
+ SXE.insertElement('abbr');
20
+ tinyMCEPopup.close();
21
+ }
22
+
23
+ function removeAbbr() {
24
+ SXE.removeElement('abbr');
25
+ tinyMCEPopup.close();
26
+ }
27
+
28
+ tinyMCEPopup.onInit.add(init);
@@ -0,0 +1,28 @@
1
+ /**
2
+ * acronym.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 init() {
12
+ SXE.initElementDialog('acronym');
13
+ if (SXE.currentAction == "update") {
14
+ SXE.showRemoveButton();
15
+ }
16
+ }
17
+
18
+ function insertAcronym() {
19
+ SXE.insertElement('acronym');
20
+ tinyMCEPopup.close();
21
+ }
22
+
23
+ function removeAcronym() {
24
+ SXE.removeElement('acronym');
25
+ tinyMCEPopup.close();
26
+ }
27
+
28
+ tinyMCEPopup.onInit.add(init);
@@ -0,0 +1,126 @@
1
+ /**
2
+ * attributes.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 init() {
12
+ tinyMCEPopup.resizeToInnerSize();
13
+ var inst = tinyMCEPopup.editor;
14
+ var dom = inst.dom;
15
+ var elm = inst.selection.getNode();
16
+ var f = document.forms[0];
17
+ var onclick = dom.getAttrib(elm, 'onclick');
18
+
19
+ setFormValue('title', dom.getAttrib(elm, 'title'));
20
+ setFormValue('id', dom.getAttrib(elm, 'id'));
21
+ setFormValue('style', dom.getAttrib(elm, "style"));
22
+ setFormValue('dir', dom.getAttrib(elm, 'dir'));
23
+ setFormValue('lang', dom.getAttrib(elm, 'lang'));
24
+ setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
25
+ setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
26
+ setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
27
+ setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
28
+ setFormValue('onclick', onclick);
29
+ setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
30
+ setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
31
+ setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
32
+ setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
33
+ setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
34
+ setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
35
+ setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
36
+ setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
37
+ setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
38
+ className = dom.getAttrib(elm, 'class');
39
+
40
+ addClassesToList('classlist', 'advlink_styles');
41
+ selectByValue(f, 'classlist', className, true);
42
+
43
+ TinyMCE_EditableSelects.init();
44
+ }
45
+
46
+ function setFormValue(name, value) {
47
+ if(value && document.forms[0].elements[name]){
48
+ document.forms[0].elements[name].value = value;
49
+ }
50
+ }
51
+
52
+ function insertAction() {
53
+ var inst = tinyMCEPopup.editor;
54
+ var elm = inst.selection.getNode();
55
+
56
+ tinyMCEPopup.execCommand("mceBeginUndoLevel");
57
+ setAllAttribs(elm);
58
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
59
+ tinyMCEPopup.close();
60
+ }
61
+
62
+ function setAttrib(elm, attrib, value) {
63
+ var formObj = document.forms[0];
64
+ var valueElm = formObj.elements[attrib.toLowerCase()];
65
+ var inst = tinyMCEPopup.editor;
66
+ var dom = inst.dom;
67
+
68
+ if (typeof(value) == "undefined" || value == null) {
69
+ value = "";
70
+
71
+ if (valueElm)
72
+ value = valueElm.value;
73
+ }
74
+
75
+ if (value != "") {
76
+ dom.setAttrib(elm, attrib.toLowerCase(), value);
77
+
78
+ if (attrib == "style")
79
+ attrib = "style.cssText";
80
+
81
+ if (attrib.substring(0, 2) == 'on')
82
+ value = 'return true;' + value;
83
+
84
+ if (attrib == "class")
85
+ attrib = "className";
86
+
87
+ elm[attrib]=value;
88
+ } else
89
+ elm.removeAttribute(attrib);
90
+ }
91
+
92
+ function setAllAttribs(elm) {
93
+ var f = document.forms[0];
94
+
95
+ setAttrib(elm, 'title');
96
+ setAttrib(elm, 'id');
97
+ setAttrib(elm, 'style');
98
+ setAttrib(elm, 'class', getSelectValue(f, 'classlist'));
99
+ setAttrib(elm, 'dir');
100
+ setAttrib(elm, 'lang');
101
+ setAttrib(elm, 'tabindex');
102
+ setAttrib(elm, 'accesskey');
103
+ setAttrib(elm, 'onfocus');
104
+ setAttrib(elm, 'onblur');
105
+ setAttrib(elm, 'onclick');
106
+ setAttrib(elm, 'ondblclick');
107
+ setAttrib(elm, 'onmousedown');
108
+ setAttrib(elm, 'onmouseup');
109
+ setAttrib(elm, 'onmouseover');
110
+ setAttrib(elm, 'onmousemove');
111
+ setAttrib(elm, 'onmouseout');
112
+ setAttrib(elm, 'onkeypress');
113
+ setAttrib(elm, 'onkeydown');
114
+ setAttrib(elm, 'onkeyup');
115
+
116
+ // Refresh in old MSIE
117
+ // if (tinyMCE.isMSIE5)
118
+ // elm.outerHTML = elm.outerHTML;
119
+ }
120
+
121
+ function insertAttribute() {
122
+ tinyMCEPopup.close();
123
+ }
124
+
125
+ tinyMCEPopup.onInit.add(init);
126
+ tinyMCEPopup.requireLangPack();
@@ -0,0 +1,28 @@
1
+ /**
2
+ * cite.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 init() {
12
+ SXE.initElementDialog('cite');
13
+ if (SXE.currentAction == "update") {
14
+ SXE.showRemoveButton();
15
+ }
16
+ }
17
+
18
+ function insertCite() {
19
+ SXE.insertElement('cite');
20
+ tinyMCEPopup.close();
21
+ }
22
+
23
+ function removeCite() {
24
+ SXE.removeElement('cite');
25
+ tinyMCEPopup.close();
26
+ }
27
+
28
+ tinyMCEPopup.onInit.add(init);
@@ -0,0 +1,53 @@
1
+ /**
2
+ * del.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 init() {
12
+ SXE.initElementDialog('del');
13
+ if (SXE.currentAction == "update") {
14
+ setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
15
+ setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
16
+ SXE.showRemoveButton();
17
+ }
18
+ }
19
+
20
+ function setElementAttribs(elm) {
21
+ setAllCommonAttribs(elm);
22
+ setAttrib(elm, 'datetime');
23
+ setAttrib(elm, 'cite');
24
+ }
25
+
26
+ function insertDel() {
27
+ var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL');
28
+
29
+ tinyMCEPopup.execCommand('mceBeginUndoLevel');
30
+ if (elm == null) {
31
+ var s = SXE.inst.selection.getContent();
32
+ if(s.length > 0) {
33
+ insertInlineElement('del');
34
+ var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';});
35
+ for (var i=0; i<elementArray.length; i++) {
36
+ var elm = elementArray[i];
37
+ setElementAttribs(elm);
38
+ }
39
+ }
40
+ } else {
41
+ setElementAttribs(elm);
42
+ }
43
+ tinyMCEPopup.editor.nodeChanged();
44
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
45
+ tinyMCEPopup.close();
46
+ }
47
+
48
+ function removeDel() {
49
+ SXE.removeElement('del');
50
+ tinyMCEPopup.close();
51
+ }
52
+
53
+ tinyMCEPopup.onInit.add(init);
@@ -0,0 +1,231 @@
1
+ /**
2
+ * element_common.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
+ function initCommonAttributes(elm) {
14
+ var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
15
+
16
+ // Setup form data for common element attributes
17
+ setFormValue('title', dom.getAttrib(elm, 'title'));
18
+ setFormValue('id', dom.getAttrib(elm, 'id'));
19
+ selectByValue(formObj, 'class', dom.getAttrib(elm, 'class'), true);
20
+ setFormValue('style', dom.getAttrib(elm, 'style'));
21
+ selectByValue(formObj, 'dir', dom.getAttrib(elm, 'dir'));
22
+ setFormValue('lang', dom.getAttrib(elm, 'lang'));
23
+ setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
24
+ setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
25
+ setFormValue('onclick', dom.getAttrib(elm, 'onclick'));
26
+ setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
27
+ setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
28
+ setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
29
+ setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
30
+ setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
31
+ setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
32
+ setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
33
+ setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
34
+ setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
35
+ }
36
+
37
+ function setFormValue(name, value) {
38
+ if(document.forms[0].elements[name]) document.forms[0].elements[name].value = value;
39
+ }
40
+
41
+ function insertDateTime(id) {
42
+ document.getElementById(id).value = getDateTime(new Date(), "%Y-%m-%dT%H:%M:%S");
43
+ }
44
+
45
+ function getDateTime(d, fmt) {
46
+ fmt = fmt.replace("%D", "%m/%d/%y");
47
+ fmt = fmt.replace("%r", "%I:%M:%S %p");
48
+ fmt = fmt.replace("%Y", "" + d.getFullYear());
49
+ fmt = fmt.replace("%y", "" + d.getYear());
50
+ fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
51
+ fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
52
+ fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
53
+ fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
54
+ fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
55
+ fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
56
+ fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
57
+ fmt = fmt.replace("%%", "%");
58
+
59
+ return fmt;
60
+ }
61
+
62
+ function addZeros(value, len) {
63
+ var i;
64
+
65
+ value = "" + value;
66
+
67
+ if (value.length < len) {
68
+ for (i=0; i<(len-value.length); i++)
69
+ value = "0" + value;
70
+ }
71
+
72
+ return value;
73
+ }
74
+
75
+ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
76
+ if (!form_obj || !form_obj.elements[field_name])
77
+ return;
78
+
79
+ var sel = form_obj.elements[field_name];
80
+
81
+ var found = false;
82
+ for (var i=0; i<sel.options.length; i++) {
83
+ var option = sel.options[i];
84
+
85
+ if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
86
+ option.selected = true;
87
+ found = true;
88
+ } else
89
+ option.selected = false;
90
+ }
91
+
92
+ if (!found && add_custom && value != '') {
93
+ var option = new Option('Value: ' + value, value);
94
+ option.selected = true;
95
+ sel.options[sel.options.length] = option;
96
+ }
97
+
98
+ return found;
99
+ }
100
+
101
+ function setAttrib(elm, attrib, value) {
102
+ var formObj = document.forms[0];
103
+ var valueElm = formObj.elements[attrib.toLowerCase()];
104
+ tinyMCEPopup.editor.dom.setAttrib(elm, attrib, value || valueElm.value);
105
+ }
106
+
107
+ function setAllCommonAttribs(elm) {
108
+ setAttrib(elm, 'title');
109
+ setAttrib(elm, 'id');
110
+ setAttrib(elm, 'class');
111
+ setAttrib(elm, 'style');
112
+ setAttrib(elm, 'dir');
113
+ setAttrib(elm, 'lang');
114
+ /*setAttrib(elm, 'onfocus');
115
+ setAttrib(elm, 'onblur');
116
+ setAttrib(elm, 'onclick');
117
+ setAttrib(elm, 'ondblclick');
118
+ setAttrib(elm, 'onmousedown');
119
+ setAttrib(elm, 'onmouseup');
120
+ setAttrib(elm, 'onmouseover');
121
+ setAttrib(elm, 'onmousemove');
122
+ setAttrib(elm, 'onmouseout');
123
+ setAttrib(elm, 'onkeypress');
124
+ setAttrib(elm, 'onkeydown');
125
+ setAttrib(elm, 'onkeyup');*/
126
+ }
127
+
128
+ SXE = {
129
+ currentAction : "insert",
130
+ inst : tinyMCEPopup.editor,
131
+ updateElement : null
132
+ }
133
+
134
+ SXE.focusElement = SXE.inst.selection.getNode();
135
+
136
+ SXE.initElementDialog = function(element_name) {
137
+ addClassesToList('class', 'xhtmlxtras_styles');
138
+ TinyMCE_EditableSelects.init();
139
+
140
+ element_name = element_name.toLowerCase();
141
+ var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
142
+ if (elm != null && elm.nodeName.toUpperCase() == element_name.toUpperCase()) {
143
+ SXE.currentAction = "update";
144
+ }
145
+
146
+ if (SXE.currentAction == "update") {
147
+ initCommonAttributes(elm);
148
+ SXE.updateElement = elm;
149
+ }
150
+
151
+ document.forms[0].insert.value = tinyMCEPopup.getLang(SXE.currentAction, 'Insert', true);
152
+ }
153
+
154
+ SXE.insertElement = function(element_name) {
155
+ var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()), h, tagName;
156
+
157
+ tinyMCEPopup.execCommand('mceBeginUndoLevel');
158
+ if (elm == null) {
159
+ var s = SXE.inst.selection.getContent();
160
+ if(s.length > 0) {
161
+ tagName = element_name;
162
+
163
+ insertInlineElement(element_name);
164
+ var elementArray = tinymce.grep(SXE.inst.dom.select(element_name));
165
+ for (var i=0; i<elementArray.length; i++) {
166
+ var elm = elementArray[i];
167
+
168
+ if (SXE.inst.dom.getAttrib(elm, '_mce_new')) {
169
+ elm.id = '';
170
+ elm.setAttribute('id', '');
171
+ elm.removeAttribute('id');
172
+ elm.removeAttribute('_mce_new');
173
+
174
+ setAllCommonAttribs(elm);
175
+ }
176
+ }
177
+ }
178
+ } else {
179
+ setAllCommonAttribs(elm);
180
+ }
181
+ SXE.inst.nodeChanged();
182
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
183
+ }
184
+
185
+ SXE.removeElement = function(element_name){
186
+ element_name = element_name.toLowerCase();
187
+ elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
188
+ if(elm && elm.nodeName.toUpperCase() == element_name.toUpperCase()){
189
+ tinyMCEPopup.execCommand('mceBeginUndoLevel');
190
+ tinyMCE.execCommand('mceRemoveNode', false, elm);
191
+ SXE.inst.nodeChanged();
192
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
193
+ }
194
+ }
195
+
196
+ SXE.showRemoveButton = function() {
197
+ document.getElementById("remove").style.display = '';
198
+ }
199
+
200
+ SXE.containsClass = function(elm,cl) {
201
+ return (elm.className.indexOf(cl) > -1) ? true : false;
202
+ }
203
+
204
+ SXE.removeClass = function(elm,cl) {
205
+ if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) {
206
+ return true;
207
+ }
208
+ var classNames = elm.className.split(" ");
209
+ var newClassNames = "";
210
+ for (var x = 0, cnl = classNames.length; x < cnl; x++) {
211
+ if (classNames[x] != cl) {
212
+ newClassNames += (classNames[x] + " ");
213
+ }
214
+ }
215
+ elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end
216
+ }
217
+
218
+ SXE.addClass = function(elm,cl) {
219
+ if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl;
220
+ return true;
221
+ }
222
+
223
+ function insertInlineElement(en) {
224
+ var ed = tinyMCEPopup.editor, dom = ed.dom;
225
+
226
+ ed.getDoc().execCommand('FontName', false, 'mceinline');
227
+ tinymce.each(dom.select('span,font'), function(n) {
228
+ if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline')
229
+ dom.replace(dom.create(en, {_mce_new : 1}), n, 1);
230
+ });
231
+ }