Lib_Js_TinyMCE - Version 1.0.18800

Version Notes

First stable release

Download this release

Release Info

Developer Magento Core Team
Extension Lib_Js_TinyMCE
Version 1.0.18800
Comparing to
See all releases


Version 1.0.18800

Files changed (309) hide show
  1. js/tiny_mce/blank.htm +9 -0
  2. js/tiny_mce/langs/en.js +41 -0
  3. js/tiny_mce/langs/readme.txt +9 -0
  4. js/tiny_mce/license.txt +504 -0
  5. js/tiny_mce/plugins/advhr/css/advhr.css +23 -0
  6. js/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
  7. js/tiny_mce/plugins/advhr/editor_plugin_src.js +90 -0
  8. js/tiny_mce/plugins/advhr/images/advhr.gif +0 -0
  9. js/tiny_mce/plugins/advhr/jscripts/rule.js +43 -0
  10. js/tiny_mce/plugins/advhr/langs/en.js +8 -0
  11. js/tiny_mce/plugins/advhr/readme.txt +1 -0
  12. js/tiny_mce/plugins/advhr/rule.htm +61 -0
  13. js/tiny_mce/plugins/advimage/css/advimage.css +66 -0
  14. js/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
  15. js/tiny_mce/plugins/advimage/editor_plugin_src.js +148 -0
  16. js/tiny_mce/plugins/advimage/image.htm +241 -0
  17. js/tiny_mce/plugins/advimage/images/sample.gif +0 -0
  18. js/tiny_mce/plugins/advimage/jscripts/functions.js +538 -0
  19. js/tiny_mce/plugins/advimage/langs/en.js +27 -0
  20. js/tiny_mce/plugins/advimage/readme.txt +1 -0
  21. js/tiny_mce/plugins/advlink/css/advlink.css +35 -0
  22. js/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
  23. js/tiny_mce/plugins/advlink/editor_plugin_src.js +83 -0
  24. js/tiny_mce/plugins/advlink/jscripts/functions.js +587 -0
  25. js/tiny_mce/plugins/advlink/langs/en.js +46 -0
  26. js/tiny_mce/plugins/advlink/link.htm +338 -0
  27. js/tiny_mce/plugins/advlink/readme.txt +1 -0
  28. js/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
  29. js/tiny_mce/plugins/autosave/editor_plugin_src.js +46 -0
  30. js/tiny_mce/plugins/autosave/langs/en.js +5 -0
  31. js/tiny_mce/plugins/autosave/readme.txt +1 -0
  32. js/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
  33. js/tiny_mce/plugins/bbcode/editor_plugin_src.js +102 -0
  34. js/tiny_mce/plugins/cleanup/editor_plugin.js +0 -0
  35. js/tiny_mce/plugins/cleanup/editor_plugin_src.js +10 -0
  36. js/tiny_mce/plugins/cleanup/readme.txt +1 -0
  37. js/tiny_mce/plugins/contextmenu/css/contextmenu.css +74 -0
  38. js/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
  39. js/tiny_mce/plugins/contextmenu/editor_plugin_src.js +360 -0
  40. js/tiny_mce/plugins/contextmenu/images/spacer.gif +0 -0
  41. js/tiny_mce/plugins/contextmenu/readme.txt +1 -0
  42. js/tiny_mce/plugins/devkit/css/devkit.css +117 -0
  43. js/tiny_mce/plugins/devkit/css/devkit_ui.css +15 -0
  44. js/tiny_mce/plugins/devkit/devkit.htm +140 -0
  45. js/tiny_mce/plugins/devkit/editor_plugin.js +1 -0
  46. js/tiny_mce/plugins/devkit/editor_plugin_src.js +325 -0
  47. js/tiny_mce/plugins/devkit/images/flip_down.gif +0 -0
  48. js/tiny_mce/plugins/devkit/images/flip_up.gif +0 -0
  49. js/tiny_mce/plugins/devkit/jscripts/devkit.js +331 -0
  50. js/tiny_mce/plugins/devkit/jscripts/diff.js +1192 -0
  51. js/tiny_mce/plugins/devkit/langs/en.js +23 -0
  52. js/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
  53. js/tiny_mce/plugins/directionality/editor_plugin_src.js +90 -0
  54. js/tiny_mce/plugins/directionality/images/ltr.gif +0 -0
  55. js/tiny_mce/plugins/directionality/images/rtl.gif +0 -0
  56. js/tiny_mce/plugins/directionality/langs/en.js +6 -0
  57. js/tiny_mce/plugins/directionality/readme.txt +1 -0
  58. js/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
  59. js/tiny_mce/plugins/emotions/editor_plugin_src.js +63 -0
  60. js/tiny_mce/plugins/emotions/emotions.htm +40 -0
  61. js/tiny_mce/plugins/emotions/images/emotions.gif +0 -0
  62. js/tiny_mce/plugins/emotions/images/readme.txt +2 -0
  63. js/tiny_mce/plugins/emotions/images/smiley-cool.gif +0 -0
  64. js/tiny_mce/plugins/emotions/images/smiley-cry.gif +0 -0
  65. js/tiny_mce/plugins/emotions/images/smiley-embarassed.gif +0 -0
  66. js/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif +0 -0
  67. js/tiny_mce/plugins/emotions/images/smiley-frown.gif +0 -0
  68. js/tiny_mce/plugins/emotions/images/smiley-innocent.gif +0 -0
  69. js/tiny_mce/plugins/emotions/images/smiley-kiss.gif +0 -0
  70. js/tiny_mce/plugins/emotions/images/smiley-laughing.gif +0 -0
  71. js/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif +0 -0
  72. js/tiny_mce/plugins/emotions/images/smiley-sealed.gif +0 -0
  73. js/tiny_mce/plugins/emotions/images/smiley-smile.gif +0 -0
  74. js/tiny_mce/plugins/emotions/images/smiley-surprised.gif +0 -0
  75. js/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif +0 -0
  76. js/tiny_mce/plugins/emotions/images/smiley-undecided.gif +0 -0
  77. js/tiny_mce/plugins/emotions/images/smiley-wink.gif +0 -0
  78. js/tiny_mce/plugins/emotions/images/smiley-yell.gif +0 -0
  79. js/tiny_mce/plugins/emotions/jscripts/functions.js +21 -0
  80. js/tiny_mce/plugins/emotions/langs/en.js +22 -0
  81. js/tiny_mce/plugins/emotions/readme.txt +1 -0
  82. js/tiny_mce/plugins/flash/css/content.css +7 -0
  83. js/tiny_mce/plugins/flash/css/flash.css +11 -0
  84. js/tiny_mce/plugins/flash/editor_plugin.js +1 -0
  85. js/tiny_mce/plugins/flash/editor_plugin_src.js +285 -0
  86. js/tiny_mce/plugins/flash/flash.htm +70 -0
  87. js/tiny_mce/plugins/flash/images/flash.gif +0 -0
  88. js/tiny_mce/plugins/flash/jscripts/flash.js +107 -0
  89. js/tiny_mce/plugins/flash/langs/en.js +11 -0
  90. js/tiny_mce/plugins/flash/readme.txt +1 -0
  91. js/tiny_mce/plugins/fullpage/blank.htm +9 -0
  92. js/tiny_mce/plugins/fullpage/css/fullpage.css +176 -0
  93. js/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
  94. js/tiny_mce/plugins/fullpage/editor_plugin_src.js +235 -0
  95. js/tiny_mce/plugins/fullpage/fullpage.htm +577 -0
  96. js/tiny_mce/plugins/fullpage/images/add.gif +0 -0
  97. js/tiny_mce/plugins/fullpage/images/fullpage.gif +0 -0
  98. js/tiny_mce/plugins/fullpage/images/move_down.gif +0 -0
  99. js/tiny_mce/plugins/fullpage/images/move_up.gif +0 -0
  100. js/tiny_mce/plugins/fullpage/images/remove.gif +0 -0
  101. js/tiny_mce/plugins/fullpage/jscripts/fullpage.js +580 -0
  102. js/tiny_mce/plugins/fullpage/langs/en.js +92 -0
  103. js/tiny_mce/plugins/fullscreen/css/page.css +21 -0
  104. js/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
  105. js/tiny_mce/plugins/fullscreen/editor_plugin_src.js +230 -0
  106. js/tiny_mce/plugins/fullscreen/fullscreen.htm +91 -0
  107. js/tiny_mce/plugins/fullscreen/images/fullscreen.gif +0 -0
  108. js/tiny_mce/plugins/fullscreen/langs/en.js +5 -0
  109. js/tiny_mce/plugins/fullscreen/readme.txt +1 -0
  110. js/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
  111. js/tiny_mce/plugins/iespell/editor_plugin_src.js +58 -0
  112. js/tiny_mce/plugins/iespell/images/iespell.gif +0 -0
  113. js/tiny_mce/plugins/iespell/langs/en.js +7 -0
  114. js/tiny_mce/plugins/iespell/readme.txt +1 -0
  115. js/tiny_mce/plugins/inlinepopups/css/inlinepopup.css +69 -0
  116. js/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
  117. js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +819 -0
  118. js/tiny_mce/plugins/inlinepopups/images/spacer.gif +0 -0
  119. js/tiny_mce/plugins/inlinepopups/images/window_close.gif +0 -0
  120. js/tiny_mce/plugins/inlinepopups/images/window_maximize.gif +0 -0
  121. js/tiny_mce/plugins/inlinepopups/images/window_minimize.gif +0 -0
  122. js/tiny_mce/plugins/inlinepopups/images/window_resize.gif +0 -0
  123. js/tiny_mce/plugins/inlinepopups/jscripts/mcwindows.js +453 -0
  124. js/tiny_mce/plugins/inlinepopups/readme.txt +0 -0
  125. js/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
  126. js/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +90 -0
  127. js/tiny_mce/plugins/insertdatetime/images/insertdate.gif +0 -0
  128. js/tiny_mce/plugins/insertdatetime/images/inserttime.gif +0 -0
  129. js/tiny_mce/plugins/insertdatetime/langs/en.js +12 -0
  130. js/tiny_mce/plugins/insertdatetime/readme.txt +1 -0
  131. js/tiny_mce/plugins/layer/editor_plugin.js +1 -0
  132. js/tiny_mce/plugins/layer/editor_plugin_src.js +248 -0
  133. js/tiny_mce/plugins/layer/images/absolute.gif +0 -0
  134. js/tiny_mce/plugins/layer/images/backward.gif +0 -0
  135. js/tiny_mce/plugins/layer/images/forward.gif +0 -0
  136. js/tiny_mce/plugins/layer/images/insert_layer.gif +0 -0
  137. js/tiny_mce/plugins/layer/images/insertlayer.gif +0 -0
  138. js/tiny_mce/plugins/layer/images/movebackward.gif +0 -0
  139. js/tiny_mce/plugins/layer/images/moveforward.gif +0 -0
  140. js/tiny_mce/plugins/layer/langs/en.js +9 -0
  141. js/tiny_mce/plugins/layer/readme.txt +1 -0
  142. js/tiny_mce/plugins/media/css/content.css +26 -0
  143. js/tiny_mce/plugins/media/css/media.css +68 -0
  144. js/tiny_mce/plugins/media/editor_plugin.js +1 -0
  145. js/tiny_mce/plugins/media/editor_plugin_src.js +435 -0
  146. js/tiny_mce/plugins/media/images/flash.gif +0 -0
  147. js/tiny_mce/plugins/media/images/media.gif +0 -0
  148. js/tiny_mce/plugins/media/images/quicktime.gif +0 -0
  149. js/tiny_mce/plugins/media/images/realmedia.gif +0 -0
  150. js/tiny_mce/plugins/media/images/shockwave.gif +0 -0
  151. js/tiny_mce/plugins/media/images/windowsmedia.gif +0 -0
  152. js/tiny_mce/plugins/media/jscripts/embed.js +73 -0
  153. js/tiny_mce/plugins/media/jscripts/media.js +590 -0
  154. js/tiny_mce/plugins/media/langs/en.js +94 -0
  155. js/tiny_mce/plugins/media/media.htm +723 -0
  156. js/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
  157. js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +62 -0
  158. js/tiny_mce/plugins/nonbreaking/images/nonbreaking.gif +0 -0
  159. js/tiny_mce/plugins/nonbreaking/langs/en.js +5 -0
  160. js/tiny_mce/plugins/noneditable/css/noneditable.css +9 -0
  161. js/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
  162. js/tiny_mce/plugins/noneditable/editor_plugin_src.js +153 -0
  163. js/tiny_mce/plugins/noneditable/readme.txt +1 -0
  164. js/tiny_mce/plugins/paste/blank.htm +19 -0
  165. js/tiny_mce/plugins/paste/css/blank.css +13 -0
  166. js/tiny_mce/plugins/paste/css/pasteword.css +3 -0
  167. js/tiny_mce/plugins/paste/editor_plugin.js +1 -0
  168. js/tiny_mce/plugins/paste/editor_plugin_src.js +395 -0
  169. js/tiny_mce/plugins/paste/images/pastetext.gif +0 -0
  170. js/tiny_mce/plugins/paste/images/pasteword.gif +0 -0
  171. js/tiny_mce/plugins/paste/images/selectall.gif +0 -0
  172. js/tiny_mce/plugins/paste/jscripts/pastetext.js +38 -0
  173. js/tiny_mce/plugins/paste/jscripts/pasteword.js +52 -0
  174. js/tiny_mce/plugins/paste/langs/en.js +10 -0
  175. js/tiny_mce/plugins/paste/pastetext.htm +34 -0
  176. js/tiny_mce/plugins/paste/pasteword.htm +29 -0
  177. js/tiny_mce/plugins/paste/readme.txt +1 -0
  178. js/tiny_mce/plugins/preview/editor_plugin.js +1 -0
  179. js/tiny_mce/plugins/preview/editor_plugin_src.js +205 -0
  180. js/tiny_mce/plugins/preview/example.html +14 -0
  181. js/tiny_mce/plugins/preview/images/preview.gif +0 -0
  182. js/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
  183. js/tiny_mce/plugins/preview/langs/en.js +5 -0
  184. js/tiny_mce/plugins/preview/readme.txt +1 -0
  185. js/tiny_mce/plugins/print/editor_plugin.js +1 -0
  186. js/tiny_mce/plugins/print/editor_plugin_src.js +47 -0
  187. js/tiny_mce/plugins/print/images/print.gif +0 -0
  188. js/tiny_mce/plugins/print/langs/en.js +5 -0
  189. js/tiny_mce/plugins/print/readme.txt +1 -0
  190. js/tiny_mce/plugins/readme.txt +1 -0
  191. js/tiny_mce/plugins/save/editor_plugin.js +1 -0
  192. js/tiny_mce/plugins/save/editor_plugin_src.js +152 -0
  193. js/tiny_mce/plugins/save/images/cancel.gif +0 -0
  194. js/tiny_mce/plugins/save/images/save.gif +0 -0
  195. js/tiny_mce/plugins/save/langs/en.js +6 -0
  196. js/tiny_mce/plugins/save/readme.txt +1 -0
  197. js/tiny_mce/plugins/searchreplace/css/searchreplace.css +20 -0
  198. js/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
  199. js/tiny_mce/plugins/searchreplace/editor_plugin_src.js +173 -0
  200. js/tiny_mce/plugins/searchreplace/images/replace.gif +0 -0
  201. js/tiny_mce/plugins/searchreplace/images/replace_all_button_bg.gif +0 -0
  202. js/tiny_mce/plugins/searchreplace/images/replace_button_bg.gif +0 -0
  203. js/tiny_mce/plugins/searchreplace/images/search.gif +0 -0
  204. js/tiny_mce/plugins/searchreplace/jscripts/searchreplace.js +86 -0
  205. js/tiny_mce/plugins/searchreplace/langs/en.js +21 -0
  206. js/tiny_mce/plugins/searchreplace/readme.txt +1 -0
  207. js/tiny_mce/plugins/searchreplace/searchreplace.htm +107 -0
  208. js/tiny_mce/plugins/style/css/props.css +62 -0
  209. js/tiny_mce/plugins/style/editor_plugin.js +1 -0
  210. js/tiny_mce/plugins/style/editor_plugin_src.js +83 -0
  211. js/tiny_mce/plugins/style/images/apply_button_bg.gif +0 -0
  212. js/tiny_mce/plugins/style/images/style_info.gif +0 -0
  213. js/tiny_mce/plugins/style/images/styleprops.gif +0 -0
  214. js/tiny_mce/plugins/style/jscripts/props.js +633 -0
  215. js/tiny_mce/plugins/style/langs/en.js +66 -0
  216. js/tiny_mce/plugins/style/props.htm +729 -0
  217. js/tiny_mce/plugins/style/readme.txt +1 -0
  218. js/tiny_mce/plugins/table/cell.htm +182 -0
  219. js/tiny_mce/plugins/table/css/cell.css +17 -0
  220. js/tiny_mce/plugins/table/css/row.css +25 -0
  221. js/tiny_mce/plugins/table/css/table.css +13 -0
  222. js/tiny_mce/plugins/table/editor_plugin.js +1 -0
  223. js/tiny_mce/plugins/table/editor_plugin_src.js +1073 -0
  224. js/tiny_mce/plugins/table/images/buttons.gif +0 -0
  225. js/tiny_mce/plugins/table/images/table.gif +0 -0
  226. js/tiny_mce/plugins/table/images/table_cell_props.gif +0 -0
  227. js/tiny_mce/plugins/table/images/table_delete.gif +0 -0
  228. js/tiny_mce/plugins/table/images/table_delete_col.gif +0 -0
  229. js/tiny_mce/plugins/table/images/table_delete_row.gif +0 -0
  230. js/tiny_mce/plugins/table/images/table_insert_col_after.gif +0 -0
  231. js/tiny_mce/plugins/table/images/table_insert_col_before.gif +0 -0
  232. js/tiny_mce/plugins/table/images/table_insert_row_after.gif +0 -0
  233. js/tiny_mce/plugins/table/images/table_insert_row_before.gif +0 -0
  234. js/tiny_mce/plugins/table/images/table_merge_cells.gif +0 -0
  235. js/tiny_mce/plugins/table/images/table_row_props.gif +0 -0
  236. js/tiny_mce/plugins/table/images/table_split_cells.gif +0 -0
  237. js/tiny_mce/plugins/table/jscripts/cell.js +249 -0
  238. js/tiny_mce/plugins/table/jscripts/merge_cells.js +24 -0
  239. js/tiny_mce/plugins/table/jscripts/row.js +200 -0
  240. js/tiny_mce/plugins/table/jscripts/table.js +364 -0
  241. js/tiny_mce/plugins/table/langs/en.js +79 -0
  242. js/tiny_mce/plugins/table/merge_cells.htm +38 -0
  243. js/tiny_mce/plugins/table/readme.txt +1 -0
  244. js/tiny_mce/plugins/table/row.htm +159 -0
  245. js/tiny_mce/plugins/table/table.htm +160 -0
  246. js/tiny_mce/plugins/template/blank.htm +23 -0
  247. js/tiny_mce/plugins/template/css/template.css +23 -0
  248. js/tiny_mce/plugins/template/editor_plugin.js +1 -0
  249. js/tiny_mce/plugins/template/editor_plugin_src.js +551 -0
  250. js/tiny_mce/plugins/template/images/template.gif +0 -0
  251. js/tiny_mce/plugins/template/jscripts/template.js +143 -0
  252. js/tiny_mce/plugins/template/langs/en.js +16 -0
  253. js/tiny_mce/plugins/template/template.htm +37 -0
  254. js/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
  255. js/tiny_mce/plugins/visualchars/editor_plugin_src.js +89 -0
  256. js/tiny_mce/plugins/visualchars/images/visualchars.gif +0 -0
  257. js/tiny_mce/plugins/visualchars/langs/en.js +5 -0
  258. js/tiny_mce/plugins/xhtmlxtras/abbr.htm +148 -0
  259. js/tiny_mce/plugins/xhtmlxtras/acronym.htm +148 -0
  260. js/tiny_mce/plugins/xhtmlxtras/attributes.htm +153 -0
  261. js/tiny_mce/plugins/xhtmlxtras/cite.htm +148 -0
  262. js/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
  263. js/tiny_mce/plugins/xhtmlxtras/css/popup.css +46 -0
  264. js/tiny_mce/plugins/xhtmlxtras/css/xhtmlxtras.css +24 -0
  265. js/tiny_mce/plugins/xhtmlxtras/del.htm +169 -0
  266. js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
  267. js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +199 -0
  268. js/tiny_mce/plugins/xhtmlxtras/images/abbr.gif +0 -0
  269. js/tiny_mce/plugins/xhtmlxtras/images/acronym.gif +0 -0
  270. js/tiny_mce/plugins/xhtmlxtras/images/attribs.gif +0 -0
  271. js/tiny_mce/plugins/xhtmlxtras/images/cite.gif +0 -0
  272. js/tiny_mce/plugins/xhtmlxtras/images/date_time.gif +0 -0
  273. js/tiny_mce/plugins/xhtmlxtras/images/del.gif +0 -0
  274. js/tiny_mce/plugins/xhtmlxtras/images/ins.gif +0 -0
  275. js/tiny_mce/plugins/xhtmlxtras/images/remove_button_bg.gif +0 -0
  276. js/tiny_mce/plugins/xhtmlxtras/ins.htm +169 -0
  277. js/tiny_mce/plugins/xhtmlxtras/jscripts/abbr.js +29 -0
  278. js/tiny_mce/plugins/xhtmlxtras/jscripts/acronym.js +29 -0
  279. js/tiny_mce/plugins/xhtmlxtras/jscripts/attributes.js +130 -0
  280. js/tiny_mce/plugins/xhtmlxtras/jscripts/cite.js +29 -0
  281. js/tiny_mce/plugins/xhtmlxtras/jscripts/del.js +54 -0
  282. js/tiny_mce/plugins/xhtmlxtras/jscripts/element_common.js +241 -0
  283. js/tiny_mce/plugins/xhtmlxtras/jscripts/ins.js +53 -0
  284. js/tiny_mce/plugins/xhtmlxtras/langs/en.js +42 -0
  285. js/tiny_mce/plugins/zoom/editor_plugin.js +1 -0
  286. js/tiny_mce/plugins/zoom/editor_plugin_src.js +56 -0
  287. js/tiny_mce/plugins/zoom/readme.txt +1 -0
  288. js/tiny_mce/themes/advanced/about.htm +52 -0
  289. js/tiny_mce/themes/advanced/anchor.htm +33 -0
  290. js/tiny_mce/themes/advanced/charmap.htm +53 -0
  291. js/tiny_mce/themes/advanced/color_picker.htm +74 -0
  292. js/tiny_mce/themes/advanced/css/colorpicker.css +53 -0
  293. js/tiny_mce/themes/advanced/css/editor_content.css +58 -0
  294. js/tiny_mce/themes/advanced/css/editor_popup.css +331 -0
  295. js/tiny_mce/themes/advanced/css/editor_ui.css +97 -0
  296. js/tiny_mce/themes/advanced/docs/en/about.htm +31 -0
  297. js/tiny_mce/themes/advanced/docs/en/common_buttons.htm +162 -0
  298. js/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm +45 -0
  299. js/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif +0 -0
  300. js/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif +0 -0
  301. js/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif +0 -0
  302. js/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif +0 -0
  303. js/tiny_mce/themes/advanced/docs/en/index.htm +27 -0
  304. js/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm +32 -0
  305. js/tiny_mce/themes/advanced/docs/en/insert_image_button.htm +65 -0
  306. js/tiny_mce/themes/advanced/docs/en/insert_link_button.htm +33 -0
  307. js/tiny_mce/themes/advanced/docs/en/insert_table_button.htm +71 -0
  308. js/tiny_mce/themes/advanced/docs/en/style.css +28 -0
  309. js/tiny_mce/themes/advanced/editor_template.js +1 -0
js/tiny_mce/blank.htm ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>blank_page</title>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ </head>
6
+ <body class="mceContentBody">
7
+
8
+ </body>
9
+ </html>
js/tiny_mce/langs/en.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ bold_desc : 'Bold (Ctrl+B)',
5
+ italic_desc : 'Italic (Ctrl+I)',
6
+ underline_desc : 'Underline (Ctrl+U)',
7
+ striketrough_desc : 'Strikethrough',
8
+ justifyleft_desc : 'Align left',
9
+ justifycenter_desc : 'Align center',
10
+ justifyright_desc : 'Align right',
11
+ justifyfull_desc : 'Align full',
12
+ bullist_desc : 'Unordered list',
13
+ numlist_desc : 'Ordered list',
14
+ outdent_desc : 'Outdent',
15
+ indent_desc : 'Indent',
16
+ undo_desc : 'Undo (Ctrl+Z)',
17
+ redo_desc : 'Redo (Ctrl+Y)',
18
+ link_desc : 'Insert/edit link',
19
+ unlink_desc : 'Unlink',
20
+ image_desc : 'Insert/edit image',
21
+ cleanup_desc : 'Cleanup messy code',
22
+ focus_alert : 'A editor instance must be focused before using this command.',
23
+ edit_confirm : 'Do you want to use the WYSIWYG mode for this textarea?',
24
+ insert_link_title : 'Insert/edit link',
25
+ insert : 'Insert',
26
+ update : 'Update',
27
+ cancel : 'Cancel',
28
+ insert_link_url : 'Link URL',
29
+ insert_link_target : 'Target',
30
+ insert_link_target_same : 'Open link in the same window',
31
+ insert_link_target_blank : 'Open link in a new window',
32
+ insert_image_title : 'Insert/edit image',
33
+ insert_image_src : 'Image URL',
34
+ insert_image_alt : 'Image description',
35
+ help_desc : 'Help',
36
+ bold_img : "bold.gif",
37
+ italic_img : "italic.gif",
38
+ underline_img : "underline.gif",
39
+ clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?',
40
+ popup_blocked : 'Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.'
41
+ });
js/tiny_mce/langs/readme.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ Beginning with version 2.0.5 the language packs are no
2
+ longer included with the core distribution.
3
+ Language packs can be downloaded from the TinyMCE website:
4
+ http://tinymce.moxiecode.com/download.php
5
+
6
+ The language pack codes are based on ISO-639-1:
7
+ http://www.loc.gov/standards/iso639-2/englangn.html
8
+
9
+ Plrease try using entities if possible. Like &aring; etc for non a-z characters.
js/tiny_mce/license.txt ADDED
@@ -0,0 +1,504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 2.1, February 1999
3
+
4
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ [This is the first released version of the Lesser GPL. It also counts
10
+ as the successor of the GNU Library Public License, version 2, hence
11
+ the version number 2.1.]
12
+
13
+ Preamble
14
+
15
+ The licenses for most software are designed to take away your
16
+ freedom to share and change it. By contrast, the GNU General Public
17
+ Licenses are intended to guarantee your freedom to share and change
18
+ free software--to make sure the software is free for all its users.
19
+
20
+ This license, the Lesser General Public License, applies to some
21
+ specially designated software packages--typically libraries--of the
22
+ Free Software Foundation and other authors who decide to use it. You
23
+ can use it too, but we suggest you first think carefully about whether
24
+ this license or the ordinary General Public License is the better
25
+ strategy to use in any particular case, based on the explanations below.
26
+
27
+ When we speak of free software, we are referring to freedom of use,
28
+ not price. Our General Public Licenses are designed to make sure that
29
+ you have the freedom to distribute copies of free software (and charge
30
+ for this service if you wish); that you receive source code or can get
31
+ it if you want it; that you can change the software and use pieces of
32
+ it in new free programs; and that you are informed that you can do
33
+ these things.
34
+
35
+ To protect your rights, we need to make restrictions that forbid
36
+ distributors to deny you these rights or to ask you to surrender these
37
+ rights. These restrictions translate to certain responsibilities for
38
+ you if you distribute copies of the library or if you modify it.
39
+
40
+ For example, if you distribute copies of the library, whether gratis
41
+ or for a fee, you must give the recipients all the rights that we gave
42
+ you. You must make sure that they, too, receive or can get the source
43
+ code. If you link other code with the library, you must provide
44
+ complete object files to the recipients, so that they can relink them
45
+ with the library after making changes to the library and recompiling
46
+ it. And you must show them these terms so they know their rights.
47
+
48
+ We protect your rights with a two-step method: (1) we copyright the
49
+ library, and (2) we offer you this license, which gives you legal
50
+ permission to copy, distribute and/or modify the library.
51
+
52
+ To protect each distributor, we want to make it very clear that
53
+ there is no warranty for the free library. Also, if the library is
54
+ modified by someone else and passed on, the recipients should know
55
+ that what they have is not the original version, so that the original
56
+ author's reputation will not be affected by problems that might be
57
+ introduced by others.
58
+
59
+ Finally, software patents pose a constant threat to the existence of
60
+ any free program. We wish to make sure that a company cannot
61
+ effectively restrict the users of a free program by obtaining a
62
+ restrictive license from a patent holder. Therefore, we insist that
63
+ any patent license obtained for a version of the library must be
64
+ consistent with the full freedom of use specified in this license.
65
+
66
+ Most GNU software, including some libraries, is covered by the
67
+ ordinary GNU General Public License. This license, the GNU Lesser
68
+ General Public License, applies to certain designated libraries, and
69
+ is quite different from the ordinary General Public License. We use
70
+ this license for certain libraries in order to permit linking those
71
+ libraries into non-free programs.
72
+
73
+ When a program is linked with a library, whether statically or using
74
+ a shared library, the combination of the two is legally speaking a
75
+ combined work, a derivative of the original library. The ordinary
76
+ General Public License therefore permits such linking only if the
77
+ entire combination fits its criteria of freedom. The Lesser General
78
+ Public License permits more lax criteria for linking other code with
79
+ the library.
80
+
81
+ We call this license the "Lesser" General Public License because it
82
+ does Less to protect the user's freedom than the ordinary General
83
+ Public License. It also provides other free software developers Less
84
+ of an advantage over competing non-free programs. These disadvantages
85
+ are the reason we use the ordinary General Public License for many
86
+ libraries. However, the Lesser license provides advantages in certain
87
+ special circumstances.
88
+
89
+ For example, on rare occasions, there may be a special need to
90
+ encourage the widest possible use of a certain library, so that it becomes
91
+ a de-facto standard. To achieve this, non-free programs must be
92
+ allowed to use the library. A more frequent case is that a free
93
+ library does the same job as widely used non-free libraries. In this
94
+ case, there is little to gain by limiting the free library to free
95
+ software only, so we use the Lesser General Public License.
96
+
97
+ In other cases, permission to use a particular library in non-free
98
+ programs enables a greater number of people to use a large body of
99
+ free software. For example, permission to use the GNU C Library in
100
+ non-free programs enables many more people to use the whole GNU
101
+ operating system, as well as its variant, the GNU/Linux operating
102
+ system.
103
+
104
+ Although the Lesser General Public License is Less protective of the
105
+ users' freedom, it does ensure that the user of a program that is
106
+ linked with the Library has the freedom and the wherewithal to run
107
+ that program using a modified version of the Library.
108
+
109
+ The precise terms and conditions for copying, distribution and
110
+ modification follow. Pay close attention to the difference between a
111
+ "work based on the library" and a "work that uses the library". The
112
+ former contains code derived from the library, whereas the latter must
113
+ be combined with the library in order to run.
114
+
115
+ GNU LESSER GENERAL PUBLIC LICENSE
116
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
117
+
118
+ 0. This License Agreement applies to any software library or other
119
+ program which contains a notice placed by the copyright holder or
120
+ other authorized party saying it may be distributed under the terms of
121
+ this Lesser General Public License (also called "this License").
122
+ Each licensee is addressed as "you".
123
+
124
+ A "library" means a collection of software functions and/or data
125
+ prepared so as to be conveniently linked with application programs
126
+ (which use some of those functions and data) to form executables.
127
+
128
+ The "Library", below, refers to any such software library or work
129
+ which has been distributed under these terms. A "work based on the
130
+ Library" means either the Library or any derivative work under
131
+ copyright law: that is to say, a work containing the Library or a
132
+ portion of it, either verbatim or with modifications and/or translated
133
+ straightforwardly into another language. (Hereinafter, translation is
134
+ included without limitation in the term "modification".)
135
+
136
+ "Source code" for a work means the preferred form of the work for
137
+ making modifications to it. For a library, complete source code means
138
+ all the source code for all modules it contains, plus any associated
139
+ interface definition files, plus the scripts used to control compilation
140
+ and installation of the library.
141
+
142
+ Activities other than copying, distribution and modification are not
143
+ covered by this License; they are outside its scope. The act of
144
+ running a program using the Library is not restricted, and output from
145
+ such a program is covered only if its contents constitute a work based
146
+ on the Library (independent of the use of the Library in a tool for
147
+ writing it). Whether that is true depends on what the Library does
148
+ and what the program that uses the Library does.
149
+
150
+ 1. You may copy and distribute verbatim copies of the Library's
151
+ complete source code as you receive it, in any medium, provided that
152
+ you conspicuously and appropriately publish on each copy an
153
+ appropriate copyright notice and disclaimer of warranty; keep intact
154
+ all the notices that refer to this License and to the absence of any
155
+ warranty; and distribute a copy of this License along with the
156
+ Library.
157
+
158
+ You may charge a fee for the physical act of transferring a copy,
159
+ and you may at your option offer warranty protection in exchange for a
160
+ fee.
161
+
162
+ 2. You may modify your copy or copies of the Library or any portion
163
+ of it, thus forming a work based on the Library, and copy and
164
+ distribute such modifications or work under the terms of Section 1
165
+ above, provided that you also meet all of these conditions:
166
+
167
+ a) The modified work must itself be a software library.
168
+
169
+ b) You must cause the files modified to carry prominent notices
170
+ stating that you changed the files and the date of any change.
171
+
172
+ c) You must cause the whole of the work to be licensed at no
173
+ charge to all third parties under the terms of this License.
174
+
175
+ d) If a facility in the modified Library refers to a function or a
176
+ table of data to be supplied by an application program that uses
177
+ the facility, other than as an argument passed when the facility
178
+ is invoked, then you must make a good faith effort to ensure that,
179
+ in the event an application does not supply such function or
180
+ table, the facility still operates, and performs whatever part of
181
+ its purpose remains meaningful.
182
+
183
+ (For example, a function in a library to compute square roots has
184
+ a purpose that is entirely well-defined independent of the
185
+ application. Therefore, Subsection 2d requires that any
186
+ application-supplied function or table used by this function must
187
+ be optional: if the application does not supply it, the square
188
+ root function must still compute square roots.)
189
+
190
+ These requirements apply to the modified work as a whole. If
191
+ identifiable sections of that work are not derived from the Library,
192
+ and can be reasonably considered independent and separate works in
193
+ themselves, then this License, and its terms, do not apply to those
194
+ sections when you distribute them as separate works. But when you
195
+ distribute the same sections as part of a whole which is a work based
196
+ on the Library, the distribution of the whole must be on the terms of
197
+ this License, whose permissions for other licensees extend to the
198
+ entire whole, and thus to each and every part regardless of who wrote
199
+ it.
200
+
201
+ Thus, it is not the intent of this section to claim rights or contest
202
+ your rights to work written entirely by you; rather, the intent is to
203
+ exercise the right to control the distribution of derivative or
204
+ collective works based on the Library.
205
+
206
+ In addition, mere aggregation of another work not based on the Library
207
+ with the Library (or with a work based on the Library) on a volume of
208
+ a storage or distribution medium does not bring the other work under
209
+ the scope of this License.
210
+
211
+ 3. You may opt to apply the terms of the ordinary GNU General Public
212
+ License instead of this License to a given copy of the Library. To do
213
+ this, you must alter all the notices that refer to this License, so
214
+ that they refer to the ordinary GNU General Public License, version 2,
215
+ instead of to this License. (If a newer version than version 2 of the
216
+ ordinary GNU General Public License has appeared, then you can specify
217
+ that version instead if you wish.) Do not make any other change in
218
+ these notices.
219
+
220
+ Once this change is made in a given copy, it is irreversible for
221
+ that copy, so the ordinary GNU General Public License applies to all
222
+ subsequent copies and derivative works made from that copy.
223
+
224
+ This option is useful when you wish to copy part of the code of
225
+ the Library into a program that is not a library.
226
+
227
+ 4. You may copy and distribute the Library (or a portion or
228
+ derivative of it, under Section 2) in object code or executable form
229
+ under the terms of Sections 1 and 2 above provided that you accompany
230
+ it with the complete corresponding machine-readable source code, which
231
+ must be distributed under the terms of Sections 1 and 2 above on a
232
+ medium customarily used for software interchange.
233
+
234
+ If distribution of object code is made by offering access to copy
235
+ from a designated place, then offering equivalent access to copy the
236
+ source code from the same place satisfies the requirement to
237
+ distribute the source code, even though third parties are not
238
+ compelled to copy the source along with the object code.
239
+
240
+ 5. A program that contains no derivative of any portion of the
241
+ Library, but is designed to work with the Library by being compiled or
242
+ linked with it, is called a "work that uses the Library". Such a
243
+ work, in isolation, is not a derivative work of the Library, and
244
+ therefore falls outside the scope of this License.
245
+
246
+ However, linking a "work that uses the Library" with the Library
247
+ creates an executable that is a derivative of the Library (because it
248
+ contains portions of the Library), rather than a "work that uses the
249
+ library". The executable is therefore covered by this License.
250
+ Section 6 states terms for distribution of such executables.
251
+
252
+ When a "work that uses the Library" uses material from a header file
253
+ that is part of the Library, the object code for the work may be a
254
+ derivative work of the Library even though the source code is not.
255
+ Whether this is true is especially significant if the work can be
256
+ linked without the Library, or if the work is itself a library. The
257
+ threshold for this to be true is not precisely defined by law.
258
+
259
+ If such an object file uses only numerical parameters, data
260
+ structure layouts and accessors, and small macros and small inline
261
+ functions (ten lines or less in length), then the use of the object
262
+ file is unrestricted, regardless of whether it is legally a derivative
263
+ work. (Executables containing this object code plus portions of the
264
+ Library will still fall under Section 6.)
265
+
266
+ Otherwise, if the work is a derivative of the Library, you may
267
+ distribute the object code for the work under the terms of Section 6.
268
+ Any executables containing that work also fall under Section 6,
269
+ whether or not they are linked directly with the Library itself.
270
+
271
+ 6. As an exception to the Sections above, you may also combine or
272
+ link a "work that uses the Library" with the Library to produce a
273
+ work containing portions of the Library, and distribute that work
274
+ under terms of your choice, provided that the terms permit
275
+ modification of the work for the customer's own use and reverse
276
+ engineering for debugging such modifications.
277
+
278
+ You must give prominent notice with each copy of the work that the
279
+ Library is used in it and that the Library and its use are covered by
280
+ this License. You must supply a copy of this License. If the work
281
+ during execution displays copyright notices, you must include the
282
+ copyright notice for the Library among them, as well as a reference
283
+ directing the user to the copy of this License. Also, you must do one
284
+ of these things:
285
+
286
+ a) Accompany the work with the complete corresponding
287
+ machine-readable source code for the Library including whatever
288
+ changes were used in the work (which must be distributed under
289
+ Sections 1 and 2 above); and, if the work is an executable linked
290
+ with the Library, with the complete machine-readable "work that
291
+ uses the Library", as object code and/or source code, so that the
292
+ user can modify the Library and then relink to produce a modified
293
+ executable containing the modified Library. (It is understood
294
+ that the user who changes the contents of definitions files in the
295
+ Library will not necessarily be able to recompile the application
296
+ to use the modified definitions.)
297
+
298
+ b) Use a suitable shared library mechanism for linking with the
299
+ Library. A suitable mechanism is one that (1) uses at run time a
300
+ copy of the library already present on the user's computer system,
301
+ rather than copying library functions into the executable, and (2)
302
+ will operate properly with a modified version of the library, if
303
+ the user installs one, as long as the modified version is
304
+ interface-compatible with the version that the work was made with.
305
+
306
+ c) Accompany the work with a written offer, valid for at
307
+ least three years, to give the same user the materials
308
+ specified in Subsection 6a, above, for a charge no more
309
+ than the cost of performing this distribution.
310
+
311
+ d) If distribution of the work is made by offering access to copy
312
+ from a designated place, offer equivalent access to copy the above
313
+ specified materials from the same place.
314
+
315
+ e) Verify that the user has already received a copy of these
316
+ materials or that you have already sent this user a copy.
317
+
318
+ For an executable, the required form of the "work that uses the
319
+ Library" must include any data and utility programs needed for
320
+ reproducing the executable from it. However, as a special exception,
321
+ the materials to be distributed need not include anything that is
322
+ normally distributed (in either source or binary form) with the major
323
+ components (compiler, kernel, and so on) of the operating system on
324
+ which the executable runs, unless that component itself accompanies
325
+ the executable.
326
+
327
+ It may happen that this requirement contradicts the license
328
+ restrictions of other proprietary libraries that do not normally
329
+ accompany the operating system. Such a contradiction means you cannot
330
+ use both them and the Library together in an executable that you
331
+ distribute.
332
+
333
+ 7. You may place library facilities that are a work based on the
334
+ Library side-by-side in a single library together with other library
335
+ facilities not covered by this License, and distribute such a combined
336
+ library, provided that the separate distribution of the work based on
337
+ the Library and of the other library facilities is otherwise
338
+ permitted, and provided that you do these two things:
339
+
340
+ a) Accompany the combined library with a copy of the same work
341
+ based on the Library, uncombined with any other library
342
+ facilities. This must be distributed under the terms of the
343
+ Sections above.
344
+
345
+ b) Give prominent notice with the combined library of the fact
346
+ that part of it is a work based on the Library, and explaining
347
+ where to find the accompanying uncombined form of the same work.
348
+
349
+ 8. You may not copy, modify, sublicense, link with, or distribute
350
+ the Library except as expressly provided under this License. Any
351
+ attempt otherwise to copy, modify, sublicense, link with, or
352
+ distribute the Library is void, and will automatically terminate your
353
+ rights under this License. However, parties who have received copies,
354
+ or rights, from you under this License will not have their licenses
355
+ terminated so long as such parties remain in full compliance.
356
+
357
+ 9. You are not required to accept this License, since you have not
358
+ signed it. However, nothing else grants you permission to modify or
359
+ distribute the Library or its derivative works. These actions are
360
+ prohibited by law if you do not accept this License. Therefore, by
361
+ modifying or distributing the Library (or any work based on the
362
+ Library), you indicate your acceptance of this License to do so, and
363
+ all its terms and conditions for copying, distributing or modifying
364
+ the Library or works based on it.
365
+
366
+ 10. Each time you redistribute the Library (or any work based on the
367
+ Library), the recipient automatically receives a license from the
368
+ original licensor to copy, distribute, link with or modify the Library
369
+ subject to these terms and conditions. You may not impose any further
370
+ restrictions on the recipients' exercise of the rights granted herein.
371
+ You are not responsible for enforcing compliance by third parties with
372
+ this License.
373
+
374
+ 11. If, as a consequence of a court judgment or allegation of patent
375
+ infringement or for any other reason (not limited to patent issues),
376
+ conditions are imposed on you (whether by court order, agreement or
377
+ otherwise) that contradict the conditions of this License, they do not
378
+ excuse you from the conditions of this License. If you cannot
379
+ distribute so as to satisfy simultaneously your obligations under this
380
+ License and any other pertinent obligations, then as a consequence you
381
+ may not distribute the Library at all. For example, if a patent
382
+ license would not permit royalty-free redistribution of the Library by
383
+ all those who receive copies directly or indirectly through you, then
384
+ the only way you could satisfy both it and this License would be to
385
+ refrain entirely from distribution of the Library.
386
+
387
+ If any portion of this section is held invalid or unenforceable under any
388
+ particular circumstance, the balance of the section is intended to apply,
389
+ and the section as a whole is intended to apply in other circumstances.
390
+
391
+ It is not the purpose of this section to induce you to infringe any
392
+ patents or other property right claims or to contest validity of any
393
+ such claims; this section has the sole purpose of protecting the
394
+ integrity of the free software distribution system which is
395
+ implemented by public license practices. Many people have made
396
+ generous contributions to the wide range of software distributed
397
+ through that system in reliance on consistent application of that
398
+ system; it is up to the author/donor to decide if he or she is willing
399
+ to distribute software through any other system and a licensee cannot
400
+ impose that choice.
401
+
402
+ This section is intended to make thoroughly clear what is believed to
403
+ be a consequence of the rest of this License.
404
+
405
+ 12. If the distribution and/or use of the Library is restricted in
406
+ certain countries either by patents or by copyrighted interfaces, the
407
+ original copyright holder who places the Library under this License may add
408
+ an explicit geographical distribution limitation excluding those countries,
409
+ so that distribution is permitted only in or among countries not thus
410
+ excluded. In such case, this License incorporates the limitation as if
411
+ written in the body of this License.
412
+
413
+ 13. The Free Software Foundation may publish revised and/or new
414
+ versions of the Lesser General Public License from time to time.
415
+ Such new versions will be similar in spirit to the present version,
416
+ but may differ in detail to address new problems or concerns.
417
+
418
+ Each version is given a distinguishing version number. If the Library
419
+ specifies a version number of this License which applies to it and
420
+ "any later version", you have the option of following the terms and
421
+ conditions either of that version or of any later version published by
422
+ the Free Software Foundation. If the Library does not specify a
423
+ license version number, you may choose any version ever published by
424
+ the Free Software Foundation.
425
+
426
+ 14. If you wish to incorporate parts of the Library into other free
427
+ programs whose distribution conditions are incompatible with these,
428
+ write to the author to ask for permission. For software which is
429
+ copyrighted by the Free Software Foundation, write to the Free
430
+ Software Foundation; we sometimes make exceptions for this. Our
431
+ decision will be guided by the two goals of preserving the free status
432
+ of all derivatives of our free software and of promoting the sharing
433
+ and reuse of software generally.
434
+
435
+ NO WARRANTY
436
+
437
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
438
+ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
439
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
440
+ OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
441
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
442
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
443
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
444
+ LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
445
+ THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
446
+
447
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
448
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
449
+ AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
450
+ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
451
+ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
452
+ LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
453
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
454
+ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455
+ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456
+ DAMAGES.
457
+
458
+ END OF TERMS AND CONDITIONS
459
+
460
+ How to Apply These Terms to Your New Libraries
461
+
462
+ If you develop a new library, and you want it to be of the greatest
463
+ possible use to the public, we recommend making it free software that
464
+ everyone can redistribute and change. You can do so by permitting
465
+ redistribution under these terms (or, alternatively, under the terms of the
466
+ ordinary General Public License).
467
+
468
+ To apply these terms, attach the following notices to the library. It is
469
+ safest to attach them to the start of each source file to most effectively
470
+ convey the exclusion of warranty; and each file should have at least the
471
+ "copyright" line and a pointer to where the full notice is found.
472
+
473
+ <one line to give the library's name and a brief idea of what it does.>
474
+ Copyright (C) <year> <name of author>
475
+
476
+ This library is free software; you can redistribute it and/or
477
+ modify it under the terms of the GNU Lesser General Public
478
+ License as published by the Free Software Foundation; either
479
+ version 2.1 of the License, or (at your option) any later version.
480
+
481
+ This library is distributed in the hope that it will be useful,
482
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
483
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
484
+ Lesser General Public License for more details.
485
+
486
+ You should have received a copy of the GNU Lesser General Public
487
+ License along with this library; if not, write to the Free Software
488
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
489
+
490
+ Also add information on how to contact you by electronic and paper mail.
491
+
492
+ You should also get your employer (if you work as a programmer) or your
493
+ school, if any, to sign a "copyright disclaimer" for the library, if
494
+ necessary. Here is a sample; alter the names:
495
+
496
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
497
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
498
+
499
+ <signature of Ty Coon>, 1 April 1990
500
+ Ty Coon, President of Vice
501
+
502
+ That's all there is to it!
503
+
504
+
js/tiny_mce/plugins/advhr/css/advhr.css ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ input.radio {
2
+ border: 1px none #000000;
3
+ background-color: transparent;
4
+ vertical-align: middle;
5
+ }
6
+
7
+ .panel_wrapper div.current {
8
+ height: 80px;
9
+ }
10
+
11
+ #width {
12
+ width: 50px;
13
+ vertical-align: middle;
14
+ }
15
+
16
+ #width2 {
17
+ width: 50px;
18
+ vertical-align: middle;
19
+ }
20
+
21
+ #size {
22
+ width: 100px;
23
+ }
js/tiny_mce/plugins/advhr/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('advhr');var TinyMCE_AdvancedHRPlugin={getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"advhr":return tinyMCE.getButtonHTML(cn,'lang_insert_advhr_desc','{$pluginurl}/images/advhr.gif','mceAdvancedHr')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=250;template['height']=160;template['width']+=tinyMCE.getLang('lang_advhr_delta_width',0);template['height']+=tinyMCE.getLang('lang_advhr_delta_height',0);var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):""}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'})}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'<hr />')}else{tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",size:size,width:width,noshade:noshade,mceDo:'insert'})}}return true}return false},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="HR"){tinyMCE.switchClass(editor_id+'_advhr','mceButtonSelected');return true}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advhr','mceButtonNormal');return true}};tinyMCE.addPlugin("advhr",TinyMCE_AdvancedHRPlugin);
js/tiny_mce/plugins/advhr/editor_plugin_src.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('advhr');
10
+
11
+ var TinyMCE_AdvancedHRPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Advanced HR',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ }
20
+ },
21
+
22
+ getControlHTML : function(cn) {
23
+ switch (cn) {
24
+ case "advhr":
25
+ return tinyMCE.getButtonHTML(cn, 'lang_insert_advhr_desc', '{$pluginurl}/images/advhr.gif', 'mceAdvancedHr');
26
+ }
27
+
28
+ return "";
29
+ },
30
+
31
+ /**
32
+ * Executes the mceAdvanceHr command.
33
+ */
34
+ execCommand : function(editor_id, element, command, user_interface, value) {
35
+ // Handle commands
36
+ switch (command) {
37
+ case "mceAdvancedHr":
38
+ var template = new Array();
39
+
40
+ template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme
41
+ template['width'] = 250;
42
+ template['height'] = 160;
43
+
44
+ template['width'] += tinyMCE.getLang('lang_advhr_delta_width', 0);
45
+ template['height'] += tinyMCE.getLang('lang_advhr_delta_height', 0);
46
+
47
+ var size = "", width = "", noshade = "";
48
+ if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr") {
49
+ tinyMCE.hrElement = tinyMCE.selectedElement;
50
+
51
+ if (tinyMCE.hrElement) {
52
+ size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : "";
53
+ width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : "";
54
+ noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : "";
55
+ }
56
+
57
+ tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'});
58
+ } else {
59
+ if (tinyMCE.isMSIE) {
60
+ tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'<hr />');
61
+ } else {
62
+ tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", size : size, width : width, noshade : noshade, mceDo : 'insert'});
63
+ }
64
+ }
65
+
66
+ return true;
67
+ }
68
+
69
+ // Pass to next handler in chain
70
+ return false;
71
+ },
72
+
73
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
74
+ if (node == null)
75
+ return;
76
+
77
+ do {
78
+ if (node.nodeName == "HR") {
79
+ tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonSelected');
80
+ return true;
81
+ }
82
+ } while ((node = node.parentNode));
83
+
84
+ tinyMCE.switchClass(editor_id + '_advhr', 'mceButtonNormal');
85
+
86
+ return true;
87
+ }
88
+ };
89
+
90
+ tinyMCE.addPlugin("advhr", TinyMCE_AdvancedHRPlugin);
js/tiny_mce/plugins/advhr/images/advhr.gif ADDED
Binary file
js/tiny_mce/plugins/advhr/jscripts/rule.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function init() {
2
+ tinyMCEPopup.resizeToInnerSize();
3
+
4
+ var formObj = document.forms[0];
5
+ formObj.width.value = tinyMCE.getWindowArg('width');
6
+ formObj.size.value = tinyMCE.getWindowArg('size');
7
+ formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'),'Insert',true);
8
+ if (tinyMCE.getWindowArg('noshade')) {
9
+ formObj.noshade.checked = true;
10
+ }
11
+ if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) {
12
+ formObj.width2.value = "%";
13
+ formObj.width.value = formObj.width.value.substring(0,formObj.width.value.length-1);
14
+ }
15
+ }
16
+
17
+ function insertHR() {
18
+ var formObj = document.forms[0];
19
+ var width = formObj.width.value;
20
+ var size = formObj.size.value;
21
+ var html = '<hr';
22
+ if (size!='' && size!=0) {
23
+ html += ' size="' + size + '"';
24
+ }
25
+ if (width!='' && width!=0) {
26
+ html += ' width="' + width;
27
+ if (formObj.width2.value=='%') {
28
+ html += '%';
29
+ }
30
+ html += '"';
31
+ }
32
+ if (formObj.noshade.checked==true) {
33
+ html += ' noshade="noshade"';
34
+ }
35
+ html += ' />';
36
+
37
+ tinyMCEPopup.execCommand("mceInsertContent", true, html);
38
+ tinyMCEPopup.close();
39
+ }
40
+
41
+ function cancelAction() {
42
+ tinyMCEPopup.close();
43
+ }
js/tiny_mce/plugins/advhr/langs/en.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ insert_advhr_desc : 'Horizontale rule',
5
+ insert_advhr_width : 'Width',
6
+ insert_advhr_size : 'Height',
7
+ insert_advhr_noshade : 'No shadow'
8
+ });
js/tiny_mce/plugins/advhr/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/advhr/rule.htm ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_insert_advhr_desc}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="jscripts/rule.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <link href="css/advhr.css" rel="stylesheet" type="text/css" />
8
+ <base target="_self" />
9
+ </head>
10
+ <body onload="tinyMCEPopup.executeOnLoad('init();');">
11
+ <form onsubmit="insertHR();return false;" action="#">
12
+ <div class="tabs">
13
+ <ul>
14
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_advhr_desc}</a></span></li>
15
+ </ul>
16
+ </div>
17
+
18
+ <div class="panel_wrapper">
19
+ <div id="general_panel" class="panel current">
20
+ <table border="0" cellpadding="4" cellspacing="0">
21
+ <tr>
22
+ <td><label for="width">{$lang_insert_advhr_width}</label></td>
23
+ <td nowrap="nowrap">
24
+ <input id="width" name="width" type="text" value="" />
25
+ <select name="width2" id="width2">
26
+ <option value="">px</option>
27
+ <option value="%">%</option>
28
+ </select>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <td><label for="size">{$lang_insert_advhr_size}</label></td>
33
+ <td><select id="size" name="size">
34
+ <option value="">Normal</option>
35
+ <option value="1">1</option>
36
+ <option value="2">2</option>
37
+ <option value="3">3</option>
38
+ <option value="4">4</option>
39
+ <option value="5">5</option>
40
+ </select></td>
41
+ </tr>
42
+ <tr>
43
+ <td><label for="noshade">{$lang_insert_advhr_noshade}</label></td>
44
+ <td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
45
+ </tr>
46
+ </table>
47
+ </div>
48
+ </div>
49
+
50
+ <div class="mceActionPanel">
51
+ <div style="float: left">
52
+ <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertHR();" />
53
+ </div>
54
+
55
+ <div style="float: right">
56
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
57
+ </div>
58
+ </div>
59
+ </form>
60
+ </body>
61
+ </html>
js/tiny_mce/plugins/advimage/css/advimage.css ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* CSS file for advimage plugin popup */
2
+
3
+ .mceImageList {
4
+ width: 280px;
5
+ }
6
+
7
+ .mceActionPanel {
8
+ margin-top: 7px;
9
+ }
10
+
11
+ .alignPreview {
12
+ border: 1px solid black;
13
+ width: 140px;
14
+ height: 140px;
15
+ overflow: hidden;
16
+ padding: 5px;
17
+ }
18
+
19
+ .checkbox {
20
+ border: 0;
21
+ }
22
+
23
+ .panel_wrapper div.current {
24
+ height: 305px;
25
+ }
26
+
27
+ #prev {
28
+ margin: 0;
29
+ border: 1px
30
+ solid black;
31
+ width: 99%;
32
+ height: 150px;
33
+ overflow: auto;
34
+ }
35
+
36
+ #align, #classlist {
37
+ width: 150px;
38
+ }
39
+
40
+ #width, #height {
41
+ vertical-align: middle;
42
+ width: 50px;
43
+ text-align: center;
44
+ }
45
+
46
+ #vspace, #hspace, #border {
47
+ vertical-align: middle;
48
+ width: 30px;
49
+ text-align: center;
50
+ }
51
+
52
+ #classlist {
53
+ width: 180px;
54
+ }
55
+
56
+ input {
57
+ width: 280px;
58
+ }
59
+
60
+ #constrain, #onmousemovecheck {
61
+ width: auto;
62
+ }
63
+
64
+ #id, #dir, #lang, #usemap, #longdesc {
65
+ width: 200px;
66
+ }
js/tiny_mce/plugins/advimage/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('advimage');var TinyMCE_AdvancedImagePlugin={getInfo:function(){return{longname:'Advanced image',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"image":return tinyMCE.getButtonHTML(cn,'lang_image_desc','{$themeurl}/images/image.gif','mceAdvImage')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvImage":var template=new Array();template['file']='../../plugins/advimage/image.htm';template['width']=480;template['height']=380;template['width']+=tinyMCE.getLang('lang_advimage_delta_width',0);template['height']+=tinyMCE.getLang('lang_advimage_delta_height',0);var inst=tinyMCE.getInstanceById(editor_id);var elm=inst.getFocusElement();if(elm!=null&&tinyMCE.getAttrib(elm,'class').indexOf('mceItem')!=-1)return true;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true}return false},cleanup:function(type,content){switch(type){case"insert_to_editor_dom":var imgs=content.getElementsByTagName("img"),src,i;for(i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=this._getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseover',"this.src='"+src+"';")}if((src=this._getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);imgs[i].setAttribute('onmouseout',"this.src='"+src+"';")}}break;case"get_from_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){var onmouseover=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseover'));var onmouseout=tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i],'onmouseout'));if((src=this._getImageSrc(onmouseover))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseover',"this.src='"+src+"';")}if((src=this._getImageSrc(onmouseout))!=""){if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('onmouseout',"this.src='"+src+"';")}}break}return content},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&tinyMCE.getAttrib(node,'class').indexOf('mceItem')==-1){tinyMCE.switchClass(editor_id+'_advimage','mceButtonSelected');return true}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_advimage','mceButtonNormal');return true},_getImageSrc:function(s){var sr,p=-1;if(!s)return"";if((p=s.indexOf('this.src='))!=-1){sr=s.substring(p+10);sr=sr.substring(0,sr.indexOf('\''));return sr}return""}};tinyMCE.addPlugin("advimage",TinyMCE_AdvancedImagePlugin);
js/tiny_mce/plugins/advimage/editor_plugin_src.js ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('advimage');
10
+
11
+ var TinyMCE_AdvancedImagePlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Advanced image',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ getControlHTML : function(cn) {
23
+ switch (cn) {
24
+ case "image":
25
+ return tinyMCE.getButtonHTML(cn, 'lang_image_desc', '{$themeurl}/images/image.gif', 'mceAdvImage');
26
+ }
27
+
28
+ return "";
29
+ },
30
+
31
+ execCommand : function(editor_id, element, command, user_interface, value) {
32
+ switch (command) {
33
+ case "mceAdvImage":
34
+ var template = new Array();
35
+
36
+ template['file'] = '../../plugins/advimage/image.htm';
37
+ template['width'] = 480;
38
+ template['height'] = 380;
39
+
40
+ // Language specific width and height addons
41
+ template['width'] += tinyMCE.getLang('lang_advimage_delta_width', 0);
42
+ template['height'] += tinyMCE.getLang('lang_advimage_delta_height', 0);
43
+
44
+ var inst = tinyMCE.getInstanceById(editor_id);
45
+ var elm = inst.getFocusElement();
46
+
47
+ if (elm != null && tinyMCE.getAttrib(elm, 'class').indexOf('mceItem') != -1)
48
+ return true;
49
+
50
+ tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
51
+
52
+ return true;
53
+ }
54
+
55
+ return false;
56
+ },
57
+
58
+ cleanup : function(type, content) {
59
+ switch (type) {
60
+ case "insert_to_editor_dom":
61
+ var imgs = content.getElementsByTagName("img"), src, i;
62
+ for (i=0; i<imgs.length; i++) {
63
+ var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
64
+ var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
65
+
66
+ if ((src = this._getImageSrc(onmouseover)) != "") {
67
+ if (tinyMCE.getParam('convert_urls'))
68
+ src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
69
+
70
+ imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
71
+ }
72
+
73
+ if ((src = this._getImageSrc(onmouseout)) != "") {
74
+ if (tinyMCE.getParam('convert_urls'))
75
+ src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
76
+
77
+ imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
78
+ }
79
+ }
80
+ break;
81
+
82
+ case "get_from_editor_dom":
83
+ var imgs = content.getElementsByTagName("img");
84
+ for (var i=0; i<imgs.length; i++) {
85
+ var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
86
+ var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
87
+
88
+ if ((src = this._getImageSrc(onmouseover)) != "") {
89
+ if (tinyMCE.getParam('convert_urls'))
90
+ src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
91
+
92
+ imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
93
+ }
94
+
95
+ if ((src = this._getImageSrc(onmouseout)) != "") {
96
+ if (tinyMCE.getParam('convert_urls'))
97
+ src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
98
+
99
+ imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
100
+ }
101
+ }
102
+ break;
103
+ }
104
+
105
+ return content;
106
+ },
107
+
108
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
109
+ if (node == null)
110
+ return;
111
+
112
+ do {
113
+ if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {
114
+ tinyMCE.switchClass(editor_id + '_advimage', 'mceButtonSelected');
115
+ return true;
116
+ }
117
+ } while ((node = node.parentNode));
118
+
119
+ tinyMCE.switchClass(editor_id + '_advimage', 'mceButtonNormal');
120
+
121
+ return true;
122
+ },
123
+
124
+ /**
125
+ * Returns the image src from a scripted mouse over image str.
126
+ *
127
+ * @param {string} s String to get real src from.
128
+ * @return Image src from a scripted mouse over image str.
129
+ * @type string
130
+ */
131
+ _getImageSrc : function(s) {
132
+ var sr, p = -1;
133
+
134
+ if (!s)
135
+ return "";
136
+
137
+ if ((p = s.indexOf('this.src=')) != -1) {
138
+ sr = s.substring(p + 10);
139
+ sr = sr.substring(0, sr.indexOf('\''));
140
+
141
+ return sr;
142
+ }
143
+
144
+ return "";
145
+ }
146
+ };
147
+
148
+ tinyMCE.addPlugin("advimage", TinyMCE_AdvancedImagePlugin);
js/tiny_mce/plugins/advimage/image.htm ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_insert_image_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/validate.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>
9
+ <link href="css/advimage.css" rel="stylesheet" type="text/css" />
10
+ <base target="_self" />
11
+ </head>
12
+ <body id="advimage" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
13
+ <form onsubmit="insertAction();return false;" action="#">
14
+ <div class="tabs">
15
+ <ul>
16
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_advimage_tab_general}</a></span></li>
17
+ <li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{$lang_advimage_tab_appearance}</a></span></li>
18
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_advimage_tab_advanced}</a></span></li>
19
+ </ul>
20
+ </div>
21
+
22
+ <div class="panel_wrapper">
23
+ <div id="general_panel" class="panel current">
24
+ <fieldset>
25
+ <legend>{$lang_advimage_general}</legend>
26
+
27
+ <table class="properties">
28
+ <tr>
29
+ <td class="column1"><label id="srclabel" for="src">{$lang_insert_image_src}</label></td>
30
+ <td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
31
+ <tr>
32
+ <td><input name="src" type="text" id="src" value="" onchange="showPreviewImage(this.value);" /></td>
33
+ <td id="srcbrowsercontainer">&nbsp;</td>
34
+ </tr>
35
+ </table></td>
36
+ </tr>
37
+ <tr id="imagelistsrcrow">
38
+ <td class="column1"><label for="imagelistsrc">{$lang_image_list}</label></td>
39
+ <td colspan="2" id="imagelistsrccontainer">&nbsp;</td>
40
+ </tr>
41
+ <tr>
42
+ <td class="column1"><label id="altlabel" for="alt">{$lang_insert_image_alt}</label></td>
43
+ <td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
44
+ </tr>
45
+ <tr>
46
+ <td class="column1"><label id="titlelabel" for="title">{$lang_advimage_title}</label></td>
47
+ <td colspan="2"><input id="title" name="title" type="text" value="" /></td>
48
+ </tr>
49
+ </table>
50
+ </fieldset>
51
+
52
+ <fieldset>
53
+ <legend>{$lang_advimage_preview}</legend>
54
+ <div id="prev"></div>
55
+ </fieldset>
56
+ </div>
57
+
58
+ <div id="appearance_panel" class="panel">
59
+ <fieldset>
60
+ <legend>{$lang_advimage_tab_appearance}</legend>
61
+
62
+ <table border="0" cellpadding="4" cellspacing="0">
63
+ <tr>
64
+ <td class="column1"><label id="alignlabel" for="align">{$lang_insert_image_align}</label></td>
65
+ <td><select id="align" name="align" onchange="changeAppearance();">
66
+ <option value="">{$lang_insert_image_align_default}</option>
67
+ <option value="baseline">{$lang_insert_image_align_baseline}</option>
68
+ <option value="top">{$lang_insert_image_align_top}</option>
69
+ <option value="middle">{$lang_insert_image_align_middle}</option>
70
+ <option value="bottom">{$lang_insert_image_align_bottom}</option>
71
+ <option value="texttop">{$lang_insert_image_align_texttop}</option>
72
+ <option value="absmiddle">{$lang_insert_image_align_absmiddle}</option>
73
+ <option value="absbottom">{$lang_insert_image_align_absbottom}</option>
74
+ <option value="left">{$lang_insert_image_align_left}</option>
75
+ <option value="right">{$lang_insert_image_align_right}</option>
76
+ </select>
77
+ </td>
78
+ <td rowspan="6" valign="top">
79
+ <div class="alignPreview">
80
+ <img id="alignSampleImg" src="images/sample.gif" alt="{$lang_advimage_example_img}" />
81
+ Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
82
+ nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
83
+ edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
84
+ erat volutpat.
85
+ </div>
86
+ </td>
87
+ </tr>
88
+
89
+ <tr>
90
+ <td class="column1"><label id="widthlabel" for="width">{$lang_insert_image_dimensions}</label></td>
91
+ <td nowrap="nowrap">
92
+ <input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="changeHeight();" /> x
93
+ <input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="changeWidth();" /> px
94
+ </td>
95
+ </tr>
96
+
97
+ <tr>
98
+ <td>&nbsp;</td>
99
+ <td><table border="0" cellpadding="0" cellspacing="0">
100
+ <tr>
101
+ <td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
102
+ <td><label id="constrainlabel" for="constrain">{$lang_advimage_constrain_proportions}</label></td>
103
+ </tr>
104
+ </table></td>
105
+ </tr>
106
+
107
+ <tr>
108
+ <td class="column1"><label id="vspacelabel" for="vspace">{$lang_insert_image_vspace}</label></td>
109
+ <td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="changeAppearance();updateStyle();" />
110
+ </td>
111
+ </tr>
112
+
113
+ <tr>
114
+ <td class="column1"><label id="hspacelabel" for="hspace">{$lang_insert_image_hspace}</label></td>
115
+ <td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="changeAppearance();updateStyle();" /></td>
116
+ </tr>
117
+
118
+ <tr>
119
+ <td class="column1"><label id="borderlabel" for="border">{$lang_insert_image_border}</label></td>
120
+ <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="changeAppearance();updateStyle();" /></td>
121
+ </tr>
122
+
123
+ <tr>
124
+ <td><label id="classlabel" for="classlist">{$lang_class_name}</label></td>
125
+ <td colspan="2">
126
+ <select id="classlist" name="classlist">
127
+ <option value="" selected>{$lang_not_set}</option>
128
+ </select>
129
+ </td>
130
+ </tr>
131
+
132
+ <tr>
133
+ <td class="column1"><label id="stylelabel" for="style">{$lang_advimage_style}</label></td>
134
+ <td colspan="2"><input id="style" name="style" type="text" value="" onchange="styleUpdated();" /></td>
135
+ </tr>
136
+
137
+ <!-- <tr>
138
+ <td class="column1"><label id="classeslabel" for="classes">{$lang_advimage_classes}</label></td>
139
+ <td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
140
+ </tr> -->
141
+ </table>
142
+ </fieldset>
143
+ </div>
144
+
145
+ <div id="advanced_panel" class="panel">
146
+ <fieldset>
147
+ <legend>{$lang_advimage_swap_image}</legend>
148
+
149
+ <input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="changeMouseMove();" />
150
+ <label id="onmousemovechecklabel" for="onmousemovecheck">{$lang_advimage_alt_image}</label>
151
+
152
+ <table border="0" cellpadding="4" cellspacing="0" width="100%">
153
+ <tr>
154
+ <td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{$lang_advimage_mouseover}</label></td>
155
+ <td><table border="0" cellspacing="0" cellpadding="0">
156
+ <tr>
157
+ <td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
158
+ <td id="onmouseoversrccontainer">&nbsp;</td>
159
+ </tr>
160
+ </table></td>
161
+ </tr>
162
+ <tr id="imagelistoverrow">
163
+ <td class="column1"><label for="imagelistover">{$lang_image_list}</label></td>
164
+ <td id="imagelistovercontainer">&nbsp;</td>
165
+ </tr>
166
+ <tr>
167
+ <td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{$lang_advimage_mouseout}</label></td>
168
+ <td class="column2"><table border="0" cellspacing="0" cellpadding="0">
169
+ <tr>
170
+ <td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
171
+ <td id="onmouseoutsrccontainer">&nbsp;</td>
172
+ </tr>
173
+ </table></td>
174
+ </tr>
175
+ <tr id="imagelistoutrow">
176
+ <td class="column1"><label for="imagelistout">{$lang_image_list}</label></td>
177
+ <td id="imagelistoutcontainer">&nbsp;</td>
178
+ </tr>
179
+ </table>
180
+ </fieldset>
181
+
182
+ <fieldset>
183
+ <legend>{$lang_advimage_misc}</legend>
184
+
185
+ <table border="0" cellpadding="4" cellspacing="0">
186
+ <tr>
187
+ <td class="column1"><label id="idlabel" for="id">{$lang_advimage_id}</label></td>
188
+ <td><input id="id" name="id" type="text" value="" /></td>
189
+ </tr>
190
+
191
+ <tr>
192
+ <td class="column1"><label id="dirlabel" for="dir">{$lang_advimage_langdir}</label></td>
193
+ <td>
194
+ <select id="dir" name="dir" onchange="changeAppearance();">
195
+ <option value="">{$lang_not_set}</option>
196
+ <option value="ltr">{$lang_advimage_ltr}</option>
197
+ <option value="rtl">{$lang_advimage_rtl}</option>
198
+ </select>
199
+ </td>
200
+ </tr>
201
+
202
+ <tr>
203
+ <td class="column1"><label id="langlabel" for="lang">{$lang_advimage_langcode}</label></td>
204
+ <td>
205
+ <input id="lang" name="lang" type="text" value="" />
206
+ </td>
207
+ </tr>
208
+
209
+ <tr>
210
+ <td class="column1"><label id="usemaplabel" for="usemap">{$lang_advimage_image_map}</label></td>
211
+ <td>
212
+ <input id="usemap" name="usemap" type="text" value="" />
213
+ </td>
214
+ </tr>
215
+
216
+ <tr>
217
+ <td class="column1"><label id="longdesclabel" for="longdesc">{$lang_advimage_long_desc}</label></td>
218
+ <td><table border="0" cellspacing="0" cellpadding="0">
219
+ <tr>
220
+ <td><input id="longdesc" name="longdesc" type="text" value="" /></td>
221
+ <td id="longdesccontainer">&nbsp;</td>
222
+ </tr>
223
+ </table></td>
224
+ </tr>
225
+ </table>
226
+ </fieldset>
227
+ </div>
228
+ </div>
229
+
230
+ <div class="mceActionPanel">
231
+ <div style="float: left">
232
+ <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertAction();" />
233
+ </div>
234
+
235
+ <div style="float: right">
236
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="cancelAction();" />
237
+ </div>
238
+ </div>
239
+ </form>
240
+ </body>
241
+ </html>
js/tiny_mce/plugins/advimage/images/sample.gif ADDED
Binary file
js/tiny_mce/plugins/advimage/jscripts/functions.js ADDED
@@ -0,0 +1,538 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Functions for the advimage plugin popup */
2
+
3
+ var preloadImg = null;
4
+ var orgImageWidth, orgImageHeight;
5
+
6
+ function preinit() {
7
+ // Initialize
8
+ tinyMCE.setWindowArg('mce_windowresize', false);
9
+
10
+ // Import external list url javascript
11
+ var url = tinyMCE.getParam("external_image_list_url");
12
+ if (url != null) {
13
+ // Fix relative
14
+ if (url.charAt(0) != '/' && url.indexOf('://') == -1)
15
+ url = tinyMCE.documentBasePath + "/" + url;
16
+
17
+ document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
18
+ }
19
+ }
20
+
21
+ function convertURL(url, node, on_save) {
22
+ return eval("tinyMCEPopup.windowOpener." + tinyMCE.settings['urlconverter_callback'] + "(url, node, on_save);");
23
+ }
24
+
25
+ function getImageSrc(str) {
26
+ var pos = -1;
27
+
28
+ if (!str)
29
+ return "";
30
+
31
+ if ((pos = str.indexOf('this.src=')) != -1) {
32
+ var src = str.substring(pos + 10);
33
+
34
+ src = src.substring(0, src.indexOf('\''));
35
+
36
+ if (tinyMCE.getParam('convert_urls'))
37
+ src = convertURL(src, null, true);
38
+
39
+ return src;
40
+ }
41
+
42
+ return "";
43
+ }
44
+
45
+ function init() {
46
+ tinyMCEPopup.resizeToInnerSize();
47
+
48
+ var formObj = document.forms[0];
49
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
50
+ var elm = inst.getFocusElement();
51
+ var action = "insert";
52
+ var html = "";
53
+
54
+ // Image list src
55
+ html = getImageListHTML('imagelistsrc','src','onSelectMainImage');
56
+ if (html == "")
57
+ document.getElementById("imagelistsrcrow").style.display = 'none';
58
+ else
59
+ document.getElementById("imagelistsrccontainer").innerHTML = html;
60
+
61
+ // Image list oversrc
62
+ html = getImageListHTML('imagelistover','onmouseoversrc');
63
+ if (html == "")
64
+ document.getElementById("imagelistoverrow").style.display = 'none';
65
+ else
66
+ document.getElementById("imagelistovercontainer").innerHTML = html;
67
+
68
+ // Image list outsrc
69
+ html = getImageListHTML('imagelistout','onmouseoutsrc');
70
+ if (html == "")
71
+ document.getElementById("imagelistoutrow").style.display = 'none';
72
+ else
73
+ document.getElementById("imagelistoutcontainer").innerHTML = html;
74
+
75
+ // Src browser
76
+ html = getBrowserHTML('srcbrowser','src','image','advimage');
77
+ document.getElementById("srcbrowsercontainer").innerHTML = html;
78
+
79
+ // Over browser
80
+ html = getBrowserHTML('oversrcbrowser','onmouseoversrc','image','advimage');
81
+ document.getElementById("onmouseoversrccontainer").innerHTML = html;
82
+
83
+ // Out browser
84
+ html = getBrowserHTML('outsrcbrowser','onmouseoutsrc','image','advimage');
85
+ document.getElementById("onmouseoutsrccontainer").innerHTML = html;
86
+
87
+ // Longdesc browser
88
+ html = getBrowserHTML('longdescbrowser','longdesc','file','advimage');
89
+ document.getElementById("longdesccontainer").innerHTML = html;
90
+
91
+ // Resize some elements
92
+ if (isVisible('srcbrowser'))
93
+ document.getElementById('src').style.width = '260px';
94
+
95
+ if (isVisible('oversrcbrowser'))
96
+ document.getElementById('onmouseoversrc').style.width = '260px';
97
+
98
+ if (isVisible('outsrcbrowser'))
99
+ document.getElementById('onmouseoutsrc').style.width = '260px';
100
+
101
+ if (isVisible('longdescbrowser'))
102
+ document.getElementById('longdesc').style.width = '180px';
103
+
104
+ // Check action
105
+ if (elm != null && elm.nodeName == "IMG")
106
+ action = "update";
107
+
108
+ formObj.insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true);
109
+
110
+ if (action == "update") {
111
+ var src = tinyMCE.getAttrib(elm, 'src');
112
+ var onmouseoversrc = getImageSrc(tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseover')));
113
+ var onmouseoutsrc = getImageSrc(tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseout')));
114
+
115
+ src = convertURL(src, elm, true);
116
+
117
+ // Use mce_src if found
118
+ var mceRealSrc = tinyMCE.getAttrib(elm, 'mce_src');
119
+ if (mceRealSrc != "") {
120
+ src = mceRealSrc;
121
+
122
+ if (tinyMCE.getParam('convert_urls'))
123
+ src = convertURL(src, elm, true);
124
+ }
125
+
126
+ if (onmouseoversrc != "" && tinyMCE.getParam('convert_urls'))
127
+ onmouseoversrc = convertURL(onmouseoversrc, elm, true);
128
+
129
+ if (onmouseoutsrc != "" && tinyMCE.getParam('convert_urls'))
130
+ onmouseoutsrc = convertURL(onmouseoutsrc, elm, true);
131
+
132
+ // Setup form data
133
+ var style = tinyMCE.parseStyle(tinyMCE.getAttrib(elm, "style"));
134
+
135
+ // Store away old size
136
+ orgImageWidth = trimSize(getStyle(elm, 'width'))
137
+ orgImageHeight = trimSize(getStyle(elm, 'height'));
138
+
139
+ formObj.src.value = src;
140
+ formObj.alt.value = tinyMCE.getAttrib(elm, 'alt');
141
+ formObj.title.value = tinyMCE.getAttrib(elm, 'title');
142
+ formObj.border.value = trimSize(getStyle(elm, 'border', 'borderWidth'));
143
+ formObj.vspace.value = tinyMCE.getAttrib(elm, 'vspace');
144
+ formObj.hspace.value = tinyMCE.getAttrib(elm, 'hspace');
145
+ formObj.width.value = orgImageWidth;
146
+ formObj.height.value = orgImageHeight;
147
+ formObj.onmouseoversrc.value = onmouseoversrc;
148
+ formObj.onmouseoutsrc.value = onmouseoutsrc;
149
+ formObj.id.value = tinyMCE.getAttrib(elm, 'id');
150
+ formObj.dir.value = tinyMCE.getAttrib(elm, 'dir');
151
+ formObj.lang.value = tinyMCE.getAttrib(elm, 'lang');
152
+ formObj.longdesc.value = tinyMCE.getAttrib(elm, 'longdesc');
153
+ formObj.usemap.value = tinyMCE.getAttrib(elm, 'usemap');
154
+ formObj.style.value = tinyMCE.serializeStyle(style);
155
+
156
+ // Select by the values
157
+ if (tinyMCE.isMSIE)
158
+ selectByValue(formObj, 'align', getStyle(elm, 'align', 'styleFloat'));
159
+ else
160
+ selectByValue(formObj, 'align', getStyle(elm, 'align', 'cssFloat'));
161
+
162
+ addClassesToList('classlist', 'advimage_styles');
163
+
164
+ selectByValue(formObj, 'classlist', tinyMCE.getAttrib(elm, 'class'));
165
+ selectByValue(formObj, 'imagelistsrc', src);
166
+ selectByValue(formObj, 'imagelistover', onmouseoversrc);
167
+ selectByValue(formObj, 'imagelistout', onmouseoutsrc);
168
+
169
+ updateStyle();
170
+ showPreviewImage(src, true);
171
+ changeAppearance();
172
+
173
+ window.focus();
174
+ } else
175
+ addClassesToList('classlist', 'advimage_styles');
176
+
177
+ // If option enabled default contrain proportions to checked
178
+ if (tinyMCE.getParam("advimage_constrain_proportions", true))
179
+ formObj.constrain.checked = true;
180
+
181
+ // Check swap image if valid data
182
+ if (formObj.onmouseoversrc.value != "" || formObj.onmouseoutsrc.value != "")
183
+ setSwapImageDisabled(false);
184
+ else
185
+ setSwapImageDisabled(true);
186
+ }
187
+
188
+ function setSwapImageDisabled(state) {
189
+ var formObj = document.forms[0];
190
+
191
+ formObj.onmousemovecheck.checked = !state;
192
+
193
+ setBrowserDisabled('overbrowser', state);
194
+ setBrowserDisabled('outbrowser', state);
195
+
196
+ if (formObj.imagelistover)
197
+ formObj.imagelistover.disabled = state;
198
+
199
+ if (formObj.imagelistout)
200
+ formObj.imagelistout.disabled = state;
201
+
202
+ formObj.onmouseoversrc.disabled = state;
203
+ formObj.onmouseoutsrc.disabled = state;
204
+ }
205
+
206
+ function setAttrib(elm, attrib, value) {
207
+ var formObj = document.forms[0];
208
+ var valueElm = formObj.elements[attrib];
209
+
210
+ if (typeof(value) == "undefined" || value == null) {
211
+ value = "";
212
+
213
+ if (valueElm)
214
+ value = valueElm.value;
215
+ }
216
+
217
+ if (value != "") {
218
+ elm.setAttribute(attrib, value);
219
+
220
+ if (attrib == "style")
221
+ attrib = "style.cssText";
222
+
223
+ if (attrib == "longdesc")
224
+ attrib = "longDesc";
225
+
226
+ if (attrib == "width") {
227
+ attrib = "style.width";
228
+ value = value + "px";
229
+ value = value.replace(/%px/g, 'px');
230
+ }
231
+
232
+ if (attrib == "height") {
233
+ attrib = "style.height";
234
+ value = value + "px";
235
+ value = value.replace(/%px/g, 'px');
236
+ }
237
+
238
+ if (attrib == "class")
239
+ attrib = "className";
240
+
241
+ eval('elm.' + attrib + "=value;");
242
+ } else {
243
+ if (attrib == 'class')
244
+ elm.className = '';
245
+
246
+ elm.removeAttribute(attrib);
247
+ }
248
+ }
249
+
250
+ function makeAttrib(attrib, value) {
251
+ var formObj = document.forms[0];
252
+ var valueElm = formObj.elements[attrib];
253
+
254
+ if (typeof(value) == "undefined" || value == null) {
255
+ value = "";
256
+
257
+ if (valueElm)
258
+ value = valueElm.value;
259
+ }
260
+
261
+ if (value == "")
262
+ return "";
263
+
264
+ // XML encode it
265
+ value = value.replace(/&/g, '&amp;');
266
+ value = value.replace(/\"/g, '&quot;');
267
+ value = value.replace(/</g, '&lt;');
268
+ value = value.replace(/>/g, '&gt;');
269
+
270
+ return ' ' + attrib + '="' + value + '"';
271
+ }
272
+
273
+ function insertAction() {
274
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
275
+ var elm = inst.getFocusElement();
276
+ var formObj = document.forms[0];
277
+ var src = formObj.src.value;
278
+ var onmouseoversrc = formObj.onmouseoversrc.value;
279
+ var onmouseoutsrc = formObj.onmouseoutsrc.value;
280
+
281
+ if (!AutoValidator.validate(formObj)) {
282
+ alert(tinyMCE.getLang('lang_invalid_data'));
283
+ return false;
284
+ }
285
+
286
+ if (tinyMCE.getParam("accessibility_warnings")) {
287
+ if (formObj.alt.value == "" && !confirm(tinyMCE.getLang('lang_advimage_missing_alt', '', true)))
288
+ return;
289
+ }
290
+
291
+ if (onmouseoversrc && onmouseoversrc != "")
292
+ onmouseoversrc = "this.src='" + convertURL(onmouseoversrc, tinyMCE.imgElement) + "';";
293
+
294
+ if (onmouseoutsrc && onmouseoutsrc != "")
295
+ onmouseoutsrc = "this.src='" + convertURL(onmouseoutsrc, tinyMCE.imgElement) + "';";
296
+
297
+ if (elm != null && elm.nodeName == "IMG") {
298
+ setAttrib(elm, 'src', convertURL(src, tinyMCE.imgElement));
299
+ setAttrib(elm, 'mce_src', src);
300
+ setAttrib(elm, 'alt');
301
+ setAttrib(elm, 'title');
302
+ setAttrib(elm, 'border');
303
+ setAttrib(elm, 'vspace');
304
+ setAttrib(elm, 'hspace');
305
+ setAttrib(elm, 'width');
306
+ setAttrib(elm, 'height');
307
+ setAttrib(elm, 'onmouseover', onmouseoversrc);
308
+ setAttrib(elm, 'onmouseout', onmouseoutsrc);
309
+ setAttrib(elm, 'id');
310
+ setAttrib(elm, 'dir');
311
+ setAttrib(elm, 'lang');
312
+ setAttrib(elm, 'longdesc');
313
+ setAttrib(elm, 'usemap');
314
+ setAttrib(elm, 'style');
315
+ setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
316
+ setAttrib(elm, 'align', getSelectValue(formObj, 'align'));
317
+
318
+ //tinyMCEPopup.execCommand("mceRepaint");
319
+
320
+ // Repaint if dimensions changed
321
+ if (formObj.width.value != orgImageWidth || formObj.height.value != orgImageHeight)
322
+ inst.repaint();
323
+
324
+ // Refresh in old MSIE
325
+ if (tinyMCE.isMSIE5)
326
+ elm.outerHTML = elm.outerHTML;
327
+ } else {
328
+ var html = "<img";
329
+
330
+ html += makeAttrib('src', convertURL(src, tinyMCE.imgElement));
331
+ html += makeAttrib('mce_src', src);
332
+ html += makeAttrib('alt');
333
+ html += makeAttrib('title');
334
+ html += makeAttrib('border');
335
+ html += makeAttrib('vspace');
336
+ html += makeAttrib('hspace');
337
+ html += makeAttrib('width');
338
+ html += makeAttrib('height');
339
+ html += makeAttrib('onmouseover', onmouseoversrc);
340
+ html += makeAttrib('onmouseout', onmouseoutsrc);
341
+ html += makeAttrib('id');
342
+ html += makeAttrib('dir');
343
+ html += makeAttrib('lang');
344
+ html += makeAttrib('longdesc');
345
+ html += makeAttrib('usemap');
346
+ html += makeAttrib('style');
347
+ html += makeAttrib('class', getSelectValue(formObj, 'classlist'));
348
+ html += makeAttrib('align', getSelectValue(formObj, 'align'));
349
+ html += " />";
350
+
351
+ tinyMCEPopup.execCommand("mceInsertContent", false, html);
352
+ }
353
+
354
+ tinyMCE._setEventsEnabled(inst.getBody(), false);
355
+ tinyMCEPopup.close();
356
+ }
357
+
358
+ function cancelAction() {
359
+ tinyMCEPopup.close();
360
+ }
361
+
362
+ function changeAppearance() {
363
+ var formObj = document.forms[0];
364
+ var img = document.getElementById('alignSampleImg');
365
+
366
+ if (img) {
367
+ img.align = formObj.align.value;
368
+ img.border = formObj.border.value;
369
+ img.hspace = formObj.hspace.value;
370
+ img.vspace = formObj.vspace.value;
371
+ }
372
+ }
373
+
374
+ function changeMouseMove() {
375
+ var formObj = document.forms[0];
376
+
377
+ setSwapImageDisabled(!formObj.onmousemovecheck.checked);
378
+ }
379
+
380
+ function updateStyle() {
381
+ var formObj = document.forms[0];
382
+ var st = tinyMCE.parseStyle(formObj.style.value);
383
+
384
+ if (tinyMCE.getParam('inline_styles', false)) {
385
+ st['width'] = formObj.width.value == '' ? '' : formObj.width.value + "px";
386
+ st['height'] = formObj.height.value == '' ? '' : formObj.height.value + "px";
387
+ st['border-width'] = formObj.border.value == '' ? '' : formObj.border.value + "px";
388
+ st['margin-top'] = formObj.vspace.value == '' ? '' : formObj.vspace.value + "px";
389
+ st['margin-bottom'] = formObj.vspace.value == '' ? '' : formObj.vspace.value + "px";
390
+ st['margin-left'] = formObj.hspace.value == '' ? '' : formObj.hspace.value + "px";
391
+ st['margin-right'] = formObj.hspace.value == '' ? '' : formObj.hspace.value + "px";
392
+ } else {
393
+ st['width'] = st['height'] = st['border-width'] = null;
394
+
395
+ if (st['margin-top'] == st['margin-bottom'])
396
+ st['margin-top'] = st['margin-bottom'] = null;
397
+
398
+ if (st['margin-left'] == st['margin-right'])
399
+ st['margin-left'] = st['margin-right'] = null;
400
+ }
401
+
402
+ formObj.style.value = tinyMCE.serializeStyle(st);
403
+ }
404
+
405
+ function styleUpdated() {
406
+ var formObj = document.forms[0];
407
+ var st = tinyMCE.parseStyle(formObj.style.value);
408
+
409
+ if (st['width'])
410
+ formObj.width.value = st['width'].replace('px', '');
411
+
412
+ if (st['height'])
413
+ formObj.height.value = st['height'].replace('px', '');
414
+
415
+ if (st['margin-top'] && st['margin-top'] == st['margin-bottom'])
416
+ formObj.vspace.value = st['margin-top'].replace('px', '');
417
+
418
+ if (st['margin-left'] && st['margin-left'] == st['margin-right'])
419
+ formObj.hspace.value = st['margin-left'].replace('px', '');
420
+
421
+ if (st['border-width'])
422
+ formObj.border.value = st['border-width'].replace('px', '');
423
+ }
424
+
425
+ function changeHeight() {
426
+ var formObj = document.forms[0];
427
+
428
+ if (!formObj.constrain.checked || !preloadImg) {
429
+ updateStyle();
430
+ return;
431
+ }
432
+
433
+ if (formObj.width.value == "" || formObj.height.value == "")
434
+ return;
435
+
436
+ var temp = (parseInt(formObj.width.value) / parseInt(preloadImg.width)) * preloadImg.height;
437
+ formObj.height.value = temp.toFixed(0);
438
+ updateStyle();
439
+ }
440
+
441
+ function changeWidth() {
442
+ var formObj = document.forms[0];
443
+
444
+ if (!formObj.constrain.checked || !preloadImg) {
445
+ updateStyle();
446
+ return;
447
+ }
448
+
449
+ if (formObj.width.value == "" || formObj.height.value == "")
450
+ return;
451
+
452
+ var temp = (parseInt(formObj.height.value) / parseInt(preloadImg.height)) * preloadImg.width;
453
+ formObj.width.value = temp.toFixed(0);
454
+ updateStyle();
455
+ }
456
+
457
+ function onSelectMainImage(target_form_element, name, value) {
458
+ var formObj = document.forms[0];
459
+
460
+ formObj.alt.value = name;
461
+ formObj.title.value = name;
462
+
463
+ resetImageData();
464
+ showPreviewImage(formObj.elements[target_form_element].value, false);
465
+ }
466
+
467
+ function showPreviewImage(src, start) {
468
+ var formObj = document.forms[0];
469
+
470
+ selectByValue(document.forms[0], 'imagelistsrc', src);
471
+
472
+ var elm = document.getElementById('prev');
473
+ var src = src == "" ? src : tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
474
+
475
+ if (!start && tinyMCE.getParam("advimage_update_dimensions_onchange", true))
476
+ resetImageData();
477
+
478
+ if (src == "")
479
+ elm.innerHTML = "";
480
+ else
481
+ elm.innerHTML = '<img id="previewImg" src="' + src + '" border="0" onload="updateImageData(' + start + ');" onerror="resetImageData();" />'
482
+ }
483
+
484
+ function updateImageData(start) {
485
+ var formObj = document.forms[0];
486
+
487
+ preloadImg = document.getElementById('previewImg');
488
+
489
+ if (!start && formObj.width.value == "")
490
+ formObj.width.value = preloadImg.width;
491
+
492
+ if (!start && formObj.height.value == "")
493
+ formObj.height.value = preloadImg.height;
494
+
495
+ updateStyle();
496
+ }
497
+
498
+ function resetImageData() {
499
+ var formObj = document.forms[0];
500
+ formObj.width.value = formObj.height.value = "";
501
+ }
502
+
503
+ function getSelectValue(form_obj, field_name) {
504
+ var elm = form_obj.elements[field_name];
505
+
506
+ if (elm == null || elm.options == null)
507
+ return "";
508
+
509
+ return elm.options[elm.selectedIndex].value;
510
+ }
511
+
512
+ function getImageListHTML(elm_id, target_form_element, onchange_func) {
513
+ if (typeof(tinyMCEImageList) == "undefined" || tinyMCEImageList.length == 0)
514
+ return "";
515
+
516
+ var html = "";
517
+
518
+ html += '<select id="' + elm_id + '" name="' + elm_id + '"';
519
+ html += ' class="mceImageList" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
520
+ html += 'this.options[this.selectedIndex].value;';
521
+
522
+ if (typeof(onchange_func) != "undefined")
523
+ html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
524
+
525
+ html += '"><option value="">---</option>';
526
+
527
+ for (var i=0; i<tinyMCEImageList.length; i++)
528
+ html += '<option value="' + tinyMCEImageList[i][1] + '">' + tinyMCEImageList[i][0] + '</option>';
529
+
530
+ html += '</select>';
531
+
532
+ return html;
533
+
534
+ // tinyMCE.debug('-- image list start --', html, '-- image list end --');
535
+ }
536
+
537
+ // While loading
538
+ preinit();
js/tiny_mce/plugins/advimage/langs/en.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('advimage',{
4
+ tab_general : 'General',
5
+ tab_appearance : 'Appearance',
6
+ tab_advanced : 'Advanced',
7
+ general : 'General',
8
+ title : 'Title',
9
+ preview : 'Preview',
10
+ constrain_proportions : 'Constrain proportions',
11
+ langdir : 'Language direction',
12
+ langcode : 'Language code',
13
+ long_desc : 'Long description link',
14
+ style : 'Style',
15
+ classes : 'Classes',
16
+ ltr : 'Left to right',
17
+ rtl : 'Right to left',
18
+ id : 'Id',
19
+ image_map : 'Image map',
20
+ swap_image : 'Swap image',
21
+ alt_image : 'Alternative image',
22
+ mouseover : 'for mouse over',
23
+ mouseout : 'for mouse out',
24
+ misc : 'Miscellaneous',
25
+ example_img : 'Appearance&nbsp;preview&nbsp;image',
26
+ missing_alt : 'Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.'
27
+ });
js/tiny_mce/plugins/advimage/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/advlink/css/advlink.css ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* CSS file for advimage plugin popup */
2
+
3
+ .mceLinkList, .mceAnchorList, #targetlist {
4
+ width: 280px;
5
+ }
6
+
7
+ .mceActionPanel {
8
+ margin-top: 7px;
9
+ }
10
+
11
+ .panel_wrapper div.current {
12
+ height: 320px;
13
+ }
14
+
15
+ #classlist, #title, #href {
16
+ width: 280px;
17
+ }
18
+
19
+ #popupurl, #popupname {
20
+ width: 200px;
21
+ }
22
+
23
+ #popupwidth, #popupheight, #popupleft, #popuptop {
24
+ width: 30px;
25
+ vertical-align: middle;
26
+ text-align: center;
27
+ }
28
+
29
+ #id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {
30
+ width: 200px;
31
+ }
32
+
33
+ #events_panel input {
34
+ width: 200px;
35
+ }
js/tiny_mce/plugins/advlink/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('advlink');var TinyMCE_AdvancedLinkPlugin={getInfo:function(){return{longname:'Advanced link',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){inst.addShortcut('ctrl','k','lang_advlink_desc','mceAdvLink')},getControlHTML:function(cn){switch(cn){case"link":return tinyMCE.getButtonHTML(cn,'lang_link_desc','{$themeurl}/images/link.gif','mceAdvLink')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceAdvLink":var inst=tinyMCE.getInstanceById(editor_id),anySelection=false;var focusElm=inst.getFocusElement(),selectedText=inst.selection.getSelectedText();if(tinyMCE.selectedElement)anySelection=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(selectedText&&selectedText.length>0);if(anySelection||(focusElm!=null&&focusElm.nodeName=="A")){tinyMCE.openWindow({file:'../../plugins/advlink/link.htm',width:480+tinyMCE.getLang('lang_advlink_delta_width',0),height:400+tinyMCE.getLang('lang_advlink_delta_height',0)},{editor_id:editor_id,inline:"yes"})}return true}return false},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="A"&&tinyMCE.getAttrib(node,'href')!=""){tinyMCE.switchClass(editor_id+'_advlink','mceButtonSelected');return true}}while((node=node.parentNode));if(any_selection){tinyMCE.switchClass(editor_id+'_advlink','mceButtonNormal');return true}tinyMCE.switchClass(editor_id+'_advlink','mceButtonDisabled');return true}};tinyMCE.addPlugin("advlink",TinyMCE_AdvancedLinkPlugin);
js/tiny_mce/plugins/advlink/editor_plugin_src.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 268 2007-04-28 15:52:59Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('advlink');
10
+
11
+ var TinyMCE_AdvancedLinkPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Advanced link',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ inst.addShortcut('ctrl', 'k', 'lang_advlink_desc', 'mceAdvLink');
24
+ },
25
+
26
+ getControlHTML : function(cn) {
27
+ switch (cn) {
28
+ case "link":
29
+ return tinyMCE.getButtonHTML(cn, 'lang_link_desc', '{$themeurl}/images/link.gif', 'mceAdvLink');
30
+ }
31
+
32
+ return "";
33
+ },
34
+
35
+ execCommand : function(editor_id, element, command, user_interface, value) {
36
+ switch (command) {
37
+ case "mceAdvLink":
38
+ var inst = tinyMCE.getInstanceById(editor_id), anySelection = false;
39
+ var focusElm = inst.getFocusElement(), selectedText = inst.selection.getSelectedText();
40
+
41
+ if (tinyMCE.selectedElement)
42
+ anySelection = (tinyMCE.selectedElement.nodeName.toLowerCase() == "img") || (selectedText && selectedText.length > 0);
43
+
44
+ if (anySelection || (focusElm != null && focusElm.nodeName == "A")) {
45
+ tinyMCE.openWindow({
46
+ file : '../../plugins/advlink/link.htm',
47
+ width : 480 + tinyMCE.getLang('lang_advlink_delta_width', 0),
48
+ height : 400 + tinyMCE.getLang('lang_advlink_delta_height', 0)
49
+ }, {
50
+ editor_id : editor_id,
51
+ inline : "yes"
52
+ });
53
+ }
54
+
55
+ return true;
56
+ }
57
+
58
+ return false;
59
+ },
60
+
61
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
62
+ if (node == null)
63
+ return;
64
+
65
+ do {
66
+ if (node.nodeName == "A" && tinyMCE.getAttrib(node, 'href') != "") {
67
+ tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonSelected');
68
+ return true;
69
+ }
70
+ } while ((node = node.parentNode));
71
+
72
+ if (any_selection) {
73
+ tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonNormal');
74
+ return true;
75
+ }
76
+
77
+ tinyMCE.switchClass(editor_id + '_advlink', 'mceButtonDisabled');
78
+
79
+ return true;
80
+ }
81
+ };
82
+
83
+ tinyMCE.addPlugin("advlink", TinyMCE_AdvancedLinkPlugin);
js/tiny_mce/plugins/advlink/jscripts/functions.js ADDED
@@ -0,0 +1,587 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Functions for the advlink plugin popup */
2
+
3
+ var templates = {
4
+ "window.open" : "window.open('${url}','${target}','${options}')"
5
+ };
6
+
7
+ function preinit() {
8
+ // Initialize
9
+ tinyMCE.setWindowArg('mce_windowresize', false);
10
+
11
+ // Import external list url javascript
12
+ var url = tinyMCE.getParam("external_link_list_url");
13
+ if (url != null) {
14
+ // Fix relative
15
+ if (url.charAt(0) != '/' && url.indexOf('://') == -1)
16
+ url = tinyMCE.documentBasePath + "/" + url;
17
+
18
+ document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
19
+ }
20
+ }
21
+
22
+ function changeClass() {
23
+ var formObj = document.forms[0];
24
+ formObj.classes.value = getSelectValue(formObj, 'classlist');
25
+ }
26
+
27
+ function init() {
28
+ tinyMCEPopup.resizeToInnerSize();
29
+
30
+ var formObj = document.forms[0];
31
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
32
+ var elm = inst.getFocusElement();
33
+ var action = "insert";
34
+ var html;
35
+
36
+ document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
37
+ document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
38
+ document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href');
39
+ document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href');
40
+ document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
41
+
42
+ // Link list
43
+ html = getLinkListHTML('linklisthref','href');
44
+ if (html == "")
45
+ document.getElementById("linklisthrefrow").style.display = 'none';
46
+ else
47
+ document.getElementById("linklisthrefcontainer").innerHTML = html;
48
+
49
+ // Resize some elements
50
+ if (isVisible('hrefbrowser'))
51
+ document.getElementById('href').style.width = '260px';
52
+
53
+ if (isVisible('popupurlbrowser'))
54
+ document.getElementById('popupurl').style.width = '180px';
55
+
56
+ elm = tinyMCE.getParentElement(elm, "a");
57
+ if (elm != null && elm.nodeName == "A")
58
+ action = "update";
59
+
60
+ formObj.insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true);
61
+
62
+ setPopupControlsDisabled(true);
63
+
64
+ if (action == "update") {
65
+ var href = tinyMCE.getAttrib(elm, 'href');
66
+
67
+ href = convertURL(href, elm, true);
68
+
69
+ // Use mce_href if found
70
+ var mceRealHref = tinyMCE.getAttrib(elm, 'mce_href');
71
+ if (mceRealHref != "") {
72
+ href = mceRealHref;
73
+
74
+ if (tinyMCE.getParam('convert_urls'))
75
+ href = convertURL(href, elm, true);
76
+ }
77
+
78
+ var onclick = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onclick'));
79
+
80
+ // Setup form data
81
+ setFormValue('href', href);
82
+ setFormValue('title', tinyMCE.getAttrib(elm, 'title'));
83
+ setFormValue('id', tinyMCE.getAttrib(elm, 'id'));
84
+ setFormValue('style', tinyMCE.serializeStyle(tinyMCE.parseStyle(tinyMCE.getAttrib(elm, "style"))));
85
+ setFormValue('rel', tinyMCE.getAttrib(elm, 'rel'));
86
+ setFormValue('rev', tinyMCE.getAttrib(elm, 'rev'));
87
+ setFormValue('charset', tinyMCE.getAttrib(elm, 'charset'));
88
+ setFormValue('hreflang', tinyMCE.getAttrib(elm, 'hreflang'));
89
+ setFormValue('dir', tinyMCE.getAttrib(elm, 'dir'));
90
+ setFormValue('lang', tinyMCE.getAttrib(elm, 'lang'));
91
+ setFormValue('tabindex', tinyMCE.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
92
+ setFormValue('accesskey', tinyMCE.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
93
+ setFormValue('type', tinyMCE.getAttrib(elm, 'type'));
94
+ setFormValue('onfocus', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onfocus')));
95
+ setFormValue('onblur', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onblur')));
96
+ setFormValue('onclick', onclick);
97
+ setFormValue('ondblclick', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'ondblclick')));
98
+ setFormValue('onmousedown', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmousedown')));
99
+ setFormValue('onmouseup', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseup')));
100
+ setFormValue('onmouseover', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseover')));
101
+ setFormValue('onmousemove', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmousemove')));
102
+ setFormValue('onmouseout', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseout')));
103
+ setFormValue('onkeypress', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onkeypress')));
104
+ setFormValue('onkeydown', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onkeydown')));
105
+ setFormValue('onkeyup', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onkeyup')));
106
+ setFormValue('target', tinyMCE.getAttrib(elm, 'target'));
107
+ setFormValue('classes', tinyMCE.getAttrib(elm, 'class'));
108
+
109
+ // Parse onclick data
110
+ if (onclick != null && onclick.indexOf('window.open') != -1)
111
+ parseWindowOpen(onclick);
112
+ else
113
+ parseFunction(onclick);
114
+
115
+ // Select by the values
116
+ selectByValue(formObj, 'dir', tinyMCE.getAttrib(elm, 'dir'));
117
+ selectByValue(formObj, 'rel', tinyMCE.getAttrib(elm, 'rel'));
118
+ selectByValue(formObj, 'rev', tinyMCE.getAttrib(elm, 'rev'));
119
+ selectByValue(formObj, 'linklisthref', href);
120
+
121
+ if (href.charAt(0) == '#')
122
+ selectByValue(formObj, 'anchorlist', href);
123
+
124
+ addClassesToList('classlist', 'advlink_styles');
125
+
126
+ selectByValue(formObj, 'classlist', tinyMCE.getAttrib(elm, 'class'), true);
127
+ selectByValue(formObj, 'targetlist', tinyMCE.getAttrib(elm, 'target'), true);
128
+ } else
129
+ addClassesToList('classlist', 'advlink_styles');
130
+
131
+ window.focus();
132
+ }
133
+
134
+ function checkPrefix(n) {
135
+ if (Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCE.getLang('lang_is_email')))
136
+ n.value = 'mailto:' + n.value;
137
+
138
+ if (/^\s*www./i.test(n.value) && confirm(tinyMCE.getLang('lang_is_external')))
139
+ n.value = 'http://' + n.value;
140
+ }
141
+
142
+ function setFormValue(name, value) {
143
+ document.forms[0].elements[name].value = value;
144
+ }
145
+
146
+ function convertURL(url, node, on_save) {
147
+ return eval("tinyMCEPopup.windowOpener." + tinyMCE.settings['urlconverter_callback'] + "(url, node, on_save);");
148
+ }
149
+
150
+ function parseWindowOpen(onclick) {
151
+ var formObj = document.forms[0];
152
+
153
+ // Preprocess center code
154
+ if (onclick.indexOf('return false;') != -1) {
155
+ formObj.popupreturn.checked = true;
156
+ onclick = onclick.replace('return false;', '');
157
+ } else
158
+ formObj.popupreturn.checked = false;
159
+
160
+ var onClickData = parseLink(onclick);
161
+
162
+ if (onClickData != null) {
163
+ formObj.ispopup.checked = true;
164
+ setPopupControlsDisabled(false);
165
+
166
+ var onClickWindowOptions = parseOptions(onClickData['options']);
167
+ var url = onClickData['url'];
168
+
169
+ if (tinyMCE.getParam('convert_urls'))
170
+ url = convertURL(url, null, true);
171
+
172
+ formObj.popupname.value = onClickData['target'];
173
+ formObj.popupurl.value = url;
174
+ formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
175
+ formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
176
+
177
+ formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
178
+ formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
179
+
180
+ if (formObj.popupleft.value.indexOf('screen') != -1)
181
+ formObj.popupleft.value = "c";
182
+
183
+ if (formObj.popuptop.value.indexOf('screen') != -1)
184
+ formObj.popuptop.value = "c";
185
+
186
+ formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
187
+ formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
188
+ formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
189
+ formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
190
+ formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
191
+ formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
192
+ formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
193
+
194
+ buildOnClick();
195
+ }
196
+ }
197
+
198
+ function parseFunction(onclick) {
199
+ var formObj = document.forms[0];
200
+ var onClickData = parseLink(onclick);
201
+
202
+ // TODO: Add stuff here
203
+ }
204
+
205
+ function getOption(opts, name) {
206
+ return typeof(opts[name]) == "undefined" ? "" : opts[name];
207
+ }
208
+
209
+ function setPopupControlsDisabled(state) {
210
+ var formObj = document.forms[0];
211
+
212
+ formObj.popupname.disabled = state;
213
+ formObj.popupurl.disabled = state;
214
+ formObj.popupwidth.disabled = state;
215
+ formObj.popupheight.disabled = state;
216
+ formObj.popupleft.disabled = state;
217
+ formObj.popuptop.disabled = state;
218
+ formObj.popuplocation.disabled = state;
219
+ formObj.popupscrollbars.disabled = state;
220
+ formObj.popupmenubar.disabled = state;
221
+ formObj.popupresizable.disabled = state;
222
+ formObj.popuptoolbar.disabled = state;
223
+ formObj.popupstatus.disabled = state;
224
+ formObj.popupreturn.disabled = state;
225
+ formObj.popupdependent.disabled = state;
226
+
227
+ setBrowserDisabled('popupurlbrowser', state);
228
+ }
229
+
230
+ function parseLink(link) {
231
+ link = link.replace(new RegExp('&#39;', 'g'), "'");
232
+
233
+ var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
234
+
235
+ // Is function name a template function
236
+ var template = templates[fnName];
237
+ if (template) {
238
+ // Build regexp
239
+ var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
240
+ var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
241
+ var replaceStr = "";
242
+ for (var i=0; i<variableNames.length; i++) {
243
+ // Is string value
244
+ if (variableNames[i].indexOf("'${") != -1)
245
+ regExp += "'(.*)'";
246
+ else // Number value
247
+ regExp += "([0-9]*)";
248
+
249
+ replaceStr += "$" + (i+1);
250
+
251
+ // Cleanup variable name
252
+ variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
253
+
254
+ if (i != variableNames.length-1) {
255
+ regExp += "\\s*,\\s*";
256
+ replaceStr += "<delim>";
257
+ } else
258
+ regExp += ".*";
259
+ }
260
+
261
+ regExp += "\\);?";
262
+
263
+ // Build variable array
264
+ var variables = new Array();
265
+ variables["_function"] = fnName;
266
+ var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
267
+ for (var i=0; i<variableNames.length; i++)
268
+ variables[variableNames[i]] = variableValues[i];
269
+
270
+ return variables;
271
+ }
272
+
273
+ return null;
274
+ }
275
+
276
+ function parseOptions(opts) {
277
+ if (opts == null || opts == "")
278
+ return new Array();
279
+
280
+ // Cleanup the options
281
+ opts = opts.toLowerCase();
282
+ opts = opts.replace(/;/g, ",");
283
+ opts = opts.replace(/[^0-9a-z=,]/g, "");
284
+
285
+ var optionChunks = opts.split(',');
286
+ var options = new Array();
287
+
288
+ for (var i=0; i<optionChunks.length; i++) {
289
+ var parts = optionChunks[i].split('=');
290
+
291
+ if (parts.length == 2)
292
+ options[parts[0]] = parts[1];
293
+ }
294
+
295
+ return options;
296
+ }
297
+
298
+ function buildOnClick() {
299
+ var formObj = document.forms[0];
300
+
301
+ if (!formObj.ispopup.checked) {
302
+ formObj.onclick.value = "";
303
+ return;
304
+ }
305
+
306
+ var onclick = "window.open('";
307
+ var url = formObj.popupurl.value;
308
+
309
+ if (tinyMCE.getParam('convert_urls'))
310
+ url = convertURL(url, null, true);
311
+
312
+ onclick += url + "','";
313
+ onclick += formObj.popupname.value + "','";
314
+
315
+ if (formObj.popuplocation.checked)
316
+ onclick += "location=yes,";
317
+
318
+ if (formObj.popupscrollbars.checked)
319
+ onclick += "scrollbars=yes,";
320
+
321
+ if (formObj.popupmenubar.checked)
322
+ onclick += "menubar=yes,";
323
+
324
+ if (formObj.popupresizable.checked)
325
+ onclick += "resizable=yes,";
326
+
327
+ if (formObj.popuptoolbar.checked)
328
+ onclick += "toolbar=yes,";
329
+
330
+ if (formObj.popupstatus.checked)
331
+ onclick += "status=yes,";
332
+
333
+ if (formObj.popupdependent.checked)
334
+ onclick += "dependent=yes,";
335
+
336
+ if (formObj.popupwidth.value != "")
337
+ onclick += "width=" + formObj.popupwidth.value + ",";
338
+
339
+ if (formObj.popupheight.value != "")
340
+ onclick += "height=" + formObj.popupheight.value + ",";
341
+
342
+ if (formObj.popupleft.value != "") {
343
+ if (formObj.popupleft.value != "c")
344
+ onclick += "left=" + formObj.popupleft.value + ",";
345
+ else
346
+ onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
347
+ }
348
+
349
+ if (formObj.popuptop.value != "") {
350
+ if (formObj.popuptop.value != "c")
351
+ onclick += "top=" + formObj.popuptop.value + ",";
352
+ else
353
+ onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
354
+ }
355
+
356
+ if (onclick.charAt(onclick.length-1) == ',')
357
+ onclick = onclick.substring(0, onclick.length-1);
358
+
359
+ onclick += "');";
360
+
361
+ if (formObj.popupreturn.checked)
362
+ onclick += "return false;";
363
+
364
+ // tinyMCE.debug(onclick);
365
+
366
+ formObj.onclick.value = onclick;
367
+
368
+ if (formObj.href.value == "")
369
+ formObj.href.value = url;
370
+ }
371
+
372
+ function setAttrib(elm, attrib, value) {
373
+ var formObj = document.forms[0];
374
+ var valueElm = formObj.elements[attrib.toLowerCase()];
375
+
376
+ if (typeof(value) == "undefined" || value == null) {
377
+ value = "";
378
+
379
+ if (valueElm)
380
+ value = valueElm.value;
381
+ }
382
+
383
+ if (value != "") {
384
+ elm.setAttribute(attrib.toLowerCase(), value);
385
+
386
+ if (attrib == "style")
387
+ attrib = "style.cssText";
388
+
389
+ if (attrib.substring(0, 2) == 'on')
390
+ value = 'return true;' + value;
391
+
392
+ if (attrib == "class")
393
+ attrib = "className";
394
+
395
+ eval('elm.' + attrib + "=value;");
396
+ } else
397
+ elm.removeAttribute(attrib);
398
+ }
399
+
400
+ function getAnchorListHTML(id, target) {
401
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
402
+ var nodes = inst.getBody().getElementsByTagName("a"), name, i;
403
+ var html = "";
404
+
405
+ html += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value=';
406
+ html += 'this.options[this.selectedIndex].value;">';
407
+ html += '<option value="">---</option>';
408
+
409
+ for (i=0; i<nodes.length; i++) {
410
+ if ((name = tinyMCE.getAttrib(nodes[i], "name")) != "")
411
+ html += '<option value="#' + name + '">' + name + '</option>';
412
+ }
413
+
414
+ html += '</select>';
415
+
416
+ return html;
417
+ }
418
+
419
+ function insertAction() {
420
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
421
+ var elm = inst.getFocusElement();
422
+
423
+ checkPrefix(document.forms[0].href);
424
+
425
+ elm = tinyMCE.getParentElement(elm, "a");
426
+
427
+ tinyMCEPopup.execCommand("mceBeginUndoLevel");
428
+
429
+ // Create new anchor elements
430
+ if (elm == null) {
431
+ if (tinyMCE.isSafari)
432
+ tinyMCEPopup.execCommand("mceInsertContent", false, '<a href="#mce_temp_url#">' + inst.selection.getSelectedHTML() + '</a>');
433
+ else
434
+ tinyMCEPopup.execCommand("createlink", false, "#mce_temp_url#");
435
+
436
+ var elementArray = tinyMCE.getElementsByAttributeValue(inst.getBody(), "a", "href", "#mce_temp_url#");
437
+ for (var i=0; i<elementArray.length; i++) {
438
+ var elm = elementArray[i];
439
+
440
+ // Move cursor to end
441
+ try {
442
+ tinyMCE.selectedInstance.selection.collapse(false);
443
+ } catch (ex) {
444
+ // Ignore
445
+ }
446
+
447
+ // Move cursor behind the new anchor
448
+ // Don't remember why this was needed so it's now removed
449
+ /*
450
+ if (tinyMCE.isGecko) {
451
+ var sp = inst.getDoc().createTextNode(" ");
452
+
453
+ if (elm.nextSibling)
454
+ elm.parentNode.insertBefore(sp, elm.nextSibling);
455
+ else
456
+ elm.parentNode.appendChild(sp);
457
+
458
+ // Set range after link
459
+ var rng = inst.getDoc().createRange();
460
+ rng.setStartAfter(elm);
461
+ rng.setEndAfter(elm);
462
+
463
+ // Update selection
464
+ var sel = inst.getSel();
465
+ sel.removeAllRanges();
466
+ sel.addRange(rng);
467
+ }
468
+ */
469
+
470
+ setAllAttribs(elm);
471
+ }
472
+ } else
473
+ setAllAttribs(elm);
474
+
475
+ tinyMCE._setEventsEnabled(inst.getBody(), false);
476
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
477
+ tinyMCEPopup.close();
478
+ }
479
+
480
+ function setAllAttribs(elm) {
481
+ var formObj = document.forms[0];
482
+ var href = formObj.href.value;
483
+ var target = getSelectValue(formObj, 'targetlist');
484
+
485
+ // Make anchors absolute
486
+ if (href.charAt(0) != '#')
487
+ href = convertURL(href, elm);
488
+
489
+ setAttrib(elm, 'href', href);
490
+ setAttrib(elm, 'mce_href', href);
491
+ setAttrib(elm, 'title');
492
+ setAttrib(elm, 'target', target == '_self' ? '' : target);
493
+ setAttrib(elm, 'id');
494
+ setAttrib(elm, 'style');
495
+ setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
496
+ setAttrib(elm, 'rel');
497
+ setAttrib(elm, 'rev');
498
+ setAttrib(elm, 'charset');
499
+ setAttrib(elm, 'hreflang');
500
+ setAttrib(elm, 'dir');
501
+ setAttrib(elm, 'lang');
502
+ setAttrib(elm, 'tabindex');
503
+ setAttrib(elm, 'accesskey');
504
+ setAttrib(elm, 'type');
505
+ setAttrib(elm, 'onfocus');
506
+ setAttrib(elm, 'onblur');
507
+ setAttrib(elm, 'onclick');
508
+ setAttrib(elm, 'ondblclick');
509
+ setAttrib(elm, 'onmousedown');
510
+ setAttrib(elm, 'onmouseup');
511
+ setAttrib(elm, 'onmouseover');
512
+ setAttrib(elm, 'onmousemove');
513
+ setAttrib(elm, 'onmouseout');
514
+ setAttrib(elm, 'onkeypress');
515
+ setAttrib(elm, 'onkeydown');
516
+ setAttrib(elm, 'onkeyup');
517
+
518
+ // Refresh in old MSIE
519
+ if (tinyMCE.isMSIE5)
520
+ elm.outerHTML = elm.outerHTML;
521
+ }
522
+
523
+ function getSelectValue(form_obj, field_name) {
524
+ var elm = form_obj.elements[field_name];
525
+
526
+ if (elm == null || elm.options == null)
527
+ return "";
528
+
529
+ return elm.options[elm.selectedIndex].value;
530
+ }
531
+
532
+ function getLinkListHTML(elm_id, target_form_element, onchange_func) {
533
+ if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
534
+ return "";
535
+
536
+ var html = "";
537
+
538
+ html += '<select id="' + elm_id + '" name="' + elm_id + '"';
539
+ html += ' class="mceLinkList" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
540
+ html += 'this.options[this.selectedIndex].value;';
541
+
542
+ if (typeof(onchange_func) != "undefined")
543
+ html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
544
+
545
+ html += '"><option value="">---</option>';
546
+
547
+ for (var i=0; i<tinyMCELinkList.length; i++)
548
+ html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
549
+
550
+ html += '</select>';
551
+
552
+ return html;
553
+
554
+ // tinyMCE.debug('-- image list start --', html, '-- image list end --');
555
+ }
556
+
557
+ function getTargetListHTML(elm_id, target_form_element) {
558
+ var targets = tinyMCE.getParam('theme_advanced_link_targets', '').split(';');
559
+ var html = '';
560
+
561
+ html += '<select id="' + elm_id + '" name="' + elm_id + '" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
562
+ html += 'this.options[this.selectedIndex].value;">';
563
+
564
+ html += '<option value="_self">' + tinyMCE.getLang('lang_advlink_target_same') + '</option>';
565
+ html += '<option value="_blank">' + tinyMCE.getLang('lang_advlink_target_blank') + ' (_blank)</option>';
566
+ html += '<option value="_parent">' + tinyMCE.getLang('lang_advlink_target_parent') + ' (_parent)</option>';
567
+ html += '<option value="_top">' + tinyMCE.getLang('lang_advlink_target_top') + ' (_top)</option>';
568
+
569
+ for (var i=0; i<targets.length; i++) {
570
+ var key, value;
571
+
572
+ if (targets[i] == "")
573
+ continue;
574
+
575
+ key = targets[i].split('=')[0];
576
+ value = targets[i].split('=')[1];
577
+
578
+ html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
579
+ }
580
+
581
+ html += '</select>';
582
+
583
+ return html;
584
+ }
585
+
586
+ // While loading
587
+ preinit();
js/tiny_mce/plugins/advlink/langs/en.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('advlink',{
4
+ general_tab : 'General',
5
+ popup_tab : 'Popup',
6
+ events_tab : 'Events',
7
+ advanced_tab : 'Advanced',
8
+ general_props : 'General properties',
9
+ popup_props : 'Popup properties',
10
+ event_props : 'Events',
11
+ advanced_props : 'Advanced properties',
12
+ popup_opts : 'Options',
13
+ anchor_names : 'Anchors',
14
+ target_same : 'Open in this window / frame',
15
+ target_parent : 'Open in parent window / frame',
16
+ target_top : 'Open in top frame (replaces all frames)',
17
+ target_blank : 'Open in new window',
18
+ popup : 'Javascript popup',
19
+ popup_url : 'Popup URL',
20
+ popup_name : 'Window name',
21
+ popup_return : 'Insert \'return false\'',
22
+ popup_scrollbars : 'Show scrollbars',
23
+ popup_statusbar : 'Show status bar',
24
+ popup_toolbar : 'Show toolbars',
25
+ popup_menubar : 'Show menu bar',
26
+ popup_location : 'Show location bar',
27
+ popup_resizable : 'Make window resizable',
28
+ popup_dependent : 'Dependent (Mozilla/Firefox only)',
29
+ popup_size : 'Size',
30
+ popup_position : 'Position (X/Y)',
31
+ id : 'Id',
32
+ style: 'Style',
33
+ classes : 'Classes',
34
+ target_name : 'Target name',
35
+ langdir : 'Language direction',
36
+ target_langcode : 'Target language',
37
+ langcode : 'Language code',
38
+ encoding : 'Target character encoding',
39
+ mime : 'Target MIME type',
40
+ rel : 'Relationship page to target',
41
+ rev : 'Relationship target to page',
42
+ tabindex : 'Tabindex',
43
+ accesskey : 'Accesskey',
44
+ ltr : 'Left to right',
45
+ rtl : 'Right to left'
46
+ });
js/tiny_mce/plugins/advlink/link.htm ADDED
@@ -0,0 +1,338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_insert_link_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/validate.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>
9
+ <link href="css/advlink.css" rel="stylesheet" type="text/css" />
10
+ <base target="_self" />
11
+ </head>
12
+ <body id="advlink" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
13
+ <form onsubmit="insertAction();return false;" action="#">
14
+ <div class="tabs">
15
+ <ul>
16
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_advlink_general_tab}</a></span></li>
17
+ <li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{$lang_advlink_popup_tab}</a></span></li>
18
+ <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{$lang_advlink_events_tab}</a></span></li>
19
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_advlink_advanced_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>{$lang_advlink_general_props}</legend>
27
+
28
+ <table border="0" cellpadding="4" cellspacing="0">
29
+ <tr>
30
+ <td nowrap="nowrap"><label id="hreflabel" for="href">{$lang_insert_link_url}</label></td>
31
+ <td><table border="0" cellspacing="0" cellpadding="0">
32
+ <tr>
33
+ <td><input id="href" name="href" type="text" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
34
+ <td id="hrefbrowsercontainer">&nbsp;</td>
35
+ </tr>
36
+ </table></td>
37
+ </tr>
38
+ <tr id="linklisthrefrow">
39
+ <td class="column1"><label for="linklisthref">{$lang_link_list}</label></td>
40
+ <td colspan="2" id="linklisthrefcontainer">&nbsp;</td>
41
+ </tr>
42
+ <tr>
43
+ <td class="column1"><label for="anchorlist">{$lang_advlink_anchor_names}</label></td>
44
+ <td colspan="2" id="anchorlistcontainer">&nbsp;</td>
45
+ </tr>
46
+ <tr>
47
+ <td><label id="targetlistlabel" for="targetlist">{$lang_insert_link_target}</label></td>
48
+ <td id="targetlistcontainer">&nbsp;</td>
49
+ </tr>
50
+ <tr>
51
+ <td nowrap="nowrap"><label id="titlelabel" for="title">{$lang_theme_insert_link_titlefield}</label></td>
52
+ <td><input id="title" name="title" type="text" value="" /></td>
53
+ </tr>
54
+ <tr>
55
+ <td><label id="classlabel" for="classlist">{$lang_class_name}</label></td>
56
+ <td>
57
+ <select id="classlist" name="classlist" onchange="changeClass();">
58
+ <option value="" selected>{$lang_not_set}</option>
59
+ </select>
60
+ </td>
61
+ </tr>
62
+ </table>
63
+ </fieldset>
64
+ </div>
65
+
66
+ <div id="popup_panel" class="panel">
67
+ <fieldset>
68
+ <legend>{$lang_advlink_popup_props}</legend>
69
+
70
+ <input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
71
+ <label id="ispopuplabel" for="ispopup">{$lang_advlink_popup}</label>
72
+
73
+ <table border="0" cellpadding="0" cellspacing="4">
74
+ <tr>
75
+ <td nowrap="nowrap"><label for="popupurl">{$lang_advlink_popup_url}</label>&nbsp;</td>
76
+ <td>
77
+ <table border="0" cellspacing="0" cellpadding="0">
78
+ <tr>
79
+ <td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
80
+ <td id="popupurlbrowsercontainer">&nbsp;</td>
81
+ </tr>
82
+ </table>
83
+ </td>
84
+ </tr>
85
+ <tr>
86
+ <td nowrap="nowrap"><label for="popupname">{$lang_advlink_popup_name}</label>&nbsp;</td>
87
+ <td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
88
+ </tr>
89
+ <tr>
90
+ <td nowrap="nowrap"><label>{$lang_advlink_popup_size}</label>&nbsp;</td>
91
+ <td nowrap="nowrap">
92
+ <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
93
+ <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
94
+ </td>
95
+ </tr>
96
+ <tr>
97
+ <td nowrap="nowrap" id="labelleft"><label>{$lang_advlink_popup_position}</label>&nbsp;</td>
98
+ <td nowrap="nowrap">
99
+ <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /
100
+ <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
101
+ </td>
102
+ </tr>
103
+ </table>
104
+
105
+ <fieldset>
106
+ <legend>{$lang_advlink_popup_opts}</legend>
107
+
108
+ <table border="0" cellpadding="0" cellspacing="4">
109
+ <tr>
110
+ <td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
111
+ <td nowrap="nowrap"><label id="popuplocationlabel" for="popuplocation">{$lang_advlink_popup_location}</label></td>
112
+ <td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
113
+ <td nowrap="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{$lang_advlink_popup_scrollbars}</label></td>
114
+ </tr>
115
+ <tr>
116
+ <td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
117
+ <td nowrap="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{$lang_advlink_popup_menubar}</label></td>
118
+ <td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
119
+ <td nowrap="nowrap"><label id="popupresizablelabel" for="popupresizable">{$lang_advlink_popup_resizable}</label></td>
120
+ </tr>
121
+ <tr>
122
+ <td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
123
+ <td nowrap="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{$lang_advlink_popup_toolbar}</label></td>
124
+ <td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
125
+ <td nowrap="nowrap"><label id="popupdependentlabel" for="popupdependent">{$lang_advlink_popup_dependent}</label></td>
126
+ </tr>
127
+ <tr>
128
+ <td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
129
+ <td nowrap="nowrap"><label id="popupstatuslabel" for="popupstatus">{$lang_advlink_popup_statusbar}</label></td>
130
+ <td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
131
+ <td nowrap="nowrap"><label id="popupreturnlabel" for="popupreturn">{$lang_advlink_popup_return}</label></td>
132
+ </tr>
133
+ </table>
134
+ </fieldset>
135
+ </fieldset>
136
+ </div>
137
+
138
+ <div id="advanced_panel" class="panel">
139
+ <fieldset>
140
+ <legend>{$lang_advlink_advanced_props}</legend>
141
+
142
+ <table border="0" cellpadding="0" cellspacing="4">
143
+ <tr>
144
+ <td class="column1"><label id="idlabel" for="id">{$lang_advlink_id}</label></td>
145
+ <td><input id="id" name="id" type="text" value="" /></td>
146
+ </tr>
147
+
148
+ <tr>
149
+ <td><label id="stylelabel" for="style">{$lang_advlink_style}</label></td>
150
+ <td><input type="text" id="style" name="style" value="" /></td>
151
+ </tr>
152
+
153
+ <tr>
154
+ <td><label id="classeslabel" for="classes">{$lang_advlink_classes}</label></td>
155
+ <td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
156
+ </tr>
157
+
158
+ <tr>
159
+ <td><label id="targetlabel" for="target">{$lang_advlink_target_name}</label></td>
160
+ <td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
161
+ </tr>
162
+
163
+ <tr>
164
+ <td class="column1"><label id="dirlabel" for="dir">{$lang_advlink_langdir}</label></td>
165
+ <td>
166
+ <select id="dir" name="dir">
167
+ <option value="">{$lang_not_set}</option>
168
+ <option value="ltr">{$lang_advlink_ltr}</option>
169
+ <option value="rtl">{$lang_advlink_rtl}</option>
170
+ </select>
171
+ </td>
172
+ </tr>
173
+
174
+ <tr>
175
+ <td><label id="hreflanglabel" for="hreflang">{$lang_advlink_target_langcode}</label></td>
176
+ <td><input type="text" id="hreflang" name="hreflang" value="" /></td>
177
+ </tr>
178
+
179
+ <tr>
180
+ <td class="column1"><label id="langlabel" for="lang">{$lang_advlink_langcode}</label></td>
181
+ <td>
182
+ <input id="lang" name="lang" type="text" value="" />
183
+ </td>
184
+ </tr>
185
+
186
+ <tr>
187
+ <td><label id="charsetlabel" for="charset">{$lang_advlink_encoding}</label></td>
188
+ <td><input type="text" id="charset" name="charset" value="" /></td>
189
+ </tr>
190
+
191
+ <tr>
192
+ <td><label id="typelabel" for="type">{$lang_advlink_mime}</label></td>
193
+ <td><input type="text" id="type" name="type" value="" /></td>
194
+ </tr>
195
+
196
+ <tr>
197
+ <td><label id="rellabel" for="rel">{$lang_advlink_rel}</label></td>
198
+ <td><select id="rel" name="rel">
199
+ <option value="">{$lang_not_set}</option>
200
+ <option value="lightbox">Lightbox</option>
201
+ <option value="alternate">Alternate</option>
202
+ <option value="designates">Designates</option>
203
+ <option value="stylesheet">Stylesheet</option>
204
+ <option value="start">Start</option>
205
+ <option value="next">Next</option>
206
+ <option value="prev">Prev</option>
207
+ <option value="contents">Contents</option>
208
+ <option value="index">Index</option>
209
+ <option value="glossary">Glossary</option>
210
+ <option value="copyright">Copyright</option>
211
+ <option value="chapter">Chapter</option>
212
+ <option value="subsection">Subsection</option>
213
+ <option value="appendix">Appendix</option>
214
+ <option value="help">Help</option>
215
+ <option value="bookmark">Bookmark</option>
216
+ <option value="nofollow">No Follow</option>
217
+ <option value="tag">Tag</option>
218
+ </select>
219
+ </td>
220
+ </tr>
221
+
222
+ <tr>
223
+ <td><label id="revlabel" for="rev">{$lang_advlink_rev}</label></td>
224
+ <td><select id="rev" name="rev">
225
+ <option value="">{$lang_not_set}</option>
226
+ <option value="alternate">Alternate</option>
227
+ <option value="designates">Designates</option>
228
+ <option value="stylesheet">Stylesheet</option>
229
+ <option value="start">Start</option>
230
+ <option value="next">Next</option>
231
+ <option value="prev">Prev</option>
232
+ <option value="contents">Contents</option>
233
+ <option value="index">Index</option>
234
+ <option value="glossary">Glossary</option>
235
+ <option value="copyright">Copyright</option>
236
+ <option value="chapter">Chapter</option>
237
+ <option value="subsection">Subsection</option>
238
+ <option value="appendix">Appendix</option>
239
+ <option value="help">Help</option>
240
+ <option value="bookmark">Bookmark</option>
241
+ </select>
242
+ </td>
243
+ </tr>
244
+
245
+ <tr>
246
+ <td><label id="tabindexlabel" for="tabindex">{$lang_advlink_tabindex}</label></td>
247
+ <td><input type="text" id="tabindex" name="tabindex" value="" /></td>
248
+ </tr>
249
+
250
+ <tr>
251
+ <td><label id="accesskeylabel" for="accesskey">{$lang_advlink_accesskey}</label></td>
252
+ <td><input type="text" id="accesskey" name="accesskey" value="" /></td>
253
+ </tr>
254
+ </table>
255
+ </fieldset>
256
+ </div>
257
+
258
+ <div id="events_panel" class="panel">
259
+ <fieldset>
260
+ <legend>{$lang_advlink_event_props}</legend>
261
+
262
+ <table border="0" cellpadding="0" cellspacing="4">
263
+ <tr>
264
+ <td class="column1"><label for="onfocus">onfocus</label></td>
265
+ <td><input id="onfocus" name="onfocus" type="text" value="" /></td>
266
+ </tr>
267
+
268
+ <tr>
269
+ <td class="column1"><label for="onblur">onblur</label></td>
270
+ <td><input id="onblur" name="onblur" type="text" value="" /></td>
271
+ </tr>
272
+
273
+ <tr>
274
+ <td class="column1"><label for="onclick">onclick</label></td>
275
+ <td><input id="onclick" name="onclick" type="text" value="" /></td>
276
+ </tr>
277
+
278
+ <tr>
279
+ <td class="column1"><label for="ondblclick">ondblclick</label></td>
280
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
281
+ </tr>
282
+
283
+ <tr>
284
+ <td class="column1"><label for="onmousedown">onmousedown</label></td>
285
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
286
+ </tr>
287
+
288
+ <tr>
289
+ <td class="column1"><label for="onmouseup">onmouseup</label></td>
290
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
291
+ </tr>
292
+
293
+ <tr>
294
+ <td class="column1"><label for="onmouseover">onmouseover</label></td>
295
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
296
+ </tr>
297
+
298
+ <tr>
299
+ <td class="column1"><label for="onmousemove">onmousemove</label></td>
300
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
301
+ </tr>
302
+
303
+ <tr>
304
+ <td class="column1"><label for="onmouseout">onmouseout</label></td>
305
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
306
+ </tr>
307
+
308
+ <tr>
309
+ <td class="column1"><label for="onkeypress">onkeypress</label></td>
310
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
311
+ </tr>
312
+
313
+ <tr>
314
+ <td class="column1"><label for="onkeydown">onkeydown</label></td>
315
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
316
+ </tr>
317
+
318
+ <tr>
319
+ <td class="column1"><label for="onkeyup">onkeyup</label></td>
320
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
321
+ </tr>
322
+ </table>
323
+ </fieldset>
324
+ </div>
325
+ </div>
326
+
327
+ <div class="mceActionPanel">
328
+ <div style="float: left">
329
+ <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertAction();" />
330
+ </div>
331
+
332
+ <div style="float: right">
333
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
334
+ </div>
335
+ </div>
336
+ </form>
337
+ </body>
338
+ </html>
js/tiny_mce/plugins/advlink/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/autosave/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('autosave');var TinyMCE_AutoSavePlugin={getInfo:function(){return{longname:'Auto save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},_beforeUnloadHandler:function(){var n,inst,anyDirty=false,msg=tinyMCE.getLang("lang_autosave_unload_msg");if(tinyMCE.getParam("fullscreen_is_enabled"))return;for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(inst.isDirty())return msg}return}};window.onbeforeunload=TinyMCE_AutoSavePlugin._beforeUnloadHandler;tinyMCE.addPlugin("autosave",TinyMCE_AutoSavePlugin);
js/tiny_mce/plugins/autosave/editor_plugin_src.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('autosave');
10
+
11
+ var TinyMCE_AutoSavePlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Auto save',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ // Private plugin internal methods
23
+
24
+ _beforeUnloadHandler : function() {
25
+ var n, inst, anyDirty = false, msg = tinyMCE.getLang("lang_autosave_unload_msg");
26
+
27
+ if (tinyMCE.getParam("fullscreen_is_enabled"))
28
+ return;
29
+
30
+ for (n in tinyMCE.instances) {
31
+ inst = tinyMCE.instances[n];
32
+
33
+ if (!tinyMCE.isInstance(inst))
34
+ continue;
35
+
36
+ if (inst.isDirty())
37
+ return msg;
38
+ }
39
+
40
+ return;
41
+ }
42
+ };
43
+
44
+ window.onbeforeunload = TinyMCE_AutoSavePlugin._beforeUnloadHandler;
45
+
46
+ tinyMCE.addPlugin("autosave", TinyMCE_AutoSavePlugin);
js/tiny_mce/plugins/autosave/langs/en.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ // EN lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ autosave_unload_msg : 'The changes you made will be lost if you navigate away from this page.'
5
+ });
js/tiny_mce/plugins/autosave/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/bbcode/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ var TinyMCE_BBCodePlugin={getInfo:function(){return{longname:'BBCode Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},cleanup:function(type,content){var dialect=tinyMCE.getParam('bbcode_dialect','punbb').toLowerCase();switch(type){case"insert_to_editor":content=this['_'+dialect+'_bbcode2html'](content);break;case"get_from_editor":content=this['_'+dialect+'_html2bbcode'](content);break}return content},_punbb_html2bbcode:function(s){s=tinyMCE.trim(s);function rep(re,str){s=s.replace(re,str)};rep(/<a href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url]$1[/url]");rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");rep(/<font>(.*?)<\/font>/gi,"$1");rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");rep(/<\/(strong|b)>/gi,"[/b]");rep(/<(strong|b)>/gi,"[b]");rep(/<\/(em|i)>/gi,"[/i]");rep(/<(em|i)>/gi,"[i]");rep(/<\/u>/gi,"[/u]");rep(/<u>/gi,"[u]");rep(/<br \/>/gi,"\n");rep(/<br\/>/gi,"\n");rep(/<br>/gi,"\n");rep(/<p>/gi,"");rep(/<\/p>/gi,"\n");rep(/&nbsp;/gi," ");rep(/&quot;/gi,"\"");rep(/&lt;/gi,"<");rep(/&gt;/gi,">");rep(/&amp;/gi,"&");rep(/&undefined;/gi,"'");return s},_punbb_bbcode2html:function(s){s=tinyMCE.trim(s);function rep(re,str){s=s.replace(re,str)};rep(/\n/gi,"<br />");rep(/\[b\]/gi,"<strong>");rep(/\[\/b\]/gi,"</strong>");rep(/\[i\]/gi,"<em>");rep(/\[\/i\]/gi,"</em>");rep(/\[u\]/gi,"<u>");rep(/\[\/u\]/gi,"</u>");rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>");rep(/\[code\](.*?)\[\/code\]/gi,"<span class=\"codeStyle\">$1</span>&nbsp;");rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<span class=\"quoteStyle\">$1</span>&nbsp;");return s}};tinyMCE.addPlugin("bbcode",TinyMCE_BBCodePlugin);
js/tiny_mce/plugins/bbcode/editor_plugin_src.js ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var TinyMCE_BBCodePlugin = {
2
+ getInfo : function() {
3
+ return {
4
+ longname : 'BBCode Plugin',
5
+ author : 'Moxiecode Systems AB',
6
+ authorurl : 'http://tinymce.moxiecode.com',
7
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',
8
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
9
+ };
10
+ },
11
+
12
+ cleanup : function(type, content) {
13
+ var dialect = tinyMCE.getParam('bbcode_dialect', 'punbb').toLowerCase();
14
+
15
+ switch (type) {
16
+ case "insert_to_editor":
17
+ content = this['_' + dialect + '_bbcode2html'](content);
18
+ break;
19
+
20
+ case "get_from_editor":
21
+ content = this['_' + dialect + '_html2bbcode'](content);
22
+ break;
23
+ }
24
+
25
+ return content;
26
+ },
27
+
28
+ // Private methods
29
+
30
+ // HTML -> BBCode in PunBB dialect
31
+ _punbb_html2bbcode : function(s) {
32
+ s = tinyMCE.trim(s);
33
+
34
+ function rep(re, str) {
35
+ s = s.replace(re, str);
36
+ };
37
+
38
+ // example: <strong> to [b]
39
+ rep(/<a href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url]$1[/url]");
40
+ rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
41
+ rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
42
+ rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
43
+ rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
44
+ rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");
45
+ rep(/<font>(.*?)<\/font>/gi,"$1");
46
+ rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
47
+ rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");
48
+ rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");
49
+ rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");
50
+ rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");
51
+ rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");
52
+ rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");
53
+ rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");
54
+ rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");
55
+ rep(/<\/(strong|b)>/gi,"[/b]");
56
+ rep(/<(strong|b)>/gi,"[b]");
57
+ rep(/<\/(em|i)>/gi,"[/i]");
58
+ rep(/<(em|i)>/gi,"[i]");
59
+ rep(/<\/u>/gi,"[/u]");
60
+ rep(/<u>/gi,"[u]");
61
+ rep(/<br \/>/gi,"\n");
62
+ rep(/<br\/>/gi,"\n");
63
+ rep(/<br>/gi,"\n");
64
+ rep(/<p>/gi,"");
65
+ rep(/<\/p>/gi,"\n");
66
+ rep(/&nbsp;/gi," ");
67
+ rep(/&quot;/gi,"\"");
68
+ rep(/&lt;/gi,"<");
69
+ rep(/&gt;/gi,">");
70
+ rep(/&amp;/gi,"&");
71
+ rep(/&undefined;/gi,"'"); // quickfix
72
+
73
+ return s;
74
+ },
75
+
76
+ // BBCode -> HTML from PunBB dialect
77
+ _punbb_bbcode2html : function(s) {
78
+ s = tinyMCE.trim(s);
79
+
80
+ function rep(re, str) {
81
+ s = s.replace(re, str);
82
+ };
83
+
84
+ // example: [b] to <strong>
85
+ rep(/\n/gi,"<br />");
86
+ rep(/\[b\]/gi,"<strong>");
87
+ rep(/\[\/b\]/gi,"</strong>");
88
+ rep(/\[i\]/gi,"<em>");
89
+ rep(/\[\/i\]/gi,"</em>");
90
+ rep(/\[u\]/gi,"<u>");
91
+ rep(/\[\/u\]/gi,"</u>");
92
+ rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
93
+ rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
94
+ rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>");
95
+ rep(/\[code\](.*?)\[\/code\]/gi,"<span class=\"codeStyle\">$1</span>&nbsp;");
96
+ rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<span class=\"quoteStyle\">$1</span>&nbsp;");
97
+
98
+ return s;
99
+ }
100
+ };
101
+
102
+ tinyMCE.addPlugin("bbcode", TinyMCE_BBCodePlugin);
js/tiny_mce/plugins/cleanup/editor_plugin.js ADDED
File without changes
js/tiny_mce/plugins/cleanup/editor_plugin_src.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $
3
+ *
4
+ * Experimental plugin for new Cleanup routine, this logic will be moved into the core ones it's stable enougth.
5
+ *
6
+ * @author Moxiecode
7
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
8
+ */
9
+
10
+ /* Dummy file since cleanup is now moved to core */
js/tiny_mce/plugins/cleanup/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Dummy plugin since cleanup is now moved into core.
js/tiny_mce/plugins/contextmenu/css/contextmenu.css ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .contextMenuIEPopup {
2
+ padding: 0;
3
+ margin: 0;
4
+ border: 0;
5
+ overflow: hidden;
6
+ }
7
+
8
+ .contextMenu {
9
+ position: absolute;
10
+ cursor: default;
11
+ z-index: 1000;
12
+ border: 1px solid #D4D0C8;
13
+ background-color: #FFFFFF;
14
+ }
15
+
16
+ .contextMenuItem, .contextMenuItemOver {
17
+ }
18
+
19
+ .contextMenuSeparator {
20
+ width: 100%;
21
+ background-color: #D4D0C8;
22
+ border: 0;
23
+ }
24
+
25
+ .contextMenuImage, .contextMenuItemDisabled {
26
+ border: 0;
27
+ }
28
+
29
+ .contextMenuIcon {
30
+ background-color: #F0F0EE;
31
+ }
32
+
33
+ .contextMenuItemOver .contextMenuIcon {
34
+ background-color: #B6BDD2;
35
+ }
36
+
37
+ .contextMenuIcon {
38
+ background-color: #F0F0EE;
39
+ }
40
+
41
+ .contextMenuItemDisabled img {
42
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
43
+ -moz-opacity:0.3;
44
+ opacity: 0.3;
45
+ }
46
+
47
+ .contextMenuText {
48
+ font-family: Tahoma, Verdana, Arial, Helvetica;
49
+ font-size: 11px;
50
+ line-height: 20px;
51
+ }
52
+
53
+ .contextMenuItemDisabled {
54
+ color: #AAAAAA;
55
+ }
56
+
57
+ .contextMenuText a {
58
+ display: block;
59
+ line-height: 20px;
60
+ width: 100%;
61
+ text-decoration: none;
62
+ color: black;
63
+ font-weight: normal;
64
+ margin: 0;
65
+ padding: 0;
66
+ }
67
+
68
+ .contextMenuText a:hover {
69
+ background-color: #B6BDD2;
70
+ text-decoration: none !important;
71
+ font-weight: normal;
72
+ margin: 0;
73
+ padding: 0;
74
+ }
js/tiny_mce/plugins/contextmenu/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ if(!tinyMCE.settings['contextmenu_skip_plugin_css']){tinyMCE.loadCSS(tinyMCE.baseURL+"/plugins/contextmenu/css/contextmenu.css")}var TinyMCE_ContextMenuPlugin={_contextMenu:null,getInfo:function(){return{longname:'Context menus',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(tinyMCE.isMSIE5_0&&tinyMCE.isOpera)return;TinyMCE_ContextMenuPlugin._contextMenu=new TinyMCE_ContextMenu({commandhandler:"TinyMCE_ContextMenuPlugin._commandHandler",spacer_image:tinyMCE.baseURL+"/plugins/contextmenu/images/spacer.gif"});tinyMCE.addEvent(inst.getDoc(),"click",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keypress",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keydown",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(document,"click",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(document,"keypress",TinyMCE_ContextMenuPlugin._hideContextMenu);tinyMCE.addEvent(document,"keydown",TinyMCE_ContextMenuPlugin._hideContextMenu);if(tinyMCE.isGecko){tinyMCE.addEvent(inst.getDoc(),"contextmenu",function(e){TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE?inst.contentWindow.event:e,inst)})}else tinyMCE.addEvent(inst.getDoc(),"contextmenu",TinyMCE_ContextMenuPlugin._onContextMenu)},_onContextMenu:function(e){var elm=tinyMCE.isMSIE?e.srcElement:e.target;var targetInst,body;if((body=tinyMCE.getParentElement(elm,"body"))!=null){for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(body==inst.getBody()){targetInst=inst;break}}return TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE?targetInst.contentWindow.event:e,targetInst)}},_showContextMenu:function(e,inst){if(e.ctrlKey)return true;function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):""}var x,y,elm,contextMenu;var pos=tinyMCE.getAbsPosition(inst.iframeElement);x=tinyMCE.isMSIE?e.screenX:pos.absLeft+(e.pageX-inst.getBody().scrollLeft);y=tinyMCE.isMSIE?e.screenY:pos.absTop+(e.pageY-inst.getBody().scrollTop);elm=tinyMCE.isMSIE?e.srcElement:e.target;contextMenu=this._contextMenu;contextMenu.inst=inst;window.setTimeout(function(){var theme=tinyMCE.getParam("theme");contextMenu.clearAll();var sel=inst.selection.getSelectedText().length!=0||elm.nodeName=="IMG";contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_cut_desc","Cut","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_copy_desc","Copy","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_paste_desc","Paste","",false);if(sel||(elm?(elm.nodeName=='A'&&tinyMCE.getAttrib(elm,'name')=='')||(elm.nodeName=='IMG'):false)){contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/themes/advanced/images/link.gif","$lang_link_desc",inst.hasPlugin("advlink")?"mceAdvLink":"mceLink");contextMenu.addItem(tinyMCE.baseURL+"/themes/advanced/images/unlink.gif","$lang_unlink_desc","unlink","",(elm?(elm.nodeName!='A')&&(elm.nodeName!='IMG'):true))}elm=tinyMCE.getParentElement(elm,"img,table,td"+(inst.hasPlugin("advhr")?',hr':''));if(elm){switch(elm.nodeName){case"IMG":contextMenu.addSeparator();if(tinyMCE.hasPlugin('flash')&&tinyMCE.getAttrib(elm,'class').indexOf('mceItemFlash')!=-1)contextMenu.addItem(tinyMCE.baseURL+"/plugins/flash/images/flash.gif","$lang_flash_props","mceFlash");else if(tinyMCE.hasPlugin('media')&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(elm,'class')))contextMenu.addItem(tinyMCE.baseURL+"/plugins/flash/images/flash.gif","$lang_media_title","mceMedia");else contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/image.gif","$lang_image_props_desc",inst.hasPlugin("advimage")?"mceAdvImage":"mceImage");break;case"HR":contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/advhr/images/advhr.gif","$lang_insert_advhr_desc","mceAdvancedHr");break;case"TABLE":case"TD":if(inst.hasPlugin("table")){var colspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"colspan");var rowspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"rowspan");colspan=colspan==""?"1":colspan;rowspan=rowspan==""?"1":rowspan;contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_table_cut_row_desc","mceTableCutRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_table_copy_row_desc","mceTableCopyRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_before_desc","mceTablePasteRowBefore","",inst.tableRowClipboard==null);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_after_desc","mceTablePasteRowAfter","",inst.tableRowClipboard==null);contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_desc","mceInsertTable","insert");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_props_desc","mceInsertTable");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_cell_props.gif","$lang_table_cell_desc","mceTableCellProps");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete.gif","$lang_table_del","mceTableDelete");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_row_props.gif","$lang_table_row_desc","mceTableRowProps");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_before.gif","$lang_table_row_before_desc","mceTableInsertRowBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_after.gif","$lang_table_row_after_desc","mceTableInsertRowAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_row.gif","$lang_table_delete_row_desc","mceTableDeleteRow");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_before.gif","$lang_table_col_before_desc","mceTableInsertColBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_after.gif","$lang_table_col_after_desc","mceTableInsertColAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_col.gif","$lang_table_delete_col_desc","mceTableDeleteCol");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_split_cells.gif","$lang_table_split_cells_desc","mceTableSplitCells","",(colspan=="1"&&rowspan=="1"));contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_merge_cells.gif","$lang_table_merge_cells_desc","mceTableMergeCells","",false)}break}}else{if(inst.hasPlugin("table")){contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_desc","mceInsertTable","insert")}}contextMenu.show(x,y)},10);tinyMCE.cancelEvent(e);return false},_hideContextMenu:function(){if(TinyMCE_ContextMenuPlugin._contextMenu)TinyMCE_ContextMenuPlugin._contextMenu.hide()},_commandHandler:function(command,value){var cm=TinyMCE_ContextMenuPlugin._contextMenu;cm.hide();var ui=false;if(command=="mceInsertTable"||command=="mceTableCellProps"||command=="mceTableRowProps"||command=="mceTableMergeCells")ui=true;if(command=="Paste")value=null;if(tinyMCE.getParam("dialog_type")=="modal"&&tinyMCE.isMSIE){window.setTimeout(function(){cm.inst.execCommand(command,ui,value)},100)}else cm.inst.execCommand(command,ui,value)}};tinyMCE.addPlugin("contextmenu",TinyMCE_ContextMenuPlugin);function TinyMCE_ContextMenu(settings){var doc,self=this;function defParam(key,def_val){settings[key]=typeof(settings[key])!="undefined"?settings[key]:def_val}this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.contextMenuDiv=document.createElement("div");this.contextMenuDiv.className="contextMenu";this.contextMenuDiv.setAttribute("class","contextMenu");this.contextMenuDiv.style.display="none";this.contextMenuDiv.style.position='absolute';this.contextMenuDiv.style.zindex=1000;this.contextMenuDiv.style.left='0';this.contextMenuDiv.style.top='0';this.contextMenuDiv.unselectable="on";document.body.appendChild(this.contextMenuDiv);defParam("commandhandler","");defParam("spacer_image","images/spacer.gif");this.items=new Array();this.settings=settings;this.html="";if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera){this.pop=window.createPopup();doc=this.pop.document;doc.open();doc.write('<html><head><link href="'+tinyMCE.baseURL+'/plugins/contextmenu/css/contextmenu.css" rel="stylesheet" type="text/css" /></head><body unselectable="yes" class="contextMenuIEPopup"></body></html>');doc.close()}};TinyMCE_ContextMenu.prototype={clearAll:function(){this.html="";this.contextMenuDiv.innerHTML=""},addSeparator:function(){this.html+='<tr class="contextMenuItem"><td class="contextMenuIcon"><img src="'+this.settings['spacer_image']+'" width="20" height="1" class="contextMenuImage" /></td><td><img class="contextMenuSeparator" width="1" height="1" src="'+this.settings['spacer_image']+'" /></td></tr>'},addItem:function(icon,title,command,value,disabled){if(title.charAt(0)=='$')title=tinyMCE.getLang(title.substring(1));var onMouseDown='';var html='';if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0)onMouseDown='contextMenu.execCommand(\''+command+'\', \''+value+'\');return false;';else onMouseDown=this.settings['commandhandler']+'(\''+command+'\', \''+value+'\');return false;';if(icon=="")icon=this.settings['spacer_image'];if(!disabled)html+='<tr class="contextMenuItem">';else html+='<tr class="contextMenuItemDisabled">';html+='<td class="contextMenuIcon"><img src="'+icon+'" width="20" height="20" class="contextMenuImage" /></td>';html+='<td><div class="contextMenuText">';html+='<a href="javascript:void(0);" onclick="'+onMouseDown+'" onmousedown="return false;">&#160;';html+=title;html+='&#160;</a>';html+='</div></td>';html+='</tr>';this.html+=html},show:function(x,y){var vp,width,height,yo;if(this.html=="")return;var html='';html+='<a href="#"></a><table border="0" cellpadding="0" cellspacing="0">';html+=this.html;html+='</table>';this.contextMenuDiv.innerHTML=html;this.contextMenuDiv.style.display="block";width=this.contextMenuDiv.offsetWidth;height=this.contextMenuDiv.offsetHeight;this.contextMenuDiv.style.display="none";if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera){this.pop.document.body.innerHTML='<div class="contextMenu">'+html+"</div>";this.pop.document.tinyMCE=tinyMCE;this.pop.document.contextMenu=this;this.pop.show(x,y,width,height)}else{vp=this.getViewPort();yo=tinyMCE.isMSIE5_0?document.body.scrollTop:self.pageYOffset;this.contextMenuDiv.style.left=(x>vp.left+vp.width-width?vp.left+vp.width-width:x)+'px';this.contextMenuDiv.style.top=(y>vp.top+vp.height-height?vp.top+vp.height-height:y)+'px';this.contextMenuDiv.style.display="block"}},getViewPort:function(){return{left:self.pageXOffset||self.document.documentElement.scrollLeft||self.document.body.scrollLeft,top:self.pageYOffset||self.document.documentElement.scrollTop||self.document.body.scrollTop,width:document.documentElement.offsetWidth||document.body.offsetWidth,height:self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}},hide:function(){if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0&&!tinyMCE.isOpera)this.pop.hide();else this.contextMenuDiv.style.display="none"},execCommand:function(command,value){eval(this.settings['commandhandler']+"(command, value);")}};
js/tiny_mce/plugins/contextmenu/editor_plugin_src.js ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 264 2007-04-26 20:53:09Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ if (!tinyMCE.settings['contextmenu_skip_plugin_css']) {
10
+ tinyMCE.loadCSS(tinyMCE.baseURL + "/plugins/contextmenu/css/contextmenu.css");
11
+ }
12
+
13
+ var TinyMCE_ContextMenuPlugin = {
14
+ // Private fields
15
+ _contextMenu : null,
16
+
17
+ getInfo : function() {
18
+ return {
19
+ longname : 'Context menus',
20
+ author : 'Moxiecode Systems AB',
21
+ authorurl : 'http://tinymce.moxiecode.com',
22
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',
23
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
24
+ };
25
+ },
26
+
27
+ initInstance : function(inst) {
28
+ // Is not working on MSIE 5.0 or Opera no contextmenu event
29
+ if (tinyMCE.isMSIE5_0 && tinyMCE.isOpera)
30
+ return;
31
+
32
+ TinyMCE_ContextMenuPlugin._contextMenu = new TinyMCE_ContextMenu({
33
+ commandhandler : "TinyMCE_ContextMenuPlugin._commandHandler",
34
+ spacer_image : tinyMCE.baseURL + "/plugins/contextmenu/images/spacer.gif"
35
+ });
36
+
37
+ // Add hide event handles
38
+ tinyMCE.addEvent(inst.getDoc(), "click", TinyMCE_ContextMenuPlugin._hideContextMenu);
39
+ tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_ContextMenuPlugin._hideContextMenu);
40
+ tinyMCE.addEvent(inst.getDoc(), "keydown", TinyMCE_ContextMenuPlugin._hideContextMenu);
41
+ tinyMCE.addEvent(document, "click", TinyMCE_ContextMenuPlugin._hideContextMenu);
42
+ tinyMCE.addEvent(document, "keypress", TinyMCE_ContextMenuPlugin._hideContextMenu);
43
+ tinyMCE.addEvent(document, "keydown", TinyMCE_ContextMenuPlugin._hideContextMenu);
44
+
45
+ // Attach contextmenu event
46
+ if (tinyMCE.isGecko) {
47
+ tinyMCE.addEvent(inst.getDoc(), "contextmenu", function(e) {TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE ? inst.contentWindow.event : e, inst);});
48
+ } else
49
+ tinyMCE.addEvent(inst.getDoc(), "contextmenu", TinyMCE_ContextMenuPlugin._onContextMenu);
50
+ },
51
+
52
+ // Private plugin internal methods
53
+
54
+ _onContextMenu : function(e) {
55
+ var elm = tinyMCE.isMSIE ? e.srcElement : e.target;
56
+ var targetInst, body;
57
+
58
+ // Find instance
59
+ if ((body = tinyMCE.getParentElement(elm, "body")) != null) {
60
+ for (var n in tinyMCE.instances) {
61
+ var inst = tinyMCE.instances[n];
62
+ if (!tinyMCE.isInstance(inst))
63
+ continue;
64
+
65
+ if (body == inst.getBody()) {
66
+ targetInst = inst;
67
+ break;
68
+ }
69
+ }
70
+
71
+ return TinyMCE_ContextMenuPlugin._showContextMenu(tinyMCE.isMSIE ? targetInst.contentWindow.event : e, targetInst);
72
+ }
73
+ },
74
+
75
+ _showContextMenu : function(e, inst) {
76
+ if (e.ctrlKey)
77
+ return true;
78
+
79
+ function getAttrib(elm, name) {
80
+ return elm.getAttribute(name) ? elm.getAttribute(name) : "";
81
+ }
82
+
83
+ var x, y, elm, contextMenu;
84
+ var pos = tinyMCE.getAbsPosition(inst.iframeElement);
85
+
86
+ x = tinyMCE.isMSIE ? e.screenX : pos.absLeft + (e.pageX - inst.getBody().scrollLeft);
87
+ y = tinyMCE.isMSIE ? e.screenY : pos.absTop + (e.pageY - inst.getBody().scrollTop);
88
+ elm = tinyMCE.isMSIE ? e.srcElement : e.target;
89
+
90
+ contextMenu = this._contextMenu;
91
+ contextMenu.inst = inst;
92
+
93
+ // Mozilla needs some time
94
+ window.setTimeout(function () {
95
+ var theme = tinyMCE.getParam("theme");
96
+
97
+ contextMenu.clearAll();
98
+ var sel = inst.selection.getSelectedText().length != 0 || elm.nodeName == "IMG";
99
+
100
+ // Default items
101
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_cut_desc", "Cut", "", !sel);
102
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_copy_desc", "Copy", "", !sel);
103
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_paste_desc", "Paste", "", false);
104
+
105
+ if (sel || (elm ? (elm.nodeName == 'A' && tinyMCE.getAttrib(elm, 'name') == '') || (elm.nodeName == 'IMG') : false)) {
106
+ contextMenu.addSeparator();
107
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/link.gif", "$lang_link_desc", inst.hasPlugin("advlink") ? "mceAdvLink" : "mceLink");
108
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/unlink.gif", "$lang_unlink_desc", "unlink", "", (elm ? (elm.nodeName != 'A') && (elm.nodeName != 'IMG') : true));
109
+ }
110
+
111
+ // Get element
112
+ elm = tinyMCE.getParentElement(elm, "img,table,td" + (inst.hasPlugin("advhr") ? ',hr' : ''));
113
+ if (elm) {
114
+ switch (elm.nodeName) {
115
+ case "IMG":
116
+ contextMenu.addSeparator();
117
+
118
+ // If flash
119
+ if (tinyMCE.hasPlugin('flash') && tinyMCE.getAttrib(elm, 'class').indexOf('mceItemFlash') != -1)
120
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_flash_props", "mceFlash");
121
+ else if (tinyMCE.hasPlugin('media') && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(elm, 'class')))
122
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_media_title", "mceMedia");
123
+ else
124
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/image.gif", "$lang_image_props_desc", inst.hasPlugin("advimage") ? "mceAdvImage" : "mceImage");
125
+ break;
126
+
127
+ case "HR":
128
+ contextMenu.addSeparator();
129
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/advhr/images/advhr.gif", "$lang_insert_advhr_desc", "mceAdvancedHr");
130
+ break;
131
+
132
+ case "TABLE":
133
+ case "TD":
134
+ // Is table plugin loaded
135
+ if (inst.hasPlugin("table")) {
136
+ var colspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "colspan");
137
+ var rowspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "rowspan");
138
+
139
+ colspan = colspan == "" ? "1" : colspan;
140
+ rowspan = rowspan == "" ? "1" : rowspan;
141
+
142
+ contextMenu.addSeparator();
143
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_table_cut_row_desc", "mceTableCutRow");
144
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_table_copy_row_desc", "mceTableCopyRow");
145
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_before_desc", "mceTablePasteRowBefore", "", inst.tableRowClipboard == null);
146
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_after_desc", "mceTablePasteRowAfter", "", inst.tableRowClipboard == null);
147
+
148
+ /* contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyleft.gif", "$lang_justifyleft_desc", "JustifyLeft", "", false);
149
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifycenter.gif", "$lang_justifycenter_desc", "JustifyCenter", "", false);
150
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyright.gif", "$lang_justifyright_desc", "JustifyRight", "", false);
151
+ contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/justifyfull.gif", "$lang_justifyfull_desc", "JustifyFull", "", false);*/
152
+ contextMenu.addSeparator();
153
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert");
154
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_props_desc", "mceInsertTable");
155
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_cell_props.gif", "$lang_table_cell_desc", "mceTableCellProps");
156
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete.gif", "$lang_table_del", "mceTableDelete");
157
+ contextMenu.addSeparator();
158
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_row_props.gif", "$lang_table_row_desc", "mceTableRowProps");
159
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_before.gif", "$lang_table_row_before_desc", "mceTableInsertRowBefore");
160
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_after.gif", "$lang_table_row_after_desc", "mceTableInsertRowAfter");
161
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_row.gif", "$lang_table_delete_row_desc", "mceTableDeleteRow");
162
+ contextMenu.addSeparator();
163
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_before.gif", "$lang_table_col_before_desc", "mceTableInsertColBefore");
164
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_after.gif", "$lang_table_col_after_desc", "mceTableInsertColAfter");
165
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_col.gif", "$lang_table_delete_col_desc", "mceTableDeleteCol");
166
+ contextMenu.addSeparator();
167
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_split_cells.gif", "$lang_table_split_cells_desc", "mceTableSplitCells", "", (colspan == "1" && rowspan == "1"));
168
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_merge_cells.gif", "$lang_table_merge_cells_desc", "mceTableMergeCells", "", false);
169
+ }
170
+ break;
171
+ }
172
+ } else {
173
+ // Add table specific
174
+ if (inst.hasPlugin("table")) {
175
+ contextMenu.addSeparator();
176
+ contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_desc", "mceInsertTable", "insert");
177
+ }
178
+ }
179
+
180
+ contextMenu.show(x, y);
181
+ }, 10);
182
+
183
+ // Cancel default handeling
184
+ tinyMCE.cancelEvent(e);
185
+ return false;
186
+ },
187
+
188
+ _hideContextMenu : function() {
189
+ if (TinyMCE_ContextMenuPlugin._contextMenu)
190
+ TinyMCE_ContextMenuPlugin._contextMenu.hide();
191
+ },
192
+
193
+ _commandHandler : function(command, value) {
194
+ var cm = TinyMCE_ContextMenuPlugin._contextMenu;
195
+
196
+ cm.hide();
197
+
198
+ // UI must be true on these
199
+ var ui = false;
200
+ if (command == "mceInsertTable" || command == "mceTableCellProps" || command == "mceTableRowProps" || command == "mceTableMergeCells")
201
+ ui = true;
202
+
203
+ if (command == "Paste")
204
+ value = null;
205
+
206
+ if (tinyMCE.getParam("dialog_type") == "modal" && tinyMCE.isMSIE) {
207
+ // Cell properties will generate access denied error is this isn't done?!
208
+ window.setTimeout(function() {
209
+ cm.inst.execCommand(command, ui, value);
210
+ }, 100);
211
+ } else
212
+ cm.inst.execCommand(command, ui, value);
213
+ }
214
+ };
215
+
216
+ tinyMCE.addPlugin("contextmenu", TinyMCE_ContextMenuPlugin);
217
+
218
+ // Context menu class
219
+
220
+ function TinyMCE_ContextMenu(settings) {
221
+ var doc, self = this;
222
+
223
+ // Default value function
224
+ function defParam(key, def_val) {
225
+ settings[key] = typeof(settings[key]) != "undefined" ? settings[key] : def_val;
226
+ }
227
+
228
+ this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
229
+
230
+ // Setup contextmenu div
231
+ this.contextMenuDiv = document.createElement("div");
232
+ this.contextMenuDiv.className = "contextMenu";
233
+ this.contextMenuDiv.setAttribute("class", "contextMenu");
234
+ this.contextMenuDiv.style.display = "none";
235
+ this.contextMenuDiv.style.position = 'absolute';
236
+ this.contextMenuDiv.style.zindex = 1000;
237
+ this.contextMenuDiv.style.left = '0';
238
+ this.contextMenuDiv.style.top = '0';
239
+ this.contextMenuDiv.unselectable = "on";
240
+
241
+ document.body.appendChild(this.contextMenuDiv);
242
+
243
+ // Setup default values
244
+ defParam("commandhandler", "");
245
+ defParam("spacer_image", "images/spacer.gif");
246
+
247
+ this.items = new Array();
248
+ this.settings = settings;
249
+ this.html = "";
250
+
251
+ // IE Popup
252
+ if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) {
253
+ this.pop = window.createPopup();
254
+ doc = this.pop.document;
255
+ doc.open();
256
+ doc.write('<html><head><link href="' + tinyMCE.baseURL + '/plugins/contextmenu/css/contextmenu.css" rel="stylesheet" type="text/css" /></head><body unselectable="yes" class="contextMenuIEPopup"></body></html>');
257
+ doc.close();
258
+ }
259
+ };
260
+
261
+ TinyMCE_ContextMenu.prototype = {
262
+ clearAll : function() {
263
+ this.html = "";
264
+ this.contextMenuDiv.innerHTML = "";
265
+ },
266
+
267
+ addSeparator : function() {
268
+ this.html += '<tr class="contextMenuItem"><td class="contextMenuIcon"><img src="' + this.settings['spacer_image'] + '" width="20" height="1" class="contextMenuImage" /></td><td><img class="contextMenuSeparator" width="1" height="1" src="' + this.settings['spacer_image'] + '" /></td></tr>';
269
+ },
270
+
271
+ addItem : function(icon, title, command, value, disabled) {
272
+ if (title.charAt(0) == '$')
273
+ title = tinyMCE.getLang(title.substring(1));
274
+
275
+ var onMouseDown = '';
276
+ var html = '';
277
+
278
+ if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0)
279
+ onMouseDown = 'contextMenu.execCommand(\'' + command + '\', \'' + value + '\');return false;';
280
+ else
281
+ onMouseDown = this.settings['commandhandler'] + '(\'' + command + '\', \'' + value + '\');return false;';
282
+
283
+ if (icon == "")
284
+ icon = this.settings['spacer_image'];
285
+
286
+ if (!disabled)
287
+ html += '<tr class="contextMenuItem">';
288
+ else
289
+ html += '<tr class="contextMenuItemDisabled">';
290
+
291
+ html += '<td class="contextMenuIcon"><img src="' + icon + '" width="20" height="20" class="contextMenuImage" /></td>';
292
+ html += '<td><div class="contextMenuText">';
293
+ html += '<a href="javascript:void(0);" onclick="' + onMouseDown + '" onmousedown="return false;">&#160;';
294
+
295
+ // Add text
296
+ html += title;
297
+
298
+ html += '&#160;</a>';
299
+ html += '</div></td>';
300
+ html += '</tr>';
301
+
302
+ // Add to main
303
+ this.html += html;
304
+ },
305
+
306
+ show : function(x, y) {
307
+ var vp, width, height, yo;
308
+
309
+ if (this.html == "")
310
+ return;
311
+
312
+ var html = '';
313
+
314
+ html += '<a href="#"></a><table border="0" cellpadding="0" cellspacing="0">';
315
+ html += this.html;
316
+ html += '</table>';
317
+
318
+ this.contextMenuDiv.innerHTML = html;
319
+
320
+ // Get dimensions
321
+ this.contextMenuDiv.style.display = "block";
322
+ width = this.contextMenuDiv.offsetWidth;
323
+ height = this.contextMenuDiv.offsetHeight;
324
+ this.contextMenuDiv.style.display = "none";
325
+
326
+ if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera) {
327
+ // Setup popup and show
328
+ this.pop.document.body.innerHTML = '<div class="contextMenu">' + html + "</div>";
329
+ this.pop.document.tinyMCE = tinyMCE;
330
+ this.pop.document.contextMenu = this;
331
+ this.pop.show(x, y, width, height);
332
+ } else {
333
+ vp = this.getViewPort();
334
+ yo = tinyMCE.isMSIE5_0 ? document.body.scrollTop : self.pageYOffset;
335
+ this.contextMenuDiv.style.left = (x > vp.left + vp.width - width ? vp.left + vp.width - width : x) + 'px';
336
+ this.contextMenuDiv.style.top = (y > vp.top + vp.height - height ? vp.top + vp.height - height : y) + 'px';
337
+ this.contextMenuDiv.style.display = "block";
338
+ }
339
+ },
340
+
341
+ getViewPort : function() {
342
+ return {
343
+ left : self.pageXOffset || self.document.documentElement.scrollLeft || self.document.body.scrollLeft,
344
+ top: self.pageYOffset || self.document.documentElement.scrollTop || self.document.body.scrollTop,
345
+ width : document.documentElement.offsetWidth || document.body.offsetWidth,
346
+ height : self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
347
+ };
348
+ },
349
+
350
+ hide : function() {
351
+ if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0 && !tinyMCE.isOpera)
352
+ this.pop.hide();
353
+ else
354
+ this.contextMenuDiv.style.display = "none";
355
+ },
356
+
357
+ execCommand : function(command, value) {
358
+ eval(this.settings['commandhandler'] + "(command, value);");
359
+ }
360
+ };
js/tiny_mce/plugins/contextmenu/images/spacer.gif ADDED
Binary file
js/tiny_mce/plugins/contextmenu/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/devkit/css/devkit.css ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ overflow: hidden;
3
+ }
4
+
5
+ h1 {
6
+ font-size: 14px;
7
+ margin: 0 0 10px 0;
8
+ }
9
+
10
+ h2 {
11
+ font-size: 12px;
12
+ margin: 3px 0 3px 0;
13
+ }
14
+
15
+ h3 {
16
+ font-size: 11px;
17
+ margin: 3px 0 3px 0;
18
+ }
19
+
20
+ #log {
21
+ font-family: Verdana;
22
+ border: 1px solid gray;
23
+ width: 100%; height: 240px;
24
+ overflow: scroll;
25
+ white-space: nowrap;
26
+ }
27
+
28
+ #log span {
29
+ display: block;
30
+ }
31
+
32
+ #log span.msg {
33
+ float: left;
34
+ }
35
+
36
+ #log span.time {
37
+ float: left;
38
+ }
39
+
40
+ #log br {
41
+ clear: both;
42
+ }
43
+
44
+ #logfilter {
45
+ width: 350px;
46
+ }
47
+
48
+ #logenabled {
49
+ border: 0;
50
+ }
51
+
52
+ #settings_panel span, #info_panel span, #content_panel span, #command_states_panel span, #undo_redo_panel span {
53
+ display: block;
54
+ margin: 5px 0 5px 0;
55
+ }
56
+
57
+ div.data {
58
+ width: 100%; height: 240px;
59
+ overflow: scroll;
60
+ border: 1px solid gray;
61
+ }
62
+
63
+ #misc_panel div.data {
64
+ height: 270px;
65
+ }
66
+
67
+ .data input {
68
+ width: 265px;
69
+ border: 0;
70
+ }
71
+
72
+ .data h2 {
73
+ margin-left: 5px;
74
+ }
75
+
76
+ .data h3 {
77
+ margin-left: 7px;
78
+ }
79
+
80
+ .data div {
81
+ margin-left: 7px;
82
+ }
83
+
84
+ .data table {
85
+ margin: 0 0 15px 15px;
86
+ }
87
+
88
+ .data p {
89
+ margin: 0; padding: 0;
90
+ margin-top: 5px;
91
+ margin-left: 5px;
92
+ }
93
+
94
+ table, td {
95
+ border: 1px solid gray;
96
+ border-collapse: collapse;
97
+ }
98
+
99
+ #flip {
100
+ position: absolute;
101
+ left: 295; top: 384px;
102
+ }
103
+
104
+ .bspec {
105
+ color: gray;
106
+ }
107
+
108
+ .dep {
109
+ color: #880000;
110
+ }
111
+
112
+ .col1 {
113
+ width: 265px;
114
+ }
115
+
116
+ div.undodata {
117
+ }
js/tiny_mce/plugins/devkit/css/devkit_ui.css ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #devkit {
2
+ position: absolute;
3
+ top: -385px; right: 0;
4
+ width: 640px; height: 390px;
5
+ border: 1px solid black;
6
+ z-index: 10000;
7
+ }
8
+
9
+ .devkitup {
10
+ top: -385px !important;
11
+ }
12
+
13
+ .devkitdown {
14
+ top: 0 !important;
15
+ }
js/tiny_mce/plugins/devkit/devkit.htm ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_devkit_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="jscripts/devkit.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/diff.js"></script>
9
+ <link href="css/devkit.css" rel="stylesheet" type="text/css" />
10
+ <base target="_self" />
11
+ </head>
12
+ <body id="devkit" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
13
+ <form action="#">
14
+ <h1>{$lang_devkit_title}</h1>
15
+
16
+ <div class="tabs">
17
+ <ul>
18
+ <li id="log_tab" class="current"><span><a href="javascript:mcTabs.displayTab('log_tab','log_panel');" onmousedown="return false;">{$lang_devkit_log_tab}</a></span></li>
19
+ <li id="info_tab"><span><a href="javascript:mcTabs.displayTab('info_tab','info_panel');" onmousedown="return false;">{$lang_devkit_info_tab}</a></span></li>
20
+ <li id="settings_tab"><span><a href="javascript:mcTabs.displayTab('settings_tab','settings_panel');" onmousedown="return false;">{$lang_devkit_settings_tab}</a></span></li>
21
+ <li id="content_tab"><span><a href="javascript:mcTabs.displayTab('content_tab','content_panel');" onmousedown="return false;">{$lang_devkit_content_tab}</a></span></li>
22
+ <!-- <li id="command_states_tab"><span><a href="javascript:mcTabs.displayTab('command_states_tab','command_states_panel');" onmousedown="return false;">{$lang_devkit_command_states_tab}</a></span></li> -->
23
+ <li id="undo_redo_tab"><span><a href="javascript:mcTabs.displayTab('undo_redo_tab','undo_redo_panel');" onmousedown="return false;">{$lang_devkit_undo_redo_tab}</a></span></li>
24
+ <li id="misc_tab"><span><a href="javascript:mcTabs.displayTab('misc_tab','misc_panel');" onmousedown="return false;">{$lang_devkit_misc_tab}</a></span></li>
25
+ </ul>
26
+ </div>
27
+
28
+ <div class="panel_wrapper">
29
+ <div id="log_panel" class="panel current">
30
+ <fieldset>
31
+ <legend>{$lang_devkit_log_tab}</legend>
32
+
33
+ <div style="float: left">
34
+ <label>{$lang_devkit_filter} </label><input type="text" id="logfilter" name="logfilter" value="" onchange="changeFilter(this.value);" />
35
+ </div>
36
+
37
+ <div style="float: left">
38
+ <input type="checkbox" id="logenabled" name="logenabled" value="true" checked="checked" onclick="toggleLog(this.checked);" />
39
+ </div>
40
+
41
+ <div style="float: right">
42
+ <a href="javascript:clearLog();">[{$lang_devkit_clear_log}]</a>
43
+ </div>
44
+
45
+ <br style="clear: both" />
46
+
47
+ <div id="log">
48
+ </div>
49
+
50
+ <input type="checkbox" id="debug_events" name="debug_events" class="checkbox" onclick="toggleDebugEvents(this.checked);" /><label for="debug_events" onclick="toggleDebugEvents(this.form.debug_events.checked);">{$lang_devkit_debug_events}</label>
51
+ </fieldset>
52
+ </div>
53
+
54
+ <div id="info_panel" class="panel">
55
+ <fieldset>
56
+ <legend>{$lang_devkit_info_tab}</legend>
57
+
58
+ <span><a href="javascript:renderInfo();">[{$lang_devkit_refresh}]</a></span>
59
+
60
+ <div id="info" class="data">
61
+ <p>{$lang_devkit_info_help}</p>
62
+ </div>
63
+ </fieldset>
64
+ </div>
65
+
66
+ <div id="settings_panel" class="panel">
67
+ <fieldset>
68
+ <legend>{$lang_devkit_settings_tab}</legend>
69
+
70
+ <span><a href="javascript:renderSettings();">[{$lang_devkit_refresh}]</a></span>
71
+
72
+ <div id="settings" class="data">
73
+ <p>{$lang_devkit_settings_help}</p>
74
+ </div>
75
+ </fieldset>
76
+ </div>
77
+
78
+ <div id="content_panel" class="panel">
79
+ <fieldset>
80
+ <legend>{$lang_devkit_content_tab}</legend>
81
+
82
+ <span><a href="javascript:renderContent();">[{$lang_devkit_refresh}]</a></span>
83
+
84
+ <div id="content" class="data">
85
+ <p>{$lang_devkit_content_help}</p>
86
+ </div>
87
+ </fieldset>
88
+ </div>
89
+
90
+ <div id="command_states_panel" class="panel">
91
+ <fieldset>
92
+ <legend>{$lang_devkit_command_states_tab}</legend>
93
+
94
+ <span><a href="javascript:renderCommandStates();">[{$lang_devkit_refresh}]</a></span>
95
+
96
+ <div id="command_states" class="data">
97
+ <p>{$lang_devkit_command_states_help}</p>
98
+ </div>
99
+ </fieldset>
100
+ </div>
101
+
102
+ <div id="undo_redo_panel" class="panel">
103
+ <fieldset>
104
+ <legend>{$lang_devkit_undo_redo_tab}</legend>
105
+
106
+ <span><a href="javascript:renderUndoRedo();">[{$lang_devkit_refresh}]</a></span>
107
+
108
+ <div id="undo_redo" class="data">
109
+ <p>{$lang_devkit_undo_redo_help}</p>
110
+ </div>
111
+
112
+ <input type="checkbox" id="undo_diff" name="undo_diff" class="checkbox" /><label for="undo_diff">{$lang_devkit_undo_diff}</label>
113
+ </fieldset>
114
+ </div>
115
+
116
+ <div id="misc_panel" class="panel">
117
+ <fieldset>
118
+ <legend>{$lang_devkit_misc_tab}</legend>
119
+
120
+ <div class="data">
121
+ <p>{$lang_devkit_misc_help}</p>
122
+ <hr />
123
+ <p>Selection: <a href="#" onmousedown="return storeSelection();">[Store selection]</a> <a href="#" onmousedown="return restoreSelection();">[Restore selection]</a></p>
124
+ <hr />
125
+ <div><strong>Insert custom HTML content</strong></div>
126
+ <div><textarea id="htmlcont" name="htmlcont" style="width: 90%" rows="5"></textarea></div>
127
+ <div><a href="#" onclick="return tinyMCE.execCommand('mceInsertContent',false,document.getElementById('htmlcont').value);">[Insert content]</a></div>
128
+ <hr />
129
+ <div><strong>Eval JS:</strong></div>
130
+ <div><textarea id="jscont" name="jscont" style="width: 90%" rows="5">tinyMCE.execCommand('Bold',false,null);</textarea></div>
131
+ <div><a href="#" onclick="return parent.window.eval(document.getElementById('jscont').value);">[Evaluate]</a></div>
132
+ </div>
133
+ </fieldset>
134
+ </div>
135
+ </div>
136
+ </form>
137
+
138
+ <div id="flip"><a href="javascript:toggleFlip();" onmousedown="return false;"><img id="flipbtn" src="images/flip_down.gif" border="0" /></a></div>
139
+ </body>
140
+ </html>
js/tiny_mce/plugins/devkit/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('devkit');var TinyMCE_DevKitPlugin={_logFilter:'\\[(importCSS|execCommand|execInstanceCommand|debug)\\]',_logPadding:'',_startTime:null,_benchMark:false,_winLoaded:false,_isDebugEvents:false,getInfo:function(){return{longname:'Development Kit',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/devkit',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){this._setup()},_setup:function(){if(this._loaded)return;this._loaded=true;document.___TinyMCE=tinyMCE;this._logFilter=tinyMCE.getParam('devkit_log_filter',this._logFilter);this._benchMark=tinyMCE.getParam('devkit_bench_mark',false);var ifr=document.createElement('iframe');ifr.setAttribute("id","devkit");ifr.setAttribute("frameBorder","0");ifr.setAttribute("src",tinyMCE.baseURL+'/plugins/devkit/devkit.htm');document.body.appendChild(ifr);tinyMCE.importCSS(document,tinyMCE.baseURL+'/plugins/devkit/css/devkit_ui.css')},_start:function(){this._logPadding+='\u00a0';return new Date().getTime()},_end:function(st){if(this._logPadding.length>0)this._logPadding=this._logPadding.substring(0,this._logPadding.length-1);if(this._benchMark)this._log("benchmark","Execution time: "+(new Date().getTime()-st))},_log:function(t){var m,a,i,e=document.getElementById('devkit'),now=new Date().getTime();if(!this._startTime)this._startTime=now;m=(this._logPadding.length>1?this._logPadding:'')+'['+(now-this._startTime)+'] ['+t+'] ';a=this._log.arguments;for(i=1;i<a.length;i++){if(typeof(a[i])=='undefined')continue;if(i>1)m+=', ';m+=a[i]}if(!new RegExp(this._logFilter,'gi').test(m)){if(this._logPadding.length>0)this._logPadding=this._logPadding.substring(0,this._logPadding.length-1);return}if(!this._winLoaded)tinyMCE.log[tinyMCE.log.length]=m;else e.contentWindow.debug(m)},_debugEvents:function(s){var i,ld,inst,n,ev=['CheckboxStateChange','DOMAttrModified','DOMMenuItemActive','DOMMenuItemInactive','DOMMouseScroll','DOMNodeInserted','DOMNodeRemoved','RadioStateChange','blur','broadcast','change','click','close','command','commandupdate','contextmenu','dblclick','dragdrop','dragenter','dragexit','draggesture','dragover','focus','input','keydown','keypress','keyup','load','mousedown','mouseout','mouseover','mouseup','overflow','overflowchanged','popuphidden','popuphiding','popupshowing','popupshown','select','syncfrompreference','synctopreference','underflow','unload','abort','activate','afterprint','afterupdate','beforeactivate','beforecopy','beforecut','beforedeactivate','beforeeditfocus','beforepaste','beforeprint','beforeunload','beforeupdate','bounce','cellchange','controlselect','copy','cut','dataavailable','datasetchanged','datasetcomplete','deactivate','dragend','dragleave','dragstart','drop','error','errorupdate','filterchange','finish','focusin','focusout','help','layoutcomplete','losecapture','mouseenter','mouseleave','mousewheel','move','moveend','movestart','paste','propertychange','readystatechange','reset','resize','resizeend','resizestart','rowenter','rowexit','rowsdelete','rowsinserted','scroll','selectionchange','selectstart','start','stop','submit'];if(TinyMCE_DevKitPlugin._isDebugEvents==s)return;TinyMCE_DevKitPlugin._isDebugEvents=s;for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst)||inst.getDoc()==ld)continue;ld=inst.getDoc();for(i=0;i<ev.length;i++){if(s)tinyMCE.addEvent(ld,ev[i],TinyMCE_DevKitPlugin._debugEvent);else tinyMCE.removeEvent(ld,ev[i],TinyMCE_DevKitPlugin._debugEvent)}}},_debugEvent:function(e){var t;e=e?e:tinyMCE.selectedInstance.getWin().event;t=e.srcElement?e.srcElement:e.target;tinyMCE.debug(e.type,t?t.nodeName:'')},_serialize:function(o){var i,v,s=TinyMCE_DevKitPlugin._serialize;if(o==null)return'null';switch(typeof o){case'string':v='\bb\tt\nn\ff\rr\""\'\'\\\\';return'"'+o.replace(new RegExp('([\u0080-\uFFFF\\x00-\\x1f\\"])','g'),function(a,b){i=v.indexOf(b);if(i+1)return'\\'+v.charAt(i+1);a=b.charCodeAt().toString(16);return'\\u'+'0000'.substring(a.length)+a})+'"';case'object':if(o instanceof Array){for(i=0,v='[';i<o.length;i++)v+=(i>0?',':'')+s(o[i]);return v+']'}v='{';for(i in o)v+=typeof o[i]!='function'?(v.length>1?',"':'"')+i+'":'+s(o[i]):'';return v+'}'}return''+o}};tinyMCE.__debug=tinyMCE.debug;tinyMCE.debug=function(){var a,i,m='',now=new Date().getTime(),start=TinyMCE_DevKitPlugin._startTime;if(!start)TinyMCE_DevKitPlugin._startTime=start=now;a=this.debug.arguments;for(i=0;i<a.length;i++){if(typeof(a[i])=='undefined')continue;if(i>0)m+=', ';m+=a[i]}TinyMCE_DevKitPlugin._log('debug',m)};tinyMCE.dump=function(o){tinyMCE.debug(TinyMCE_DevKitPlugin._serialize(o))};tinyMCE.sleep=function(t){var s=new Date().getTime(),b;while(new Date().getTime()-s<t)b=1};tinyMCE.__execCommand=tinyMCE.execCommand;tinyMCE.execCommand=function(command,user_interface,value){var r,st,dk=TinyMCE_DevKitPlugin;st=dk._start();dk._log('execCommand',command,user_interface,value);r=tinyMCE.__execCommand(command,user_interface,value);dk._end(st);return r};tinyMCE.__execInstanceCommand=tinyMCE.execInstanceCommand;tinyMCE.execInstanceCommand=function(editor_id,command,user_interface,value,focus){var r,st,dk=TinyMCE_DevKitPlugin;st=dk._start();dk._log('execInstanceCommand',editor_id,command,user_interface,value);r=tinyMCE.__execInstanceCommand(editor_id,command,user_interface,value);dk._end(st);return r};TinyMCE_Engine.prototype.__handleEvent=TinyMCE_Engine.prototype.handleEvent;TinyMCE_Engine.prototype.handleEvent=function(e){var r,st,dk=TinyMCE_DevKitPlugin;st=dk._start();dk._log('handleEvent',e.type);r=tinyMCE.__handleEvent(e);dk._end(st);return r};tinyMCE.__importCSS=tinyMCE.importCSS;tinyMCE.importCSS=function(doc,css){var r,st,dk=TinyMCE_DevKitPlugin;st=dk._start();dk._log('importCSS',doc,css);r=tinyMCE.__importCSS(doc,css);dk._end(st);return r};tinyMCE.__triggerNodeChange=tinyMCE.triggerNodeChange;tinyMCE.triggerNodeChange=function(focus,setup_content){var r,st,dk=TinyMCE_DevKitPlugin;st=dk._start();dk._log('triggerNodeChange',focus,setup_content);r=tinyMCE.__triggerNodeChange(focus,setup_content);dk._end(st);return r};tinyMCE.__dispatchCallback=tinyMCE.dispatchCallback;tinyMCE.dispatchCallback=function(i,p,n){var r,st,dk=TinyMCE_DevKitPlugin;st=dk._start();dk._log('dispatchCallback',i,p,n);r=tinyMCE.__dispatchCallback(i,p,n);dk._end(st);return r};tinyMCE.__executeCallback=tinyMCE.executeCallback;tinyMCE.executeCallback=function(i,p,n){var r,st,dk=TinyMCE_DevKitPlugin;st=dk._start();dk._log('executeCallback',i,p,n);r=tinyMCE.__executeCallback(i,p,n);dk._end(st);return r};tinyMCE.__execCommandCallback=tinyMCE.execCommandCallback;tinyMCE.execCommandCallback=function(i,p,n){var r,st,dk=TinyMCE_DevKitPlugin;st=dk._start();dk._log('execCommandCallback',i,p,n);r=tinyMCE.__execCommandCallback(i,p,n);dk._end(st);return r};tinyMCE.addPlugin("devkit",TinyMCE_DevKitPlugin);
js/tiny_mce/plugins/devkit/editor_plugin_src.js ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ tinyMCE.importPluginLanguagePack('devkit');
9
+
10
+ var TinyMCE_DevKitPlugin = {
11
+ _logFilter : '\\[(importCSS|execCommand|execInstanceCommand|debug)\\]',
12
+ _logPadding : '',
13
+ _startTime : null,
14
+ _benchMark : false,
15
+ _winLoaded : false,
16
+ _isDebugEvents : false,
17
+
18
+ getInfo : function() {
19
+ return {
20
+ longname : 'Development Kit',
21
+ author : 'Moxiecode Systems AB',
22
+ authorurl : 'http://tinymce.moxiecode.com',
23
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/devkit',
24
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
25
+ };
26
+ },
27
+
28
+ initInstance : function(inst) {
29
+ this._setup();
30
+ },
31
+
32
+ _setup : function() {
33
+ if (this._loaded)
34
+ return;
35
+
36
+ this._loaded = true;
37
+
38
+ // Register a document reference for more easy access in the FF DOM inspector
39
+ document.___TinyMCE = tinyMCE;
40
+
41
+ // Setup devkit by settings
42
+ this._logFilter = tinyMCE.getParam('devkit_log_filter', this._logFilter);
43
+ this._benchMark = tinyMCE.getParam('devkit_bench_mark', false);
44
+
45
+ var ifr = document.createElement('iframe');
46
+
47
+ ifr.setAttribute("id", "devkit");
48
+ ifr.setAttribute("frameBorder", "0");
49
+ ifr.setAttribute("src", tinyMCE.baseURL + '/plugins/devkit/devkit.htm');
50
+
51
+ document.body.appendChild(ifr);
52
+
53
+ // Workaround for strange IE reload bug
54
+ //if (tinyMCE.isRealIE)
55
+ // document.getElementById('devkit').outerHTML = document.getElementById('devkit').outerHTML;
56
+
57
+ tinyMCE.importCSS(document, tinyMCE.baseURL + '/plugins/devkit/css/devkit_ui.css');
58
+ },
59
+
60
+ _start : function() {
61
+ this._logPadding += '\u00a0';
62
+
63
+ return new Date().getTime();
64
+ },
65
+
66
+ _end : function(st) {
67
+ if (this._logPadding.length > 0)
68
+ this._logPadding = this._logPadding.substring(0, this._logPadding.length - 1);
69
+
70
+ if (this._benchMark)
71
+ this._log("benchmark", "Execution time: " + (new Date().getTime() - st));
72
+ },
73
+
74
+ _log : function(t) {
75
+ var m, a, i, e = document.getElementById('devkit'), now = new Date().getTime();
76
+
77
+ if (!this._startTime)
78
+ this._startTime = now;
79
+
80
+ m = (this._logPadding.length > 1 ? this._logPadding : '') + '[' + (now - this._startTime) + '] [' + t + '] ';
81
+
82
+ a = this._log.arguments;
83
+ for (i=1; i<a.length; i++) {
84
+ if (typeof(a[i]) == 'undefined')
85
+ continue;
86
+
87
+ if (i > 1)
88
+ m += ', ';
89
+
90
+ m += a[i];
91
+ }
92
+
93
+ if (!new RegExp(this._logFilter, 'gi').test(m)) {
94
+ if (this._logPadding.length > 0)
95
+ this._logPadding = this._logPadding.substring(0, this._logPadding.length - 1);
96
+
97
+ return;
98
+ }
99
+
100
+ if (!this._winLoaded)
101
+ tinyMCE.log[tinyMCE.log.length] = m;
102
+ else
103
+ e.contentWindow.debug(m);
104
+ },
105
+
106
+ _debugEvents : function(s) {
107
+ var i, ld, inst, n, ev = ['CheckboxStateChange','DOMAttrModified','DOMMenuItemActive',
108
+ 'DOMMenuItemInactive','DOMMouseScroll','DOMNodeInserted','DOMNodeRemoved',
109
+ 'RadioStateChange','blur','broadcast','change','click','close','command',
110
+ 'commandupdate','contextmenu','dblclick','dragdrop','dragenter','dragexit',
111
+ 'draggesture','dragover','focus','input','keydown','keypress','keyup','load',
112
+ 'mousedown','mouseout','mouseover','mouseup','overflow','overflowchanged','popuphidden',
113
+ 'popuphiding','popupshowing','popupshown','select','syncfrompreference','synctopreference',
114
+ 'underflow','unload','abort','activate','afterprint','afterupdate','beforeactivate',
115
+ 'beforecopy','beforecut','beforedeactivate','beforeeditfocus','beforepaste','beforeprint',
116
+ 'beforeunload','beforeupdate','bounce','cellchange','controlselect','copy','cut',
117
+ 'dataavailable','datasetchanged','datasetcomplete','deactivate','dragend','dragleave',
118
+ 'dragstart','drop','error','errorupdate','filterchange','finish','focusin','focusout',
119
+ 'help','layoutcomplete','losecapture','mouseenter','mouseleave','mousewheel',
120
+ 'move','moveend','movestart','paste','propertychange','readystatechange','reset','resize',
121
+ 'resizeend','resizestart','rowenter','rowexit','rowsdelete','rowsinserted','scroll',
122
+ 'selectionchange','selectstart','start','stop','submit'];
123
+ // mousemove
124
+
125
+ if (TinyMCE_DevKitPlugin._isDebugEvents == s)
126
+ return;
127
+
128
+ TinyMCE_DevKitPlugin._isDebugEvents = s;
129
+
130
+ for (n in tinyMCE.instances) {
131
+ inst = tinyMCE.instances[n];
132
+
133
+ if (!tinyMCE.isInstance(inst) || inst.getDoc() == ld)
134
+ continue;
135
+
136
+ ld = inst.getDoc();
137
+
138
+ for (i=0; i<ev.length; i++) {
139
+ if (s)
140
+ tinyMCE.addEvent(ld, ev[i], TinyMCE_DevKitPlugin._debugEvent);
141
+ else
142
+ tinyMCE.removeEvent(ld, ev[i], TinyMCE_DevKitPlugin._debugEvent);
143
+ }
144
+ }
145
+ },
146
+
147
+ _debugEvent : function(e) {
148
+ var t;
149
+
150
+ e = e ? e : tinyMCE.selectedInstance.getWin().event;
151
+ t = e.srcElement ? e.srcElement : e.target;
152
+
153
+ tinyMCE.debug(e.type, t ? t.nodeName : '');
154
+ },
155
+
156
+ _serialize : function(o) {
157
+ var i, v, s = TinyMCE_DevKitPlugin._serialize;
158
+
159
+ if (o == null)
160
+ return 'null';
161
+
162
+ switch (typeof o) {
163
+ case 'string':
164
+ v = '\bb\tt\nn\ff\rr\""\'\'\\\\';
165
+
166
+ return '"' + o.replace(new RegExp('([\u0080-\uFFFF\\x00-\\x1f\\"])', 'g'), function(a, b) {
167
+ i = v.indexOf(b);
168
+
169
+ if (i+1)
170
+ return '\\' + v.charAt(i + 1);
171
+
172
+ a = b.charCodeAt().toString(16);
173
+
174
+ return '\\u' + '0000'.substring(a.length) + a;
175
+ }) + '"';
176
+
177
+ case 'object':
178
+ if (o instanceof Array) {
179
+ for (i=0, v = '['; i<o.length; i++)
180
+ v += (i > 0 ? ',' : '') + s(o[i]);
181
+
182
+ return v + ']';
183
+ }
184
+
185
+ v = '{';
186
+
187
+ for (i in o)
188
+ v += typeof o[i] != 'function' ? (v.length > 1 ? ',"' : '"') + i + '":' + s(o[i]) : '';
189
+
190
+ return v + '}';
191
+ }
192
+
193
+ return '' + o;
194
+ }
195
+ };
196
+
197
+ // Patch and piggy back functions
198
+ tinyMCE.__debug = tinyMCE.debug;
199
+ tinyMCE.debug = function() {
200
+ var a, i, m = '', now = new Date().getTime(), start = TinyMCE_DevKitPlugin._startTime;
201
+
202
+ if (!start)
203
+ TinyMCE_DevKitPlugin._startTime = start = now;
204
+
205
+ a = this.debug.arguments;
206
+ for (i=0; i<a.length; i++) {
207
+ if (typeof(a[i]) == 'undefined')
208
+ continue;
209
+
210
+ if (i > 0)
211
+ m += ', ';
212
+
213
+ m += a[i];
214
+ }
215
+
216
+ TinyMCE_DevKitPlugin._log('debug', m);
217
+ };
218
+
219
+ tinyMCE.dump = function(o) {
220
+ tinyMCE.debug(TinyMCE_DevKitPlugin._serialize(o));
221
+ };
222
+
223
+ tinyMCE.sleep = function(t) {
224
+ var s = new Date().getTime(), b;
225
+
226
+ while (new Date().getTime() - s < t) b=1;
227
+ };
228
+
229
+ tinyMCE.__execCommand = tinyMCE.execCommand;
230
+ tinyMCE.execCommand = function(command, user_interface, value) {
231
+ var r, st, dk = TinyMCE_DevKitPlugin;
232
+
233
+ st = dk._start();
234
+ dk._log('execCommand', command, user_interface, value);
235
+ r = tinyMCE.__execCommand(command, user_interface, value);
236
+ dk._end(st);
237
+
238
+ return r;
239
+ };
240
+
241
+ tinyMCE.__execInstanceCommand = tinyMCE.execInstanceCommand;
242
+ tinyMCE.execInstanceCommand = function(editor_id, command, user_interface, value, focus) {
243
+ var r, st, dk = TinyMCE_DevKitPlugin;
244
+
245
+ st = dk._start();
246
+ dk._log('execInstanceCommand', editor_id, command, user_interface, value);
247
+ r = tinyMCE.__execInstanceCommand(editor_id, command, user_interface, value);
248
+ dk._end(st);
249
+
250
+ return r;
251
+ };
252
+
253
+ TinyMCE_Engine.prototype.__handleEvent = TinyMCE_Engine.prototype.handleEvent;
254
+ TinyMCE_Engine.prototype.handleEvent = function(e) {
255
+ var r, st, dk = TinyMCE_DevKitPlugin;
256
+
257
+ st = dk._start();
258
+ dk._log('handleEvent', e.type);
259
+ r = tinyMCE.__handleEvent(e);
260
+ dk._end(st);
261
+
262
+ return r;
263
+ };
264
+
265
+ tinyMCE.__importCSS = tinyMCE.importCSS;
266
+ tinyMCE.importCSS = function(doc, css) {
267
+ var r, st, dk = TinyMCE_DevKitPlugin;
268
+
269
+ st = dk._start();
270
+ dk._log('importCSS', doc, css);
271
+ r = tinyMCE.__importCSS(doc, css);
272
+ dk._end(st);
273
+
274
+ return r;
275
+ };
276
+
277
+ tinyMCE.__triggerNodeChange = tinyMCE.triggerNodeChange;
278
+ tinyMCE.triggerNodeChange = function(focus, setup_content) {
279
+ var r, st, dk = TinyMCE_DevKitPlugin;
280
+
281
+ st = dk._start();
282
+ dk._log('triggerNodeChange', focus, setup_content);
283
+ r = tinyMCE.__triggerNodeChange(focus, setup_content);
284
+ dk._end(st);
285
+
286
+ return r;
287
+ };
288
+
289
+ tinyMCE.__dispatchCallback = tinyMCE.dispatchCallback;
290
+ tinyMCE.dispatchCallback = function(i, p, n) {
291
+ var r, st, dk = TinyMCE_DevKitPlugin;
292
+
293
+ st = dk._start();
294
+ dk._log('dispatchCallback', i, p, n);
295
+ r = tinyMCE.__dispatchCallback(i, p, n);
296
+ dk._end(st);
297
+
298
+ return r;
299
+ };
300
+
301
+ tinyMCE.__executeCallback = tinyMCE.executeCallback;
302
+ tinyMCE.executeCallback = function(i, p, n) {
303
+ var r, st, dk = TinyMCE_DevKitPlugin;
304
+
305
+ st = dk._start();
306
+ dk._log('executeCallback', i, p, n);
307
+ r = tinyMCE.__executeCallback(i, p, n);
308
+ dk._end(st);
309
+
310
+ return r;
311
+ };
312
+
313
+ tinyMCE.__execCommandCallback = tinyMCE.execCommandCallback;
314
+ tinyMCE.execCommandCallback = function(i, p, n) {
315
+ var r, st, dk = TinyMCE_DevKitPlugin;
316
+
317
+ st = dk._start();
318
+ dk._log('execCommandCallback', i, p, n);
319
+ r = tinyMCE.__execCommandCallback(i, p, n);
320
+ dk._end(st);
321
+
322
+ return r;
323
+ };
324
+
325
+ tinyMCE.addPlugin("devkit", TinyMCE_DevKitPlugin);
js/tiny_mce/plugins/devkit/images/flip_down.gif ADDED
Binary file
js/tiny_mce/plugins/devkit/images/flip_up.gif ADDED
Binary file
js/tiny_mce/plugins/devkit/jscripts/devkit.js ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var devkit = parent.tinyMCE.plugins['devkit'], logEnabled = true, flip = false, book = null;
2
+
3
+ function init() {
4
+ var log, i, f = document.forms[0];
5
+
6
+ devkit._winLoaded = true;
7
+
8
+ log = tinyMCE.log;
9
+
10
+ for (i=0; i<log.length; i++)
11
+ debug(log[i]);
12
+
13
+ f.logfilter.value = devkit._logFilter;
14
+ }
15
+
16
+ function changeFilter(f) {
17
+ devkit._logFilter = f;
18
+ }
19
+
20
+ function toggleLog(s) {
21
+ logEnabled = s;
22
+ }
23
+
24
+ function toggleFlip() {
25
+ document.getElementById('flipbtn').src = flip ? 'images/flip_down.gif' : 'images/flip_up.gif';
26
+
27
+ if (flip)
28
+ parent.document.getElementById('devkit').className = 'devkitup';
29
+ else
30
+ parent.document.getElementById('devkit').className = 'devkitdown';
31
+
32
+ flip = !flip;
33
+ }
34
+
35
+ function debug(s) {
36
+ var d, l, n;
37
+
38
+ if (!logEnabled || !new RegExp(devkit._logFilter, 'gi').test(s))
39
+ return;
40
+
41
+ d = document;
42
+ l = d.getElementById('log');
43
+ n = d.createElement('span');
44
+
45
+ n.innerHTML = tinyMCE.xmlEncode(s);
46
+
47
+ l.appendChild(n);
48
+ l.scrollTop = l.scrollHeight;
49
+ }
50
+
51
+ function renderInfo() {
52
+ var se = document.getElementById('info'), n, sn, inst, h = '', sel, rng, instCount = 0, rc;
53
+
54
+ h += '<h2>Browser info:</h2>';
55
+
56
+ h += '<table border="0" cellpadding="0" cellspacing="0" class="data">';
57
+ h += addRenderInfo('navigator.userAgent', navigator.userAgent);
58
+ h += addRenderInfo('navigator.appName', navigator.appName);
59
+ h += addRenderInfo('navigator.platform', navigator.platform);
60
+ h += addRenderInfo('navigator.language', navigator.language, 'bspec');
61
+ h += addRenderInfo('navigator.browserLanguage', navigator.browserLanguage, 'bspec');
62
+ h += addRenderInfo('navigator.systemLanguage', navigator.systemLanguage, 'bspec');
63
+ h += addRenderInfo('navigator.userLanguage', navigator.userLanguage, 'bspec');
64
+ h += addRenderInfo('opera.buildNumber("inconspicuous")', typeof(opera) != 'undefined' && opera.buildNumber ? opera.buildNumber('inconspicuous') : null, 'bspec');
65
+ h += addRenderInfo('window.innerWidth', parent.window.innerWidth, 'bspec');
66
+ h += addRenderInfo('window.innerHeight', parent.window.innerHeight, 'bspec');
67
+ h += addRenderInfo('document.body.offsetWidth', parent.document.body.offsetWidth);
68
+ h += addRenderInfo('document.body.offsetHeight', parent.document.body.offsetHeight);
69
+ h += addRenderInfo('screen.width', screen.width);
70
+ h += addRenderInfo('screen.height', screen.height);
71
+ h += addRenderInfo('screen.availWidth', screen.availWidth);
72
+ h += addRenderInfo('screen.availHeight', screen.availHeight);
73
+ h += addRenderInfo('screen.colorDepth', screen.colorDepth);
74
+ h += addRenderInfo('screen.pixelDepth', screen.pixelDepth, 'bspec');
75
+ h += addRenderInfo('document.contentType', document.contentType, 'bspec');
76
+ h += '</table>';
77
+
78
+ h += '<h2>TinyMCE_Engine info:</h2>';
79
+
80
+ h += '<table border="0" cellpadding="0" cellspacing="0" class="data">';
81
+ h += addRenderInfo('baseURL', tinyMCE.baseURL);
82
+ h += addRenderInfo('selectedInstance.editorId', tinyMCE.selectedInstance ? tinyMCE.selectedInstance.editorId : null);
83
+ h += addRenderInfo('selectedElement.nodeName', tinyMCE.selectedElement ? tinyMCE.selectedElement.nodeName : null, 'dep');
84
+ h += addRenderInfo('loadedFiles',tinyMCE.loadedFiles.join(','));
85
+ h += addRenderInfo('isMSIE', tinyMCE.isMSIE);
86
+ h += addRenderInfo('isMSIE5', tinyMCE.isMSIE5);
87
+ h += addRenderInfo('isMSIE5_0', tinyMCE.isMSIE5_0);
88
+ h += addRenderInfo('isMSIE7', tinyMCE.isMSIE7);
89
+ h += addRenderInfo('isGecko', tinyMCE.isGecko);
90
+ h += addRenderInfo('isSafari', tinyMCE.isSafari);
91
+ h += addRenderInfo('isOpera', tinyMCE.isOpera);
92
+ h += addRenderInfo('isMac', tinyMCE.isMac);
93
+ h += addRenderInfo('isNS7', tinyMCE.isNS7);
94
+ h += addRenderInfo('isNS71', tinyMCE.isNS71);
95
+ h += addRenderInfo('idCounter', tinyMCE.idCounter);
96
+ h += addRenderInfo('currentConfig', tinyMCE.currentConfig);
97
+ h += addRenderInfo('majorVersion', tinyMCE.majorVersion);
98
+ h += addRenderInfo('minorVersion', tinyMCE.minorVersion);
99
+ h += addRenderInfo('releaseDate', tinyMCE.releaseDate);
100
+ h += addRenderInfo('documentBasePath', tinyMCE.documentBasePath);
101
+ h += addRenderInfo('documentURL', tinyMCE.documentURL);
102
+ h += '</table>';
103
+
104
+ for (n in tinyMCE.instances) {
105
+ inst = tinyMCE.instances[n];
106
+
107
+ if (!tinyMCE.isInstance(inst))
108
+ continue;
109
+
110
+ sel = inst.selection.getSel();
111
+ rng = inst.selection.getRng();
112
+
113
+ h += '<h2>TinyMCE_Control(' + (instCount++) + ') id: ' + inst.editorId + '</h2>';
114
+ h += '<table border="0" cellpadding="0" cellspacing="0" class="data">';
115
+
116
+ h += addRenderInfo('editorId', inst.editorId);
117
+ h += addRenderInfo('visualAid', inst.visualAid);
118
+ h += addRenderInfo('foreColor', inst.foreColor);
119
+ h += addRenderInfo('backColor', inst.backColor);
120
+ h += addRenderInfo('formTargetElementId', inst.formTargetElementId);
121
+ h += addRenderInfo('formElement', inst.formElement ? inst.formElement.nodeName : null);
122
+ h += addRenderInfo('oldTargetElement', inst.oldTargetElement ? inst.oldTargetElement.nodeName : null);
123
+ h += addRenderInfo('linkElement', inst.linkElement ? inst.linkElement.nodeName : null, 'dep');
124
+ h += addRenderInfo('imgElement', inst.imgElement ? inst.imgElement.nodeName : null, 'dep');
125
+ h += addRenderInfo('selectedNode', inst.selectedNode ? inst.selectedNode.nodeName : null, 'dep');
126
+ h += addRenderInfo('targetElement', inst.targetElement ? inst.targetElement.nodeName : null);
127
+ h += addRenderInfo('getBody().nodeName', inst.getBody() ? inst.getBody().nodeName : null);
128
+ h += addRenderInfo('getBody().getAttribute("id")', inst.getBody() ? inst.getBody().getAttribute("id") : null);
129
+ h += addRenderInfo('getDoc().location', inst.getDoc() ? inst.getDoc().location : null);
130
+ h += addRenderInfo('startContent', inst.startContent);
131
+ h += addRenderInfo('isHidden()', inst.isHidden());
132
+ h += addRenderInfo('isDirty()', inst.isDirty());
133
+ h += addRenderInfo('undoRedo.undoLevels.length', inst.undoRedo.undoLevels.length);
134
+ h += addRenderInfo('undoRedo.undoIndex', inst.undoRedo.undoIndex);
135
+ h += addRenderInfo('selection.getSelectedHTML()', inst.selection.getSelectedHTML());
136
+ h += addRenderInfo('selection.isCollapsed()', inst.selection.isCollapsed() || 'false');
137
+ h += addRenderInfo('selection.getSelectedText()', inst.selection.getSelectedText());
138
+ h += addRenderInfo('selection.getFocusElement().nodeName', inst.selection.getFocusElement().nodeName);
139
+ h += addRenderInfo('selection.getFocusElement().outerHTML', tinyMCE.getOuterHTML(inst.selection.getFocusElement()));
140
+
141
+ if ((tinyMCE.isGecko || tinyMCE.isOpera) && sel && rng) {
142
+ h += addRenderInfo('selection.getSel().anchorNode.nodeName', sel.anchorNode ? sel.anchorNode.nodeName : null, 'bspec');
143
+ h += addRenderInfo('selection.getSel().anchorOffset', sel.anchorOffset, 'bspec');
144
+ h += addRenderInfo('selection.getSel().focusNode.nodeName', sel.focusNode ? sel.focusNode.nodeName : null, 'bspec');
145
+ h += addRenderInfo('selection.getSel().focusOffset', sel.focusOffset, 'bspec');
146
+ h += addRenderInfo('selection.getRng().startContainer.nodeName', rng.startContainer ? rng.startContainer.nodeName : null, 'bspec');
147
+ h += addRenderInfo('selection.getRng().startOffset', rng.startOffset, 'bspec');
148
+ h += addRenderInfo('selection.getRng().endContainer.nodeName', rng.endContainer ? rng.endContainer.nodeName : null, 'bspec');
149
+ h += addRenderInfo('selection.getRng().endOffset', rng.endOffset, 'bspec');
150
+ }
151
+
152
+ if (typeof(rng.item) != 'undefined' || typeof(rng.htmlText) != 'undefined') {
153
+ if (!rng.item) {
154
+ h += addRenderInfo('selection.getSel().type', sel.type, 'bspec');
155
+ h += addRenderInfo('selection.getRng().htmlText', rng.htmlText, 'bspec');
156
+ h += addRenderInfo('selection.getRng().text', rng.text, 'bspec');
157
+ } else
158
+ h += addRenderInfo('selection.getRng().item(0).nodeName', rng.item(0).nodeName, 'bspec');
159
+ }
160
+
161
+ h += '</table>';
162
+ }
163
+
164
+ h += '<p>Fields marked in <strong class="bspec">gray</strong> is not cross browser and should be used with care.</p>';
165
+ h += '<p>Fields marked <strong class="dep">red</strong> are marked deprecated and will be removed in the future.</p><br />';
166
+
167
+ se.innerHTML = h;
168
+ }
169
+
170
+ function addRenderInfo(n, v, c) {
171
+ return '<tr><td' + (c ? ' class="' + c + '"' : '')+ '>' + n + '</td><td><input type="text" value="' + tinyMCE.xmlEncode(v != null ? ('' + v).replace(/[\r\n]/g, '') : 'null') + '" /></td></tr>';
172
+ }
173
+
174
+ function renderSettings() {
175
+ var se = document.getElementById('settings'), n, sn, inst, h = '', v;
176
+
177
+ for (n in tinyMCE.instances) {
178
+ inst = tinyMCE.instances[n];
179
+
180
+ if (!tinyMCE.isInstance(inst))
181
+ continue;
182
+
183
+ h += '<h2>Instance id: ' + inst.editorId + '</h2>';
184
+ h += '<table border="0" cellpadding="0" cellspacing="0" class="data">';
185
+
186
+ for (sn in inst.settings) {
187
+ v = inst.settings[sn];
188
+
189
+ h += '<tr><td class="col1">' + tinyMCE.xmlEncode(sn) + '</td><td><input type="text" value="' + tinyMCE.xmlEncode(v) + '" /></td></tr>';
190
+ }
191
+
192
+ h += '</table>';
193
+ }
194
+
195
+ se.innerHTML = h;
196
+ }
197
+
198
+ function renderContent() {
199
+ var se = document.getElementById('content'), n, inst, h = '';
200
+
201
+ for (n in tinyMCE.instances) {
202
+ inst = tinyMCE.instances[n];
203
+
204
+ if (!tinyMCE.isInstance(inst))
205
+ continue;
206
+
207
+ h += '<h2>Instance id: ' + inst.editorId + '</h2>';
208
+
209
+ h += '<h3>Start content - inst.startContent:</h3>';
210
+ h += '<div>' + tinyMCE.xmlEncode(inst.startContent) + '</div>';
211
+
212
+ h += '<h3>Raw content - inst.getBody().innerHTML or inst.getHTML(true):</h3>';
213
+ h += '<div>' + tinyMCE.xmlEncode(inst.getHTML(true)) + '</div>';
214
+
215
+ h += '<h3>Cleaned content - inst.getHTML():</h3>';
216
+ h += '<div>' + tinyMCE.xmlEncode(inst.getHTML()) + '</div>';
217
+
218
+ if (inst.serializedHTML) {
219
+ h += '<h3>Serialized HTML content - inst.serializedHTML:</h3>';
220
+ h += '<div>' + tinyMCE.xmlEncode(inst.serializedHTML) + '</div>';
221
+ }
222
+ }
223
+
224
+ se.innerHTML = h;
225
+ }
226
+
227
+ function renderCommandStates() {
228
+ var se = document.getElementById('command_states'), n, inst, h = '', v, ex;
229
+ var cmds = new Array('2D-Position','AbsolutePosition','BackColor','BlockDirLTR','BlockDirRTL','Bold','BrowseMode','Copy','CreateBookmark','CreateLink','Cut','Delete','DirLTR','DirRTL','EditMode','enableInlineTableEditing','enableObjectResizing','FontName','FontSize','ForeColor','FormatBlock','Indent','InsertButton','InsertFieldset','InsertHorizontalRule','InsertIFrame','InsertImage','InsertInputButton','InsertInputCheckbox','InsertInputFileUpload','InsertInputHidden','InsertInputImage','InsertInputPassword','InsertInputRadio','InsertInputReset','InsertInputSubmit','InsertInputText','InsertMarquee','InsertOrderedList','InsertParagraph','InsertSelectDropdown','InsertSelectListbox','InsertTextArea','InsertUnorderedList','Italic','JustifyCenter','JustifyFull','JustifyLeft','JustifyNone','JustifyRight','LiveResize','MultipleSelection','Open','Outdent','OverWrite','Paste','PlayImage','Redo','Refresh','RemoveFormat','SaveAs','SelectAll','SizeToControl','SizeToControlHeight','SizeToControlWidth','Stop','StopImage','StrikeThrough','styleWithCSS','Subscript','Superscript','UnBookmark','Underline','Undo','Unlink','Unselect'), i;
230
+
231
+ for (n in tinyMCE.instances) {
232
+ inst = tinyMCE.instances[n];
233
+
234
+ if (!tinyMCE.isInstance(inst))
235
+ continue;
236
+
237
+ h += '<h2>Instance id: ' + inst.editorId + '</h2>';
238
+ h += '<table border="0" cellpadding="0" cellspacing="0" class="data">';
239
+
240
+ for (i=0; i<cmds.length; i++) {
241
+ v = null;
242
+
243
+ try {
244
+ v = tinyMCE.isGecko || inst.getDoc().queryCommandSupported(cmds[i]);
245
+ v = v ? inst.queryCommandState(cmds[i]) : 'Not supported';
246
+ } catch (ex) {
247
+ v = 'Not supported';
248
+ }
249
+
250
+ h += '<tr><td><input type="text" value="' + tinyMCE.xmlEncode(cmds[i]) + '" /></td><td><input type="text" value="' + tinyMCE.xmlEncode(v) + '" /></td></tr>';
251
+ }
252
+
253
+ h += '</table>';
254
+ }
255
+
256
+ se.innerHTML = h;
257
+ }
258
+
259
+ function renderUndoRedo() {
260
+ var se = document.getElementById('undo_redo'), inst, n, h = '', i, le, id, d, ur;
261
+ var f = document.forms[0];
262
+
263
+ if (tinyMCE.undoLevels) {
264
+ le = tinyMCE.undoLevels;
265
+
266
+ h += '<h2>Global undo/redo</h2>';
267
+ h += '<table border="0" cellpadding="0" cellspacing="0" width="50%" class="data">';
268
+ h += '<tr><td>undoLevels.length</td><td>' + le.length + '</td></tr>';
269
+ h += '<tr><td>undoIndex</td><td>' + tinyMCE.undoIndex + '</td></tr>';
270
+ h += '</table>';
271
+
272
+ for (i=0; i<le.length; i++)
273
+ h += '<h3>Level: ' + i + ', Instance: ' + (le[i] ? le[i].editorId : 'null') + '</h3>';
274
+ }
275
+
276
+ for (n in tinyMCE.instances) {
277
+ inst = tinyMCE.instances[n];
278
+
279
+ if (!tinyMCE.isInstance(inst))
280
+ continue;
281
+
282
+ ur = inst.undoRedo;
283
+ le = ur.undoLevels;
284
+
285
+ h += '<hr /><h2>Instance id: ' + inst.editorId + '</h2>';
286
+ h += '<table border="0" cellpadding="0" cellspacing="0" width="50%" class="data">';
287
+ h += '<tr><td>undoLevels.length</td><td>' + le.length + '</td></tr>';
288
+ h += '<tr><td>undoIndex</td><td>' + ur.undoIndex + '</td></tr>';
289
+ h += '<tr><td>typingUndoIndex</td><td>' + ur.typingUndoIndex + '</td></tr>';
290
+ h += '<tr><td>undoRedo</td><td>' + ur.undoRedo + '</td></tr>';
291
+ h += '</table>';
292
+
293
+ for (i=0; i<le.length; i++) {
294
+ h += '<h3>Level: ' + i + (!le[i].bookmark ? "" : " [bookmark]") + '</h3>';
295
+ h += '<div class="undodata">' + tinyMCE.xmlEncode(le[i].content) + '</div>';
296
+
297
+ if (i > 0 && f.undo_diff.checked) {
298
+ d = diff_main(i > 0 ? le[i-1].content.replace(/[\r\n]+/g, '') : null, le[i].content.replace(/[\r\n]+/g, ''), false);
299
+ diff_cleanup_semantic(d);
300
+ h += '<h3>Diff ' + (i-1) + ',' + i + '</h3><div class="undodata">' + diff_prettyhtml(d) + '</div>';
301
+ }
302
+ }
303
+ }
304
+
305
+ se.innerHTML = h;
306
+ }
307
+
308
+ function clearLog() {
309
+ document.getElementById('log').innerHTML = '';
310
+ devkit._startTime = null;
311
+ }
312
+
313
+ function cancelAction() {
314
+ parent.document.getElementById('devkit').style.display = 'none';
315
+ }
316
+
317
+ function toggleDebugEvents(s) {
318
+ devkit._debugEvents(s);
319
+ }
320
+
321
+ function storeSelection() {
322
+ book = tinyMCE.selectedInstance.selection.getBookmark();
323
+
324
+ return false;
325
+ }
326
+
327
+ function restoreSelection() {
328
+ tinyMCE.selectedInstance.selection.moveToBookmark(book);
329
+
330
+ return false;
331
+ }
js/tiny_mce/plugins/devkit/jscripts/diff.js ADDED
@@ -0,0 +1,1192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Diff_Match_Patch v1.3
2
+ // Computes the difference between two texts to create a patch.
3
+ // Applies the patch onto another text, allowing for errors.
4
+ // Copyright (C) 2006 Neil Fraser
5
+ // http://neil.fraser.name/software/diff_match_patch/
6
+
7
+ // This program is free software; you can redistribute it and/or
8
+ // modify it under the terms of the GNU General Public License
9
+ // as published by the Free Software Foundation.
10
+
11
+ // This program is distributed in the hope that it will be useful,
12
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ // GNU General Public License (www.gnu.org) for more details.
15
+
16
+
17
+ // Constants.
18
+ // Redefine these in your program to override the defaults.
19
+
20
+ // Number of seconds to map a diff before giving up. (0 for infinity)
21
+ var DIFF_TIMEOUT = 1.0;
22
+ // Cost of an empty edit operation in terms of edit characters.
23
+ var DIFF_EDIT_COST = 4;
24
+ // Tweak the relative importance (0.0 = accuracy, 1.0 = proximity)
25
+ var MATCH_BALANCE = 0.5;
26
+ // At what point is no match declared (0.0 = perfection, 1.0 = very loose)
27
+ var MATCH_THRESHOLD = 0.5;
28
+ // The min and max cutoffs used when computing text lengths.
29
+ var MATCH_MINLENGTH = 100;
30
+ var MATCH_MAXLENGTH = 1000;
31
+ // Chunk size for context length.
32
+ var PATCH_MARGIN = 4;
33
+
34
+
35
+ //////////////////////////////////////////////////////////////////////
36
+ // Diff //
37
+ //////////////////////////////////////////////////////////////////////
38
+
39
+ // The data structure representing a diff is an array of tuples:
40
+ // [[-1, "Hello"], [1, "Goodbye"], [0, " world."]]
41
+ // which means: delete "Hello", add "Goodbye" and keep " world."
42
+
43
+
44
+ function diff_main(text1, text2, checklines) {
45
+ // Find the differences between two texts. Return an array of changes.
46
+ // If checklines is present and false, then don't run a line-level diff first to identify the changed areas.
47
+ // Check for equality (speedup)
48
+ if (text1 == text2)
49
+ return [[0, text1]];
50
+
51
+ if (typeof checklines == 'undefined')
52
+ checklines = true;
53
+
54
+ var a;
55
+ // Trim off common prefix (speedup)
56
+ a = diff_prefix(text1, text2);
57
+ text1 = a[0];
58
+ text2 = a[1];
59
+ var commonprefix = a[2];
60
+
61
+ // Trim off common suffix (speedup)
62
+ a = diff_suffix(text1, text2);
63
+ text1 = a[0];
64
+ text2 = a[1];
65
+ var commonsuffix = a[2];
66
+
67
+ var diff, i;
68
+ var longtext = text1.length > text2.length ? text1 : text2;
69
+ var shorttext = text1.length > text2.length ? text2 : text1;
70
+
71
+ if (!text1) { // Just add some text (speedup)
72
+ diff = [[1, text2]];
73
+ } else if (!text2) { // Just delete some text (speedup)
74
+ diff = [[-1, text1]];
75
+ } else if ((i = longtext.indexOf(shorttext)) != -1) {
76
+ // Shorter text is inside the longer text (speedup)
77
+ diff = [[1, longtext.substring(0, i)], [0, shorttext], [1, longtext.substring(i+shorttext.length)]];
78
+ // Swap insertions for deletions if diff is reversed.
79
+ if (text1.length > text2.length)
80
+ diff[0][0] = diff[2][0] = -1;
81
+ } else {
82
+ longtext = shorttext = null; // Garbage collect
83
+ // Check to see if the problem can be split in two.
84
+ var hm = diff_halfmatch(text1, text2);
85
+ if (hm) {
86
+ // A half-match was found, sort out the return data.
87
+ var text1_a = hm[0];
88
+ var text1_b = hm[1];
89
+ var text2_a = hm[2];
90
+ var text2_b = hm[3];
91
+ var mid_common = hm[4];
92
+ // Send both pairs off for separate processing.
93
+ var diff_a = diff_main(text1_a, text2_a, checklines);
94
+ var diff_b = diff_main(text1_b, text2_b, checklines);
95
+ // Merge the results.
96
+ diff = diff_a.concat([[0, mid_common]], diff_b);
97
+ } else {
98
+ // Perform a real diff.
99
+ if (checklines && text1.length + text2.length < 250)
100
+ checklines = false; // Too trivial for the overhead.
101
+ if (checklines) {
102
+ // Scan the text on a line-by-line basis first.
103
+ a = diff_lines2chars(text1, text2);
104
+ text1 = a[0];
105
+ text2 = a[1];
106
+ var linearray = a[2];
107
+ }
108
+ diff = diff_map(text1, text2);
109
+ if (!diff) // No acceptable result.
110
+ diff = [[-1, text1], [1, text2]];
111
+ if (checklines) {
112
+ diff_chars2lines(diff, linearray); // Convert the diff back to original text.
113
+ diff_cleanup_semantic(diff); // Eliminate freak matches (e.g. blank lines)
114
+
115
+ // Rediff any replacement blocks, this time on character-by-character basis.
116
+ diff.push([0, '']); // Add a dummy entry at the end.
117
+ var pointer = 0;
118
+ var count_delete = 0;
119
+ var count_insert = 0;
120
+ var text_delete = '';
121
+ var text_insert = '';
122
+ while(pointer < diff.length) {
123
+ if (diff[pointer][0] == 1) {
124
+ count_insert++;
125
+ text_insert += diff[pointer][1];
126
+ } else if (diff[pointer][0] == -1) {
127
+ count_delete++;
128
+ text_delete += diff[pointer][1];
129
+ } else { // Upon reaching an equality, check for prior redundancies.
130
+ if (count_delete >= 1 && count_insert >= 1) {
131
+ // Delete the offending records and add the merged ones.
132
+ a = diff_main(text_delete, text_insert, false);
133
+ diff.splice(pointer - count_delete - count_insert, count_delete + count_insert);
134
+ pointer = pointer - count_delete - count_insert;
135
+ for (i=a.length-1; i>=0; i--)
136
+ diff.splice(pointer, 0, a[i]);
137
+ pointer = pointer + a.length;
138
+ }
139
+ count_insert = 0;
140
+ count_delete = 0;
141
+ text_delete = '';
142
+ text_insert = '';
143
+ }
144
+ pointer++;
145
+ }
146
+ diff.pop(); // Remove the dummy entry at the end.
147
+
148
+ }
149
+ }
150
+ }
151
+
152
+ if (commonprefix)
153
+ diff.unshift([0, commonprefix]);
154
+ if (commonsuffix)
155
+ diff.push([0, commonsuffix]);
156
+ diff_cleanup_merge(diff);
157
+ return diff;
158
+ }
159
+
160
+
161
+ function diff_lines2chars(text1, text2) {
162
+ // Split text into an array of strings.
163
+ // Reduce the texts to a string of hashes where each character represents one line.
164
+ var linearray = new Array(); // linearray[4] == "Hello\n"
165
+ var linehash = new Object(); // linehash["Hello\n"] == 4
166
+
167
+ // "\x00" is a valid JavaScript character, but the Venkman debugger doesn't like it (bug 335098)
168
+ // So we'll insert a junk entry to avoid generating a null character.
169
+ linearray.push('');
170
+
171
+ function diff_lines2chars_munge(text) {
172
+ // My first ever closure!
173
+ var i, line;
174
+ var chars = '';
175
+ while (text) {
176
+ i = text.indexOf('\n');
177
+ if (i == -1)
178
+ i = text.length;
179
+ line = text.substring(0, i+1);
180
+ text = text.substring(i+1);
181
+ if (linehash.hasOwnProperty ? linehash.hasOwnProperty(line) : (linehash[line] !== undefined)) {
182
+ chars += String.fromCharCode(linehash[line]);
183
+ } else {
184
+ linearray.push(line);
185
+ linehash[line] = linearray.length - 1;
186
+ chars += String.fromCharCode(linearray.length - 1);
187
+ }
188
+ }
189
+ return chars;
190
+ }
191
+
192
+ var chars1 = diff_lines2chars_munge(text1);
193
+ var chars2 = diff_lines2chars_munge(text2);
194
+ return [chars1, chars2, linearray];
195
+ }
196
+
197
+
198
+ function diff_chars2lines(diff, linearray) {
199
+ // Rehydrate the text in a diff from a string of line hashes to real lines of text.
200
+ var chars, text;
201
+ for (var x=0; x<diff.length; x++) {
202
+ chars = diff[x][1];
203
+ text = '';
204
+ for (var y=0; y<chars.length; y++)
205
+ text += linearray[chars.charCodeAt(y)];
206
+ diff[x][1] = text;
207
+ }
208
+ }
209
+
210
+
211
+ function diff_map(text1, text2) {
212
+ // Explore the intersection points between the two texts.
213
+ var now = new Date();
214
+ var ms_end = now.getTime() + DIFF_TIMEOUT * 1000; // Don't run for too long.
215
+ var max = (text1.length + text2.length) / 2;
216
+ var v_map1 = new Array();
217
+ var v_map2 = new Array();
218
+ var v1 = new Object();
219
+ var v2 = new Object();
220
+ v1[1] = 0;
221
+ v2[1] = 0;
222
+ var x, y;
223
+ var footstep; // Used to track overlapping paths.
224
+ var footsteps = new Object();
225
+ var done = false;
226
+ var hasOwnProperty = !!(footsteps.hasOwnProperty);
227
+ // If the total number of characters is odd, then the front path will collide with the reverse path.
228
+ var front = (text1.length + text2.length) % 2;
229
+ for (var d=0; d<max; d++) {
230
+ now = new Date();
231
+ if (DIFF_TIMEOUT > 0 && now.getTime() > ms_end) // Timeout reached
232
+ return null;
233
+
234
+ // Walk the front path one step.
235
+ v_map1[d] = new Object();
236
+ for (var k=-d; k<=d; k+=2) {
237
+ if (k == -d || k != d && v1[k-1] < v1[k+1])
238
+ x = v1[k+1];
239
+ else
240
+ x = v1[k-1]+1;
241
+ y = x - k;
242
+ footstep = x+","+y;
243
+ if (front && (hasOwnProperty ? footsteps.hasOwnProperty(footstep) : (footsteps[footstep] !== undefined)))
244
+ done = true;
245
+ if (!front)
246
+ footsteps[footstep] = d;
247
+ while (!done && x < text1.length && y < text2.length && text1.charAt(x) == text2.charAt(y)) {
248
+ x++; y++;
249
+ footstep = x+","+y;
250
+ if (front && (hasOwnProperty ? footsteps.hasOwnProperty(footstep) : (footsteps[footstep] !== undefined)))
251
+ done = true;
252
+ if (!front)
253
+ footsteps[footstep] = d;
254
+ }
255
+ v1[k] = x;
256
+ v_map1[d][x+","+y] = true;
257
+ if (done) {
258
+ // Front path ran over reverse path.
259
+ v_map2 = v_map2.slice(0, footsteps[footstep]+1);
260
+ var a = diff_path1(v_map1, text1.substring(0, x), text2.substring(0, y));
261
+ return a.concat(diff_path2(v_map2, text1.substring(x), text2.substring(y)));
262
+ }
263
+ }
264
+
265
+ // Walk the reverse path one step.
266
+ v_map2[d] = new Object();
267
+ for (var k=-d; k<=d; k+=2) {
268
+ if (k == -d || k != d && v2[k-1] < v2[k+1])
269
+ x = v2[k+1];
270
+ else
271
+ x = v2[k-1]+1;
272
+ y = x - k;
273
+ footstep = (text1.length-x)+","+(text2.length-y);
274
+ if (!front && (hasOwnProperty ? footsteps.hasOwnProperty(footstep) : (footsteps[footstep] !== undefined)))
275
+ done = true;
276
+ if (front)
277
+ footsteps[footstep] = d;
278
+ while (!done && x < text1.length && y < text2.length && text1.charAt(text1.length-x-1) == text2.charAt(text2.length-y-1)) {
279
+ x++; y++;
280
+ footstep = (text1.length-x)+","+(text2.length-y);
281
+ if (!front && (hasOwnProperty ? footsteps.hasOwnProperty(footstep) : (footsteps[footstep] !== undefined)))
282
+ done = true;
283
+ if (front)
284
+ footsteps[footstep] = d;
285
+ }
286
+ v2[k] = x;
287
+ v_map2[d][x+","+y] = true;
288
+ if (done) {
289
+ // Reverse path ran over front path.
290
+ v_map1 = v_map1.slice(0, footsteps[footstep]+1);
291
+ var a = diff_path1(v_map1, text1.substring(0, text1.length-x), text2.substring(0, text2.length-y));
292
+ return a.concat(diff_path2(v_map2, text1.substring(text1.length-x), text2.substring(text2.length-y)));
293
+ }
294
+ }
295
+ }
296
+ // Number of diffs equals number of characters, no commonality at all.
297
+ return null;
298
+ }
299
+
300
+
301
+ function diff_path1(v_map, text1, text2) {
302
+ // Work from the middle back to the start to determine the path.
303
+ var path = [];
304
+ var x = text1.length;
305
+ var y = text2.length;
306
+ var last_op = null;
307
+ for (var d=v_map.length-2; d>=0; d--) {
308
+ while(1) {
309
+ if (v_map[d].hasOwnProperty ? v_map[d].hasOwnProperty((x-1)+","+y) : (v_map[d][(x-1)+","+y] !== undefined)) {
310
+ x--;
311
+ if (last_op === -1)
312
+ path[0][1] = text1.charAt(x) + path[0][1];
313
+ else
314
+ path.unshift([-1, text1.charAt(x)]);
315
+ last_op = -1;
316
+ break;
317
+ } else if (v_map[d].hasOwnProperty ? v_map[d].hasOwnProperty(x+","+(y-1)) : (v_map[d][x+","+(y-1)] !== undefined)) {
318
+ y--;
319
+ if (last_op === 1)
320
+ path[0][1] = text2.charAt(y) + path[0][1];
321
+ else
322
+ path.unshift([1, text2.charAt(y)]);
323
+ last_op = 1;
324
+ break;
325
+ } else {
326
+ x--;
327
+ y--;
328
+ //if (text1.charAt(x) != text2.charAt(y))
329
+ // return alert("No diagonal. Can't happen. (diff_path1)");
330
+ if (last_op === 0)
331
+ path[0][1] = text1.charAt(x) + path[0][1];
332
+ else
333
+ path.unshift([0, text1.charAt(x)]);
334
+ last_op = 0;
335
+ }
336
+ }
337
+ }
338
+ return path;
339
+ }
340
+
341
+
342
+ function diff_path2(v_map, text1, text2) {
343
+ // Work from the middle back to the end to determine the path.
344
+ var path = [];
345
+ var x = text1.length;
346
+ var y = text2.length;
347
+ var last_op = null;
348
+ for (var d=v_map.length-2; d>=0; d--) {
349
+ while(1) {
350
+ if (v_map[d].hasOwnProperty ? v_map[d].hasOwnProperty((x-1)+","+y) : (v_map[d][(x-1)+","+y] !== undefined)) {
351
+ x--;
352
+ if (last_op === -1)
353
+ path[path.length-1][1] += text1.charAt(text1.length-x-1);
354
+ else
355
+ path.push([-1, text1.charAt(text1.length-x-1)]);
356
+ last_op = -1;
357
+ break;
358
+ } else if (v_map[d].hasOwnProperty ? v_map[d].hasOwnProperty(x+","+(y-1)) : (v_map[d][x+","+(y-1)] !== undefined)) {
359
+ y--;
360
+ if (last_op === 1)
361
+ path[path.length-1][1] += text2.charAt(text2.length-y-1);
362
+ else
363
+ path.push([1, text2.charAt(text2.length-y-1)]);
364
+ last_op = 1;
365
+ break;
366
+ } else {
367
+ x--;
368
+ y--;
369
+ //if (text1.charAt(text1.length-x-1) != text2.charAt(text2.length-y-1))
370
+ // return alert("No diagonal. Can't happen. (diff_path2)");
371
+ if (last_op === 0)
372
+ path[path.length-1][1] += text1.charAt(text1.length-x-1);
373
+ else
374
+ path.push([0, text1.charAt(text1.length-x-1)]);
375
+ last_op = 0;
376
+ }
377
+ }
378
+ }
379
+ return path;
380
+ }
381
+
382
+
383
+ function diff_prefix(text1, text2) {
384
+ // Trim off common prefix
385
+ var pointermin = 0;
386
+ var pointermax = Math.min(text1.length, text2.length);
387
+ var pointermid = pointermax;
388
+ while(pointermin < pointermid) {
389
+ if (text1.substring(0, pointermid) == text2.substring(0, pointermid))
390
+ pointermin = pointermid;
391
+ else
392
+ pointermax = pointermid;
393
+ pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
394
+ }
395
+ var commonprefix = text1.substring(0, pointermid);
396
+ text1 = text1.substring(pointermid);
397
+ text2 = text2.substring(pointermid);
398
+ return [text1, text2, commonprefix];
399
+ }
400
+
401
+
402
+ function diff_suffix(text1, text2) {
403
+ // Trim off common suffix
404
+ var pointermin = 0;
405
+ var pointermax = Math.min(text1.length, text2.length);
406
+ var pointermid = pointermax;
407
+ while(pointermin < pointermid) {
408
+ if (text1.substring(text1.length-pointermid) == text2.substring(text2.length-pointermid))
409
+ pointermin = pointermid;
410
+ else
411
+ pointermax = pointermid;
412
+ pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
413
+ }
414
+ var commonsuffix = text1.substring(text1.length-pointermid);
415
+ text1 = text1.substring(0, text1.length-pointermid);
416
+ text2 = text2.substring(0, text2.length-pointermid);
417
+ return [text1, text2, commonsuffix];
418
+ }
419
+
420
+
421
+ function diff_halfmatch(text1, text2) {
422
+ // Do the two texts share a substring which is at least half the length of the longer text?
423
+ var longtext = text1.length > text2.length ? text1 : text2;
424
+ var shorttext = text1.length > text2.length ? text2 : text1;
425
+ if (longtext.length < 10 || shorttext.length < 1)
426
+ return null; // Pointless.
427
+
428
+ function diff_halfmatch_i(longtext, shorttext, i) {
429
+ // Start with a 1/4 length substring at position i as a seed.
430
+ var seed = longtext.substring(i, i+Math.floor(longtext.length/4));
431
+ var j = -1;
432
+ var best_common = '';
433
+ var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
434
+ while ((j = shorttext.indexOf(seed, j+1)) != -1) {
435
+ var my_prefix = diff_prefix(longtext.substring(i), shorttext.substring(j));
436
+ var my_suffix = diff_suffix(longtext.substring(0, i), shorttext.substring(0, j));
437
+ if (best_common.length < (my_suffix[2] + my_prefix[2]).length) {
438
+ best_common = my_suffix[2] + my_prefix[2];
439
+ best_longtext_a = my_suffix[0];
440
+ best_longtext_b = my_prefix[0];
441
+ best_shorttext_a = my_suffix[1];
442
+ best_shorttext_b = my_prefix[1];
443
+ }
444
+ }
445
+ if (best_common.length >= longtext.length/2)
446
+ return [best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b, best_common];
447
+ else
448
+ return null;
449
+ }
450
+
451
+ // First check if the second quarter is the seed for a half-match.
452
+ var hm1 = diff_halfmatch_i(longtext, shorttext, Math.ceil(longtext.length/4));
453
+ // Check again based on the third quarter.
454
+ var hm2 = diff_halfmatch_i(longtext, shorttext, Math.ceil(longtext.length/2));
455
+ var hm;
456
+ if (!hm1 && !hm2)
457
+ return null;
458
+ else if (!hm2)
459
+ hm = hm1;
460
+ else if (!hm1)
461
+ hm = hm2;
462
+ else // Both matched. Select the longest.
463
+ hm = hm1[4].length > hm2[4].length ? hm1 : hm2;
464
+
465
+ // A half-match was found, sort out the return data.
466
+ if (text1.length > text2.length) {
467
+ var text1_a = hm[0];
468
+ var text1_b = hm[1];
469
+ var text2_a = hm[2];
470
+ var text2_b = hm[3];
471
+ } else {
472
+ var text2_a = hm[0];
473
+ var text2_b = hm[1];
474
+ var text1_a = hm[2];
475
+ var text1_b = hm[3];
476
+ }
477
+ var mid_common = hm[4];
478
+ return [text1_a, text1_b, text2_a, text2_b, mid_common];
479
+ }
480
+
481
+
482
+ function diff_cleanup_semantic(diff) {
483
+ // Reduce the number of edits by eliminating semantically trivial equalities.
484
+ var changes = false;
485
+ var equalities = []; // Stack of indices where equalities are found.
486
+ var lastequality = null; // Always equal to equalities[equalities.length-1][1]
487
+ var pointer = 0; // Index of current position.
488
+ var length_changes1 = 0; // Number of characters that changed prior to the equality.
489
+ var length_changes2 = 0; // Number of characters that changed after the equality.
490
+ while (pointer < diff.length) {
491
+ if (diff[pointer][0] == 0) { // equality found
492
+ equalities.push(pointer);
493
+ length_changes1 = length_changes2;
494
+ length_changes2 = 0;
495
+ lastequality = diff[pointer][1];
496
+ } else { // an insertion or deletion
497
+ length_changes2 += diff[pointer][1].length;
498
+ if (lastequality != null && (lastequality.length <= length_changes1) && (lastequality.length <= length_changes2)) {
499
+ //alert("Splitting: '"+lastequality+"'");
500
+ diff.splice(equalities[equalities.length-1], 0, [-1, lastequality]); // Duplicate record
501
+ diff[equalities[equalities.length-1]+1][0] = 1; // Change second copy to insert.
502
+ equalities.pop(); // Throw away the equality we just deleted;
503
+ equalities.pop(); // Throw away the previous equality;
504
+ pointer = equalities.length ? equalities[equalities.length-1] : -1;
505
+ length_changes1 = 0; // Reset the counters.
506
+ length_changes2 = 0;
507
+ lastequality = null;
508
+ changes = true;
509
+ }
510
+ }
511
+ pointer++;
512
+ }
513
+
514
+ if (changes)
515
+ diff_cleanup_merge(diff);
516
+ }
517
+
518
+
519
+ function diff_cleanup_efficiency(diff) {
520
+ // Reduce the number of edits by eliminating operationally trivial equalities.
521
+ var changes = false;
522
+ var equalities = []; // Stack of indices where equalities are found.
523
+ var lastequality = ''; // Always equal to equalities[equalities.length-1][1]
524
+ var pointer = 0; // Index of current position.
525
+ var pre_ins = false; // Is there an insertion operation before the last equality.
526
+ var pre_del = false; // Is there an deletion operation before the last equality.
527
+ var post_ins = false; // Is there an insertion operation after the last equality.
528
+ var post_del = false; // Is there an deletion operation after the last equality.
529
+ while (pointer < diff.length) {
530
+ if (diff[pointer][0] == 0) { // equality found
531
+ if (diff[pointer][1].length < DIFF_EDIT_COST && (post_ins || post_del)) {
532
+ // Candidate found.
533
+ equalities.push(pointer);
534
+ pre_ins = post_ins;
535
+ pre_del = post_del;
536
+ lastequality = diff[pointer][1];
537
+ } else {
538
+ // Not a candidate, and can never become one.
539
+ equalities = [];
540
+ lastequality = '';
541
+ }
542
+ post_ins = post_del = false;
543
+ } else { // an insertion or deletion
544
+ if (diff[pointer][0] == -1)
545
+ post_del = true;
546
+ else
547
+ post_ins = true;
548
+ // Five types to be split:
549
+ // <ins>A</ins><del>B</del>XY<ins>C</ins><del>D</del>
550
+ // <ins>A</ins>X<ins>C</ins><del>D</del>
551
+ // <ins>A</ins><del>B</del>X<ins>C</ins>
552
+ // <ins>A</del>X<ins>C</ins><del>D</del>
553
+ // <ins>A</ins><del>B</del>X<del>C</del>
554
+ if (lastequality && ((pre_ins && pre_del && post_ins && post_del) || ((lastequality.length < DIFF_EDIT_COST/2) && (pre_ins + pre_del + post_ins + post_del) == 3))) {
555
+ //alert("Splitting: '"+lastequality+"'");
556
+ diff.splice(equalities[equalities.length-1], 0, [-1, lastequality]); // Duplicate record
557
+ diff[equalities[equalities.length-1]+1][0] = 1; // Change second copy to insert.
558
+ equalities.pop(); // Throw away the equality we just deleted;
559
+ lastequality = '';
560
+ if (pre_ins && pre_del) {
561
+ // No changes made which could affect previous entry, keep going.
562
+ post_ins = post_del = true;
563
+ equalities = [];
564
+ } else {
565
+ equalities.pop(); // Throw away the previous equality;
566
+ pointer = equalities.length ? equalities[equalities.length-1] : -1;
567
+ post_ins = post_del = false;
568
+ }
569
+ changes = true;
570
+ }
571
+ }
572
+ pointer++;
573
+ }
574
+
575
+ if (changes)
576
+ diff_cleanup_merge(diff);
577
+ }
578
+
579
+
580
+ function diff_cleanup_merge(diff) {
581
+ // Reorder and merge like edit sections. Merge equalities.
582
+ // Any edit section can move as long as it doesn't cross an equality.
583
+ diff.push([0, '']); // Add a dummy entry at the end.
584
+ var pointer = 0;
585
+ var count_delete = 0;
586
+ var count_insert = 0;
587
+ var text_delete = '';
588
+ var text_insert = '';
589
+ var record_insert, record_delete;
590
+ var my_xfix;
591
+ while(pointer < diff.length) {
592
+ if (diff[pointer][0] == 1) {
593
+ count_insert++;
594
+ text_insert += diff[pointer][1];
595
+ pointer++;
596
+ } else if (diff[pointer][0] == -1) {
597
+ count_delete++;
598
+ text_delete += diff[pointer][1];
599
+ pointer++;
600
+ } else { // Upon reaching an equality, check for prior redundancies.
601
+ if (count_delete > 1 || count_insert > 1) {
602
+ if (count_delete > 1 && count_insert > 1) {
603
+ // Factor out any common prefixies.
604
+ my_xfix = diff_prefix(text_insert, text_delete);
605
+ if (my_xfix[2] != '') {
606
+ if ((pointer - count_delete - count_insert) > 0 && diff[pointer - count_delete - count_insert - 1][0] == 0) {
607
+ text_insert = my_xfix[0];
608
+ text_delete = my_xfix[1];
609
+ diff[pointer - count_delete - count_insert - 1][1] += my_xfix[2];
610
+ }
611
+ }
612
+ // Factor out any common suffixies.
613
+ my_xfix = diff_suffix(text_insert, text_delete);
614
+ if (my_xfix[2] != '') {
615
+ text_insert = my_xfix[0];
616
+ text_delete = my_xfix[1];
617
+ diff[pointer][1] = my_xfix[2] + diff[pointer][1];
618
+ }
619
+ }
620
+ // Delete the offending records and add the merged ones.
621
+ if (count_delete == 0)
622
+ diff.splice(pointer - count_delete - count_insert, count_delete + count_insert, [1, text_insert]);
623
+ else if (count_insert == 0)
624
+ diff.splice(pointer - count_delete - count_insert, count_delete + count_insert, [-1, text_delete]);
625
+ else
626
+ diff.splice(pointer - count_delete - count_insert, count_delete + count_insert, [-1, text_delete], [1, text_insert]);
627
+ pointer = pointer - count_delete - count_insert + (count_delete ? 1 : 0) + (count_insert ? 1 : 0) + 1;
628
+ } else if (pointer != 0 && diff[pointer-1][0] == 0) {
629
+ // Merge this equality with the previous one.
630
+ diff[pointer-1][1] += diff[pointer][1];
631
+ diff.splice(pointer, 1);
632
+ } else {
633
+ pointer++;
634
+ }
635
+ count_insert = 0;
636
+ count_delete = 0;
637
+ text_delete = '';
638
+ text_insert = '';
639
+ }
640
+ }
641
+ if (diff[diff.length-1][1] == '')
642
+ diff.pop(); // Remove the dummy entry at the end.
643
+ }
644
+
645
+
646
+ function diff_addindex(diff) {
647
+ // Add an index to each tuple, represents where the tuple is located in text2.
648
+ // e.g. [[-1, 'h', 0], [1, 'c', 0], [0, 'at', 1]]
649
+ var i = 0;
650
+ for (var x=0; x<diff.length; x++) {
651
+ diff[x].push(i);
652
+ if (diff[x][0] != -1)
653
+ i += diff[x][1].length;
654
+ }
655
+ }
656
+
657
+
658
+ function diff_xindex(diff, loc) {
659
+ // loc is a location in text1, compute and return the equivalent location in text2.
660
+ // e.g. "The cat" vs "The big cat", 1->1, 5->8
661
+ var chars1 = 0;
662
+ var chars2 = 0;
663
+ var last_chars1 = 0;
664
+ var last_chars2 = 0;
665
+ for (var x=0; x<diff.length; x++) {
666
+ if (diff[x][0] != 1) // Equality or deletion.
667
+ chars1 += diff[x][1].length;
668
+ if (diff[x][0] != -1) // Equality or insertion.
669
+ chars2 += diff[x][1].length;
670
+ if (chars1 > loc) // Overshot the location.
671
+ break;
672
+ last_chars1 = chars1;
673
+ last_chars2 = chars2;
674
+ }
675
+ if (diff.length != x && diff[x][0] == -1) // The location was deleted.
676
+ return last_chars2;
677
+ // Add the remaining character length.
678
+ return last_chars2 + (loc - last_chars1);
679
+ }
680
+
681
+
682
+ function diff_prettyhtml(diff) {
683
+ // Convert a diff array into a pretty HTML report.
684
+ diff_addindex(diff);
685
+ var html = '';
686
+ for (var x=0; x<diff.length; x++) {
687
+ var m = diff[x][0]; // Mode (-1=delete, 0=copy, 1=add)
688
+ var t = diff[x][1]; // Text of change.
689
+ var i = diff[x][2]; // Index of change.
690
+ t = t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
691
+ t = t.replace(/\n/g, "&para;<BR>");
692
+ if (m == -1)
693
+ html += "<DEL STYLE='background:#FFE6E6;' TITLE='i="+i+"'>"+t+"</DEL>";
694
+ else if (m == 1)
695
+ html += "<INS STYLE='background:#E6FFE6;' TITLE='i="+i+"'>"+t+"</INS>";
696
+ else
697
+ html += "<SPAN TITLE='i="+i+"'>"+t+"</SPAN>";
698
+ }
699
+ return html;
700
+ }
701
+
702
+
703
+ //////////////////////////////////////////////////////////////////////
704
+ // Match //
705
+ //////////////////////////////////////////////////////////////////////
706
+
707
+
708
+ function match_getmaxbits() {
709
+ // Compute the number of bits in an int.
710
+ // The normal answer for JavaScript is 32.
711
+ var maxbits = 0;
712
+ var oldi = 1;
713
+ var newi = 2;
714
+ while (oldi != newi) {
715
+ maxbits++;
716
+ oldi = newi;
717
+ newi = newi << 1;
718
+ }
719
+ return maxbits;
720
+ }
721
+ var MATCH_MAXBITS = match_getmaxbits();
722
+
723
+
724
+ function match_main(text, pattern, loc) {
725
+ // Locate the best instance of 'pattern' in 'text' near 'loc'.
726
+ loc = Math.max(0, Math.min(loc, text.length-pattern.length));
727
+ if (text == pattern) {
728
+ // Shortcut (potentially not guaranteed by the algorithm)
729
+ return 0;
730
+ } else if (text.length == 0) {
731
+ // Nothing to match.
732
+ return null;
733
+ } else if (text.substring(loc, loc + pattern.length) == pattern) {
734
+ // Perfect match at the perfect spot! (Includes case of null pattern)
735
+ return loc;
736
+ } else {
737
+ // Do a fuzzy compare.
738
+ var match = match_bitap(text, pattern, loc);
739
+ return match;
740
+ }
741
+ }
742
+
743
+
744
+ function match_bitap(text, pattern, loc) {
745
+ // Locate the best instance of 'pattern' in 'text' near 'loc' using the Bitap algorithm.
746
+ if (pattern.length > MATCH_MAXBITS)
747
+ return alert("Pattern too long for this browser.");
748
+
749
+ // Initialise the alphabet.
750
+ var s = match_alphabet(pattern);
751
+
752
+ var score_text_length = text.length;
753
+ // Coerce the text length between reasonable maximums and minimums.
754
+ score_text_length = Math.max(score_text_length, MATCH_MINLENGTH);
755
+ score_text_length = Math.min(score_text_length, MATCH_MAXLENGTH);
756
+
757
+ function match_bitap_score (e, x) {
758
+ // Compute and return the score for a match with e errors and x location.
759
+ var d = Math.abs(loc-x);
760
+ return (e / pattern.length / MATCH_BALANCE) + (d / score_text_length / (1.0 - MATCH_BALANCE));
761
+ }
762
+
763
+ // Highest score beyond which we give up.
764
+ var score_threshold = MATCH_THRESHOLD;
765
+ // Is there a nearby exact match? (speedup)
766
+ var best_loc = text.indexOf(pattern, loc);
767
+ if (best_loc != -1)
768
+ score_threshold = Math.min(match_bitap_score(0, best_loc), score_threshold);
769
+ // What about in the other direction? (speedup)
770
+ best_loc = text.lastIndexOf(pattern, loc+pattern.length);
771
+ if (best_loc != -1)
772
+ score_threshold = Math.min(match_bitap_score(0, best_loc), score_threshold);
773
+
774
+ // Initialise the bit arrays.
775
+ var r = Array();
776
+ var d = -1;
777
+ var matchmask = Math.pow(2, pattern.length-1);
778
+ best_loc = null;
779
+
780
+ var bin_min, bin_mid;
781
+ var bin_max = Math.max(loc+loc, text.length);
782
+ var last_rd;
783
+ for (var d=0; d<pattern.length; d++) {
784
+ // Scan for the best match; each iteration allows for one more error.
785
+ var rd = Array(text.length);
786
+
787
+ // Run a binary search to determine how far from 'loc' we can stray at this error level.
788
+ bin_min = loc;
789
+ bin_mid = bin_max;
790
+ while(bin_min < bin_mid) {
791
+ if (match_bitap_score(d, bin_mid) < score_threshold)
792
+ bin_min = bin_mid;
793
+ else
794
+ bin_max = bin_mid;
795
+ bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);
796
+ }
797
+ bin_max = bin_mid; // Use the result from this iteration as the maximum for the next.
798
+ var start = Math.max(0, loc - (bin_mid - loc) - 1);
799
+ var finish = Math.min(text.length-1, pattern.length + bin_mid);
800
+
801
+ if (text.charAt(finish) == pattern.charAt(pattern.length-1))
802
+ rd[finish] = Math.pow(2, d+1)-1;
803
+ else
804
+ rd[finish] = Math.pow(2, d)-1;
805
+ for (var j=finish-1; j>=start; j--) {
806
+ // The alphabet (s) is a sparse hash, so the following lines generate warnings.
807
+ if (d == 0) // First pass: exact match.
808
+ rd[j] = ((rd[j+1] << 1) | 1) & s[text.charAt(j)];
809
+ else // Subsequent passes: fuzzy match.
810
+ rd[j] = ((rd[j+1] << 1) | 1) & s[text.charAt(j)] | ((last_rd[j+1] << 1) | 1) | ((last_rd[j] << 1) | 1) | last_rd[j+1];
811
+ if (rd[j] & matchmask) {
812
+ var score = match_bitap_score(d, j);
813
+ // This match will almost certainly be better than any existing match. But check anyway.
814
+ if (score <= score_threshold) {
815
+ // Told you so.
816
+ score_threshold = score;
817
+ best_loc = j;
818
+ if (j > loc) {
819
+ // When passing loc, don't exceed our current distance from loc.
820
+ start = Math.max(0, loc - (j - loc));
821
+ } else {
822
+ // Already passed loc, downhill from here on in.
823
+ break;
824
+ }
825
+ }
826
+ }
827
+ }
828
+ if (match_bitap_score(d+1, loc) > score_threshold) // No hope for a (better) match at greater error levels.
829
+ break;
830
+ last_rd = rd;
831
+ }
832
+ return best_loc;
833
+ }
834
+
835
+
836
+ function match_alphabet(pattern) {
837
+ // Initialise the alphabet for the Bitap algorithm.
838
+ var s = Object();
839
+ for (var i=0; i<pattern.length; i++)
840
+ s[pattern.charAt(i)] = 0;
841
+ for (var i=0; i<pattern.length; i++)
842
+ s[pattern.charAt(i)] |= Math.pow(2, pattern.length-i-1);
843
+ return s;
844
+ }
845
+
846
+
847
+ //////////////////////////////////////////////////////////////////////
848
+ // Patch //
849
+ //////////////////////////////////////////////////////////////////////
850
+
851
+
852
+ function patch_obj() {
853
+ // Constructor for a patch object.
854
+ this.diffs = [];
855
+ this.start1 = null;
856
+ this.start2 = null;
857
+ this.length1 = 0;
858
+ this.length2 = 0;
859
+
860
+ this.toString = function() {
861
+ // Emmulate GNU diff's format.
862
+ // Header: @@ -382,8 +481,9 @@
863
+ // Indicies are printed as 1-based, not 0-based.
864
+ var coords1, coords2;
865
+ if (this.length1 == 0)
866
+ coords1 = this.start1+",0";
867
+ else if (this.length1 == 1)
868
+ coords1 = this.start1+1;
869
+ else
870
+ coords1 = (this.start1+1)+","+this.length1;
871
+ if (this.length2 == 0)
872
+ coords2 = this.start2+",0";
873
+ else if (this.length2 == 1)
874
+ coords2 = this.start2+1;
875
+ else
876
+ coords2 = (this.start2+1)+","+this.length2;
877
+ var txt = "@@ -"+coords1+" +"+coords2+" @@\n";
878
+ // Escape the body of the patch with %xx notation.
879
+ for (var x=0; x<this.diffs.length; x++)
880
+ txt += ("- +".charAt(this.diffs[x][0]+1)) + encodeURI(this.diffs[x][1]) + "\n";
881
+ return txt.replace(/%20/g, ' ');
882
+ }
883
+
884
+ this.text1 = function() {
885
+ // Compute and return the source text (all equalities and deletions).
886
+ var txt = '';
887
+ for (var x=0; x<this.diffs.length; x++)
888
+ if (this.diffs[x][0] == 0 || this.diffs[x][0] == -1)
889
+ txt += this.diffs[x][1];
890
+ return txt;
891
+ }
892
+
893
+ this.text2 = function() {
894
+ // Compute and return the destination text (all equalities and insertions).
895
+ var txt = '';
896
+ for (var x=0; x<this.diffs.length; x++)
897
+ if (this.diffs[x][0] == 0 || this.diffs[x][0] == 1)
898
+ txt += this.diffs[x][1];
899
+ return txt;
900
+ }
901
+ }
902
+
903
+
904
+ function patch_addcontext(patch, text) {
905
+ var pattern = text.substring(patch.start2, patch.start2+patch.length1);
906
+ var padding = 0;
907
+ // Increase the context until we're unique (but don't let the pattern expand beyond MATCH_MAXBITS).
908
+ while (text.indexOf(pattern) != text.lastIndexOf(pattern) && pattern.length < MATCH_MAXBITS-PATCH_MARGIN-PATCH_MARGIN) {
909
+ padding += PATCH_MARGIN;
910
+ pattern = text.substring(patch.start2 - padding, patch.start2+patch.length1 + padding);
911
+ }
912
+ // Add one chunk for good luck.
913
+ padding += PATCH_MARGIN;
914
+ // Add the prefix.
915
+ var prefix = text.substring(patch.start2 - padding, patch.start2);
916
+ if (prefix != '')
917
+ patch.diffs.unshift([0, prefix]);
918
+ // Add the suffix
919
+ var suffix = text.substring(patch.start2+patch.length1, patch.start2+patch.length1 + padding);
920
+ if (suffix != '')
921
+ patch.diffs.push([0, suffix]);
922
+
923
+ // Roll back the start points.
924
+ patch.start1 -= prefix.length;
925
+ patch.start2 -= prefix.length;
926
+ // Extend the lengths.
927
+ patch.length1 += prefix.length + suffix.length;
928
+ patch.length2 += prefix.length + suffix.length;
929
+ }
930
+
931
+
932
+ function patch_make(text1, text2, diff) {
933
+ // Compute a list of patches to turn text1 into text2.
934
+ // Use diff if provided, otherwise compute it ourselves.
935
+ if (typeof diff == 'undefined') {
936
+ diff = diff_main(text1, text2, true);
937
+ if (diff.length > 2) {
938
+ diff_cleanup_semantic(diff);
939
+ diff_cleanup_efficiency(diff);
940
+ }
941
+ }
942
+ if (diff.length == 0)
943
+ return []; // Get rid of the null case.
944
+ var patches = [];
945
+ var patch = new patch_obj();
946
+ var char_count1 = 0; // Number of characters into the text1 string.
947
+ var char_count2 = 0; // Number of characters into the text2 string.
948
+ var last_type = null;
949
+ var prepatch_text = text1; // Recreate the patches to determine context info.
950
+ var postpatch_text = text1;
951
+ for (var x=0; x<diff.length; x++) {
952
+ var diff_type = diff[x][0];
953
+ var diff_text = diff[x][1];
954
+
955
+ if (patch.diffs.length == 0 && diff_type != 0) {
956
+ // A new patch starts here.
957
+ patch.start1 = char_count1;
958
+ patch.start2 = char_count2;
959
+ }
960
+
961
+ if (diff_type == 1) {
962
+ // Insertion
963
+ patch.diffs.push(diff[x]);
964
+ patch.length2 += diff_text.length;
965
+ postpatch_text = postpatch_text.substring(0, char_count2) + diff_text + postpatch_text.substring(char_count2);
966
+ } else if (diff_type == -1) {
967
+ // Deletion.
968
+ patch.length1 += diff_text.length;
969
+ patch.diffs.push(diff[x]);
970
+ postpatch_text = postpatch_text.substring(0, char_count2) + postpatch_text.substring(char_count2 + diff_text.length);
971
+ } else if (diff_type == 0 && diff_text.length <= 2*PATCH_MARGIN && patch.diffs.length != 0 && diff.length != x+1) {
972
+ // Small equality inside a patch.
973
+ patch.diffs.push(diff[x]);
974
+ patch.length1 += diff_text.length;
975
+ patch.length2 += diff_text.length;
976
+ }
977
+
978
+ last_type = diff_type;
979
+ if (diff_type == 0 && diff_text.length >= 2*PATCH_MARGIN) {
980
+ // Time for a new patch.
981
+ if (patch.diffs.length != 0) {
982
+ patch_addcontext(patch, prepatch_text);
983
+ patches.push(patch);
984
+ var patch = new patch_obj();
985
+ last_type = null;
986
+ prepatch_text = postpatch_text;
987
+ }
988
+ }
989
+
990
+ // Update the current character count.
991
+ if (diff_type != 1)
992
+ char_count1 += diff_text.length;
993
+ if (diff_type != -1)
994
+ char_count2 += diff_text.length;
995
+ }
996
+ // Pick up the leftover patch if not empty.
997
+ if (patch.diffs.length != 0) {
998
+ patch_addcontext(patch, prepatch_text);
999
+ patches.push(patch);
1000
+ }
1001
+
1002
+ return patches;
1003
+ }
1004
+
1005
+
1006
+ function patch_apply(patches, text) {
1007
+ // Merge a set of patches onto the text.
1008
+ // Return a patched text, as well as a list of true/false values indicating which patches were applied.
1009
+ patch_splitmax(patches);
1010
+ var results = [];
1011
+ var delta = 0;
1012
+ var expected_loc, start_loc;
1013
+ var text1, text2;
1014
+ var diff, mod, index1, index2;
1015
+ for (var x=0; x<patches.length; x++) {
1016
+ expected_loc = patches[x].start2 + delta;
1017
+ text1 = patches[x].text1();
1018
+ start_loc = match_main(text, text1, expected_loc);
1019
+ if (start_loc == null) {
1020
+ // No match found. :(
1021
+ results.push(false);
1022
+ } else {
1023
+ // Found a match. :)
1024
+ results.push(true);
1025
+ delta = start_loc - expected_loc;
1026
+ text2 = text.substring(start_loc, start_loc + text1.length);
1027
+ if (text1 == text2) {
1028
+ // Perfect match, just shove the replacement text in.
1029
+ text = text.substring(0, start_loc) + patches[x].text2() + text.substring(start_loc + text1.length);
1030
+ } else {
1031
+ // Imperfect match. Run a diff to get a framework of equivalent indicies.
1032
+ diff = diff_main(text1, text2, false);
1033
+ index1 = 0;
1034
+ for (var y=0; y<patches[x].diffs.length; y++) {
1035
+ mod = patches[x].diffs[y];
1036
+ if (mod[0] != 0)
1037
+ index2 = diff_xindex(diff, index1);
1038
+ if (mod[0] == 1) // Insertion
1039
+ text = text.substring(0, start_loc + index2) + mod[1] + text.substring(start_loc + index2);
1040
+ else if (mod[0] == -1) // Deletion
1041
+ text = text.substring(0, start_loc + index2) + text.substring(start_loc + diff_xindex(diff, index1 + mod[1].length));
1042
+ if (mod[0] != -1)
1043
+ index1 += mod[1].length;
1044
+ }
1045
+ }
1046
+ }
1047
+ }
1048
+ return [text, results];
1049
+ }
1050
+
1051
+
1052
+ function patch_splitmax(patches) {
1053
+ // Look through the patches and break up any which are longer than the maximum limit of the match algorithm.
1054
+ var bigpatch, patch, patch_size, start1, start2, diff_type, diff_text, precontext, postcontext, empty;
1055
+ for (var x=0; x<patches.length; x++) {
1056
+ if (patches[x].length1 > MATCH_MAXBITS) {
1057
+ bigpatch = patches[x];
1058
+ // Remove the big old patch.
1059
+ patches.splice(x, 1);
1060
+ patch_size = MATCH_MAXBITS;
1061
+ start1 = bigpatch.start1;
1062
+ start2 = bigpatch.start2;
1063
+ precontext = '';
1064
+ while (bigpatch.diffs.length != 0) {
1065
+ // Create one of several smaller patches.
1066
+ patch = new patch_obj();
1067
+ empty = true;
1068
+ patch.start1 = start1 - precontext.length;
1069
+ patch.start2 = start2 - precontext.length;
1070
+ if (precontext != '') {
1071
+ patch.length1 = patch.length2 = precontext.length;
1072
+ patch.diffs.push([0, precontext]);
1073
+ }
1074
+ while (bigpatch.diffs.length != 0 && patch.length1 < patch_size - PATCH_MARGIN) {
1075
+ diff_type = bigpatch.diffs[0][0];
1076
+ diff_text = bigpatch.diffs[0][1];
1077
+ if (diff_type == 1) {
1078
+ // Insertions are harmless.
1079
+ patch.length2 += diff_text.length;
1080
+ start2 += diff_text.length;
1081
+ patch.diffs.push(bigpatch.diffs.shift());
1082
+ empty = false;
1083
+ } else {
1084
+ // Deletion or equality. Only take as much as we can stomach.
1085
+ diff_text = diff_text.substring(0, patch_size - patch.length1 - PATCH_MARGIN);
1086
+ patch.length1 += diff_text.length;
1087
+ start1 += diff_text.length;
1088
+ if (diff_type == 0) {
1089
+ patch.length2 += diff_text.length;
1090
+ start2 += diff_text.length;
1091
+ } else {
1092
+ empty = false;
1093
+ }
1094
+ patch.diffs.push([diff_type, diff_text]);
1095
+ if (diff_text == bigpatch.diffs[0][1])
1096
+ bigpatch.diffs.shift();
1097
+ else
1098
+ bigpatch.diffs[0][1] = bigpatch.diffs[0][1].substring(diff_text.length);
1099
+ }
1100
+ }
1101
+ // Compute the head context for the next patch.
1102
+ precontext = patch.text2();
1103
+ precontext = precontext.substring(precontext.length - PATCH_MARGIN);
1104
+ // Append the end context for this patch.
1105
+ postcontext = bigpatch.text1().substring(0, PATCH_MARGIN);
1106
+ if (postcontext != '') {
1107
+ patch.length1 += postcontext.length;
1108
+ patch.length2 += postcontext.length;
1109
+ if (patch.diffs.length > 0 && patch.diffs[patch.diffs.length-1][0] == 0)
1110
+ patch.diffs[patch.diffs.length-1][1] += postcontext;
1111
+ else
1112
+ patch.diffs.push([0, postcontext]);
1113
+ }
1114
+ if (!empty)
1115
+ patches.splice(x++, 0, patch);
1116
+ }
1117
+ }
1118
+ }
1119
+ }
1120
+
1121
+
1122
+ function patch_totext(patches) {
1123
+ // Take a list of patches and return a textual representation.
1124
+ var text = '';
1125
+ for (var x=0; x<patches.length; x++)
1126
+ text += patches[x];
1127
+ return text;
1128
+ }
1129
+
1130
+
1131
+ function patch_fromtext(text) {
1132
+ // Take a textual representation of patches and return a list of patch objects.
1133
+ var patches = [];
1134
+ text = text.split('\n');
1135
+ var patch, m, chars1, chars2, sign, line;
1136
+ while (text.length != 0) {
1137
+ m = text[0].match(/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/);
1138
+ if (!m)
1139
+ return alert("Invalid patch string:\n"+text[0]);
1140
+ patch = new patch_obj();
1141
+ patches.push(patch);
1142
+ patch.start1 = parseInt(m[1]);
1143
+ if (m[2] == '') {
1144
+ patch.start1--;
1145
+ patch.length1 = 1;
1146
+ } else if (m[2] == '0') {
1147
+ patch.length1 = 0;
1148
+ } else {
1149
+ patch.start1--;
1150
+ patch.length1 = parseInt(m[2]);
1151
+ }
1152
+
1153
+ patch.start2 = parseInt(m[3]);
1154
+ if (m[4] == '') {
1155
+ patch.start2--;
1156
+ patch.length2 = 1;
1157
+ } else if (m[4] == '0') {
1158
+ patch.length2 = 0;
1159
+ } else {
1160
+ patch.start2--;
1161
+ patch.length2 = parseInt(m[4]);
1162
+ }
1163
+ text.shift();
1164
+
1165
+ while (text.length != 0) {
1166
+ sign = text[0].charAt(0);
1167
+ line = decodeURIComponent(text[0].substring(1));
1168
+ if (sign == '-') {
1169
+ // Deletion.
1170
+ patch.diffs.push([-1, line]);
1171
+ } else if (sign == '+') {
1172
+ // Insertion.
1173
+ patch.diffs.push([1, line]);
1174
+ } else if (sign == ' ') {
1175
+ // Minor equality.
1176
+ patch.diffs.push([0, line]);
1177
+ } else if (sign == '@') {
1178
+ // Start of next patch.
1179
+ break;
1180
+ } else if (sign == '') {
1181
+ // Blank line? Whatever.
1182
+ } else {
1183
+ // WTF?
1184
+ return alert("Invalid patch mode: '"+sign+"'\n"+line);
1185
+ }
1186
+ text.shift();
1187
+ }
1188
+ }
1189
+ return patches;
1190
+ }
1191
+
1192
+ // EOF
js/tiny_mce/plugins/devkit/langs/en.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('devkit',{
4
+ title : 'TinyMCE Development Kit',
5
+ info_tab : 'Info',
6
+ settings_tab : 'Settings',
7
+ log_tab : 'Log',
8
+ content_tab : 'Content',
9
+ command_states_tab : 'Commands',
10
+ undo_redo_tab : 'Undo/Redo',
11
+ misc_tab : 'Misc',
12
+ filter : 'Filter:',
13
+ clear_log : 'Clear log',
14
+ refresh : 'Refresh',
15
+ info_help : 'Press Refresh to view info.',
16
+ settings_help : 'Press Refresh to display the settings array for each TinyMCE_Control instance.',
17
+ content_help : 'Press Refresh to display the raw and cleaned HTML content for each TinyMCE_Control instance.',
18
+ command_states_help : 'Press Refresh to display the current command states from inst.queryCommandState. This list will also mark unsupported commands.',
19
+ undo_redo_help : 'Press Refresh to display the global and instance undo/redo levels.',
20
+ misc_help : 'Here are various tools for debugging and development purposes.',
21
+ debug_events : 'Debug events',
22
+ undo_diff : 'Diff undo levels'
23
+ });
js/tiny_mce/plugins/directionality/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('directionality');var TinyMCE_DirectionalityPlugin={getInfo:function(){return{longname:'Directionality',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"ltr":return tinyMCE.getButtonHTML(cn,'lang_directionality_ltr_desc','{$pluginurl}/images/ltr.gif','mceDirectionLTR');case"rtl":return tinyMCE.getButtonHTML(cn,'lang_directionality_rtl_desc','{$pluginurl}/images/rtl.gif','mceDirectionRTL')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceDirectionLTR":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","ltr");tinyMCE.triggerNodeChange(false);return true;case"mceDirectionRTL":var inst=tinyMCE.getInstanceById(editor_id);var elm=tinyMCE.getParentElement(inst.getFocusElement(),"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(elm)elm.setAttribute("dir","rtl");tinyMCE.triggerNodeChange(false);return true}return false},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):""}if(node==null)return;var elm=tinyMCE.getParentElement(node,"p,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(!elm){tinyMCE.switchClass(editor_id+'_ltr','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_rtl','mceButtonDisabled');return true}tinyMCE.switchClass(editor_id+'_ltr','mceButtonNormal');tinyMCE.switchClass(editor_id+'_rtl','mceButtonNormal');var dir=getAttrib(elm,"dir");if(dir=="ltr"||dir=="")tinyMCE.switchClass(editor_id+'_ltr','mceButtonSelected');else tinyMCE.switchClass(editor_id+'_rtl','mceButtonSelected');return true}};tinyMCE.addPlugin("directionality",TinyMCE_DirectionalityPlugin);
js/tiny_mce/plugins/directionality/editor_plugin_src.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('directionality');
10
+
11
+ var TinyMCE_DirectionalityPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Directionality',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ getControlHTML : function(cn) {
23
+ switch (cn) {
24
+ case "ltr":
25
+ return tinyMCE.getButtonHTML(cn, 'lang_directionality_ltr_desc', '{$pluginurl}/images/ltr.gif', 'mceDirectionLTR');
26
+
27
+ case "rtl":
28
+ return tinyMCE.getButtonHTML(cn, 'lang_directionality_rtl_desc', '{$pluginurl}/images/rtl.gif', 'mceDirectionRTL');
29
+ }
30
+
31
+ return "";
32
+ },
33
+
34
+ execCommand : function(editor_id, element, command, user_interface, value) {
35
+ // Handle commands
36
+ switch (command) {
37
+ case "mceDirectionLTR":
38
+ var inst = tinyMCE.getInstanceById(editor_id);
39
+ var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
40
+
41
+ if (elm)
42
+ elm.setAttribute("dir", "ltr");
43
+
44
+ tinyMCE.triggerNodeChange(false);
45
+ return true;
46
+
47
+ case "mceDirectionRTL":
48
+ var inst = tinyMCE.getInstanceById(editor_id);
49
+ var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
50
+
51
+ if (elm)
52
+ elm.setAttribute("dir", "rtl");
53
+
54
+ tinyMCE.triggerNodeChange(false);
55
+ return true;
56
+ }
57
+
58
+ // Pass to next handler in chain
59
+ return false;
60
+ },
61
+
62
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
63
+ function getAttrib(elm, name) {
64
+ return elm.getAttribute(name) ? elm.getAttribute(name) : "";
65
+ }
66
+
67
+ if (node == null)
68
+ return;
69
+
70
+ var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
71
+ if (!elm) {
72
+ tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonDisabled');
73
+ tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonDisabled');
74
+ return true;
75
+ }
76
+
77
+ tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonNormal');
78
+ tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonNormal');
79
+
80
+ var dir = getAttrib(elm, "dir");
81
+ if (dir == "ltr" || dir == "")
82
+ tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonSelected');
83
+ else
84
+ tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonSelected');
85
+
86
+ return true;
87
+ }
88
+ };
89
+
90
+ tinyMCE.addPlugin("directionality", TinyMCE_DirectionalityPlugin);
js/tiny_mce/plugins/directionality/images/ltr.gif ADDED
Binary file
js/tiny_mce/plugins/directionality/images/rtl.gif ADDED
Binary file
js/tiny_mce/plugins/directionality/langs/en.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ directionality_ltr_desc : 'Direction left to right',
5
+ directionality_rtl_desc : 'Direction right to left'
6
+ });
js/tiny_mce/plugins/directionality/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/emotions/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('emotions');var TinyMCE_EmotionsPlugin={getInfo:function(){return{longname:'Emotions',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"emotions":return tinyMCE.getButtonHTML(cn,'lang_emotions_desc','{$pluginurl}/images/emotions.gif','mceEmotion')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=250;template['height']=160;template['width']+=tinyMCE.getLang('lang_emotions_delta_width',0);template['height']+=tinyMCE.getLang('lang_emotions_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true}return false}};tinyMCE.addPlugin('emotions',TinyMCE_EmotionsPlugin);
js/tiny_mce/plugins/emotions/editor_plugin_src.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('emotions');
10
+
11
+ // Plucin static class
12
+ var TinyMCE_EmotionsPlugin = {
13
+ getInfo : function() {
14
+ return {
15
+ longname : 'Emotions',
16
+ author : 'Moxiecode Systems AB',
17
+ authorurl : 'http://tinymce.moxiecode.com',
18
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
19
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
20
+ };
21
+ },
22
+
23
+ /**
24
+ * Returns the HTML contents of the emotions control.
25
+ */
26
+ getControlHTML : function(cn) {
27
+ switch (cn) {
28
+ case "emotions":
29
+ return tinyMCE.getButtonHTML(cn, 'lang_emotions_desc', '{$pluginurl}/images/emotions.gif', 'mceEmotion');
30
+ }
31
+
32
+ return "";
33
+ },
34
+
35
+ /**
36
+ * Executes the mceEmotion command.
37
+ */
38
+ execCommand : function(editor_id, element, command, user_interface, value) {
39
+ // Handle commands
40
+ switch (command) {
41
+ case "mceEmotion":
42
+ var template = new Array();
43
+
44
+ template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme
45
+ template['width'] = 250;
46
+ template['height'] = 160;
47
+
48
+ // Language specific width and height addons
49
+ template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0);
50
+ template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0);
51
+
52
+ tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
53
+
54
+ return true;
55
+ }
56
+
57
+ // Pass to next handler in chain
58
+ return false;
59
+ }
60
+ };
61
+
62
+ // Register plugin
63
+ tinyMCE.addPlugin('emotions', TinyMCE_EmotionsPlugin);
js/tiny_mce/plugins/emotions/emotions.htm ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_emotions_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>
6
+ <base target="_self" />
7
+ </head>
8
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
9
+ <div align="center">
10
+ <div class="title">{$lang_emotions_title}:<br /><br /></div>
11
+
12
+ <table border="0" cellspacing="0" cellpadding="4">
13
+ <tr>
14
+ <td><a href="javascript:insertEmotion('smiley-cool.gif','lang_emotions_cool');"><img src="images/smiley-cool.gif" width="18" height="18" border="0" alt="{$lang_emotions_cool}" title="{$lang_emotions_cool}" /></a></td>
15
+ <td><a href="javascript:insertEmotion('smiley-cry.gif','lang_emotions_cry');"><img src="images/smiley-cry.gif" width="18" height="18" border="0" alt="{$lang_emotions_cry}" title="{$lang_emotions_cry}" /></a></td>
16
+ <td><a href="javascript:insertEmotion('smiley-embarassed.gif','lang_emotions_embarassed');"><img src="images/smiley-embarassed.gif" width="18" height="18" border="0" alt="{$lang_emotions_embarassed}" title="{$lang_emotions_embarassed}" /></a></td>
17
+ <td><a href="javascript:insertEmotion('smiley-foot-in-mouth.gif','lang_emotions_foot_in_mouth');"><img src="images/smiley-foot-in-mouth.gif" width="18" height="18" border="0" alt="{$lang_emotions_foot_in_mouth}" title="{$lang_emotions_foot_in_mouth}" /></a></td>
18
+ </tr>
19
+ <tr>
20
+ <td><a href="javascript:insertEmotion('smiley-frown.gif','lang_emotions_frown');"><img src="images/smiley-frown.gif" width="18" height="18" border="0" alt="{$lang_emotions_frown}" title="{$lang_emotions_frown}" /></a></td>
21
+ <td><a href="javascript:insertEmotion('smiley-innocent.gif','lang_emotions_innocent');"><img src="images/smiley-innocent.gif" width="18" height="18" border="0" alt="{$lang_emotions_innocent}" title="{$lang_emotions_innocent}" /></a></td>
22
+ <td><a href="javascript:insertEmotion('smiley-kiss.gif','lang_emotions_kiss');"><img src="images/smiley-kiss.gif" width="18" height="18" border="0" alt="{$lang_emotions_kiss}" title="{$lang_emotions_kiss}" /></a></td>
23
+ <td><a href="javascript:insertEmotion('smiley-laughing.gif','lang_emotions_laughing');"><img src="images/smiley-laughing.gif" width="18" height="18" border="0" alt="{$lang_emotions_laughing}" title="{$lang_emotions_laughing}" /></a></td>
24
+ </tr>
25
+ <tr>
26
+ <td><a href="javascript:insertEmotion('smiley-money-mouth.gif','lang_emotions_money_mouth');"><img src="images/smiley-money-mouth.gif" width="18" height="18" border="0" alt="{$lang_emotions_money_mouth}" title="{$lang_emotions_money_mouth}" /></a></td>
27
+ <td><a href="javascript:insertEmotion('smiley-sealed.gif','lang_emotions_sealed');"><img src="images/smiley-sealed.gif" width="18" height="18" border="0" alt="{$lang_emotions_sealed}" title="{$lang_emotions_sealed}" /></a></td>
28
+ <td><a href="javascript:insertEmotion('smiley-smile.gif','lang_emotions_smile');"><img src="images/smiley-smile.gif" width="18" height="18" border="0" alt="{$lang_emotions_smile}" title="{$lang_emotions_smile}" /></a></td>
29
+ <td><a href="javascript:insertEmotion('smiley-surprised.gif','lang_emotions_surprised');"><img src="images/smiley-surprised.gif" width="18" height="18" border="0" alt="{$lang_emotions_surprised}" title="{$lang_emotions_surprised}" /></a></td>
30
+ </tr>
31
+ <tr>
32
+ <td><a href="javascript:insertEmotion('smiley-tongue-out.gif','lang_emotions_tongue_out');"><img src="images/smiley-tongue-out.gif" width="18" height="18" border="0" alt="{$lang_emotions_tongue-out}" title="{$lang_emotions_tongue_out}" /></a></td>
33
+ <td><a href="javascript:insertEmotion('smiley-undecided.gif','lang_emotions_undecided');"><img src="images/smiley-undecided.gif" width="18" height="18" border="0" alt="{$lang_emotions_undecided}" title="{$lang_emotions_undecided}" /></a></td>
34
+ <td><a href="javascript:insertEmotion('smiley-wink.gif','lang_emotions_wink');"><img src="images/smiley-wink.gif" width="18" height="18" border="0" alt="{$lang_emotions_wink}" title="{$lang_emotions_wink}" /></a></td>
35
+ <td><a href="javascript:insertEmotion('smiley-yell.gif','lang_emotions_yell');"><img src="images/smiley-yell.gif" width="18" height="18" border="0" alt="{$lang_emotions_yell}" title="{$lang_emotions_yell}" /></a></td>
36
+ </tr>
37
+ </table>
38
+ </div>
39
+ </body>
40
+ </html>
js/tiny_mce/plugins/emotions/images/emotions.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/readme.txt ADDED
@@ -0,0 +1,2 @@
 
 
1
+ These emotions where taken from Mozilla Thunderbird.
2
+ I hope they don't get angry if I use them here after all this is a open source project aswell.
js/tiny_mce/plugins/emotions/images/smiley-cool.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-cry.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-embarassed.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-frown.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-innocent.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-kiss.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-laughing.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-sealed.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-smile.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-surprised.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-undecided.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-wink.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/images/smiley-yell.gif ADDED
Binary file
js/tiny_mce/plugins/emotions/jscripts/functions.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function init() {
2
+ tinyMCEPopup.resizeToInnerSize();
3
+ }
4
+
5
+ function insertEmotion(file_name, title) {
6
+ title = tinyMCE.getLang(title);
7
+
8
+ if (title == null)
9
+ title = "";
10
+
11
+ // XML encode
12
+ title = title.replace(/&/g, '&amp;');
13
+ title = title.replace(/\"/g, '&quot;');
14
+ title = title.replace(/</g, '&lt;');
15
+ title = title.replace(/>/g, '&gt;');
16
+
17
+ var html = '<img src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" mce_src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" border="0" alt="' + title + '" title="' + title + '" />';
18
+
19
+ tinyMCE.execCommand('mceInsertContent', false, html);
20
+ tinyMCEPopup.close();
21
+ }
js/tiny_mce/plugins/emotions/langs/en.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('emotions',{
4
+ title : 'Insert emotion',
5
+ desc : 'Emotions',
6
+ cool : 'Cool',
7
+ cry : 'Cry',
8
+ embarassed : 'Embarassed',
9
+ foot_in_mouth : 'Foot in mouth',
10
+ frown : 'Frown',
11
+ innocent : 'Innocent',
12
+ kiss : 'Kiss',
13
+ laughing : 'Laughing',
14
+ money_mouth : 'Money mouth',
15
+ sealed : 'Sealed',
16
+ smile : 'Smile',
17
+ surprised : 'Surprised',
18
+ tongue_out : 'Tongue out',
19
+ undecided : 'Undecided',
20
+ wink : 'Wink',
21
+ yell : 'Yell'
22
+ });
js/tiny_mce/plugins/emotions/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/flash/css/content.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ .mceItemFlash {
2
+ border: 1px dotted #cc0000;
3
+ background-image: url('../images/flash.gif');
4
+ background-position: center;
5
+ background-repeat: no-repeat;
6
+ background-color: #ffffcc;
7
+ }
js/tiny_mce/plugins/flash/css/flash.css ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ .panel_wrapper div.current {
2
+ height: 100px;
3
+ }
4
+
5
+ #width, #height {
6
+ width: 50px;
7
+ }
8
+
9
+ #file {
10
+ width: 250px;
11
+ }
js/tiny_mce/plugins/flash/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('flash');var TinyMCE_FlashPlugin={getInfo:function(){return{longname:'Flash',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/flash',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(!tinyMCE.settings['flash_skip_plugin_css'])tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/flash/css/content.css")},getControlHTML:function(cn){switch(cn){case"flash":return tinyMCE.getButtonHTML(cn,'lang_flash_desc','{$pluginurl}/images/flash.gif','mceFlash')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceFlash":var name="",swffile="",swfwidth="",swfheight="",action="insert";var template=new Array();var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();template['file']='../../plugins/flash/flash.htm';template['width']=430;template['height']=175;template['width']+=tinyMCE.getLang('lang_flash_delta_width',0);template['height']+=tinyMCE.getLang('lang_flash_delta_height',0);if(focusElm!=null&&focusElm.nodeName.toLowerCase()=="img"){name=tinyMCE.getAttrib(focusElm,'class');if(name.indexOf('mceItemFlash')==-1)return true;swffile=tinyMCE.getAttrib(focusElm,'alt');if(tinyMCE.getParam('convert_urls'))swffile=eval(tinyMCE.settings['urlconverter_callback']+"(swffile, null, true);");swfwidth=tinyMCE.getAttrib(focusElm,'width');swfheight=tinyMCE.getAttrib(focusElm,'height');action="update"}tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",swffile:swffile,swfwidth:swfwidth,swfheight:swfheight,action:action});return true}return false},cleanup:function(type,content){switch(type){case"insert_to_editor_dom":if(tinyMCE.getParam('convert_urls')){var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if(tinyMCE.getAttrib(imgs[i],"class")=="mceItemFlash"){var src=tinyMCE.getAttrib(imgs[i],"alt");if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('alt',src);imgs[i].setAttribute('title',src)}}}break;case"get_from_editor_dom":var imgs=content.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if(tinyMCE.getAttrib(imgs[i],"class")=="mceItemFlash"){var src=tinyMCE.getAttrib(imgs[i],"alt");if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, null, true);");imgs[i].setAttribute('alt',src);imgs[i].setAttribute('title',src)}}break;case"insert_to_editor":var startPos=0;var embedList=new Array();content=content.replace(new RegExp('<[ ]*embed','gi'),'<embed');content=content.replace(new RegExp('<[ ]*/embed[ ]*>','gi'),'</embed>');content=content.replace(new RegExp('<[ ]*object','gi'),'<object');content=content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');while((startPos=content.indexOf('<embed',startPos+1))!=-1){var endPos=content.indexOf('>',startPos);var attribs=TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos+6,endPos));embedList[embedList.length]=attribs}var index=0;while((startPos=content.indexOf('<object',startPos))!=-1){if(index>=embedList.length)break;var attribs=embedList[index];endPos=content.indexOf('</object>',startPos);endPos+=9;var contentAfter=content.substring(endPos);content=content.substring(0,startPos);content+='<img width="'+attribs["width"]+'" height="'+attribs["height"]+'"';content+=' src="'+(tinyMCE.getParam("theme_href")+'/images/spacer.gif')+'" title="'+attribs["src"]+'"';content+=' alt="'+attribs["src"]+'" class="mceItemFlash" />'+content.substring(endPos);content+=contentAfter;index++;startPos++}var index=0;while((startPos=content.indexOf('<embed',startPos))!=-1){if(index>=embedList.length)break;var attribs=embedList[index];endPos=content.indexOf('>',startPos);endPos+=9;var contentAfter=content.substring(endPos);content=content.substring(0,startPos);content+='<img width="'+attribs["width"]+'" height="'+attribs["height"]+'"';content+=' src="'+(tinyMCE.getParam("theme_href")+'/images/spacer.gif')+'" title="'+attribs["src"]+'"';content+=' alt="'+attribs["src"]+'" class="mceItemFlash" />'+content.substring(endPos);content+=contentAfter;index++;startPos++}break;case"get_from_editor":var startPos=-1;while((startPos=content.indexOf('<img',startPos+1))!=-1){var endPos=content.indexOf('/>',startPos);var attribs=TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos+4,endPos));if(attribs['class']!="mceItemFlash")continue;endPos+=2;var embedHTML='';var wmode=tinyMCE.getParam("flash_wmode","");var quality=tinyMCE.getParam("flash_quality","high");var menu=tinyMCE.getParam("flash_menu","false");embedHTML+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';embedHTML+=' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"';embedHTML+=' width="'+attribs["width"]+'" height="'+attribs["height"]+'">';embedHTML+='<param name="movie" value="'+attribs["title"]+'" />';embedHTML+='<param name="quality" value="'+quality+'" />';embedHTML+='<param name="menu" value="'+menu+'" />';embedHTML+='<param name="wmode" value="'+wmode+'" />';embedHTML+='<embed src="'+attribs["title"]+'" wmode="'+wmode+'" quality="'+quality+'" menu="'+menu+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+attribs["width"]+'" height="'+attribs["height"]+'"></embed></object>';chunkBefore=content.substring(0,startPos);chunkAfter=content.substring(endPos);content=chunkBefore+embedHTML+chunkAfter}break}return content},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&tinyMCE.getAttrib(node,'class').indexOf('mceItemFlash')==0){tinyMCE.switchClass(editor_id+'_flash','mceButtonSelected');return true}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_flash','mceButtonNormal');return true},_parseAttributes:function(attribute_string){var attributeName="";var attributeValue="";var withInName;var withInValue;var attributes=new Array();var whiteSpaceRegExp=new RegExp('^[ \n\r\t]+','g');if(attribute_string==null||attribute_string.length<2)return null;withInName=withInValue=false;for(var i=0;i<attribute_string.length;i++){var chr=attribute_string.charAt(i);if((chr=='"'||chr=="'")&&!withInValue)withInValue=true;else if((chr=='"'||chr=="'")&&withInValue){withInValue=false;var pos=attributeName.lastIndexOf(' ');if(pos!=-1)attributeName=attributeName.substring(pos+1);attributes[attributeName.toLowerCase()]=attributeValue.substring(1);attributeName="";attributeValue=""}else if(!whiteSpaceRegExp.test(chr)&&!withInName&&!withInValue)withInName=true;if(chr=='='&&withInName)withInName=false;if(withInName)attributeName+=chr;if(withInValue)attributeValue+=chr}return attributes}};tinyMCE.addPlugin("flash",TinyMCE_FlashPlugin);
js/tiny_mce/plugins/flash/editor_plugin_src.js ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('flash');
10
+
11
+ var TinyMCE_FlashPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Flash',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/flash',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ if (!tinyMCE.settings['flash_skip_plugin_css'])
24
+ tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/flash/css/content.css");
25
+ },
26
+
27
+ getControlHTML : function(cn) {
28
+ switch (cn) {
29
+ case "flash":
30
+ return tinyMCE.getButtonHTML(cn, 'lang_flash_desc', '{$pluginurl}/images/flash.gif', 'mceFlash');
31
+ }
32
+
33
+ return "";
34
+ },
35
+
36
+ execCommand : function(editor_id, element, command, user_interface, value) {
37
+ // Handle commands
38
+ switch (command) {
39
+ case "mceFlash":
40
+ var name = "", swffile = "", swfwidth = "", swfheight = "", action = "insert";
41
+ var template = new Array();
42
+ var inst = tinyMCE.getInstanceById(editor_id);
43
+ var focusElm = inst.getFocusElement();
44
+
45
+ template['file'] = '../../plugins/flash/flash.htm'; // Relative to theme
46
+ template['width'] = 430;
47
+ template['height'] = 175;
48
+
49
+ template['width'] += tinyMCE.getLang('lang_flash_delta_width', 0);
50
+ template['height'] += tinyMCE.getLang('lang_flash_delta_height', 0);
51
+
52
+ // Is selection a image
53
+ if (focusElm != null && focusElm.nodeName.toLowerCase() == "img") {
54
+ name = tinyMCE.getAttrib(focusElm, 'class');
55
+
56
+ if (name.indexOf('mceItemFlash') == -1) // Not a Flash
57
+ return true;
58
+
59
+ // Get rest of Flash items
60
+ swffile = tinyMCE.getAttrib(focusElm, 'alt');
61
+
62
+ if (tinyMCE.getParam('convert_urls'))
63
+ swffile = eval(tinyMCE.settings['urlconverter_callback'] + "(swffile, null, true);");
64
+
65
+ swfwidth = tinyMCE.getAttrib(focusElm, 'width');
66
+ swfheight = tinyMCE.getAttrib(focusElm, 'height');
67
+ action = "update";
68
+ }
69
+
70
+ tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", swffile : swffile, swfwidth : swfwidth, swfheight : swfheight, action : action});
71
+ return true;
72
+ }
73
+
74
+ // Pass to next handler in chain
75
+ return false;
76
+ },
77
+
78
+ cleanup : function(type, content) {
79
+ switch (type) {
80
+ case "insert_to_editor_dom":
81
+ // Force relative/absolute
82
+ if (tinyMCE.getParam('convert_urls')) {
83
+ var imgs = content.getElementsByTagName("img");
84
+ for (var i=0; i<imgs.length; i++) {
85
+ if (tinyMCE.getAttrib(imgs[i], "class") == "mceItemFlash") {
86
+ var src = tinyMCE.getAttrib(imgs[i], "alt");
87
+
88
+ if (tinyMCE.getParam('convert_urls'))
89
+ src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
90
+
91
+ imgs[i].setAttribute('alt', src);
92
+ imgs[i].setAttribute('title', src);
93
+ }
94
+ }
95
+ }
96
+ break;
97
+
98
+ case "get_from_editor_dom":
99
+ var imgs = content.getElementsByTagName("img");
100
+ for (var i=0; i<imgs.length; i++) {
101
+ if (tinyMCE.getAttrib(imgs[i], "class") == "mceItemFlash") {
102
+ var src = tinyMCE.getAttrib(imgs[i], "alt");
103
+
104
+ if (tinyMCE.getParam('convert_urls'))
105
+ src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
106
+
107
+ imgs[i].setAttribute('alt', src);
108
+ imgs[i].setAttribute('title', src);
109
+ }
110
+ }
111
+ break;
112
+
113
+ case "insert_to_editor":
114
+ var startPos = 0;
115
+ var embedList = new Array();
116
+
117
+ // Fix the embed and object elements
118
+ content = content.replace(new RegExp('<[ ]*embed','gi'),'<embed');
119
+ content = content.replace(new RegExp('<[ ]*/embed[ ]*>','gi'),'</embed>');
120
+ content = content.replace(new RegExp('<[ ]*object','gi'),'<object');
121
+ content = content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');
122
+
123
+ // Parse all embed tags
124
+ while ((startPos = content.indexOf('<embed', startPos+1)) != -1) {
125
+ var endPos = content.indexOf('>', startPos);
126
+ var attribs = TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos + 6, endPos));
127
+ embedList[embedList.length] = attribs;
128
+ }
129
+
130
+ // Parse all object tags and replace them with images from the embed data
131
+ var index = 0;
132
+ while ((startPos = content.indexOf('<object', startPos)) != -1) {
133
+ if (index >= embedList.length)
134
+ break;
135
+
136
+ var attribs = embedList[index];
137
+
138
+ // Find end of object
139
+ endPos = content.indexOf('</object>', startPos);
140
+ endPos += 9;
141
+
142
+ // Insert image
143
+ var contentAfter = content.substring(endPos);
144
+ content = content.substring(0, startPos);
145
+ content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
146
+ content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
147
+ content += ' alt="' + attribs["src"] + '" class="mceItemFlash" />' + content.substring(endPos);
148
+ content += contentAfter;
149
+ index++;
150
+
151
+ startPos++;
152
+ }
153
+
154
+ // Parse all embed tags and replace them with images from the embed data
155
+ var index = 0;
156
+ while ((startPos = content.indexOf('<embed', startPos)) != -1) {
157
+ if (index >= embedList.length)
158
+ break;
159
+
160
+ var attribs = embedList[index];
161
+
162
+ // Find end of embed
163
+ endPos = content.indexOf('>', startPos);
164
+ endPos += 9;
165
+
166
+ // Insert image
167
+ var contentAfter = content.substring(endPos);
168
+ content = content.substring(0, startPos);
169
+ content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
170
+ content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
171
+ content += ' alt="' + attribs["src"] + '" class="mceItemFlash" />' + content.substring(endPos);
172
+ content += contentAfter;
173
+ index++;
174
+
175
+ startPos++;
176
+ }
177
+
178
+ break;
179
+
180
+ case "get_from_editor":
181
+ // Parse all img tags and replace them with object+embed
182
+ var startPos = -1;
183
+
184
+ while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
185
+ var endPos = content.indexOf('/>', startPos);
186
+ var attribs = TinyMCE_FlashPlugin._parseAttributes(content.substring(startPos + 4, endPos));
187
+
188
+ // Is not flash, skip it
189
+ if (attribs['class'] != "mceItemFlash")
190
+ continue;
191
+
192
+ endPos += 2;
193
+
194
+ var embedHTML = '';
195
+ var wmode = tinyMCE.getParam("flash_wmode", "");
196
+ var quality = tinyMCE.getParam("flash_quality", "high");
197
+ var menu = tinyMCE.getParam("flash_menu", "false");
198
+
199
+ // Insert object + embed
200
+ embedHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
201
+ embedHTML += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"';
202
+ embedHTML += ' width="' + attribs["width"] + '" height="' + attribs["height"] + '">';
203
+ embedHTML += '<param name="movie" value="' + attribs["title"] + '" />';
204
+ embedHTML += '<param name="quality" value="' + quality + '" />';
205
+ embedHTML += '<param name="menu" value="' + menu + '" />';
206
+ embedHTML += '<param name="wmode" value="' + wmode + '" />';
207
+ embedHTML += '<embed src="' + attribs["title"] + '" wmode="' + wmode + '" quality="' + quality + '" menu="' + menu + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + attribs["width"] + '" height="' + attribs["height"] + '"></embed></object>';
208
+
209
+ // Insert embed/object chunk
210
+ chunkBefore = content.substring(0, startPos);
211
+ chunkAfter = content.substring(endPos);
212
+ content = chunkBefore + embedHTML + chunkAfter;
213
+ }
214
+ break;
215
+ }
216
+
217
+ // Pass through to next handler in chain
218
+ return content;
219
+ },
220
+
221
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
222
+ if (node == null)
223
+ return;
224
+
225
+ do {
226
+ if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('mceItemFlash') == 0) {
227
+ tinyMCE.switchClass(editor_id + '_flash', 'mceButtonSelected');
228
+ return true;
229
+ }
230
+ } while ((node = node.parentNode));
231
+
232
+ tinyMCE.switchClass(editor_id + '_flash', 'mceButtonNormal');
233
+
234
+ return true;
235
+ },
236
+
237
+ // Private plugin internal functions
238
+
239
+ _parseAttributes : function(attribute_string) {
240
+ var attributeName = "";
241
+ var attributeValue = "";
242
+ var withInName;
243
+ var withInValue;
244
+ var attributes = new Array();
245
+ var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
246
+
247
+ if (attribute_string == null || attribute_string.length < 2)
248
+ return null;
249
+
250
+ withInName = withInValue = false;
251
+
252
+ for (var i=0; i<attribute_string.length; i++) {
253
+ var chr = attribute_string.charAt(i);
254
+
255
+ if ((chr == '"' || chr == "'") && !withInValue)
256
+ withInValue = true;
257
+ else if ((chr == '"' || chr == "'") && withInValue) {
258
+ withInValue = false;
259
+
260
+ var pos = attributeName.lastIndexOf(' ');
261
+ if (pos != -1)
262
+ attributeName = attributeName.substring(pos+1);
263
+
264
+ attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
265
+
266
+ attributeName = "";
267
+ attributeValue = "";
268
+ } else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
269
+ withInName = true;
270
+
271
+ if (chr == '=' && withInName)
272
+ withInName = false;
273
+
274
+ if (withInName)
275
+ attributeName += chr;
276
+
277
+ if (withInValue)
278
+ attributeValue += chr;
279
+ }
280
+
281
+ return attributes;
282
+ }
283
+ };
284
+
285
+ tinyMCE.addPlugin("flash", TinyMCE_FlashPlugin);
js/tiny_mce/plugins/flash/flash.htm ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_flash_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="jscripts/flash.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
8
+ <link href="css/flash.css" rel="stylesheet" type="text/css" />
9
+ <base target="_self" />
10
+ </head>
11
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
12
+ <form onsubmit="insertFlash();return false;" action="#">
13
+ <div class="tabs">
14
+ <ul>
15
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_flash_general}</a></span></li>
16
+ </ul>
17
+ </div>
18
+
19
+ <div class="panel_wrapper">
20
+ <div id="general_panel" class="panel current">
21
+ <fieldset>
22
+ <legend>{$lang_flash_general}</legend>
23
+
24
+ <table border="0" cellpadding="4" cellspacing="0">
25
+ <tr>
26
+ <td nowrap="nowrap"><label for="file">{$lang_flash_file}</label></td>
27
+ <td nowrap="nowrap">
28
+ <table border="0" cellspacing="0" cellpadding="0">
29
+ <tr>
30
+ <td><input id="file" name="file" type="text" value="" onfocus="this.select();" /></td>
31
+ <td id="filebrowsercontainer">&nbsp;</td>
32
+ </tr>
33
+ </table>
34
+ </td>
35
+ </tr>
36
+ <tr id="linklistrow">
37
+ <td><label for="linklist">{$lang_flash_list}</label></td>
38
+ <td id="linklistcontainer">&nbsp;</td>
39
+ </tr>
40
+ <tr>
41
+ <td nowrap="nowrap"><label>{$lang_flash_size}</label></td>
42
+ <td nowrap="nowrap">
43
+ <input type="text" id="width" name="width" value="" onfocus="this.select();" />
44
+ <select name="width2" id="width2" style="width: 50px">
45
+ <option value="">px</option>
46
+ <option value="%">%</option>
47
+ </select>&nbsp;x&nbsp;<input id="height" name="height" type="text" value="" onfocus="this.select();" />
48
+ <select name="height2" id="height2" style="width: 50px">
49
+ <option value="">px</option>
50
+ <option value="%">%</option>
51
+ </select>
52
+ </td>
53
+ </tr>
54
+ </table>
55
+ </fieldset>
56
+ </div>
57
+ </div>
58
+
59
+ <div class="mceActionPanel">
60
+ <div style="float: left">
61
+ <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertFlash();" />
62
+ </div>
63
+
64
+ <div style="float: right">
65
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
66
+ </div>
67
+ </div>
68
+ </form>
69
+ </body>
70
+ </html>
js/tiny_mce/plugins/flash/images/flash.gif ADDED
Binary file
js/tiny_mce/plugins/flash/jscripts/flash.js ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var url = tinyMCE.getParam("flash_external_list_url");
2
+ if (url != null) {
3
+ // Fix relative
4
+ if (url.charAt(0) != '/' && url.indexOf('://') == -1)
5
+ url = tinyMCE.documentBasePath + "/" + url;
6
+
7
+ document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
8
+ }
9
+
10
+ function init() {
11
+ tinyMCEPopup.resizeToInnerSize();
12
+
13
+ document.getElementById("filebrowsercontainer").innerHTML = getBrowserHTML('filebrowser','file','flash','flash');
14
+
15
+ // Image list outsrc
16
+ var html = getFlashListHTML('filebrowser','file','flash','flash');
17
+ if (html == "")
18
+ document.getElementById("linklistrow").style.display = 'none';
19
+ else
20
+ document.getElementById("linklistcontainer").innerHTML = html;
21
+
22
+ var formObj = document.forms[0];
23
+ var swffile = tinyMCE.getWindowArg('swffile');
24
+ var swfwidth = '' + tinyMCE.getWindowArg('swfwidth');
25
+ var swfheight = '' + tinyMCE.getWindowArg('swfheight');
26
+
27
+ if (swfwidth.indexOf('%')!=-1) {
28
+ formObj.width2.value = "%";
29
+ formObj.width.value = swfwidth.substring(0,swfwidth.length-1);
30
+ } else {
31
+ formObj.width2.value = "px";
32
+ formObj.width.value = swfwidth;
33
+ }
34
+
35
+ if (swfheight.indexOf('%')!=-1) {
36
+ formObj.height2.value = "%";
37
+ formObj.height.value = swfheight.substring(0,swfheight.length-1);
38
+ } else {
39
+ formObj.height2.value = "px";
40
+ formObj.height.value = swfheight;
41
+ }
42
+
43
+ formObj.file.value = swffile;
44
+ formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
45
+
46
+ selectByValue(formObj, 'linklist', swffile);
47
+
48
+ // Handle file browser
49
+ if (isVisible('filebrowser'))
50
+ document.getElementById('file').style.width = '230px';
51
+
52
+ // Auto select flash in list
53
+ if (typeof(tinyMCEFlashList) != "undefined" && tinyMCEFlashList.length > 0) {
54
+ for (var i=0; i<formObj.linklist.length; i++) {
55
+ if (formObj.linklist.options[i].value == tinyMCE.getWindowArg('swffile'))
56
+ formObj.linklist.options[i].selected = true;
57
+ }
58
+ }
59
+ }
60
+
61
+ function getFlashListHTML() {
62
+ if (typeof(tinyMCEFlashList) != "undefined" && tinyMCEFlashList.length > 0) {
63
+ var html = "";
64
+
65
+ html += '<select id="linklist" name="linklist" style="width: 250px" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.file.value=this.options[this.selectedIndex].value;">';
66
+ html += '<option value="">---</option>';
67
+
68
+ for (var i=0; i<tinyMCEFlashList.length; i++)
69
+ html += '<option value="' + tinyMCEFlashList[i][1] + '">' + tinyMCEFlashList[i][0] + '</option>';
70
+
71
+ html += '</select>';
72
+
73
+ return html;
74
+ }
75
+
76
+ return "";
77
+ }
78
+
79
+ function insertFlash() {
80
+ var formObj = document.forms[0];
81
+ var html = '';
82
+ var file = formObj.file.value;
83
+ var width = formObj.width.value;
84
+ var height = formObj.height.value;
85
+ if (formObj.width2.value=='%') {
86
+ width = width + '%';
87
+ }
88
+ if (formObj.height2.value=='%') {
89
+ height = height + '%';
90
+ }
91
+
92
+ if (width == "")
93
+ width = 100;
94
+
95
+ if (height == "")
96
+ height = 100;
97
+
98
+ html += ''
99
+ + '<img src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" mce_src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" '
100
+ + 'width="' + width + '" height="' + height + '" '
101
+ + 'border="0" alt="' + file + '" title="' + file + '" class="mceItemFlash" />';
102
+
103
+ tinyMCEPopup.execCommand("mceInsertContent", true, html);
104
+ tinyMCE.selectedInstance.repaint();
105
+
106
+ tinyMCEPopup.close();
107
+ }
js/tiny_mce/plugins/flash/langs/en.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('flash',{
4
+ title : 'Insert / edit Flash Movie',
5
+ desc : 'Insert / edit Flash Movie',
6
+ file : 'Flash-File (.swf)',
7
+ size : 'Size',
8
+ list : 'Flash files',
9
+ props : 'Flash properties',
10
+ general : 'General'
11
+ });
js/tiny_mce/plugins/flash/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/fullpage/blank.htm ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>blank_page</title>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ </head>
6
+ <body onload="parent.setupIframe(document);">
7
+
8
+ </body>
9
+ </html>
js/tiny_mce/plugins/fullpage/css/fullpage.css ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Hide the advanced tab */
2
+ #advanced_tab {
3
+ display: none;
4
+ }
5
+
6
+ #metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright {
7
+ width: 280px;
8
+ }
9
+
10
+ #doctype, #docencoding {
11
+ width: 200px;
12
+ }
13
+
14
+ #langcode {
15
+ width: 30px;
16
+ }
17
+
18
+ #bgimage {
19
+ width: 220px;
20
+ }
21
+
22
+ #fontface {
23
+ width: 240px;
24
+ }
25
+
26
+ #leftmargin, #rightmargin, #topmargin, #bottommargin {
27
+ width: 50px;
28
+ }
29
+
30
+ .panel_wrapper div.current {
31
+ height: 400px;
32
+ }
33
+
34
+ #stylesheet, #style {
35
+ width: 240px;
36
+ }
37
+
38
+ /* Head list classes */
39
+
40
+ .headlistwrapper {
41
+ width: 100%;
42
+ }
43
+
44
+ .addbutton, .removebutton, .moveupbutton, .movedownbutton {
45
+ border-top: 1px solid;
46
+ border-left: 1px solid;
47
+ border-bottom: 1px solid;
48
+ border-right: 1px solid;
49
+ border-color: #F0F0EE;
50
+ cursor: default;
51
+ display: block;
52
+ width: 20px;
53
+ height: 20px;
54
+ }
55
+
56
+ .addbutton:hover, .removebutton:hover, .moveupbutton:hover, .movedownbutton:hover {
57
+ border: 1px solid #0A246A;
58
+ background-color: #B6BDD2;
59
+ }
60
+
61
+ .addbutton {
62
+ background-image: url('../images/add.gif');
63
+ float: left;
64
+ margin-right: 3px;
65
+ }
66
+
67
+ .removebutton {
68
+ background-image: url('../images/remove.gif');
69
+ float: left;
70
+ }
71
+
72
+ .moveupbutton {
73
+ background-image: url('../images/move_up.gif');
74
+ float: left;
75
+ margin-right: 3px;
76
+ }
77
+
78
+ .movedownbutton {
79
+ background-image: url('../images/move_down.gif');
80
+ float: left;
81
+ }
82
+
83
+ .selected {
84
+ border: 1px solid #0A246A;
85
+ background-color: #B6BDD2;
86
+ }
87
+
88
+ .toolbar {
89
+ width: 100%;
90
+ }
91
+
92
+ #headlist {
93
+ width: 100%;
94
+ margin-top: 3px;
95
+ font-size: 11px;
96
+ }
97
+
98
+ #info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element {
99
+ display: none;
100
+ }
101
+
102
+ #addmenu {
103
+ position: absolute;
104
+ border: 1px solid gray;
105
+ display: none;
106
+ z-index: 100;
107
+ background-color: white;
108
+ }
109
+
110
+ #addmenu a {
111
+ display: block;
112
+ width: 100%;
113
+ line-height: 20px;
114
+ text-decoration: none;
115
+ background-color: white;
116
+ }
117
+
118
+ #addmenu a:hover {
119
+ background-color: #B6BDD2;
120
+ color: black;
121
+ }
122
+
123
+ #addmenu span {
124
+ padding-left: 10px;
125
+ padding-right: 10px;
126
+ }
127
+
128
+ #updateElementPanel {
129
+ display: none;
130
+ }
131
+
132
+ #script_element .panel_wrapper div.current {
133
+ height: 108px;
134
+ }
135
+
136
+ #style_element .panel_wrapper div.current {
137
+ height: 108px;
138
+ }
139
+
140
+ #link_element .panel_wrapper div.current {
141
+ height: 140px;
142
+ }
143
+
144
+ #element_script_value {
145
+ width: 100%;
146
+ height: 100px;
147
+ }
148
+
149
+ #element_comment_value {
150
+ width: 100%;
151
+ height: 120px;
152
+ }
153
+
154
+ #element_style_value {
155
+ width: 100%;
156
+ height: 100px;
157
+ }
158
+
159
+ #element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title {
160
+ width: 250px;
161
+ }
162
+
163
+ .updateElementButton {
164
+ margin-top: 3px;
165
+ }
166
+
167
+ /* MSIE specific styles */
168
+
169
+ * html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton {
170
+ width: 22px;
171
+ height: 22px;
172
+ }
173
+
174
+ textarea {
175
+ height: 55px;
176
+ }
js/tiny_mce/plugins/fullpage/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('fullpage');var TinyMCE_FullPagePlugin={getInfo:function(){return{longname:'Fullpage',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"fullpage":return tinyMCE.getButtonHTML(cn,'lang_fullpage_desc','{$pluginurl}/images/fullpage.gif','mceFullPageProperties')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceFullPageProperties":var template=new Array();template['file']='../../plugins/fullpage/fullpage.htm';template['width']=430;template['height']=485+(tinyMCE.isOpera?5:0);template['width']+=tinyMCE.getLang('lang_fullpage_delta_width',0);template['height']+=tinyMCE.getLang('lang_fullpage_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceFullPageUpdate":TinyMCE_FullPagePlugin._addToHead(tinyMCE.getInstanceById(editor_id));return true}return false},cleanup:function(type,content,inst){switch(type){case"insert_to_editor":var tmp=content.toLowerCase();var pos=tmp.indexOf('<body'),pos2;if(pos!=-1){pos=tmp.indexOf('>',pos);pos2=tmp.lastIndexOf('</body>');inst.fullpageTopContent=content.substring(0,pos+1);content=content.substring(pos+1,pos2);}else{if(!inst.fullpageTopContent){var docType=tinyMCE.getParam("fullpage_default_doctype",'<!DOCTYPE html PUBLIC "-/'+'/W3C//DTD XHTML 1.0 Transitional/'+'/EN" "http:/'+'/www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');var enc=tinyMCE.getParam("fullpage_default_encoding",'utf-8');var title=tinyMCE.getParam("fullpage_default_title",'Untitled document');var lang=tinyMCE.getParam("fullpage_default_langcode",'en');var pi=tinyMCE.getParam("fullpage_default_xml_pi",true);var ff=tinyMCE.getParam("fullpage_default_font_family","");var fz=tinyMCE.getParam("fullpage_default_font_size","");var ds=tinyMCE.getParam("fullpage_default_style","");var dtc=tinyMCE.getParam("fullpage_default_text_color","");title=title.replace(/&/g,'&amp;');title=title.replace(/\"/g,'&quot;');title=title.replace(/</g,'&lt;');title=title.replace(/>/g,'&gt;');tmp='';if(pi)tmp+='<?xml version="1.0" encoding="'+enc+'"?>\n';tmp+=docType+'\n';tmp+='<html xmlns="http:/'+'/www.w3.org/1999/xhtml" lang="'+lang+'" xml:lang="'+lang+'">\n';tmp+='<head>\n';tmp+='\t<title>'+title+'</title>\n';tmp+='\t<meta http-equiv="Content-Type" content="text/html; charset='+enc+'" />\n';tmp+='</head>\n';tmp+='<body';if(ff!=''||fz!=''){tmp+=' style="';if(ds!='')tmp+=ds+";";if(ff!='')tmp+='font-family: '+ff+";";if(fz!='')tmp+='font-size: '+fz+";";tmp+='"'}if(dtc!='')tmp+=' text="'+dtc+'"';tmp+='>\n';inst.fullpageTopContent=tmp}}this._addToHead(inst);break;case"get_from_editor":if(inst.fullpageTopContent&&!tinyMCE.getParam("fullpage_hide_in_source_view",false)){content=content.replace(/(\s)?mce\_[a-z_]+\=[^\s>]+(\s|\>)/i,'');content=inst.fullpageTopContent+content+"\n</body>\n</html>"}break;case"submit_content":if(inst.fullpageTopContent&&tinyMCE.getParam("fullpage_hide_in_source_view",false))content=inst.fullpageTopContent+content+"\n</body>\n</html>";break}return content},_addToHead:function(inst){var doc=inst.getDoc();var head=doc.getElementsByTagName("head")[0];var body=doc.body;var h=inst.fullpageTopContent;var e=doc.createElement("body");var nl,i,le,tmp;h=h.replace(/(\r|\n)/gi,'');h=h.replace(/<\?[^\>]*\>/gi,'');h=h.replace(/<\/?(!DOCTYPE|head|html)[^\>]*\>/gi,'');h=h.replace(/<script(.*?)<\/script>/gi,'');h=h.replace(/<title(.*?)<\/title>/gi,'');h=h.replace(/<(meta|base)[^>]*>/gi,'');h=h.replace(/<link([^>]*)\/>/gi,'<pre mce_type="link" $1></pre>');h=h.replace(/<body/gi,'<div mce_type="body"');h+='</div>';e.innerHTML=h;body.vLink=body.aLink=body.link=body.text='';body.style.cssText='';nl=head.getElementsByTagName('link');for(i=0;i<nl.length;i++){if(tinyMCE.getAttrib(nl[i],'mce_head')=="true")nl[i].parentNode.removeChild(nl[i])}nl=e.getElementsByTagName('pre');for(i=0;i<nl.length;i++){tmp=tinyMCE.getAttrib(nl[i],'media');if(tinyMCE.getAttrib(nl[i],'mce_type')=="link"&&(tmp==""||tmp=="screen"||tmp=="all")&&tinyMCE.getAttrib(nl[i],'rel')=="stylesheet"){le=doc.createElement("link");le.rel="stylesheet";le.href=tinyMCE.getAttrib(nl[i],'href');le.setAttribute("mce_head","true");head.appendChild(le)}}nl=e.getElementsByTagName('div');if(nl.length>0){body.style.cssText=tinyMCE.getAttrib(nl[0],'style');if((tmp=tinyMCE.getAttrib(nl[0],'leftmargin'))!=''&&body.style.marginLeft=='')body.style.marginLeft=tmp+"px";if((tmp=tinyMCE.getAttrib(nl[0],'rightmargin'))!=''&&body.style.marginRight=='')body.style.marginRight=tmp+"px";if((tmp=tinyMCE.getAttrib(nl[0],'topmargin'))!=''&&body.style.marginTop=='')body.style.marginTop=tmp+"px";if((tmp=tinyMCE.getAttrib(nl[0],'bottommargin'))!=''&&body.style.marginBottom=='')body.style.marginBottom=tmp+"px";body.dir=tinyMCE.getAttrib(nl[0],'dir');body.vLink=tinyMCE.getAttrib(nl[0],'vlink');body.aLink=tinyMCE.getAttrib(nl[0],'alink');body.link=tinyMCE.getAttrib(nl[0],'link');body.text=tinyMCE.getAttrib(nl[0],'text');if((tmp=tinyMCE.getAttrib(nl[0],'background'))!='')body.style.backgroundImage="url('"+tmp+"')";if((tmp=tinyMCE.getAttrib(nl[0],'bgcolor'))!='')body.style.backgroundColor=tmp}}};tinyMCE.addPlugin("fullpage",TinyMCE_FullPagePlugin);
js/tiny_mce/plugins/fullpage/editor_plugin_src.js ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 232 2007-03-05 17:00:27Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('fullpage');
10
+
11
+ var TinyMCE_FullPagePlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Fullpage',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ getControlHTML : function(cn) {
23
+ switch (cn) {
24
+ case "fullpage":
25
+ return tinyMCE.getButtonHTML(cn, 'lang_fullpage_desc', '{$pluginurl}/images/fullpage.gif', 'mceFullPageProperties');
26
+ }
27
+
28
+ return "";
29
+ },
30
+
31
+ execCommand : function(editor_id, element, command, user_interface, value) {
32
+ // Handle commands
33
+ switch (command) {
34
+ case "mceFullPageProperties":
35
+ var template = new Array();
36
+
37
+ template['file'] = '../../plugins/fullpage/fullpage.htm';
38
+ template['width'] = 430;
39
+ template['height'] = 485 + (tinyMCE.isOpera ? 5 : 0);
40
+
41
+ template['width'] += tinyMCE.getLang('lang_fullpage_delta_width', 0);
42
+ template['height'] += tinyMCE.getLang('lang_fullpage_delta_height', 0);
43
+
44
+ tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
45
+ return true;
46
+
47
+ case "mceFullPageUpdate":
48
+ TinyMCE_FullPagePlugin._addToHead(tinyMCE.getInstanceById(editor_id));
49
+ return true;
50
+ }
51
+
52
+ // Pass to next handler in chain
53
+ return false;
54
+ },
55
+
56
+ cleanup : function(type, content, inst) {
57
+ switch (type) {
58
+ case "insert_to_editor":
59
+ var tmp = content.toLowerCase();
60
+ var pos = tmp.indexOf('<body'), pos2;
61
+
62
+ // Split page in header and body chunks
63
+ if (pos != -1) {
64
+ pos = tmp.indexOf('>', pos);
65
+ pos2 = tmp.lastIndexOf('</body>');
66
+ inst.fullpageTopContent = content.substring(0, pos + 1);
67
+ content = content.substring(pos + 1, pos2);
68
+ // tinyMCE.debug(inst.fullpageTopContent, content);
69
+ } else {
70
+ if (!inst.fullpageTopContent) {
71
+ var docType = tinyMCE.getParam("fullpage_default_doctype", '<!DOCTYPE html PUBLIC "-/'+'/W3C//DTD XHTML 1.0 Transitional/'+'/EN" "http:/'+'/www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
72
+ var enc = tinyMCE.getParam("fullpage_default_encoding", 'utf-8');
73
+ var title = tinyMCE.getParam("fullpage_default_title", 'Untitled document');
74
+ var lang = tinyMCE.getParam("fullpage_default_langcode", 'en');
75
+ var pi = tinyMCE.getParam("fullpage_default_xml_pi", true);
76
+ var ff = tinyMCE.getParam("fullpage_default_font_family", "");
77
+ var fz = tinyMCE.getParam("fullpage_default_font_size", "");
78
+ var ds = tinyMCE.getParam("fullpage_default_style", "");
79
+ var dtc = tinyMCE.getParam("fullpage_default_text_color", "");
80
+
81
+ // Xml encode it
82
+ title = title.replace(/&/g, '&amp;');
83
+ title = title.replace(/\"/g, '&quot;');
84
+ title = title.replace(/</g, '&lt;');
85
+ title = title.replace(/>/g, '&gt;');
86
+
87
+ tmp = '';
88
+
89
+ // Make default chunk
90
+ if (pi)
91
+ tmp += '<?xml version="1.0" encoding="' + enc + '"?>\n';
92
+
93
+ tmp += docType + '\n';
94
+ tmp += '<html xmlns="http:/'+'/www.w3.org/1999/xhtml" lang="' + lang + '" xml:lang="' + lang + '">\n';
95
+ tmp += '<head>\n';
96
+ tmp += '\t<title>' + title + '</title>\n';
97
+ tmp += '\t<meta http-equiv="Content-Type" content="text/html; charset=' + enc + '" />\n';
98
+ tmp += '</head>\n';
99
+ tmp += '<body';
100
+
101
+ if (ff != '' || fz != '') {
102
+ tmp += ' style="';
103
+
104
+ if (ds != '')
105
+ tmp += ds + ";";
106
+
107
+ if (ff != '')
108
+ tmp += 'font-family: ' + ff + ";";
109
+
110
+ if (fz != '')
111
+ tmp += 'font-size: ' + fz + ";";
112
+
113
+ tmp += '"';
114
+ }
115
+
116
+ if (dtc != '')
117
+ tmp += ' text="' + dtc + '"';
118
+
119
+ tmp += '>\n';
120
+
121
+ inst.fullpageTopContent = tmp;
122
+ }
123
+ }
124
+
125
+ this._addToHead(inst);
126
+
127
+ break;
128
+
129
+ case "get_from_editor":
130
+ if (inst.fullpageTopContent && !tinyMCE.getParam("fullpage_hide_in_source_view", false)) {
131
+ content = content.replace(/(\s)?mce\_[a-z_]+\=[^\s>]+(\s|\>)/i, ''); // Remove internal stuff
132
+ content = inst.fullpageTopContent + content + "\n</body>\n</html>";
133
+ }
134
+
135
+ break;
136
+
137
+ case "submit_content":
138
+ if (inst.fullpageTopContent && tinyMCE.getParam("fullpage_hide_in_source_view", false))
139
+ content = inst.fullpageTopContent + content + "\n</body>\n</html>";
140
+
141
+ break;
142
+ }
143
+
144
+ // Pass through to next handler in chain
145
+ return content;
146
+ },
147
+
148
+ // Private plugin internal methods
149
+
150
+ _addToHead : function(inst) {
151
+ var doc = inst.getDoc();
152
+ var head = doc.getElementsByTagName("head")[0];
153
+ var body = doc.body;
154
+ var h = inst.fullpageTopContent;
155
+ var e = doc.createElement("body");
156
+ var nl, i, le, tmp;
157
+
158
+ // Remove stuff we don't want
159
+ h = h.replace(/(\r|\n)/gi, '');
160
+ h = h.replace(/<\?[^\>]*\>/gi, '');
161
+ h = h.replace(/<\/?(!DOCTYPE|head|html)[^\>]*\>/gi, '');
162
+ h = h.replace(/<script(.*?)<\/script>/gi, '');
163
+ h = h.replace(/<title(.*?)<\/title>/gi, '');
164
+ h = h.replace(/<(meta|base)[^>]*>/gi, '');
165
+
166
+ // Make link and style elements into pre
167
+ h = h.replace(/<link([^>]*)\/>/gi, '<pre mce_type="link" $1></pre>');
168
+ //h = h.replace(/<style([^>]*)>(.*?)<\/style>/gi, '<pre mce_type="style" $1>$2</pre>');
169
+
170
+ // Make body a div
171
+ h = h.replace(/<body/gi, '<div mce_type="body"');
172
+ h += '</div>';
173
+
174
+ // Now crapy MSIE can parse it
175
+ e.innerHTML = h;
176
+
177
+ // Reset all body attributes
178
+ body.vLink = body.aLink = body.link = body.text = '';
179
+ body.style.cssText = '';
180
+
181
+ // Delete all old links
182
+ nl = head.getElementsByTagName('link');
183
+ for (i=0; i<nl.length; i++) {
184
+ if (tinyMCE.getAttrib(nl[i], 'mce_head') == "true")
185
+ nl[i].parentNode.removeChild(nl[i]);
186
+ }
187
+
188
+ // Add link elements
189
+ nl = e.getElementsByTagName('pre');
190
+ for (i=0; i<nl.length; i++) {
191
+ tmp = tinyMCE.getAttrib(nl[i], 'media');
192
+ if (tinyMCE.getAttrib(nl[i], 'mce_type') == "link" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCE.getAttrib(nl[i], 'rel') == "stylesheet") {
193
+ le = doc.createElement("link");
194
+
195
+ le.rel = "stylesheet";
196
+ le.href = tinyMCE.getAttrib(nl[i], 'href');
197
+ le.setAttribute("mce_head", "true");
198
+
199
+ head.appendChild(le);
200
+ }
201
+ }
202
+
203
+ // Add body attributes
204
+ nl = e.getElementsByTagName('div');
205
+ if (nl.length > 0) {
206
+ body.style.cssText = tinyMCE.getAttrib(nl[0], 'style');
207
+
208
+ if ((tmp = tinyMCE.getAttrib(nl[0], 'leftmargin')) != '' && body.style.marginLeft == '')
209
+ body.style.marginLeft = tmp + "px";
210
+
211
+ if ((tmp = tinyMCE.getAttrib(nl[0], 'rightmargin')) != '' && body.style.marginRight == '')
212
+ body.style.marginRight = tmp + "px";
213
+
214
+ if ((tmp = tinyMCE.getAttrib(nl[0], 'topmargin')) != '' && body.style.marginTop == '')
215
+ body.style.marginTop = tmp + "px";
216
+
217
+ if ((tmp = tinyMCE.getAttrib(nl[0], 'bottommargin')) != '' && body.style.marginBottom == '')
218
+ body.style.marginBottom = tmp + "px";
219
+
220
+ body.dir = tinyMCE.getAttrib(nl[0], 'dir');
221
+ body.vLink = tinyMCE.getAttrib(nl[0], 'vlink');
222
+ body.aLink = tinyMCE.getAttrib(nl[0], 'alink');
223
+ body.link = tinyMCE.getAttrib(nl[0], 'link');
224
+ body.text = tinyMCE.getAttrib(nl[0], 'text');
225
+
226
+ if ((tmp = tinyMCE.getAttrib(nl[0], 'background')) != '')
227
+ body.style.backgroundImage = "url('" + tmp + "')";
228
+
229
+ if ((tmp = tinyMCE.getAttrib(nl[0], 'bgcolor')) != '')
230
+ body.style.backgroundColor = tmp;
231
+ }
232
+ }
233
+ };
234
+
235
+ tinyMCE.addPlugin("fullpage", TinyMCE_FullPagePlugin);
js/tiny_mce/plugins/fullpage/fullpage.htm ADDED
@@ -0,0 +1,577 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_fullpage_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/mclayer.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/fullpage.js"></script>
9
+ <link href="css/fullpage.css" rel="stylesheet" type="text/css" />
10
+ <base target="_self" />
11
+ </head>
12
+ <body id="advlink" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
13
+ <form onsubmit="updateAction();return false;" name="fullpage" action="#">
14
+ <div class="tabs">
15
+ <ul>
16
+ <li id="meta_tab" class="current"><span><a href="javascript:mcTabs.displayTab('meta_tab','meta_panel');" onmousedown="return false;">{$lang_fullpage_meta_tab}</a></span></li>
17
+ <li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{$lang_fullpage_appearance_tab}</a></span></li>
18
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_fullpage_advanced_tab}</a></span></li>
19
+ </ul>
20
+ </div>
21
+
22
+ <div class="panel_wrapper">
23
+ <div id="meta_panel" class="panel current">
24
+ <fieldset>
25
+ <legend>{$lang_fullpage_meta_props}</legend>
26
+
27
+ <table border="0" cellpadding="4" cellspacing="0">
28
+ <tr>
29
+ <td nowrap="nowrap"><label for="metatitle">{$lang_fullpage_meta_title}</label>&nbsp;</td>
30
+ <td><input type="text" id="metatitle" name="metatitle" value="" /></td>
31
+ </tr>
32
+ <tr>
33
+ <td nowrap="nowrap"><label for="metakeywords">{$lang_fullpage_meta_keywords}</label>&nbsp;</td>
34
+ <td><textarea id="metakeywords" name="metakeywords" rows="4"></textarea></td>
35
+ </tr>
36
+ <tr>
37
+ <td nowrap="nowrap"><label for="metadescription">{$lang_fullpage_meta_description}</label>&nbsp;</td>
38
+ <td><textarea id="metadescription" name="metadescription" rows="4"></textarea></td>
39
+ </tr>
40
+ <tr>
41
+ <td nowrap="nowrap"><label for="metaauthor">{$lang_fullpage_author}</label>&nbsp;</td>
42
+ <td><input type="text" id="metaauthor" name="metaauthor" value="" /></td>
43
+ </tr>
44
+ <tr>
45
+ <td nowrap="nowrap"><label for="metacopyright">{$lang_fullpage_copyright}</label>&nbsp;</td>
46
+ <td><input type="text" id="metacopyright" name="metacopyright" value="" /></td>
47
+ </tr>
48
+ <tr>
49
+ <td nowrap="nowrap"><label for="metarobots">{$lang_fullpage_meta_robots}</label>&nbsp;</td>
50
+ <td>
51
+ <select id="metarobots" name="metarobots">
52
+ <option value="">{$lang_not_set}</option>
53
+ <option value="index,follow">{$lang_fullpage_meta_index_follow}</option>
54
+ <option value="index,nofollow">{$lang_fullpage_meta_index_nofollow}</option>
55
+ <option value="noindex,follow">{$lang_fullpage_meta_noindex_follow}</option>
56
+ <option value="noindex,nofollow">{$lang_fullpage_meta_noindex_nofollow}</option>
57
+ </select>
58
+ </td>
59
+ </tr>
60
+ </table>
61
+ </fieldset>
62
+
63
+ <fieldset>
64
+ <legend>{$lang_fullpage_langprops}</legend>
65
+
66
+ <table border="0" cellpadding="4" cellspacing="0">
67
+ <tr>
68
+ <td class="column1"><label for="docencoding">{$lang_fullpage_encoding}</label></td>
69
+ <td>
70
+ <select id="docencoding" name="docencoding">
71
+ <option value="">{$lang_not_set}</option>
72
+ </select>
73
+ </td>
74
+ </tr>
75
+ <tr>
76
+ <td nowrap="nowrap"><label for="doctypes">{$lang_fullpage_doctypes}</label>&nbsp;</td>
77
+ <td>
78
+ <select id="doctypes" name="doctypes">
79
+ <option value="">{$lang_not_set}</option>
80
+ </select>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <td nowrap="nowrap"><label for="langcode">{$lang_fullpage_langcode}</label>&nbsp;</td>
85
+ <td><input type="text" id="langcode" name="langcode" value="" /></td>
86
+ </tr>
87
+ <tr>
88
+ <td class="column1"><label for="langdir">{$lang_fullpage_langdir}</label></td>
89
+ <td>
90
+ <select id="langdir" name="langdir">
91
+ <option value="">{$lang_not_set}</option>
92
+ <option value="ltr">{$lang_fullpage_ltr}</option>
93
+ <option value="rtl">{$lang_fullpage_rtl}</option>
94
+ </select>
95
+ </td>
96
+ </tr>
97
+ <tr>
98
+ <td nowrap="nowrap"><label for="xml_pi">{$lang_fullpage_xml_pi}</label>&nbsp;</td>
99
+ <td><input type="checkbox" id="xml_pi" name="xml_pi" class="checkbox" /></td>
100
+ </tr>
101
+ </table>
102
+ </fieldset>
103
+ </div>
104
+
105
+ <div id="appearance_panel" class="panel">
106
+ <fieldset>
107
+ <legend>{$lang_fullpage_appearance_textprops}</legend>
108
+
109
+ <table border="0" cellpadding="4" cellspacing="0">
110
+ <tr>
111
+ <td class="column1"><label for="fontface">{$lang_fullpage_fontface}</label></td>
112
+ <td>
113
+ <select id="fontface" name="fontface" onchange="changedStyleField(this);">
114
+ <option value="">{$lang_not_set}</option>
115
+ </select>
116
+ </td>
117
+ </tr>
118
+
119
+ <tr>
120
+ <td class="column1"><label for="fontsize">{$lang_fullpage_fontsize}</label></td>
121
+ <td>
122
+ <select id="fontsize" name="fontsize" onchange="changedStyleField(this);">
123
+ <option value="">{$lang_not_set}</option>
124
+ </select>
125
+ </td>
126
+ </tr>
127
+
128
+ <tr>
129
+ <td class="column1"><label for="textcolor">{$lang_fullpage_textcolor}</label></td>
130
+ <td>
131
+ <table border="0" cellpadding="0" cellspacing="0">
132
+ <tr>
133
+ <td><input id="textcolor" name="textcolor" type="text" value="" size="9" onchange="updateColor('textcolor_pick','textcolor');changedStyleField(this);" /></td>
134
+ <td id="textcolor_pickcontainer">&nbsp;</td>
135
+ </tr>
136
+ </table>
137
+ </td>
138
+ </tr>
139
+ </table>
140
+ </fieldset>
141
+
142
+ <fieldset>
143
+ <legend>{$lang_fullpage_appearance_bgprops}</legend>
144
+
145
+ <table border="0" cellpadding="4" cellspacing="0">
146
+ <tr>
147
+ <td class="column1"><label for="bgimage">{$lang_fullpage_bgimage}</label></td>
148
+ <td>
149
+ <table border="0" cellpadding="0" cellspacing="0">
150
+ <tr>
151
+ <td><input id="bgimage" name="bgimage" type="text" value="" onchange="changedStyleField(this);" /></td>
152
+ <td id="bgimage_pickcontainer">&nbsp;</td>
153
+ </tr>
154
+ </table>
155
+ </td>
156
+ </tr>
157
+ <tr>
158
+ <td class="column1"><label for="bgcolor">{$lang_fullpage_bgcolor}</label></td>
159
+ <td>
160
+ <table border="0" cellpadding="0" cellspacing="0">
161
+ <tr>
162
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedStyleField(this);" /></td>
163
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
164
+ </tr>
165
+ </table>
166
+ </td>
167
+ </tr>
168
+ </table>
169
+ </fieldset>
170
+
171
+ <fieldset>
172
+ <legend>{$lang_fullpage_appearance_marginprops}</legend>
173
+
174
+ <table border="0" cellpadding="4" cellspacing="0">
175
+ <tr>
176
+ <td class="column1"><label for="leftmargin">{$lang_fullpage_left_margin}</label></td>
177
+ <td><input id="leftmargin" name="leftmargin" type="text" value="" onchange="changedStyleField(this);" /></td>
178
+ <td class="column1"><label for="rightmargin">{$lang_fullpage_right_margin}</label></td>
179
+ <td><input id="rightmargin" name="rightmargin" type="text" value="" onchange="changedStyleField(this);" /></td>
180
+ </tr>
181
+ <tr>
182
+ <td class="column1"><label for="topmargin">{$lang_fullpage_top_margin}</label></td>
183
+ <td><input id="topmargin" name="topmargin" type="text" value="" onchange="changedStyleField(this);" /></td>
184
+ <td class="column1"><label for="bottommargin">{$lang_fullpage_bottom_margin}</label></td>
185
+ <td><input id="bottommargin" name="bottommargin" type="text" value="" onchange="changedStyleField(this);" /></td>
186
+ </tr>
187
+ </table>
188
+ </fieldset>
189
+
190
+ <fieldset>
191
+ <legend>{$lang_fullpage_appearance_linkprops}</legend>
192
+
193
+ <table border="0" cellpadding="4" cellspacing="0">
194
+ <tr>
195
+ <td class="column1"><label for="link_color">{$lang_fullpage_link_color}</label></td>
196
+ <td>
197
+ <table border="0" cellpadding="0" cellspacing="0">
198
+ <tr>
199
+ <td><input id="link_color" name="link_color" type="text" value="" size="9" onchange="updateColor('link_color_pick','link_color');changedStyleField(this);" /></td>
200
+ <td id="link_color_pickcontainer">&nbsp;</td>
201
+ </tr>
202
+ </table>
203
+ </td>
204
+
205
+ <td class="column1"><label for="visited_color">{$lang_fullpage_visited_color}</label></td>
206
+ <td>
207
+ <table border="0" cellpadding="0" cellspacing="0">
208
+ <tr>
209
+ <td><input id="visited_color" name="visited_color" type="text" value="" size="9" onchange="updateColor('visited_color_pick','visited_color');changedStyleField(this);" /></td>
210
+ <td id="visited_color_pickcontainer">&nbsp;</td>
211
+ </tr>
212
+ </table>
213
+ </td>
214
+ </tr>
215
+
216
+ <tr>
217
+ <td class="column1"><label for="active_color">{$lang_fullpage_active_color}</label></td>
218
+ <td>
219
+ <table border="0" cellpadding="0" cellspacing="0">
220
+ <tr>
221
+ <td><input id="active_color" name="active_color" type="text" value="" size="9" onchange="updateColor('active_color_pick','active_color');changedStyleField(this);" /></td>
222
+ <td id="active_color_pickcontainer">&nbsp;</td>
223
+ </tr>
224
+ </table>
225
+ </td>
226
+
227
+ <td>&nbsp;</td>
228
+ <td>&nbsp;</td>
229
+
230
+ <!-- <td class="column1"><label for="hover_color">{$lang_fullpage_hover_color}</label></td>
231
+ <td>
232
+ <table border="0" cellpadding="0" cellspacing="0">
233
+ <tr>
234
+ <td><input id="hover_color" name="hover_color" type="text" value="" size="9" onchange="changedStyleField(this);" /></td>
235
+ <td id="hover_color_pickcontainer">&nbsp;</td>
236
+ </tr>
237
+ </table>
238
+ </td> -->
239
+ </tr>
240
+ </table>
241
+ </fieldset>
242
+
243
+ <fieldset>
244
+ <legend>{$lang_fullpage_appearance_style}</legend>
245
+
246
+ <table border="0" cellpadding="4" cellspacing="0">
247
+ <tr>
248
+ <td class="column1"><label for="stylesheet">{$lang_fullpage_stylesheet}</label></td>
249
+ <td><table border="0" cellpadding="0" cellspacing="0">
250
+ <tr>
251
+ <td><input id="stylesheet" name="stylesheet" type="text" value="" /></td>
252
+ <td id="stylesheet_browsercontainer">&nbsp;</td>
253
+ </tr>
254
+ </table></td>
255
+ </tr>
256
+ <tr>
257
+ <td class="column1"><label for="style">{$lang_fullpage_style}</label></td>
258
+ <td><input id="style" name="style" type="text" value="" onchange="changedStyleField(this);" /></td>
259
+ </tr>
260
+ </table>
261
+ </fieldset>
262
+ </div>
263
+
264
+ <div id="advanced_panel" class="panel">
265
+ <div id="addmenu">
266
+ <table border="0" cellpadding="0" cellspacing="0">
267
+ <tr><td><a href="javascript:addHeadElm('title');" onmousedown="return false;"><span>{$lang_fullpage_add_title}</span></a></td></tr>
268
+ <tr><td><a href="javascript:addHeadElm('meta');" onmousedown="return false;"><span>{$lang_fullpage_add_meta}</span></a></td></tr>
269
+ <tr><td><a href="javascript:addHeadElm('script');" onmousedown="return false;"><span>{$lang_fullpage_add_script}</span></a></td></tr>
270
+ <tr><td><a href="javascript:addHeadElm('style');" onmousedown="return false;"><span>{$lang_fullpage_add_style}</span></a></td></tr>
271
+ <tr><td><a href="javascript:addHeadElm('link');" onmousedown="return false;"><span>{$lang_fullpage_add_link}</span></a></td></tr>
272
+ <tr><td><a href="javascript:addHeadElm('base');" onmousedown="return false;"><span>{$lang_fullpage_add_base}</span></a></td></tr>
273
+ <tr><td><a href="javascript:addHeadElm('comment');" onmousedown="return false;"><span>{$lang_fullpage_add_comment}</span></a></td></tr>
274
+ </table>
275
+ </div>
276
+
277
+ <fieldset>
278
+ <legend>{$lang_fullpage_head_elements}</legend>
279
+
280
+ <div class="headlistwrapper">
281
+ <div class="toolbar">
282
+ <div style="float: left">
283
+ <a id="addbutton" href="javascript:showAddMenu();" onmousedown="return false;" class="addbutton" title="{$lang_fullpage_add}"></a>
284
+ <a href="#" onmousedown="return false;" class="removebutton" title="{$lang_fullpage_remove}"></a>
285
+ </div>
286
+ <div style="float: right">
287
+ <a href="#" onmousedown="return false;" class="moveupbutton" title="{$lang_fullpage_moveup}"></a>
288
+ <a href="#" onmousedown="return false;" class="movedownbutton" title="{$lang_fullpage_movedown}"></a>
289
+ </div>
290
+ <br style="clear: both" />
291
+ </div>
292
+ <select id="headlist" size="26" onchange="updateHeadElm(this.options[this.selectedIndex].value);">
293
+ <option value="title_0">&lt;title&gt;Some title bla bla bla&lt;/title&gt;</option>
294
+ <option value="meta_1">&lt;meta name="keywords"&gt;Some bla bla bla&lt;/meta&gt;</option>
295
+ <option value="meta_2">&lt;meta name="description"&gt;Some bla bla bla bla bla bla bla bla bla&lt;/meta&gt;</option>
296
+ <option value="script_3">&lt;script language=&quot;javascript&quot;&gt;...&lt;/script&gt;</option>
297
+ <option value="style_4">&lt;style&gt;...&lt;/style&gt;</option>
298
+ <option value="base_5">&lt;base href="." /&gt;</option>
299
+ <option value="comment_6">&lt;!-- ... --&gt;</option>
300
+ <option value="link_7">&lt;link href="." /&gt;</option>
301
+ </select>
302
+ </div>
303
+ </fieldset>
304
+
305
+ <fieldset id="meta_element">
306
+ <legend>{$lang_fullpage_meta_element}</legend>
307
+
308
+ <table border="0" cellpadding="4" cellspacing="0">
309
+ <tr>
310
+ <td class="column1"><label for="element_meta_type">{$lang_fullpage_type}</label></td>
311
+ <td><select id="element_meta_type">
312
+ <option value="name">name</option>
313
+ <option value="http-equiv">http-equiv</option>
314
+ </select></td>
315
+ </tr>
316
+ <tr>
317
+ <td class="column1"><label for="element_meta_name">{$lang_fullpage_name}</label></td>
318
+ <td><input id="element_meta_name" name="element_meta_name" type="text" value="" /></td>
319
+ </tr>
320
+ <tr>
321
+ <td class="column1"><label for="element_meta_content">{$lang_fullpage_content}</label></td>
322
+ <td><input id="element_meta_content" name="element_meta_content" type="text" value="" /></td>
323
+ </tr>
324
+ </table>
325
+
326
+ <input type="button" id="meta_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
327
+ </fieldset>
328
+
329
+ <fieldset id="title_element">
330
+ <legend>{$lang_fullpage_title_element}</legend>
331
+
332
+ <table border="0" cellpadding="4" cellspacing="0">
333
+ <tr>
334
+ <td class="column1"><label for="element_title">{$lang_fullpage_meta_title}</label></td>
335
+ <td><input id="element_title" name="element_title" type="text" value="" /></td>
336
+ </tr>
337
+ </table>
338
+
339
+ <input type="button" id="title_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
340
+ </fieldset>
341
+
342
+ <fieldset id="script_element">
343
+ <legend>{$lang_fullpage_script_element}</legend>
344
+
345
+ <div class="tabs">
346
+ <ul>
347
+ <li id="script_props_tab" class="current"><span><a href="javascript:mcTabs.displayTab('script_props_tab','script_props_panel');" onmousedown="return false;">{$lang_fullpage_properties}</a></span></li>
348
+ <li id="script_value_tab"><span><a href="javascript:mcTabs.displayTab('script_value_tab','script_value_panel');" onmousedown="return false;">{$lang_fullpage_value}</a></span></li>
349
+ </ul>
350
+ </div>
351
+
352
+ <br style="clear: both" />
353
+
354
+ <div class="panel_wrapper">
355
+ <div id="script_props_panel" class="panel current">
356
+ <table border="0" cellpadding="4" cellspacing="0">
357
+ <tr>
358
+ <td class="column1"><label for="element_script_type">{$lang_fullpage_type}</label></td>
359
+ <td><select id="element_script_type">
360
+ <option value="text/javascript">text/javascript</option>
361
+ <option value="text/jscript">text/jscript</option>
362
+ <option value="text/vbscript">text/vbscript</option>
363
+ <option value="text/vbs">text/vbs</option>
364
+ <option value="text/ecmascript">text/ecmascript</option>
365
+ <option value="text/xml">text/xml</option>
366
+ </select></td>
367
+ </tr>
368
+ <tr>
369
+ <td class="column1"><label for="element_script_src">{$lang_fullpage_src}</label></td>
370
+ <td><table border="0" cellpadding="0" cellspacing="0">
371
+ <tr>
372
+ <td><input id="element_script_src" name="element_script_src" type="text" value="" /></td>
373
+ <td id="script_src_pickcontainer">&nbsp;</td>
374
+ </tr>
375
+ </table></td>
376
+ </tr>
377
+ <tr>
378
+ <td class="column1"><label for="element_script_charset">{$lang_fullpage_charset}</label></td>
379
+ <td><select id="element_script_charset"><option value="">{$lang_not_set}</option></select></td>
380
+ </tr>
381
+ <tr>
382
+ <td class="column1"><label for="element_script_defer">{$lang_fullpage_defer}</label></td>
383
+ <td><input type="checkbox" id="element_script_defer" name="element_script_defer" class="checkbox" /></td>
384
+ </tr>
385
+ </table>
386
+ </div>
387
+
388
+ <div id="script_value_panel" class="panel">
389
+ <textarea id="element_script_value"></textarea>
390
+ </div>
391
+ </div>
392
+
393
+ <input type="button" id="script_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
394
+ </fieldset>
395
+
396
+ <fieldset id="style_element">
397
+ <legend>{$lang_fullpage_style_element}</legend>
398
+
399
+ <div class="tabs">
400
+ <ul>
401
+ <li id="style_props_tab" class="current"><span><a href="javascript:mcTabs.displayTab('style_props_tab','style_props_panel');" onmousedown="return false;">{$lang_fullpage_properties}</a></span></li>
402
+ <li id="style_value_tab"><span><a href="javascript:mcTabs.displayTab('style_value_tab','style_value_panel');" onmousedown="return false;">{$lang_fullpage_value}</a></span></li>
403
+ </ul>
404
+ </div>
405
+
406
+ <br style="clear: both" />
407
+
408
+ <div class="panel_wrapper">
409
+ <div id="style_props_panel" class="panel current">
410
+ <table border="0" cellpadding="4" cellspacing="0">
411
+ <tr>
412
+ <td class="column1"><label for="element_style_type">{$lang_fullpage_type}</label></td>
413
+ <td><select id="element_style_type">
414
+ <option value="text/css">text/css</option>
415
+ </select></td>
416
+ </tr>
417
+ <tr>
418
+ <td class="column1"><label for="element_style_media">{$lang_fullpage_media}</label></td>
419
+ <td><select id="element_style_media"></select></td>
420
+ </tr>
421
+ </table>
422
+ </div>
423
+
424
+ <div id="style_value_panel" class="panel">
425
+ <textarea id="element_style_value"></textarea>
426
+ </div>
427
+ </div>
428
+
429
+ <input type="button" id="style_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
430
+ </fieldset>
431
+
432
+ <fieldset id="base_element">
433
+ <legend>{$lang_fullpage_base_element}</legend>
434
+
435
+ <table border="0" cellpadding="4" cellspacing="0">
436
+ <tr>
437
+ <td class="column1"><label for="element_base_href">{$lang_fullpage_href}</label></td>
438
+ <td><input id="element_base_href" name="element_base_href" type="text" value="" /></td>
439
+ </tr>
440
+ <tr>
441
+ <td class="column1"><label for="element_base_target">{$lang_fullpage_target}</label></td>
442
+ <td><input id="element_base_target" name="element_base_target" type="text" value="" /></td>
443
+ </tr>
444
+ </table>
445
+
446
+ <input type="button" id="base_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
447
+ </fieldset>
448
+
449
+ <fieldset id="link_element">
450
+ <legend>{$lang_fullpage_link_element}</legend>
451
+
452
+ <div class="tabs">
453
+ <ul>
454
+ <li id="link_general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('link_general_tab','link_general_panel');" onmousedown="return false;">{$lang_fullpage_general_props}</a></span></li>
455
+ <li id="link_advanced_tab"><span><a href="javascript:mcTabs.displayTab('link_advanced_tab','link_advanced_panel');" onmousedown="return false;">{$lang_fullpage_advanced_props}</a></span></li>
456
+ </ul>
457
+ </div>
458
+
459
+ <br style="clear: both" />
460
+
461
+ <div class="panel_wrapper">
462
+ <div id="link_general_panel" class="panel current">
463
+ <table border="0" cellpadding="4" cellspacing="0">
464
+ <tr>
465
+ <td class="column1"><label for="element_link_href">{$lang_fullpage_href}</label></td>
466
+ <td><table border="0" cellpadding="0" cellspacing="0">
467
+ <tr>
468
+ <td><input id="element_link_href" name="element_link_href" type="text" value="" /></td>
469
+ <td id="link_href_pickcontainer">&nbsp;</td>
470
+ </tr>
471
+ </table></td>
472
+ </tr>
473
+ <tr>
474
+ <td class="column1"><label for="element_link_title">{$lang_fullpage_meta_title}</label></td>
475
+ <td><input id="element_link_title" name="element_link_title" type="text" value="" /></td>
476
+ </tr>
477
+ <tr>
478
+ <td class="column1"><label for="element_link_type">{$lang_fullpage_type}</label></td>
479
+ <td><select id="element_link_type" name="element_link_type">
480
+ <option value="text/css">text/css</option>
481
+ <option value="text/javascript">text/javascript</option>
482
+ </select></td>
483
+ </tr>
484
+ <tr>
485
+ <td class="column1"><label for="element_link_media">{$lang_fullpage_media}</label></td>
486
+ <td><select id="element_link_media" name="element_link_media"></select></td>
487
+ </tr>
488
+ <tr>
489
+ <td><label for="element_style_rel">{$lang_fullpage_rel}</label></td>
490
+ <td><select id="element_style_rel" name="element_style_rel">
491
+ <option value="">{$lang_not_set}</option>
492
+ <option value="stylesheet">Stylesheet</option>
493
+ <option value="alternate">Alternate</option>
494
+ <option value="designates">Designates</option>
495
+ <option value="start">Start</option>
496
+ <option value="next">Next</option>
497
+ <option value="prev">Prev</option>
498
+ <option value="contents">Contents</option>
499
+ <option value="index">Index</option>
500
+ <option value="glossary">Glossary</option>
501
+ <option value="copyright">Copyright</option>
502
+ <option value="chapter">Chapter</option>
503
+ <option value="subsection">Subsection</option>
504
+ <option value="appendix">Appendix</option>
505
+ <option value="help">Help</option>
506
+ <option value="bookmark">Bookmark</option>
507
+ </select>
508
+ </td>
509
+ </tr>
510
+ </table>
511
+ </div>
512
+
513
+ <div id="link_advanced_panel" class="panel">
514
+ <table border="0" cellpadding="4" cellspacing="0">
515
+ <tr>
516
+ <td class="column1"><label for="element_link_charset">{$lang_fullpage_charset}</label></td>
517
+ <td><select id="element_link_charset"><option value="">{$lang_not_set}</option></select></td>
518
+ </tr>
519
+ <tr>
520
+ <td class="column1"><label for="element_link_hreflang">{$lang_fullpage_hreflang}</label></td>
521
+ <td><input id="element_link_hreflang" name="element_link_hreflang" type="text" value="" /></td>
522
+ </tr>
523
+ <tr>
524
+ <td class="column1"><label for="element_link_target">{$lang_fullpage_target}</label></td>
525
+ <td><input id="element_link_target" name="element_link_target" type="text" value="" /></td>
526
+ </tr>
527
+ <tr>
528
+ <td><label for="element_style_rev">{$lang_fullpage_rev}</label></td>
529
+ <td><select id="element_style_rev" name="element_style_rev">
530
+ <option value="">{$lang_not_set}</option>
531
+ <option value="alternate">Alternate</option>
532
+ <option value="designates">Designates</option>
533
+ <option value="stylesheet">Stylesheet</option>
534
+ <option value="start">Start</option>
535
+ <option value="next">Next</option>
536
+ <option value="prev">Prev</option>
537
+ <option value="contents">Contents</option>
538
+ <option value="index">Index</option>
539
+ <option value="glossary">Glossary</option>
540
+ <option value="copyright">Copyright</option>
541
+ <option value="chapter">Chapter</option>
542
+ <option value="subsection">Subsection</option>
543
+ <option value="appendix">Appendix</option>
544
+ <option value="help">Help</option>
545
+ <option value="bookmark">Bookmark</option>
546
+ </select>
547
+ </td>
548
+ </tr>
549
+ </table>
550
+ </div>
551
+ </div>
552
+
553
+ <input type="button" id="link_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
554
+ </fieldset>
555
+
556
+ <fieldset id="comment_element">
557
+ <legend>{$lang_fullpage_comment_element}</legend>
558
+
559
+ <textarea id="element_comment_value"></textarea>
560
+
561
+ <input type="button" id="comment_updateelement" class="updateElementButton" name="update" value="{$lang_update}" onclick="updateElement();" />
562
+ </fieldset>
563
+ </div>
564
+ </div>
565
+
566
+ <div class="mceActionPanel">
567
+ <div style="float: left">
568
+ <input type="button" id="insert" name="update" value="{$lang_update}" onclick="updateAction();" />
569
+ </div>
570
+
571
+ <div style="float: right">
572
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
573
+ </div>
574
+ </div>
575
+ </form>
576
+ </body>
577
+ </html>
js/tiny_mce/plugins/fullpage/images/add.gif ADDED
Binary file
js/tiny_mce/plugins/fullpage/images/fullpage.gif ADDED
Binary file
js/tiny_mce/plugins/fullpage/images/move_down.gif ADDED
Binary file
js/tiny_mce/plugins/fullpage/images/move_up.gif ADDED
Binary file
js/tiny_mce/plugins/fullpage/images/remove.gif ADDED
Binary file
js/tiny_mce/plugins/fullpage/jscripts/fullpage.js ADDED
@@ -0,0 +1,580 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+
3
+ var defaultDocTypes =
4
+ 'XHTML 1.0 Transitional=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">,' +
5
+ 'XHTML 1.0 Frameset=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">,' +
6
+ 'XHTML 1.0 Strict=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">,' +
7
+ 'XHTML 1.1=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">,' +
8
+ 'HTML 4.01 Transitional=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">,' +
9
+ 'HTML 4.01 Strict=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">,' +
10
+ 'HTML 4.01 Frameset=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';
11
+
12
+ var defaultEncodings =
13
+ 'Western european (iso-8859-1)=iso-8859-1,' +
14
+ 'Central European (iso-8859-2)=iso-8859-2,' +
15
+ 'Unicode (UTF-8)=utf-8,' +
16
+ 'Chinese traditional (Big5)=big5,' +
17
+ 'Cyrillic (iso-8859-5)=iso-8859-5,' +
18
+ 'Japanese (iso-2022-jp)=iso-2022-jp,' +
19
+ 'Greek (iso-8859-7)=iso-8859-7,' +
20
+ 'Korean (iso-2022-kr)=iso-2022-kr,' +
21
+ 'ASCII (us-ascii)=us-ascii';
22
+
23
+ var defaultMediaTypes =
24
+ 'all=all,' +
25
+ 'screen=screen,' +
26
+ 'print=print,' +
27
+ 'tty=tty,' +
28
+ 'tv=tv,' +
29
+ 'projection=projection,' +
30
+ 'handheld=handheld,' +
31
+ 'braille=braille,' +
32
+ 'aural=aural';
33
+
34
+ var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
35
+ var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px';
36
+
37
+ var addMenuLayer = new MCLayer("addmenu");
38
+ var lastElementType = null;
39
+ var topDoc;
40
+
41
+ function init() {
42
+ var f = document.forms['fullpage'];
43
+ var i, p, doctypes, encodings, mediaTypes, fonts;
44
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
45
+
46
+ // Setup doctype select box
47
+ doctypes = tinyMCE.getParam("fullpage_doctypes", defaultDocTypes).split(',');
48
+ for (i=0; i<doctypes.length; i++) {
49
+ p = doctypes[i].split('=');
50
+
51
+ if (p.length > 1)
52
+ addSelectValue(f, 'doctypes', p[0], p[1]);
53
+ }
54
+
55
+ // Setup fonts select box
56
+ fonts = tinyMCE.getParam("fullpage_fonts", defaultFontNames).split(';');
57
+ for (i=0; i<fonts.length; i++) {
58
+ p = fonts[i].split('=');
59
+
60
+ if (p.length > 1)
61
+ addSelectValue(f, 'fontface', p[0], p[1]);
62
+ }
63
+
64
+ // Setup fontsize select box
65
+ fonts = tinyMCE.getParam("fullpage_fontsizes", defaultFontSizes).split(',');
66
+ for (i=0; i<fonts.length; i++)
67
+ addSelectValue(f, 'fontsize', fonts[i], fonts[i]);
68
+
69
+ // Setup mediatype select boxs
70
+ mediaTypes = tinyMCE.getParam("fullpage_media_types", defaultMediaTypes).split(',');
71
+ for (i=0; i<mediaTypes.length; i++) {
72
+ p = mediaTypes[i].split('=');
73
+
74
+ if (p.length > 1) {
75
+ addSelectValue(f, 'element_style_media', p[0], p[1]);
76
+ addSelectValue(f, 'element_link_media', p[0], p[1]);
77
+ }
78
+ }
79
+
80
+ // Setup encodings select box
81
+ encodings = tinyMCE.getParam("fullpage_encodings", defaultEncodings).split(',');
82
+ for (i=0; i<encodings.length; i++) {
83
+ p = encodings[i].split('=');
84
+
85
+ if (p.length > 1) {
86
+ addSelectValue(f, 'docencoding', p[0], p[1]);
87
+ addSelectValue(f, 'element_script_charset', p[0], p[1]);
88
+ addSelectValue(f, 'element_link_charset', p[0], p[1]);
89
+ }
90
+ }
91
+
92
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
93
+ document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color');
94
+ //document.getElementById('hover_color_pickcontainer').innerHTML = getColorPickerHTML('hover_color_pick','hover_color');
95
+ document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color');
96
+ document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color');
97
+ document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor');
98
+ document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage');
99
+ document.getElementById('link_href_pickcontainer').innerHTML = getBrowserHTML('link_href_browser','element_link_href','file','fullpage');
100
+ document.getElementById('script_src_pickcontainer').innerHTML = getBrowserHTML('script_src_browser','element_script_src','file','fullpage');
101
+ document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage');
102
+
103
+ // Resize some elements
104
+ if (isVisible('stylesheetbrowser'))
105
+ document.getElementById('stylesheet').style.width = '220px';
106
+
107
+ if (isVisible('link_href_browser'))
108
+ document.getElementById('element_link_href').style.width = '230px';
109
+
110
+ if (isVisible('bgimage_browser'))
111
+ document.getElementById('bgimage').style.width = '210px';
112
+
113
+ // Create iframe
114
+ var iframe = document.createElement('iframe');
115
+
116
+ iframe.id = 'tempFrame';
117
+ iframe.style.display = 'none';
118
+ iframe.src = tinyMCE.baseURL + "/plugins/fullpage/blank.htm";
119
+
120
+ document.body.appendChild(iframe);
121
+
122
+ tinyMCEPopup.resizeToInnerSize();
123
+ }
124
+
125
+ function setupIframe(doc) {
126
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
127
+ var hc = inst.fullpageTopContent;
128
+ var f = document.forms[0];
129
+ var xmlVer, xmlEnc, docType;
130
+ var nodes, i, x, name, value, tmp, l;
131
+
132
+ // Keep it from not loading/executing stuff
133
+ hc = hc.replace(/<script>/gi, '<script type="text/javascript">');
134
+ hc = hc.replace(/\ssrc=/gi, " mce_src=");
135
+ hc = hc.replace(/\shref=/gi, " mce_href=");
136
+ hc = hc.replace(/\stype=/gi, " mce_type=");
137
+ hc = hc.replace(/<script/gi, '<script type="text/unknown" ');
138
+
139
+ // Add end to make it DOM parseable
140
+ hc += '</body></html>';
141
+
142
+ topDoc = doc;
143
+ doc.open();
144
+ doc.write(hc);
145
+ doc.close();
146
+
147
+ // ------- Setup options for genral tab
148
+
149
+ // Parse xml and doctype
150
+ xmlVer = getReItem(/<\?\s*?xml.*?version\s*?=\s*?"(.*?)".*?\?>/gi, hc, 1);
151
+ xmlEnc = getReItem(/<\?\s*?xml.*?encoding\s*?=\s*?"(.*?)".*?\?>/gi, hc, 1);
152
+ docType = getReItem(/<\!DOCTYPE.*?>/gi, hc, 0);
153
+ f.langcode.value = getReItem(/lang="(.*?)"/gi, hc, 1);
154
+
155
+ // Get title
156
+ f.metatitle.value = tinyMCE.entityDecode(getReItem(/<title>(.*?)<\/title>/gi, hc, 1));
157
+
158
+ // Check for meta encoding
159
+ nodes = doc.getElementsByTagName("meta");
160
+ for (i=0; i<nodes.length; i++) {
161
+ name = tinyMCE.getAttrib(nodes[i], 'name');
162
+ value = tinyMCE.getAttrib(nodes[i], 'content');
163
+ httpEquiv = tinyMCE.getAttrib(nodes[i], 'httpEquiv');
164
+
165
+ switch (name.toLowerCase()) {
166
+ case "keywords":
167
+ f.metakeywords.value = value;
168
+ break;
169
+
170
+ case "description":
171
+ f.metadescription.value = value;
172
+ break;
173
+
174
+ case "author":
175
+ f.metaauthor.value = value;
176
+ break;
177
+
178
+ case "copyright":
179
+ f.metacopyright.value = value;
180
+ break;
181
+
182
+ case "robots":
183
+ selectByValue(f, 'metarobots', value, true, true);
184
+ break;
185
+ }
186
+
187
+ switch (httpEquiv.toLowerCase()) {
188
+ case "content-type":
189
+ tmp = getReItem(/charset\s*=\s*(.*)\s*/gi, value, 1);
190
+
191
+ // Override XML encoding
192
+ if (tmp != "")
193
+ xmlEnc = tmp;
194
+
195
+ break;
196
+ }
197
+ }
198
+
199
+ selectByValue(f, 'doctypes', docType, true, true);
200
+ selectByValue(f, 'docencoding', xmlEnc, true, true);
201
+ selectByValue(f, 'langdir', tinyMCE.getAttrib(doc.body, 'dir'), true, true);
202
+
203
+ if (xmlVer != '')
204
+ f.xml_pi.checked = true;
205
+
206
+ // ------- Setup options for appearance tab
207
+
208
+ // Get primary stylesheet
209
+ nodes = doc.getElementsByTagName("link");
210
+ for (i=0; i<nodes.length; i++) {
211
+ l = nodes[i];
212
+ tmp = tinyMCE.getAttrib(l, 'media');
213
+
214
+ if (tinyMCE.getAttrib(l, 'mce_type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCE.getAttrib(l, 'rel') == "stylesheet") {
215
+ f.stylesheet.value = tinyMCE.getAttrib(l, 'mce_href');
216
+ break;
217
+ }
218
+ }
219
+
220
+ // Get from style elements
221
+ nodes = doc.getElementsByTagName("style");
222
+ for (i=0; i<nodes.length; i++) {
223
+ tmp = parseStyleElement(nodes[i]);
224
+
225
+ for (x=0; x<tmp.length; x++) {
226
+ // if (tmp[x].rule.indexOf('a:hover') != -1 && tmp[x].data['color'])
227
+ // f.hover_color.value = tmp[x].data['color'];
228
+
229
+ if (tmp[x].rule.indexOf('a:visited') != -1 && tmp[x].data['color'])
230
+ f.visited_color.value = tmp[x].data['color'];
231
+
232
+ if (tmp[x].rule.indexOf('a:link') != -1 && tmp[x].data['color'])
233
+ f.link_color.value = tmp[x].data['color'];
234
+
235
+ if (tmp[x].rule.indexOf('a:active') != -1 && tmp[x].data['color'])
236
+ f.active_color.value = tmp[x].data['color'];
237
+ }
238
+ }
239
+
240
+ // Get from body attribs
241
+
242
+ /* f.leftmargin.value = tinyMCE.getAttrib(doc.body, "leftmargin");
243
+ f.rightmargin.value = tinyMCE.getAttrib(doc.body, "rightmargin");
244
+ f.topmargin.value = tinyMCE.getAttrib(doc.body, "topmargin");
245
+ f.bottommargin.value = tinyMCE.getAttrib(doc.body, "bottommargin");*/
246
+ f.textcolor.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "text"));
247
+ f.active_color.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "alink"));
248
+ f.link_color.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "link"));
249
+ f.visited_color.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "vlink"));
250
+ f.bgcolor.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "bgcolor"));
251
+ f.bgimage.value = convertRGBToHex(tinyMCE.getAttrib(doc.body, "background"));
252
+
253
+ // Get from style info
254
+ var style = tinyMCE.parseStyle(tinyMCE.getAttrib(doc.body, 'style'));
255
+
256
+ if (style['font-family'])
257
+ selectByValue(f, 'fontface', style['font-family'], true, true);
258
+ else
259
+ selectByValue(f, 'fontface', tinyMCE.getParam("fullpage_default_fontface", ""), true, true);
260
+
261
+ if (style['font-size'])
262
+ selectByValue(f, 'fontsize', style['font-size'], true, true);
263
+ else
264
+ selectByValue(f, 'fontsize', tinyMCE.getParam("fullpage_default_fontsize", ""), true, true);
265
+
266
+ if (style['color'])
267
+ f.textcolor.value = convertRGBToHex(style['color']);
268
+
269
+ if (style['background-image'])
270
+ f.bgimage.value = style['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
271
+
272
+ if (style['background-color'])
273
+ f.bgcolor.value = convertRGBToHex(style['background-color']);
274
+
275
+ if (style['margin']) {
276
+ tmp = style['margin'].replace(/[^0-9 ]/g, '');
277
+ tmp = tmp.split(/ +/);
278
+ f.topmargin.value = tmp.length > 0 ? tmp[0] : '';
279
+ f.rightmargin.value = tmp.length > 1 ? tmp[1] : tmp[0];
280
+ f.bottommargin.value = tmp.length > 2 ? tmp[2] : tmp[0];
281
+ f.leftmargin.value = tmp.length > 3 ? tmp[3] : tmp[0];
282
+ }
283
+
284
+ if (style['margin-left'])
285
+ f.leftmargin.value = style['margin-left'].replace(/[^0-9]/g, '');
286
+
287
+ if (style['margin-right'])
288
+ f.rightmargin.value = style['margin-right'].replace(/[^0-9]/g, '');
289
+
290
+ if (style['margin-top'])
291
+ f.topmargin.value = style['margin-top'].replace(/[^0-9]/g, '');
292
+
293
+ if (style['margin-bottom'])
294
+ f.bottommargin.value = style['margin-bottom'].replace(/[^0-9]/g, '');
295
+
296
+ f.style.value = tinyMCE.serializeStyle(style);
297
+
298
+ updateColor('textcolor_pick', 'textcolor');
299
+ updateColor('bgcolor_pick', 'bgcolor');
300
+ updateColor('visited_color_pick', 'visited_color');
301
+ updateColor('active_color_pick', 'active_color');
302
+ updateColor('link_color_pick', 'link_color');
303
+ //updateColor('hover_color_pick', 'hover_color');
304
+ }
305
+
306
+ function updateAction() {
307
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
308
+ var f = document.forms[0];
309
+ var nl, i, h, v, s, head, html, l, tmp, addlink = true;
310
+
311
+ head = topDoc.getElementsByTagName('head')[0];
312
+
313
+ // Fix scripts without a type
314
+ nl = topDoc.getElementsByTagName('script');
315
+ for (i=0; i<nl.length; i++) {
316
+ if (tinyMCE.getAttrib(nl[i], 'mce_type') == '')
317
+ nl[i].setAttribute('mce_type', 'text/javascript');
318
+ }
319
+
320
+ // Get primary stylesheet
321
+ nl = topDoc.getElementsByTagName("link");
322
+ for (i=0; i<nl.length; i++) {
323
+ l = nl[i];
324
+
325
+ tmp = tinyMCE.getAttrib(l, 'media');
326
+
327
+ if (tinyMCE.getAttrib(l, 'mce_type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCE.getAttrib(l, 'rel') == "stylesheet") {
328
+ addlink = false;
329
+
330
+ if (f.stylesheet.value == '')
331
+ l.parentNode.removeChild(l);
332
+ else
333
+ l.setAttribute('mce_href', f.stylesheet.value);
334
+
335
+ break;
336
+ }
337
+ }
338
+
339
+ // Add new link
340
+ if (f.stylesheet.value != '') {
341
+ l = topDoc.createElement('link');
342
+
343
+ l.setAttribute('mce_type', 'text/css');
344
+ l.setAttribute('mce_href', f.stylesheet.value);
345
+ l.setAttribute('rel', 'stylesheet');
346
+
347
+ head.appendChild(l);
348
+ }
349
+
350
+ setMeta(head, 'keywords', f.metakeywords.value);
351
+ setMeta(head, 'description', f.metadescription.value);
352
+ setMeta(head, 'author', f.metaauthor.value);
353
+ setMeta(head, 'copyright', f.metacopyright.value);
354
+ setMeta(head, 'robots', getSelectValue(f, 'metarobots'));
355
+ setMeta(head, 'Content-Type', getSelectValue(f, 'docencoding'));
356
+
357
+ topDoc.body.dir = getSelectValue(f, 'langdir');
358
+ topDoc.body.style.cssText = f.style.value;
359
+
360
+ topDoc.body.setAttribute('vLink', f.visited_color.value);
361
+ topDoc.body.setAttribute('link', f.link_color.value);
362
+ topDoc.body.setAttribute('text', f.textcolor.value);
363
+ topDoc.body.setAttribute('aLink', f.active_color.value);
364
+
365
+ topDoc.body.style.fontFamily = getSelectValue(f, 'fontface');
366
+ topDoc.body.style.fontSize = getSelectValue(f, 'fontsize');
367
+ topDoc.body.style.backgroundColor = f.bgcolor.value;
368
+
369
+ if (f.leftmargin.value != '')
370
+ topDoc.body.style.marginLeft = f.leftmargin.value + 'px';
371
+
372
+ if (f.rightmargin.value != '')
373
+ topDoc.body.style.marginRight = f.rightmargin.value + 'px';
374
+
375
+ if (f.bottommargin.value != '')
376
+ topDoc.body.style.marginBottom = f.bottommargin.value + 'px';
377
+
378
+ if (f.topmargin.value != '')
379
+ topDoc.body.style.marginTop = f.topmargin.value + 'px';
380
+
381
+ html = topDoc.getElementsByTagName('html')[0];
382
+ html.setAttribute('lang', f.langcode.value);
383
+ html.setAttribute('xml:lang', f.langcode.value);
384
+
385
+ if (f.bgimage.value != '')
386
+ topDoc.body.style.backgroundImage = "url('" + f.bgimage.value + "')";
387
+ else
388
+ topDoc.body.style.backgroundImage = '';
389
+
390
+ inst.cleanup.addRuleStr('-title,meta[http-equiv|name|content],base[href|target],link[href|rel|type|title|media],style[type],script[type|language|src],html[lang|xml:lang|xmlns],body[style|dir|vlink|link|text|alink],head');
391
+
392
+ h = inst.cleanup.serializeNodeAsHTML(topDoc.documentElement);
393
+
394
+ h = h.substring(0, h.lastIndexOf('</body>'));
395
+
396
+ if (h.indexOf('<title>') == -1)
397
+ h = h.replace(/<head.*?>/, '$&\n' + '<title>' + inst.cleanup.xmlEncode(f.metatitle.value) + '</title>');
398
+ else
399
+ h = h.replace(/<title>(.*?)<\/title>/, '<title>' + inst.cleanup.xmlEncode(f.metatitle.value) + '</title>');
400
+
401
+ if ((v = getSelectValue(f, 'doctypes')) != '')
402
+ h = v + '\n' + h;
403
+
404
+ if (f.xml_pi.checked) {
405
+ s = '<?xml version="1.0"';
406
+
407
+ if ((v = getSelectValue(f, 'docencoding')) != '')
408
+ s += ' encoding="' + v + '"';
409
+
410
+ s += '?>\n';
411
+ h = s + h;
412
+ }
413
+
414
+ inst.fullpageTopContent = h;
415
+
416
+ tinyMCEPopup.execCommand('mceFullPageUpdate', false, '');
417
+ tinyMCEPopup.close();
418
+ }
419
+
420
+ function setMeta(he, k, v) {
421
+ var nl, i, m;
422
+
423
+ nl = he.getElementsByTagName('meta');
424
+ for (i=0; i<nl.length; i++) {
425
+ if (k == 'Content-Type' && tinyMCE.getAttrib(nl[i], 'http-equiv') == k) {
426
+ if (v == '')
427
+ nl[i].parentNode.removeChild(nl[i]);
428
+ else
429
+ nl[i].setAttribute('content', "text/html; charset=" + v);
430
+
431
+ return;
432
+ }
433
+
434
+ if (tinyMCE.getAttrib(nl[i], 'name') == k) {
435
+ if (v == '')
436
+ nl[i].parentNode.removeChild(nl[i]);
437
+ else
438
+ nl[i].setAttribute('content', v);
439
+ return;
440
+ }
441
+ }
442
+
443
+ if (v == '')
444
+ return;
445
+
446
+ m = topDoc.createElement('meta');
447
+
448
+ if (k == 'Content-Type')
449
+ m.httpEquiv = k;
450
+ else
451
+ m.setAttribute('name', k);
452
+
453
+ m.setAttribute('content', v);
454
+ he.appendChild(m);
455
+ }
456
+
457
+ function parseStyleElement(e) {
458
+ var v = e.innerHTML;
459
+ var p, i, r;
460
+
461
+ v = v.replace(/<!--/gi, '');
462
+ v = v.replace(/-->/gi, '');
463
+ v = v.replace(/[\n\r]/gi, '');
464
+ v = v.replace(/\s+/gi, ' ');
465
+
466
+ r = new Array();
467
+ p = v.split(/{|}/);
468
+
469
+ for (i=0; i<p.length; i+=2) {
470
+ if (p[i] != "")
471
+ r[r.length] = {rule : tinyMCE.trim(p[i]), data : tinyMCE.parseStyle(p[i+1])};
472
+ }
473
+
474
+ return r;
475
+ }
476
+
477
+ function serializeStyleElement(d) {
478
+ var i, s, st;
479
+
480
+ s = '<!--\n';
481
+
482
+ for (i=0; i<d.length; i++) {
483
+ s += d[i].rule + ' {\n';
484
+
485
+ st = tinyMCE.serializeStyle(d[i].data);
486
+
487
+ if (st != '')
488
+ st += ';';
489
+
490
+ s += st.replace(/;/g, ';\n');
491
+ s += '}\n';
492
+
493
+ if (i != d.length - 1)
494
+ s += '\n';
495
+ }
496
+
497
+ s += '\n-->';
498
+
499
+ return s;
500
+ }
501
+
502
+ function getReItem(r, s, i) {
503
+ var c = r.exec(s);
504
+
505
+ if (c && c.length > i)
506
+ return c[i];
507
+
508
+ return '';
509
+ }
510
+
511
+ function changedStyleField(field) {
512
+ //alert(field.id);
513
+ }
514
+
515
+ function showAddMenu() {
516
+ var re = document.getElementById('addbutton');
517
+
518
+ addMenuLayer.moveRelativeTo(re, 'tr');
519
+ if (addMenuLayer.isMSIE)
520
+ addMenuLayer.moveBy(2, 0);
521
+
522
+ addMenuLayer.show();
523
+ addMenuLayer.setAutoHide(true, hideAddMenu);
524
+ addMenuLayer.addCSSClass(re, 'selected');
525
+ }
526
+
527
+ function hideAddMenu(l, e, mx, my) {
528
+ var re = document.getElementById('addbutton');
529
+ addMenuLayer.removeCSSClass(re, 'selected');
530
+ }
531
+
532
+ function addHeadElm(type) {
533
+ var le = document.getElementById('headlist');
534
+ var re = document.getElementById('addbutton');
535
+ var te = document.getElementById(type + '_element');
536
+
537
+ if (lastElementType)
538
+ lastElementType.style.display = 'none';
539
+
540
+ te.style.display = 'block';
541
+
542
+ lastElementType = te;
543
+
544
+ addMenuLayer.hide();
545
+ addMenuLayer.removeCSSClass(re, 'selected');
546
+
547
+ document.getElementById(type + '_updateelement').value = tinyMCE.getLang('lang_insert', 'Insert', true);
548
+
549
+ le.size = 10;
550
+ }
551
+
552
+ function updateHeadElm(item) {
553
+ var type = item.substring(0, item.indexOf('_'));
554
+ var le = document.getElementById('headlist');
555
+ var re = document.getElementById('addbutton');
556
+ var te = document.getElementById(type + '_element');
557
+
558
+ if (lastElementType)
559
+ lastElementType.style.display = 'none';
560
+
561
+ te.style.display = 'block';
562
+
563
+ lastElementType = te;
564
+
565
+ addMenuLayer.hide();
566
+ addMenuLayer.removeCSSClass(re, 'selected');
567
+
568
+ document.getElementById(type + '_updateelement').value = tinyMCE.getLang('lang_update', 'Update', true);
569
+
570
+ le.size = 10;
571
+ }
572
+
573
+ function cancelElementUpdate() {
574
+ var le = document.getElementById('headlist');
575
+
576
+ if (lastElementType)
577
+ lastElementType.style.display = 'none';
578
+
579
+ le.size = 26;
580
+ }
js/tiny_mce/plugins/fullpage/langs/en.js ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('fullpage',{
4
+ title : 'Document properties',
5
+ desc : 'Document properties',
6
+ meta_tab : 'General',
7
+ appearance_tab : 'Appearance',
8
+ advanced_tab : 'Advanced',
9
+ meta_props : 'Meta information',
10
+ langprops : 'Language and encoding',
11
+ meta_title : 'Title',
12
+ meta_keywords : 'Keywords',
13
+ meta_description : 'Description',
14
+ meta_robots : 'Robots',
15
+ doctypes : 'Doctype',
16
+ langcode : 'Language code',
17
+ langdir : 'Language direction',
18
+ ltr : 'Left to right',
19
+ rtl : 'Right to left',
20
+ xml_pi : 'XML declaration',
21
+ encoding : 'Character encoding',
22
+ appearance_bgprops : 'Background properties',
23
+ appearance_marginprops : 'Body margins',
24
+ appearance_linkprops : 'Link colors',
25
+ appearance_textprops : 'Text properties',
26
+ bgcolor : 'Background color',
27
+ bgimage : 'Background image',
28
+ left_margin : 'Left margin',
29
+ right_margin : 'Right margin',
30
+ top_margin : 'Top margin',
31
+ bottom_margin : 'Bottom margin',
32
+ text_color : 'Text color',
33
+ font_size : 'Font size',
34
+ font_face : 'Font face',
35
+ link_color : 'Link color',
36
+ hover_color : 'Hover color',
37
+ visited_color : 'Visited color',
38
+ active_color : 'Active color',
39
+ textcolor : 'Color',
40
+ fontsize : 'Font size',
41
+ fontface : 'Font family',
42
+ meta_index_follow : 'Index and follow the links',
43
+ meta_index_nofollow : 'Index and don\'t follow the links',
44
+ meta_noindex_follow : 'Do not index but follow the links',
45
+ meta_noindex_nofollow : 'Do not index and don\'t follow the links',
46
+ appearance_style : 'Stylesheet and style properties',
47
+ stylesheet : 'Stylesheet',
48
+ style : 'Style',
49
+ author : 'Author',
50
+ copyright : 'Copyright',
51
+ add : 'Add new element',
52
+ remove : 'Remove selected element',
53
+ moveup : 'Move selected element up',
54
+ movedown : 'Move selected element down',
55
+ head_elements : 'Head elements',
56
+ info : 'Information',
57
+ info_text : '',
58
+ add_title : 'Title element',
59
+ add_meta : 'Meta element',
60
+ add_script : 'Script element',
61
+ add_style : 'Style element',
62
+ add_link : 'Link element',
63
+ add_base : 'Base element',
64
+ add_comment : 'Comment node',
65
+ title_element : 'Title element',
66
+ script_element : 'Script element',
67
+ style_element : 'Style element',
68
+ base_element : 'Base element',
69
+ link_element : 'Link element',
70
+ meta_element : 'Meta element',
71
+ comment_element : 'Comment',
72
+ src : 'Src',
73
+ language : 'Language',
74
+ href : 'Href',
75
+ target : 'Target',
76
+ rel : 'Rel',
77
+ type : 'Type',
78
+ charset : 'Charset',
79
+ defer : 'Defer',
80
+ media : 'Media',
81
+ properties : 'Properties',
82
+ name : 'Name',
83
+ value : 'Value',
84
+ content : 'Content',
85
+ rel : 'Rel',
86
+ rev : 'Rev',
87
+ hreflang : 'Href lang',
88
+ general_props : 'General',
89
+ advanced_props : 'Advanced',
90
+ delta_width : 0,
91
+ delta_height : 0
92
+ });
js/tiny_mce/plugins/fullscreen/css/page.css ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* This class restores all CSS properties to that absolute positioning of fullscreen mode is correct */
2
+ .mceFullscreenPos {
3
+ display: block !important;
4
+ position: static !important;
5
+ left: 0 !important;
6
+ top: 0 !important;
7
+ bottom: auto !important;
8
+ right: auto !important;
9
+ width: auto !important;
10
+ height: auto !important;
11
+ margin: 0 !important;
12
+ padding: 0 !important;
13
+ border: 0 !important;
14
+ overflow: visible;
15
+ z-index: 1 !important;
16
+ clear: both;
17
+ }
18
+
19
+ body.mceFullscreen {
20
+ overflow: hidden !important;
21
+ }
js/tiny_mce/plugins/fullscreen/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('fullscreen');var TinyMCE_FullScreenPlugin={getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(!tinyMCE.settings['fullscreen_skip_plugin_css'])tinyMCE.importCSS(inst.getContainerWin().document,tinyMCE.baseURL+"/plugins/fullscreen/css/page.css")},getControlHTML:function(cn){switch(cn){case"fullscreen":return tinyMCE.getButtonHTML(cn,'lang_fullscreen_desc','{$pluginurl}/images/fullscreen.gif','mceFullScreen')}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst;switch(command){case"mceFullScreen":inst=tinyMCE.getInstanceById(editor_id);if(tinyMCE.getParam('fullscreen_new_window'))this._toggleFullscreenWin(inst);else this._toggleFullscreen(inst);return true}return false},_toggleFullscreenWin:function(inst){if(tinyMCE.getParam('fullscreen_is_enabled')){window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'),'mceSetContent',false,tinyMCE.getContent(inst.editorId));top.close()}else{tinyMCE.setWindowArg('editor_id',inst.editorId);var win=window.open(tinyMCE.baseURL+"/plugins/fullscreen/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight)}catch(e){}}},_toggleFullscreen:function(inst){var ds=inst.getData('fullscreen'),editorContainer,tableElm,iframe,vp,cw,cd,re,w,h,si,blo,delta=0,cell,row,fcml,bcml;cw=inst.getContainerWin();cd=cw.document;editorContainer=cd.getElementById(inst.editorId+'_parent');tableElm=editorContainer.firstChild;iframe=inst.iframeElement;re=cd.getElementById(inst.editorId+'_resize');blo=document.getElementById('mce_fullscreen_blocker');fcm=new TinyMCE_Layer(inst.editorId+'_fcMenu');fcml=new TinyMCE_Layer(inst.editorId+'_fcMenu');bcml=new TinyMCE_Layer(inst.editorId+'_bcMenu');if(fcml.exists()&&fcml.isVisible()){tinyMCE.switchClass(inst.editorId+'_forecolor','mceMenuButton');fcml.hide()}if(bcml.exists()&&bcml.isVisible()){tinyMCE.switchClass(inst.editorId+'_backcolor','mceMenuButton');bcml.hide()}if(!ds.enabled){if(inst.toolbarElement){delta+=inst.toolbarElement.offsetHeight;cell=tableElm.tBodies[0].insertRow(0).insertCell(-1);cell.className='mceToolbarTop';cell.nowrap=true;ds.oldToolbarParent=inst.toolbarElement.parentNode;ds.toolbarHolder=document.createTextNode('...');cell.appendChild(ds.oldToolbarParent.replaceChild(ds.toolbarHolder,inst.toolbarElement))}ds.parents=[];vp=tinyMCE.getViewPort(cw);ds.scrollX=vp.left;ds.scrollY=vp.top;if(!tinyMCE.isOpera)tinyMCE.addCSSClass(cd.body,'mceFullscreen');tinyMCE.getParentNode(tableElm.parentNode,function(n){if(n.nodeName=='BODY')return true;if(n.nodeType==1)tinyMCE.addCSSClass(n,'mceFullscreenPos');return false});if(re)re.style.display='none';vp=tinyMCE.getViewPort(cw);ds.oldWidth=iframe.style.width?iframe.style.width:iframe.offsetWidth;ds.oldHeight=iframe.style.height?iframe.style.height:iframe.offsetHeight;ds.oldTWidth=tableElm.style.width?tableElm.style.width:tableElm.offsetWidth;ds.oldTHeight=tableElm.style.height?tableElm.style.height:tableElm.offsetHeight;if(ds.oldWidth&&ds.oldWidth.indexOf)ds.oldTWidth=ds.oldWidth.indexOf('%')!=-1?ds.oldWidth:ds.oldTWidth;if(!blo&&tinyMCE.isRealIE){blo=tinyMCE.createTag(document,'iframe',{id:'mce_fullscreen_blocker',src:'about:blank',frameBorder:0,width:vp.width,height:vp.height,style:'display: block; position: absolute; left: 0; top: 0; z-index: 999; margin: 0; padding: 0;'});document.body.appendChild(blo)}tableElm.style.position='absolute';tableElm.style.zIndex=1000;tableElm.style.left=tableElm.style.top='0';tableElm.style.width=vp.width+'px';tableElm.style.height=vp.height+'px';if(tinyMCE.isRealIE){iframe.style.width=vp.width+'px';iframe.style.height=vp.height+'px';w=iframe.parentNode.clientWidth-(tableElm.offsetWidth-vp.width);h=iframe.parentNode.clientHeight-(tableElm.offsetHeight-vp.height)}else{w=iframe.parentNode.clientWidth;h=iframe.parentNode.clientHeight}iframe.style.width=w+"px";iframe.style.height=(h+delta)+"px";tinyMCE.switchClass(inst.editorId+'_fullscreen','mceButtonSelected');ds.enabled=true;inst.useCSS=false}else{if(inst.toolbarElement){row=inst.toolbarElement.parentNode.parentNode;row.parentNode.removeChild(row);ds.oldToolbarParent.replaceChild(inst.toolbarElement,ds.toolbarHolder);ds.oldToolbarParent=null;ds.toolbarHolder=null}if(blo)blo.parentNode.removeChild(blo);si=0;tinyMCE.getParentNode(tableElm.parentNode,function(n){if(n.nodeName=='BODY')return true;if(n.nodeType==1)tinyMCE.removeCSSClass(n,'mceFullscreenPos')});if(re&&tinyMCE.getParam("theme_advanced_resizing",false))re.style.display='block';tableElm.style.position='static';tableElm.style.zIndex='';tableElm.style.width='';tableElm.style.height='';tableElm.style.width=ds.oldTWidth?ds.oldTWidth:'';tableElm.style.height=ds.oldTHeight?ds.oldTHeight:'';iframe.style.width=ds.oldWidth?ds.oldWidth:'';iframe.style.height=ds.oldHeight?ds.oldHeight:'';tinyMCE.switchClass(inst.editorId+'_fullscreen','mceButtonNormal');ds.enabled=false;tinyMCE.removeCSSClass(cd.body,'mceFullscreen');cw.scrollTo(ds.scrollX,ds.scrollY);inst.useCSS=false}},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(tinyMCE.getParam('fullscreen_is_enabled'))tinyMCE.switchClass(editor_id+'_fullscreen','mceButtonSelected');return true}};tinyMCE.addPlugin("fullscreen",TinyMCE_FullScreenPlugin);
js/tiny_mce/plugins/fullscreen/editor_plugin_src.js ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('fullscreen');
10
+
11
+ var TinyMCE_FullScreenPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Fullscreen',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ if (!tinyMCE.settings['fullscreen_skip_plugin_css'])
24
+ tinyMCE.importCSS(inst.getContainerWin().document, tinyMCE.baseURL + "/plugins/fullscreen/css/page.css");
25
+ },
26
+
27
+ getControlHTML : function(cn) {
28
+ switch (cn) {
29
+ case "fullscreen":
30
+ return tinyMCE.getButtonHTML(cn, 'lang_fullscreen_desc', '{$pluginurl}/images/fullscreen.gif', 'mceFullScreen');
31
+ }
32
+
33
+ return "";
34
+ },
35
+
36
+ execCommand : function(editor_id, element, command, user_interface, value) {
37
+ var inst;
38
+
39
+ // Handle commands
40
+ switch (command) {
41
+ case "mceFullScreen":
42
+ inst = tinyMCE.getInstanceById(editor_id);
43
+
44
+ if (tinyMCE.getParam('fullscreen_new_window'))
45
+ this._toggleFullscreenWin(inst);
46
+ else
47
+ this._toggleFullscreen(inst);
48
+
49
+ return true;
50
+ }
51
+
52
+ // Pass to next handler in chain
53
+ return false;
54
+ },
55
+
56
+ _toggleFullscreenWin : function(inst) {
57
+ if (tinyMCE.getParam('fullscreen_is_enabled')) {
58
+ // In fullscreen mode
59
+ window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(inst.editorId));
60
+ top.close();
61
+ } else {
62
+ tinyMCE.setWindowArg('editor_id', inst.editorId);
63
+
64
+ var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
65
+ try { win.resizeTo(screen.availWidth, screen.availHeight); } catch (e) {}
66
+ }
67
+ },
68
+
69
+ _toggleFullscreen : function(inst) {
70
+ var ds = inst.getData('fullscreen'), editorContainer, tableElm, iframe, vp, cw, cd, re, w, h, si, blo, delta = 0, cell, row, fcml, bcml;
71
+
72
+ cw = inst.getContainerWin();
73
+ cd = cw.document;
74
+ editorContainer = cd.getElementById(inst.editorId + '_parent');
75
+ tableElm = editorContainer.firstChild;
76
+ iframe = inst.iframeElement;
77
+ re = cd.getElementById(inst.editorId + '_resize');
78
+ blo = document.getElementById('mce_fullscreen_blocker');
79
+ fcm = new TinyMCE_Layer(inst.editorId + '_fcMenu');
80
+ fcml = new TinyMCE_Layer(inst.editorId + '_fcMenu');
81
+ bcml = new TinyMCE_Layer(inst.editorId + '_bcMenu');
82
+
83
+ if (fcml.exists() && fcml.isVisible()) {
84
+ tinyMCE.switchClass(inst.editorId + '_forecolor', 'mceMenuButton');
85
+ fcml.hide();
86
+ }
87
+
88
+ if (bcml.exists() && bcml.isVisible()) {
89
+ tinyMCE.switchClass(inst.editorId + '_backcolor', 'mceMenuButton');
90
+ bcml.hide();
91
+ }
92
+
93
+ if (!ds.enabled) {
94
+ // Handle External Toolbar
95
+ if (inst.toolbarElement) {
96
+ delta += inst.toolbarElement.offsetHeight;
97
+
98
+ cell = tableElm.tBodies[0].insertRow(0).insertCell(-1);
99
+ cell.className = 'mceToolbarTop';
100
+ cell.nowrap = true;
101
+
102
+ ds.oldToolbarParent = inst.toolbarElement.parentNode;
103
+ ds.toolbarHolder = document.createTextNode('...');
104
+
105
+ cell.appendChild(ds.oldToolbarParent.replaceChild(ds.toolbarHolder, inst.toolbarElement));
106
+ }
107
+
108
+ ds.parents = [];
109
+
110
+ vp = tinyMCE.getViewPort(cw);
111
+ ds.scrollX = vp.left;
112
+ ds.scrollY = vp.top;
113
+
114
+ // Opera has a bug restoring scrollbars
115
+ if (!tinyMCE.isOpera)
116
+ tinyMCE.addCSSClass(cd.body, 'mceFullscreen');
117
+
118
+ tinyMCE.getParentNode(tableElm.parentNode, function (n) {
119
+ if (n.nodeName == 'BODY')
120
+ return true;
121
+
122
+ if (n.nodeType == 1)
123
+ tinyMCE.addCSSClass(n, 'mceFullscreenPos');
124
+
125
+ return false;
126
+ });
127
+
128
+ if (re)
129
+ re.style.display = 'none';
130
+
131
+ vp = tinyMCE.getViewPort(cw);
132
+
133
+ ds.oldWidth = iframe.style.width ? iframe.style.width : iframe.offsetWidth;
134
+ ds.oldHeight = iframe.style.height ? iframe.style.height : iframe.offsetHeight;
135
+ ds.oldTWidth = tableElm.style.width ? tableElm.style.width : tableElm.offsetWidth;
136
+ ds.oldTHeight = tableElm.style.height ? tableElm.style.height : tableElm.offsetHeight;
137
+
138
+ // Handle % width
139
+ if (ds.oldWidth && ds.oldWidth.indexOf)
140
+ ds.oldTWidth = ds.oldWidth.indexOf('%') != -1 ? ds.oldWidth : ds.oldTWidth;
141
+
142
+ if (!blo && tinyMCE.isRealIE) {
143
+ blo = tinyMCE.createTag(document, 'iframe', {id : 'mce_fullscreen_blocker', src : 'about:blank', frameBorder : 0, width : vp.width, height : vp.height, style : 'display: block; position: absolute; left: 0; top: 0; z-index: 999; margin: 0; padding: 0;'});
144
+ document.body.appendChild(blo);
145
+ }
146
+
147
+ tableElm.style.position = 'absolute';
148
+ tableElm.style.zIndex = 1000;
149
+ tableElm.style.left = tableElm.style.top = '0';
150
+
151
+ tableElm.style.width = vp.width + 'px';
152
+ tableElm.style.height = vp.height + 'px';
153
+
154
+ if (tinyMCE.isRealIE) {
155
+ iframe.style.width = vp.width + 'px';
156
+ iframe.style.height = vp.height + 'px';
157
+
158
+ // Calc new width/height based on overflow
159
+ w = iframe.parentNode.clientWidth - (tableElm.offsetWidth - vp.width);
160
+ h = iframe.parentNode.clientHeight - (tableElm.offsetHeight - vp.height);
161
+ } else {
162
+ w = iframe.parentNode.clientWidth;
163
+ h = iframe.parentNode.clientHeight;
164
+ }
165
+
166
+ iframe.style.width = w + "px";
167
+ iframe.style.height = (h+delta) + "px";
168
+
169
+ tinyMCE.switchClass(inst.editorId + '_fullscreen', 'mceButtonSelected');
170
+ ds.enabled = true;
171
+
172
+ inst.useCSS = false;
173
+ } else {
174
+ // Handle External Toolbar
175
+ if (inst.toolbarElement) {
176
+ row = inst.toolbarElement.parentNode.parentNode;
177
+
178
+ row.parentNode.removeChild(row);
179
+
180
+ ds.oldToolbarParent.replaceChild(inst.toolbarElement, ds.toolbarHolder);
181
+
182
+ ds.oldToolbarParent = null;
183
+ ds.toolbarHolder = null;
184
+ }
185
+
186
+ if (blo)
187
+ blo.parentNode.removeChild(blo);
188
+
189
+ si = 0;
190
+ tinyMCE.getParentNode(tableElm.parentNode, function (n) {
191
+ if (n.nodeName == 'BODY')
192
+ return true;
193
+
194
+ if (n.nodeType == 1)
195
+ tinyMCE.removeCSSClass(n, 'mceFullscreenPos');
196
+ });
197
+
198
+ if (re && tinyMCE.getParam("theme_advanced_resizing", false))
199
+ re.style.display = 'block';
200
+
201
+ tableElm.style.position = 'static';
202
+ tableElm.style.zIndex = '';
203
+ tableElm.style.width = '';
204
+ tableElm.style.height = '';
205
+
206
+ tableElm.style.width = ds.oldTWidth ? ds.oldTWidth : '';
207
+ tableElm.style.height = ds.oldTHeight ? ds.oldTHeight : '';
208
+
209
+ iframe.style.width = ds.oldWidth ? ds.oldWidth : '';
210
+ iframe.style.height = ds.oldHeight ? ds.oldHeight : '';
211
+
212
+ tinyMCE.switchClass(inst.editorId + '_fullscreen', 'mceButtonNormal');
213
+ ds.enabled = false;
214
+
215
+ tinyMCE.removeCSSClass(cd.body, 'mceFullscreen');
216
+ cw.scrollTo(ds.scrollX, ds.scrollY);
217
+
218
+ inst.useCSS = false;
219
+ }
220
+ },
221
+
222
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
223
+ if (tinyMCE.getParam('fullscreen_is_enabled'))
224
+ tinyMCE.switchClass(editor_id + '_fullscreen', 'mceButtonSelected');
225
+
226
+ return true;
227
+ }
228
+ };
229
+
230
+ tinyMCE.addPlugin("fullscreen", TinyMCE_FullScreenPlugin);
js/tiny_mce/plugins/fullscreen/fullscreen.htm ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_fullscreen_title}</title>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5
+ <script language="javascript" type="text/javascript" src="../../tiny_mce.js"></script>
6
+ <script language="javascript" type="text/javascript">
7
+ function patchCallback(settings, key) {
8
+ if (settings[key])
9
+ settings[key] = "window.opener." + settings[key];
10
+ }
11
+
12
+ var settings = new Array();
13
+
14
+ // Clone array
15
+ for (var name in window.opener.tinyMCE.settings)
16
+ settings[name] = window.opener.tinyMCE.settings[name];
17
+
18
+ // Override options for fullscreen
19
+ for (var name in window.opener.tinyMCE.settings.fullscreen_settings)
20
+ settings[name] = window.opener.tinyMCE.settings.fullscreen_settings[name];
21
+
22
+ // Patch callbacks, make them point to window.opener
23
+ patchCallback(settings, 'urlconverter_callback');
24
+ patchCallback(settings, 'insertlink_callback');
25
+ patchCallback(settings, 'insertimage_callback');
26
+ patchCallback(settings, 'setupcontent_callback');
27
+ patchCallback(settings, 'save_callback');
28
+ patchCallback(settings, 'onchange_callback');
29
+ patchCallback(settings, 'init_instance_callback');
30
+ patchCallback(settings, 'file_browser_callback');
31
+ patchCallback(settings, 'cleanup_callback');
32
+ patchCallback(settings, 'execcommand_callback');
33
+ patchCallback(settings, 'oninit');
34
+
35
+ // Set options
36
+ settings['mode'] = 'exact';
37
+ settings['elements'] = 'fullscreenarea';
38
+ settings['ask'] = false;
39
+ settings['setupcontent_callback'] = 'setupContent';
40
+ settings['fullscreen_is_enabled'] = true;
41
+ settings['fullscreen_editor_id'] = window.opener.tinyMCE.getWindowArg("editor_id");
42
+ settings['theme_advanced_resizing'] = false;
43
+
44
+ // Init
45
+ tinyMCE.init(settings);
46
+ tinyMCE.documentBasePath = window.opener.tinyMCE.documentBasePath;
47
+
48
+ function setupContent(editor_id, body, doc) {
49
+ var inst = tinyMCE.getInstanceById(editor_id);
50
+ var content = window.opener.tinyMCE.getContent(tinyMCE.getParam('fullscreen_editor_id'));
51
+
52
+ // Setup title
53
+ var divElm = document.createElement("div");
54
+ divElm.innerHTML = tinyMCELang['lang_fullscreen_title'];
55
+ document.title = divElm.innerHTML;
56
+
57
+ // Get content
58
+ inst.execCommand('mceSetContent', false, content);
59
+ }
60
+
61
+ function unloadHandler(e) {
62
+ moveContent();
63
+ }
64
+
65
+ function moveContent() {
66
+ var doc = tinyMCE.isMSIE ? window.frames['mce_editor_0'].window.document : document.getElementById('mce_editor_0').contentDocument;
67
+ window.opener.tinyMCE.setInnerHTML(window.opener.tinyMCE.selectedInstance.getBody(), doc.body.innerHTML);
68
+ }
69
+
70
+ // Add onunload
71
+ tinyMCE.addEvent(window, "beforeunload", unloadHandler);
72
+
73
+ function doParentSubmit() {
74
+ moveContent();
75
+
76
+ if (window.opener.tinyMCE.selectedInstance.formElement.form)
77
+ window.opener.tinyMCE.selectedInstance.formElement.form.submit();
78
+
79
+ window.close();
80
+
81
+ return false;
82
+ }
83
+ </script>
84
+ <base target="_self" />
85
+ </head>
86
+ <body style="margin: 0; overflow: hidden; height: 100%" scrolling="no" scroll="no">
87
+ <form onsubmit="doParentSubmit();" style="height: 100%">
88
+ <textarea id="fullscreenarea" style="width: 100%; height: 100%"></textarea>
89
+ </form>
90
+ </body>
91
+ </html>
js/tiny_mce/plugins/fullscreen/images/fullscreen.gif ADDED
Binary file
js/tiny_mce/plugins/fullscreen/langs/en.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ fullscreen_desc : 'Toggle fullscreen mode'
5
+ });
js/tiny_mce/plugins/fullscreen/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/iespell/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('iespell');var TinyMCE_IESpellPlugin={getInfo:function(){return{longname:'IESpell (MSIE Only)',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){if(cn=="iespell"&&(tinyMCE.isMSIE&&!tinyMCE.isOpera))return tinyMCE.getButtonHTML(cn,'lang_iespell_desc','{$pluginurl}/images/iespell.gif','mceIESpell');return""},execCommand:function(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement)}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','')}else alert("Error Loading ieSpell: Exception "+e.number)}return true}return false}};tinyMCE.addPlugin("iespell",TinyMCE_IESpellPlugin);
js/tiny_mce/plugins/iespell/editor_plugin_src.js ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('iespell');
10
+
11
+ var TinyMCE_IESpellPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'IESpell (MSIE Only)',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ /**
23
+ * Returns the HTML contents of the iespell control.
24
+ */
25
+ getControlHTML : function(cn) {
26
+ // Is it the iespell control and is the brower MSIE.
27
+ if (cn == "iespell" && (tinyMCE.isMSIE && !tinyMCE.isOpera))
28
+ return tinyMCE.getButtonHTML(cn, 'lang_iespell_desc', '{$pluginurl}/images/iespell.gif', 'mceIESpell');
29
+
30
+ return "";
31
+ },
32
+
33
+ /**
34
+ * Executes the mceIESpell command.
35
+ */
36
+ execCommand : function(editor_id, element, command, user_interface, value) {
37
+ // Handle ieSpellCommand
38
+ if (command == "mceIESpell") {
39
+ try {
40
+ var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension");
41
+ ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);
42
+ } catch (e) {
43
+ if (e.number == -2146827859) {
44
+ if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))
45
+ window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
46
+ } else
47
+ alert("Error Loading ieSpell: Exception " + e.number);
48
+ }
49
+
50
+ return true;
51
+ }
52
+
53
+ // Pass to next handler in chain
54
+ return false;
55
+ }
56
+ };
57
+
58
+ tinyMCE.addPlugin("iespell", TinyMCE_IESpellPlugin);
js/tiny_mce/plugins/iespell/images/iespell.gif ADDED
Binary file
js/tiny_mce/plugins/iespell/langs/en.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ iespell_desc : 'Run spell checking',
5
+ iespell_download : "ieSpell not detected. Click OK to go to download page."
6
+ });
7
+
js/tiny_mce/plugins/iespell/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/inlinepopups/css/inlinepopup.css ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Window classes */
2
+
3
+ .mceWindow {
4
+ position: absolute;
5
+ left: 0;
6
+ top: 0;
7
+ border: 1px solid black;
8
+ background-color: #D4D0C8;
9
+ }
10
+
11
+ .mceWindowHead {
12
+ background-color: #334F8D;
13
+ width: 100%;
14
+ height: 18px;
15
+ cursor: move;
16
+ overflow: hidden;
17
+ }
18
+
19
+ .mceWindowBody {
20
+ clear: both;
21
+ background-color: white;
22
+ }
23
+
24
+ .mceWindowStatusbar {
25
+ background-color: #D4D0C8;
26
+ height: 12px;
27
+ border-top: 1px solid black;
28
+ }
29
+
30
+ .mceWindowTitle {
31
+ float: left;
32
+ font-family: "MS Sans Serif";
33
+ font-size: 9pt;
34
+ font-weight: bold;
35
+ line-height: 18px;
36
+ color: white;
37
+ margin-left: 2px;
38
+ overflow: hidden;
39
+ }
40
+
41
+ .mceWindowHeadTools {
42
+ margin-right: 2px;
43
+ }
44
+
45
+ .mceWindowClose, .mceWindowMinimize, .mceWindowMaximize {
46
+ display: block;
47
+ float: right;
48
+ overflow: hidden;
49
+ margin-top: 2px;
50
+ }
51
+
52
+ .mceWindowClose {
53
+ margin-left: 2px;
54
+ }
55
+
56
+ .mceWindowMinimize {
57
+ }
58
+
59
+ .mceWindowMaximize {
60
+ }
61
+
62
+ .mceWindowResize {
63
+ display: block;
64
+ float: right;
65
+ overflow: hidden;
66
+ cursor: se-resize;
67
+ width: 12px;
68
+ height: 12px;
69
+ }
js/tiny_mce/plugins/inlinepopups/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ var TinyMCE_InlinePopupsPlugin={getInfo:function(){return{longname:'Inline Popups',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}}};tinyMCE.addPlugin("inlinepopups",TinyMCE_InlinePopupsPlugin);TinyMCE_Engine.prototype.orgOpenWindow=TinyMCE_Engine.prototype.openWindow;TinyMCE_Engine.prototype.orgCloseWindow=TinyMCE_Engine.prototype.closeWindow;TinyMCE_Engine.prototype.openWindow=function(template,args){if(args['inline']!="yes"||tinyMCE.isOpera||tinyMCE.getParam("plugins").indexOf('inlinepopups')==-1){mcWindows.selectedWindow=null;args['mce_inside_iframe']=false;this.orgOpenWindow(template,args);return}var url,resizable,scrollbars;args['mce_inside_iframe']=true;tinyMCE.windowArgs=args;if(template['file'].charAt(0)!='/'&&template['file'].indexOf('://')==-1)url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];else url=template['file'];if(!(width=parseInt(template['width'])))width=320;if(!(height=parseInt(template['height'])))height=200;if(!(minWidth=parseInt(template['minWidth'])))minWidth=100;if(!(minHeight=parseInt(template['minHeight'])))minHeight=100;resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";height+=18;for(var name in args){if(typeof(args[name])=='function')continue;url=tinyMCE.replaceVar(url,name,escape(args[name]))}var elm=document.getElementById(this.selectedInstance.editorId+'_parent');if(tinyMCE.hasPlugin('fullscreen')&&this.selectedInstance.getData('fullscreen').enabled)pos={absLeft:0,absTop:0};else pos=tinyMCE.getAbsPosition(elm);pos.absLeft+=Math.round((elm.firstChild.clientWidth/ 2) - (width /2));pos.absTop+=Math.round((elm.firstChild.clientHeight/ 2) - (height /2));mcWindows.open(url,mcWindows.idCounter++,"modal=yes,width="+width+",height="+height+",resizable="+resizable+",scrollbars="+scrollbars+",statusbar="+resizable+",left="+pos.absLeft+",top="+pos.absTop+",minWidth="+minWidth+",minHeight="+minHeight)};TinyMCE_Engine.prototype.closeWindow=function(win){var gotit=false,n,w;for(n in mcWindows.windows){w=mcWindows.windows[n];if(typeof(w)=='function')continue;if(win.name==w.id+'_iframe'){w.close();gotit=true}}if(!gotit)this.orgCloseWindow(win);tinyMCE.selectedInstance.getWin().focus()};TinyMCE_Engine.prototype.setWindowTitle=function(win_ref,title){for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(win_ref.name==win.id+"_iframe")window.frames[win.id+"_iframe"].document.getElementById(win.id+'_title').innerHTML=title}};function TinyMCE_Windows(){this.settings=new Array();this.windows=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.isSafari=navigator.userAgent.indexOf('Safari')!=-1;this.isMac=navigator.userAgent.indexOf('Mac')!=-1;this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.action="none";this.selectedWindow=null;this.lastSelectedWindow=null;this.zindex=1001;this.mouseDownScreenX=0;this.mouseDownScreenY=0;this.mouseDownLayerX=0;this.mouseDownLayerY=0;this.mouseDownWidth=0;this.mouseDownHeight=0;this.idCounter=0};TinyMCE_Windows.prototype.init=function(settings){this.settings=settings;if(this.isMSIE)this.addEvent(document,"mousemove",mcWindows.eventDispatcher);else this.addEvent(window,"mousemove",mcWindows.eventDispatcher);this.addEvent(document,"mouseup",mcWindows.eventDispatcher);this.addEvent(window,"resize",mcWindows.eventDispatcher);this.addEvent(document,"scroll",mcWindows.eventDispatcher);this.doc=document};TinyMCE_Windows.prototype.getBounds=function(){if(!this.bounds){var vp=tinyMCE.getViewPort(window);var top,left,bottom,right,docEl=this.doc.documentElement;top=vp.top;left=vp.left;bottom=vp.height+top-2;right=vp.width+left-22;this.bounds=[left,top,right,bottom]}return this.bounds};TinyMCE_Windows.prototype.clampBoxPosition=function(x,y,w,h,minW,minH){var bounds=this.getBounds();x=Math.max(bounds[0],Math.min(bounds[2],x+w)-w);y=Math.max(bounds[1],Math.min(bounds[3],y+h)-h);return this.clampBoxSize(x,y,w,h,minW,minH)};TinyMCE_Windows.prototype.clampBoxSize=function(x,y,w,h,minW,minH){var bounds=this.getBounds();return[x,y,Math.max(minW,Math.min(bounds[2],x+w)-x),Math.max(minH,Math.min(bounds[3],y+h)-y)]};TinyMCE_Windows.prototype.getParam=function(name,default_value){var value=null;value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");return value};TinyMCE_Windows.prototype.eventDispatcher=function(e){e=typeof(e)=="undefined"?window.event:e;if(mcWindows.selectedWindow==null)return;if(mcWindows.isGecko&&e.type=="mousedown"){var elm=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(win.headElement==elm||win.resizeElement==elm){win.focus();break}}}switch(e.type){case"mousemove":mcWindows.selectedWindow.onMouseMove(e);break;case"mouseup":mcWindows.selectedWindow.onMouseUp(e);break;case"mousedown":mcWindows.selectedWindow.onMouseDown(e);break;case"focus":mcWindows.selectedWindow.onFocus(e);break;case"scroll":case"resize":if(mcWindows.clampUpdateTimeout)clearTimeout(mcWindows.clampUpdateTimeout);mcWindows.clampEventType=e.type;mcWindows.clampUpdateTimeout=setTimeout(function(){mcWindows.updateClamping()},100);break}};TinyMCE_Windows.prototype.updateClamping=function(){var clamp,oversize,etype=mcWindows.clampEventType;this.bounds=null;this.clampUpdateTimeout=null;for(var n in this.windows){win=this.windows[n];if(typeof(win)=='function'||!win.winElement)continue;clamp=mcWindows.clampBoxPosition(win.left,win.top,win.winElement.scrollWidth,win.winElement.scrollHeight,win.features.minWidth,win.features.minHeight);oversize=(clamp[2]!=win.winElement.scrollWidth||clamp[3]!=win.winElement.scrollHeight)?true:false;if(!oversize||win.features.resizable=="yes"||etype!="scroll")win.moveTo(clamp[0],clamp[1]);if(oversize&&win.features.resizable=="yes")win.resizeTo(clamp[2],clamp[3])}};TinyMCE_Windows.prototype.addEvent=function(obj,name,handler){if(this.isMSIE)obj.attachEvent("on"+name,handler);else obj.addEventListener(name,handler,false)};TinyMCE_Windows.prototype.cancelEvent=function(e){if(this.isMSIE){e.returnValue=false;e.cancelBubble=true}else e.preventDefault()};TinyMCE_Windows.prototype.parseFeatures=function(opts){opts=opts.toLowerCase();opts=opts.replace(/;/g,",");opts=opts.replace(/[^0-9a-z=,]/g,"");var optionChunks=opts.split(',');var options=new Array();options['left']="10";options['top']="10";options['width']="300";options['height']="300";options['minwidth']="100";options['minheight']="100";options['resizable']="yes";options['minimizable']="yes";options['maximizable']="yes";options['close']="yes";options['movable']="yes";options['statusbar']="yes";options['scrollbars']="auto";options['modal']="no";if(opts=="")return options;for(var i=0;i<optionChunks.length;i++){var parts=optionChunks[i].split('=');if(parts.length==2)options[parts[0]]=parts[1]}options['left']=parseInt(options['left']);options['top']=parseInt(options['top']);options['width']=parseInt(options['width']);options['height']=parseInt(options['height']);options['minWidth']=parseInt(options['minwidth']);options['minHeight']=parseInt(options['minheight']);return options};TinyMCE_Windows.prototype.open=function(url,name,features){this.lastSelectedWindow=this.selectedWindow;var win=new TinyMCE_Window();var winDiv,html="",id;var imgPath=this.getParam("images_path");features=this.parseFeatures(features);var clamp=mcWindows.clampBoxPosition(features['left'],features['top'],features['width'],features['height'],features['minWidth'],features['minHeight']);features['left']=clamp[0];features['top']=clamp[1];if(features['resizable']=="yes"){features['width']=clamp[2];features['height']=clamp[3]}id="mcWindow_"+name;win.deltaHeight=18;if(features['statusbar']=="yes"){win.deltaHeight+=13;if(this.isMSIE)win.deltaHeight+=1}width=parseInt(features['width']);height=parseInt(features['height'])-win.deltaHeight;if(this.isMSIE)width-=2;win.id=id;win.url=url;win.name=name;win.features=features;this.windows[name]=win;iframeWidth=width;iframeHeight=height;html+='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';html+='<html>';html+='<head>';html+='<title>Wrapper iframe</title>';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';html+='<link href="'+this.getParam("css_file")+'" rel="stylesheet" type="text/css" />';html+='</head>';html+='<body onload="parent.mcWindows.onLoad(\''+name+'\');">';html+='<div id="'+id+'_container" class="mceWindow">';html+='<div id="'+id+'_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';html+=' <div id="'+id+'_title" class="mceWindowTitle"';html+=' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>';html+=' <div class="mceWindowHeadTools">';html+=' <a href="javascript:parent.mcWindows.windows[\''+name+'\'].close();" target="_self" onmousedown="return false;" class="mceWindowClose"><img border="0" src="'+imgPath+'/window_close.gif" /></a>';if(features['resizable']=="yes"&&features['maximizable']=="yes")html+=' <a href="javascript:parent.mcWindows.windows[\''+name+'\'].maximize();" target="_self" onmousedown="return false;" class="mceWindowMaximize"><img border="0" src="'+imgPath+'/window_maximize.gif" /></a>';html+=' </div>';html+='</div><div id="'+id+'_body" class="mceWindowBody" style="width: '+width+'px; height: '+height+'px;">';html+='<iframe id="'+id+'_iframe" name="'+id+'_iframe" frameborder="0" width="'+iframeWidth+'" height="'+iframeHeight+'" src="'+url+'" class="mceWindowBodyIframe" scrolling="'+features['scrollbars']+'"></iframe></div>';if(features['statusbar']=="yes"){html+='<div id="'+id+'_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';if(features['resizable']=="yes"){if(this.isGecko)html+='<div id="'+id+'_resize" class="mceWindowResize"><div style="background-image: url(\''+imgPath+'/window_resize.gif\'); width: 12px; height: 12px;"></div></div>';else html+='<div id="'+id+'_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();" border="0" src="'+imgPath+'/window_resize.gif" /></div>'}html+='</div>'}html+='</div>';html+='</body>';html+='</html>';this.createFloatingIFrame(id,features['left'],features['top'],features['width'],features['height'],html)};TinyMCE_Windows.prototype.setDocumentLock=function(state){var elm=document.getElementById('mcWindowEventBlocker');if(state){if(elm==null){elm=document.createElement("div");elm.id="mcWindowEventBlocker";elm.style.position="absolute";elm.style.left="0";elm.style.top="0";document.body.appendChild(elm)}elm.style.display="none";var imgPath=this.getParam("images_path");var width=document.body.clientWidth;var height=document.body.clientHeight;elm.style.width=width;elm.style.height=height;elm.innerHTML='<img src="'+imgPath+'/spacer.gif" width="'+width+'" height="'+height+'" />';elm.style.zIndex=mcWindows.zindex-1;elm.style.display="block"}else if(elm!=null){if(mcWindows.windows.length==0)elm.parentNode.removeChild(elm);else elm.style.zIndex=mcWindows.zindex-1}};TinyMCE_Windows.prototype.onLoad=function(name){var win=mcWindows.windows[name];var id="mcWindow_"+name;var wrapperIframe=window.frames[id+"_iframe"].frames[0];var wrapperDoc=window.frames[id+"_iframe"].document;var doc=window.frames[id+"_iframe"].document;var winDiv=document.getElementById("mcWindow_"+name+"_div");var realIframe=window.frames[id+"_iframe"].frames[0];win.id="mcWindow_"+name;win.winElement=winDiv;win.bodyElement=doc.getElementById(id+'_body');win.iframeElement=doc.getElementById(id+'_iframe');win.headElement=doc.getElementById(id+'_head');win.titleElement=doc.getElementById(id+'_title');win.resizeElement=doc.getElementById(id+'_resize');win.containerElement=doc.getElementById(id+'_container');win.left=win.features['left'];win.top=win.features['top'];win.frame=window.frames[id+'_iframe'].frames[0];win.wrapperFrame=window.frames[id+'_iframe'];win.wrapperIFrameElement=document.getElementById(id+"_iframe");mcWindows.addEvent(win.headElement,"mousedown",mcWindows.eventDispatcher);if(win.resizeElement!=null)mcWindows.addEvent(win.resizeElement,"mousedown",mcWindows.eventDispatcher);if(mcWindows.isMSIE){mcWindows.addEvent(realIframe.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe.document,"mouseup",mcWindows.eventDispatcher)}else{mcWindows.addEvent(realIframe,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"focus",mcWindows.eventDispatcher)}for(var i=0;i<window.frames.length;i++){if(!window.frames[i]._hasMouseHandlers){if(mcWindows.isMSIE){mcWindows.addEvent(window.frames[i].document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i].document,"mouseup",mcWindows.eventDispatcher)}else{mcWindows.addEvent(window.frames[i],"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i],"mouseup",mcWindows.eventDispatcher)}window.frames[i]._hasMouseHandlers=true}}if(mcWindows.isMSIE){mcWindows.addEvent(win.frame.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame.document,"mouseup",mcWindows.eventDispatcher)}else{mcWindows.addEvent(win.frame,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"focus",mcWindows.eventDispatcher)}var func=this.getParam("on_open_window","");if(func!="")eval(func+"(win);");win.focus();if(win.features['modal']=="yes")mcWindows.setDocumentLock(true)};TinyMCE_Windows.prototype.createFloatingIFrame=function(id_prefix,left,top,width,height,html){var iframe=document.createElement("iframe");var div=document.createElement("div"),doc;width=parseInt(width);height=parseInt(height)+1;div.setAttribute("id",id_prefix+"_div");div.setAttribute("width",width);div.setAttribute("height",(height));div.style.position="absolute";div.style.left=left+"px";div.style.top=top+"px";div.style.width=width+"px";div.style.height=(height)+"px";div.style.backgroundColor="white";div.style.display="none";if(this.isGecko){iframeWidth=width+2;iframeHeight=height+2}else{iframeWidth=width;iframeHeight=height+1}iframe.setAttribute("id",id_prefix+"_iframe");iframe.setAttribute("name",id_prefix+"_iframe");iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",iframeWidth);iframe.setAttribute("height",iframeHeight);iframe.setAttribute("scrolling","no");iframe.style.width=iframeWidth+"px";iframe.style.height=iframeHeight+"px";iframe.style.backgroundColor="white";div.appendChild(iframe);document.body.appendChild(div);div.innerHTML=div.innerHTML;if(this.isSafari){window.setTimeout(function(){var doc=window.frames[id_prefix+'_iframe'].document;doc.open();doc.write(html);doc.close()},10)}else{doc=window.frames[id_prefix+'_iframe'].window.document;doc.open();doc.write(html);doc.close()}div.style.display="block";return div};function TinyMCE_Window(){};TinyMCE_Window.prototype.focus=function(){if(this!=mcWindows.selectedWindow){this.winElement.style.zIndex=++mcWindows.zindex;mcWindows.lastSelectedWindow=mcWindows.selectedWindow;mcWindows.selectedWindow=this}};TinyMCE_Window.prototype.minimize=function(){};TinyMCE_Window.prototype.maximize=function(){if(this.restoreSize){this.moveTo(this.restoreSize[0],this.restoreSize[1]);this.resizeTo(this.restoreSize[2],this.restoreSize[3]);this.updateClamping();this.restoreSize=null}else{var bounds=mcWindows.getBounds();this.restoreSize=[this.left,this.top,this.winElement.scrollWidth,this.winElement.scrollHeight];this.moveTo(bounds[0],bounds[1]);this.resizeTo(bounds[2]-bounds[0],bounds[3]-bounds[1])}};TinyMCE_Window.prototype.startResize=function(){mcWindows.action="resize"};TinyMCE_Window.prototype.startMove=function(e){mcWindows.action="move"};TinyMCE_Window.prototype.close=function(){if(this.frame&&this.frame['tinyMCEPopup'])this.frame['tinyMCEPopup'].restoreSelection();if(mcWindows.lastSelectedWindow!=null)mcWindows.lastSelectedWindow.focus();var mcWindowsNew=new Array();for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(win.name!=this.name)mcWindowsNew[n]=win}mcWindows.windows=mcWindowsNew;var e=mcWindows.doc.getElementById(this.id+"_iframe");e.parentNode.removeChild(e);var e=mcWindows.doc.getElementById(this.id+"_div");e.parentNode.removeChild(e);mcWindows.setDocumentLock(false)};TinyMCE_Window.prototype.onMouseMove=function(e){var clamp;var dx=e.screenX-mcWindows.mouseDownScreenX;var dy=e.screenY-mcWindows.mouseDownScreenY;switch(mcWindows.action){case"resize":clamp=mcWindows.clampBoxSize(this.left,this.top,mcWindows.mouseDownWidth+(e.screenX-mcWindows.mouseDownScreenX),mcWindows.mouseDownHeight+(e.screenY-mcWindows.mouseDownScreenY),this.features.minWidth,this.features.minHeight);this.resizeTo(clamp[2],clamp[3]);mcWindows.cancelEvent(e);break;case"move":this.left=mcWindows.mouseDownLayerX+(e.screenX-mcWindows.mouseDownScreenX);this.top=mcWindows.mouseDownLayerY+(e.screenY-mcWindows.mouseDownScreenY);this.updateClamping();mcWindows.cancelEvent(e);break}};TinyMCE_Window.prototype.moveTo=function(x,y){this.left=x;this.top=y;this.winElement.style.left=this.left+"px";this.winElement.style.top=this.top+"px"};TinyMCE_Window.prototype.resizeTo=function(width,height){this.wrapperIFrameElement.style.width=(width+2)+'px';this.wrapperIFrameElement.style.height=(height+2)+'px';this.wrapperIFrameElement.width=width+2;this.wrapperIFrameElement.height=height+2;this.winElement.style.width=width+'px';this.winElement.style.height=height+'px';height=height-this.deltaHeight;this.containerElement.style.width=width+'px';this.iframeElement.style.width=width+'px';this.iframeElement.style.height=height+'px';this.bodyElement.style.width=width+'px';this.bodyElement.style.height=height+'px';this.headElement.style.width=width+'px';};TinyMCE_Window.prototype.updateClamping=function(){var clamp,oversize;clamp=mcWindows.clampBoxPosition(this.left,this.top,this.winElement.scrollWidth,this.winElement.scrollHeight,this.features.minWidth,this.features.minHeight);oversize=(clamp[2]!=this.winElement.scrollWidth||clamp[3]!=this.winElement.scrollHeight)?true:false;this.moveTo(clamp[0],clamp[1]);if(this.features.resizable=="yes"&&oversize)this.resizeTo(clamp[2],clamp[3])};function debug(msg){document.getElementById('debug').value+=msg+"\n"}TinyMCE_Window.prototype.onMouseUp=function(e){mcWindows.action="none"};TinyMCE_Window.prototype.onFocus=function(e){var winRef=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(typeof(win)=='function')continue;if(winRef.name==win.id+"_iframe"){win.focus();return}}};TinyMCE_Window.prototype.onMouseDown=function(e){var elm=mcWindows.isMSIE?this.wrapperFrame.event.srcElement:e.target;mcWindows.mouseDownScreenX=e.screenX;mcWindows.mouseDownScreenY=e.screenY;mcWindows.mouseDownLayerX=this.left;mcWindows.mouseDownLayerY=this.top;mcWindows.mouseDownWidth=parseInt(this.winElement.style.width);mcWindows.mouseDownHeight=parseInt(this.winElement.style.height);if(this.resizeElement!=null&&elm==this.resizeElement.firstChild)this.startResize(e);else this.startMove(e);mcWindows.cancelEvent(e)};var mcWindows=new TinyMCE_Windows();mcWindows.init({images_path:tinyMCE.baseURL+"/plugins/inlinepopups/images",css_file:tinyMCE.baseURL+"/plugins/inlinepopups/css/inlinepopup.css"});
js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js ADDED
@@ -0,0 +1,819 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 268 2007-04-28 15:52:59Z spocke $
3
+ *
4
+ * Moxiecode DHTML Windows script.
5
+ *
6
+ * @author Moxiecode
7
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
8
+ */
9
+
10
+ // Patch openWindow, closeWindow TinyMCE functions
11
+
12
+ var TinyMCE_InlinePopupsPlugin = {
13
+ getInfo : function() {
14
+ return {
15
+ longname : 'Inline Popups',
16
+ author : 'Moxiecode Systems AB',
17
+ authorurl : 'http://tinymce.moxiecode.com',
18
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
19
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
20
+ };
21
+ }
22
+ };
23
+
24
+ tinyMCE.addPlugin("inlinepopups", TinyMCE_InlinePopupsPlugin);
25
+
26
+ // Patch openWindow, closeWindow TinyMCE functions
27
+
28
+ TinyMCE_Engine.prototype.orgOpenWindow = TinyMCE_Engine.prototype.openWindow;
29
+ TinyMCE_Engine.prototype.orgCloseWindow = TinyMCE_Engine.prototype.closeWindow;
30
+
31
+ TinyMCE_Engine.prototype.openWindow = function(template, args) {
32
+ // Does the caller support inline
33
+ if (args['inline'] != "yes" || tinyMCE.isOpera || tinyMCE.getParam("plugins").indexOf('inlinepopups') == -1) {
34
+ mcWindows.selectedWindow = null;
35
+ args['mce_inside_iframe'] = false;
36
+ this.orgOpenWindow(template, args);
37
+ return;
38
+ }
39
+
40
+ var url, resizable, scrollbars;
41
+
42
+ args['mce_inside_iframe'] = true;
43
+ tinyMCE.windowArgs = args;
44
+
45
+ if (template['file'].charAt(0) != '/' && template['file'].indexOf('://') == -1)
46
+ url = tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file'];
47
+ else
48
+ url = template['file'];
49
+
50
+ if (!(width = parseInt(template['width'])))
51
+ width = 320;
52
+
53
+ if (!(height = parseInt(template['height'])))
54
+ height = 200;
55
+
56
+ if (!(minWidth = parseInt(template['minWidth'])))
57
+ minWidth = 100;
58
+
59
+ if (!(minHeight = parseInt(template['minHeight'])))
60
+ minHeight = 100;
61
+
62
+ resizable = (args && args['resizable']) ? args['resizable'] : "no";
63
+ scrollbars = (args && args['scrollbars']) ? args['scrollbars'] : "no";
64
+
65
+ height += 18;
66
+
67
+ // Replace all args as variables in URL
68
+ for (var name in args) {
69
+ if (typeof(args[name]) == 'function')
70
+ continue;
71
+
72
+ url = tinyMCE.replaceVar(url, name, escape(args[name]));
73
+ }
74
+
75
+ var elm = document.getElementById(this.selectedInstance.editorId + '_parent');
76
+
77
+ if (tinyMCE.hasPlugin('fullscreen') && this.selectedInstance.getData('fullscreen').enabled)
78
+ pos = { absLeft: 0, absTop: 0 };
79
+ else
80
+ pos = tinyMCE.getAbsPosition(elm);
81
+
82
+ // Center div in editor area
83
+ pos.absLeft += Math.round((elm.firstChild.clientWidth / 2) - (width / 2));
84
+ pos.absTop += Math.round((elm.firstChild.clientHeight / 2) - (height / 2));
85
+
86
+ mcWindows.open(url, mcWindows.idCounter++, "modal=yes,width=" + width+ ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",statusbar=" + resizable + ",left=" + pos.absLeft + ",top=" + pos.absTop + ",minWidth=" + minWidth + ",minHeight=" + minHeight );
87
+ };
88
+
89
+ TinyMCE_Engine.prototype.closeWindow = function(win) {
90
+ var gotit = false, n, w;
91
+
92
+ for (n in mcWindows.windows) {
93
+ w = mcWindows.windows[n];
94
+
95
+ if (typeof(w) == 'function')
96
+ continue;
97
+
98
+ if (win.name == w.id + '_iframe') {
99
+ w.close();
100
+ gotit = true;
101
+ }
102
+ }
103
+
104
+ if (!gotit)
105
+ this.orgCloseWindow(win);
106
+
107
+ tinyMCE.selectedInstance.getWin().focus();
108
+ };
109
+
110
+ TinyMCE_Engine.prototype.setWindowTitle = function(win_ref, title) {
111
+ for (var n in mcWindows.windows) {
112
+ var win = mcWindows.windows[n];
113
+ if (typeof(win) == 'function')
114
+ continue;
115
+
116
+ if (win_ref.name == win.id + "_iframe")
117
+ window.frames[win.id + "_iframe"].document.getElementById(win.id + '_title').innerHTML = title;
118
+ }
119
+ };
120
+
121
+ // * * * * * TinyMCE_Windows classes below
122
+
123
+ // Windows handler
124
+ function TinyMCE_Windows() {
125
+ this.settings = new Array();
126
+ this.windows = new Array();
127
+ this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
128
+ this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
129
+ this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
130
+ this.isMac = navigator.userAgent.indexOf('Mac') != -1;
131
+ this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
132
+ this.action = "none";
133
+ this.selectedWindow = null;
134
+ this.lastSelectedWindow = null;
135
+ this.zindex = 1001;
136
+ this.mouseDownScreenX = 0;
137
+ this.mouseDownScreenY = 0;
138
+ this.mouseDownLayerX = 0;
139
+ this.mouseDownLayerY = 0;
140
+ this.mouseDownWidth = 0;
141
+ this.mouseDownHeight = 0;
142
+ this.idCounter = 0;
143
+ };
144
+
145
+ TinyMCE_Windows.prototype.init = function(settings) {
146
+ this.settings = settings;
147
+
148
+ if (this.isMSIE)
149
+ this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
150
+ else
151
+ this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
152
+
153
+ this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
154
+
155
+ this.addEvent(window, "resize", mcWindows.eventDispatcher);
156
+ this.addEvent(document, "scroll", mcWindows.eventDispatcher);
157
+
158
+ this.doc = document;
159
+ };
160
+
161
+ TinyMCE_Windows.prototype.getBounds = function() {
162
+ if (!this.bounds) {
163
+ var vp = tinyMCE.getViewPort(window);
164
+ var top, left, bottom, right, docEl = this.doc.documentElement;
165
+
166
+ top = vp.top;
167
+ left = vp.left;
168
+ bottom = vp.height + top - 2;
169
+ right = vp.width + left - 22; // TODO this number is platform dependant
170
+ // x1, y1, x2, y2
171
+ this.bounds = [left, top, right, bottom];
172
+ }
173
+ return this.bounds;
174
+ };
175
+
176
+ TinyMCE_Windows.prototype.clampBoxPosition = function(x, y, w, h, minW, minH) {
177
+ var bounds = this.getBounds();
178
+
179
+ x = Math.max(bounds[0], Math.min(bounds[2], x + w) - w);
180
+ y = Math.max(bounds[1], Math.min(bounds[3], y + h) - h);
181
+
182
+ return this.clampBoxSize(x, y, w, h, minW, minH);
183
+ };
184
+
185
+ TinyMCE_Windows.prototype.clampBoxSize = function(x, y, w, h, minW, minH) {
186
+ var bounds = this.getBounds();
187
+
188
+ return [
189
+ x, y,
190
+ Math.max(minW, Math.min(bounds[2], x + w) - x),
191
+ Math.max(minH, Math.min(bounds[3], y + h) - y)
192
+ ];
193
+ };
194
+
195
+ TinyMCE_Windows.prototype.getParam = function(name, default_value) {
196
+ var value = null;
197
+
198
+ value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
199
+
200
+ // Fix bool values
201
+ if (value == "true" || value == "false")
202
+ return (value == "true");
203
+
204
+ return value;
205
+ };
206
+
207
+ TinyMCE_Windows.prototype.eventDispatcher = function(e) {
208
+ e = typeof(e) == "undefined" ? window.event : e;
209
+
210
+ if (mcWindows.selectedWindow == null)
211
+ return;
212
+
213
+ // Switch focus
214
+ if (mcWindows.isGecko && e.type == "mousedown") {
215
+ var elm = e.currentTarget;
216
+
217
+ for (var n in mcWindows.windows) {
218
+ var win = mcWindows.windows[n];
219
+
220
+ if (win.headElement == elm || win.resizeElement == elm) {
221
+ win.focus();
222
+ break;
223
+ }
224
+ }
225
+ }
226
+
227
+ switch (e.type) {
228
+ case "mousemove":
229
+ mcWindows.selectedWindow.onMouseMove(e);
230
+ break;
231
+
232
+ case "mouseup":
233
+ mcWindows.selectedWindow.onMouseUp(e);
234
+ break;
235
+
236
+ case "mousedown":
237
+ mcWindows.selectedWindow.onMouseDown(e);
238
+ break;
239
+
240
+ case "focus":
241
+ mcWindows.selectedWindow.onFocus(e);
242
+ break;
243
+ case "scroll":
244
+ case "resize":
245
+ if (mcWindows.clampUpdateTimeout)
246
+ clearTimeout(mcWindows.clampUpdateTimeout);
247
+ mcWindows.clampEventType = e.type;
248
+ mcWindows.clampUpdateTimeout =
249
+ setTimeout(function () {mcWindows.updateClamping()}, 100);
250
+ break;
251
+ }
252
+ };
253
+
254
+ TinyMCE_Windows.prototype.updateClamping = function () {
255
+ var clamp, oversize, etype = mcWindows.clampEventType;
256
+
257
+ this.bounds = null; // Recalc window bounds on resize/scroll
258
+ this.clampUpdateTimeout = null;
259
+
260
+ for (var n in this.windows) {
261
+ win = this.windows[n];
262
+ if (typeof(win) == 'function' || ! win.winElement) continue;
263
+
264
+ clamp = mcWindows.clampBoxPosition(
265
+ win.left, win.top,
266
+ win.winElement.scrollWidth,
267
+ win.winElement.scrollHeight,
268
+ win.features.minWidth,
269
+ win.features.minHeight
270
+ );
271
+ oversize = (
272
+ clamp[2] != win.winElement.scrollWidth ||
273
+ clamp[3] != win.winElement.scrollHeight
274
+ ) ? true : false;
275
+
276
+ if (!oversize || win.features.resizable == "yes" || etype != "scroll")
277
+ win.moveTo(clamp[0], clamp[1]);
278
+ if (oversize && win.features.resizable == "yes")
279
+ win.resizeTo(clamp[2], clamp[3]);
280
+ }
281
+ };
282
+
283
+ TinyMCE_Windows.prototype.addEvent = function(obj, name, handler) {
284
+ if (this.isMSIE)
285
+ obj.attachEvent("on" + name, handler);
286
+ else
287
+ obj.addEventListener(name, handler, false);
288
+ };
289
+
290
+ TinyMCE_Windows.prototype.cancelEvent = function(e) {
291
+ if (this.isMSIE) {
292
+ e.returnValue = false;
293
+ e.cancelBubble = true;
294
+ } else
295
+ e.preventDefault();
296
+ };
297
+
298
+ TinyMCE_Windows.prototype.parseFeatures = function(opts) {
299
+ // Cleanup the options
300
+ opts = opts.toLowerCase();
301
+ opts = opts.replace(/;/g, ",");
302
+ opts = opts.replace(/[^0-9a-z=,]/g, "");
303
+
304
+ var optionChunks = opts.split(',');
305
+ var options = new Array();
306
+
307
+ options['left'] = "10";
308
+ options['top'] = "10";
309
+ options['width'] = "300";
310
+ options['height'] = "300";
311
+ options['minwidth'] = "100";
312
+ options['minheight'] = "100";
313
+ options['resizable'] = "yes";
314
+ options['minimizable'] = "yes";
315
+ options['maximizable'] = "yes";
316
+ options['close'] = "yes";
317
+ options['movable'] = "yes";
318
+ options['statusbar'] = "yes";
319
+ options['scrollbars'] = "auto";
320
+ options['modal'] = "no";
321
+
322
+ if (opts == "")
323
+ return options;
324
+
325
+ for (var i=0; i<optionChunks.length; i++) {
326
+ var parts = optionChunks[i].split('=');
327
+
328
+ if (parts.length == 2)
329
+ options[parts[0]] = parts[1];
330
+ }
331
+
332
+ options['left'] = parseInt(options['left']);
333
+ options['top'] = parseInt(options['top']);
334
+ options['width'] = parseInt(options['width']);
335
+ options['height'] = parseInt(options['height']);
336
+ options['minWidth'] = parseInt(options['minwidth']);
337
+ options['minHeight'] = parseInt(options['minheight']);
338
+
339
+ return options;
340
+ };
341
+
342
+ TinyMCE_Windows.prototype.open = function(url, name, features) {
343
+ this.lastSelectedWindow = this.selectedWindow;
344
+
345
+ var win = new TinyMCE_Window();
346
+ var winDiv, html = "", id;
347
+ var imgPath = this.getParam("images_path");
348
+
349
+ features = this.parseFeatures(features);
350
+
351
+ // Clamp specified dimensions
352
+ var clamp = mcWindows.clampBoxPosition(
353
+ features['left'], features['top'],
354
+ features['width'], features['height'],
355
+ features['minWidth'], features['minHeight']
356
+ );
357
+
358
+ features['left'] = clamp[0];
359
+ features['top'] = clamp[1];
360
+
361
+ if (features['resizable'] == "yes") {
362
+ features['width'] = clamp[2];
363
+ features['height'] = clamp[3];
364
+ }
365
+
366
+ // Create div
367
+ id = "mcWindow_" + name;
368
+ win.deltaHeight = 18;
369
+
370
+ if (features['statusbar'] == "yes") {
371
+ win.deltaHeight += 13;
372
+
373
+ if (this.isMSIE)
374
+ win.deltaHeight += 1;
375
+ }
376
+
377
+ width = parseInt(features['width']);
378
+ height = parseInt(features['height'])-win.deltaHeight;
379
+
380
+ if (this.isMSIE)
381
+ width -= 2;
382
+
383
+ // Setup first part of window
384
+ win.id = id;
385
+ win.url = url;
386
+ win.name = name;
387
+ win.features = features;
388
+ this.windows[name] = win;
389
+
390
+ iframeWidth = width;
391
+ iframeHeight = height;
392
+
393
+ // Create inner content
394
+ html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
395
+ html += '<html>';
396
+ html += '<head>';
397
+ html += '<title>Wrapper iframe</title>';
398
+ html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
399
+ html += '<link href="' + this.getParam("css_file") + '" rel="stylesheet" type="text/css" />';
400
+ html += '</head>';
401
+ html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
402
+
403
+ html += '<div id="' + id + '_container" class="mceWindow">';
404
+ html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
405
+ html += ' <div id="' + id + '_title" class="mceWindowTitle"';
406
+ html += ' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>';
407
+ html += ' <div class="mceWindowHeadTools">';
408
+ html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" target="_self" onmousedown="return false;" class="mceWindowClose"><img border="0" src="' + imgPath + '/window_close.gif" /></a>';
409
+ if (features['resizable'] == "yes" && features['maximizable'] == "yes")
410
+ html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].maximize();" target="_self" onmousedown="return false;" class="mceWindowMaximize"><img border="0" src="' + imgPath + '/window_maximize.gif" /></a>';
411
+ // html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" target="_self" onmousedown="return false;" class="mceWindowMinimize"></a>';
412
+ html += ' </div>';
413
+ html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
414
+ html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe" scrolling="' + features['scrollbars'] + '"></iframe></div>';
415
+
416
+ if (features['statusbar'] == "yes") {
417
+ html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
418
+
419
+ if (features['resizable'] == "yes") {
420
+ if (this.isGecko)
421
+ html += '<div id="' + id + '_resize" class="mceWindowResize"><div style="background-image: url(\'' + imgPath + '/window_resize.gif\'); width: 12px; height: 12px;"></div></div>';
422
+ else
423
+ html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="' + imgPath + '/window_resize.gif" /></div>';
424
+ }
425
+
426
+ html += '</div>';
427
+ }
428
+
429
+ html += '</div>';
430
+
431
+ html += '</body>';
432
+ html += '</html>';
433
+
434
+ // Create iframe
435
+ this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
436
+ };
437
+
438
+ // Blocks the document events by placing a image over the whole document
439
+ TinyMCE_Windows.prototype.setDocumentLock = function(state) {
440
+ var elm = document.getElementById('mcWindowEventBlocker');
441
+
442
+ if (state) {
443
+ if (elm == null) {
444
+ elm = document.createElement("div");
445
+
446
+ elm.id = "mcWindowEventBlocker";
447
+ elm.style.position = "absolute";
448
+ elm.style.left = "0";
449
+ elm.style.top = "0";
450
+
451
+ document.body.appendChild(elm);
452
+ }
453
+
454
+ elm.style.display = "none";
455
+
456
+ var imgPath = this.getParam("images_path");
457
+ var width = document.body.clientWidth;
458
+ var height = document.body.clientHeight;
459
+
460
+ elm.style.width = width;
461
+ elm.style.height = height;
462
+ elm.innerHTML = '<img src="' + imgPath + '/spacer.gif" width="' + width + '" height="' + height + '" />';
463
+
464
+ elm.style.zIndex = mcWindows.zindex-1;
465
+ elm.style.display = "block";
466
+ } else if (elm != null) {
467
+ if (mcWindows.windows.length == 0)
468
+ elm.parentNode.removeChild(elm);
469
+ else
470
+ elm.style.zIndex = mcWindows.zindex-1;
471
+ }
472
+ };
473
+
474
+ // Gets called when wrapper iframe is initialized
475
+ TinyMCE_Windows.prototype.onLoad = function(name) {
476
+ var win = mcWindows.windows[name];
477
+ var id = "mcWindow_" + name;
478
+ var wrapperIframe = window.frames[id + "_iframe"].frames[0];
479
+ var wrapperDoc = window.frames[id + "_iframe"].document;
480
+ var doc = window.frames[id + "_iframe"].document;
481
+ var winDiv = document.getElementById("mcWindow_" + name + "_div");
482
+ var realIframe = window.frames[id + "_iframe"].frames[0];
483
+
484
+ // Set window data
485
+ win.id = "mcWindow_" + name;
486
+ win.winElement = winDiv;
487
+ win.bodyElement = doc.getElementById(id + '_body');
488
+ win.iframeElement = doc.getElementById(id + '_iframe');
489
+ win.headElement = doc.getElementById(id + '_head');
490
+ win.titleElement = doc.getElementById(id + '_title');
491
+ win.resizeElement = doc.getElementById(id + '_resize');
492
+ win.containerElement = doc.getElementById(id + '_container');
493
+ win.left = win.features['left'];
494
+ win.top = win.features['top'];
495
+ win.frame = window.frames[id + '_iframe'].frames[0];
496
+ win.wrapperFrame = window.frames[id + '_iframe'];
497
+ win.wrapperIFrameElement = document.getElementById(id + "_iframe");
498
+
499
+ // Add event handlers
500
+ mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
501
+
502
+ if (win.resizeElement != null)
503
+ mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
504
+
505
+ if (mcWindows.isMSIE) {
506
+ mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
507
+ mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
508
+ } else {
509
+ mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
510
+ mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
511
+ mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
512
+ }
513
+
514
+ for (var i=0; i<window.frames.length; i++) {
515
+ if (!window.frames[i]._hasMouseHandlers) {
516
+ if (mcWindows.isMSIE) {
517
+ mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
518
+ mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
519
+ } else {
520
+ mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
521
+ mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
522
+ }
523
+
524
+ window.frames[i]._hasMouseHandlers = true;
525
+ }
526
+ }
527
+
528
+ if (mcWindows.isMSIE) {
529
+ mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
530
+ mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
531
+ } else {
532
+ mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
533
+ mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
534
+ mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
535
+ }
536
+
537
+ // Dispatch open window event
538
+ var func = this.getParam("on_open_window", "");
539
+ if (func != "")
540
+ eval(func + "(win);");
541
+
542
+ win.focus();
543
+
544
+ if (win.features['modal'] == "yes")
545
+ mcWindows.setDocumentLock(true);
546
+ };
547
+
548
+ TinyMCE_Windows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
549
+ var iframe = document.createElement("iframe");
550
+ var div = document.createElement("div"), doc;
551
+
552
+ width = parseInt(width);
553
+ height = parseInt(height)+1;
554
+
555
+ // Create wrapper div
556
+ div.setAttribute("id", id_prefix + "_div");
557
+ div.setAttribute("width", width);
558
+ div.setAttribute("height", (height));
559
+ div.style.position = "absolute";
560
+
561
+ div.style.left = left + "px";
562
+ div.style.top = top + "px";
563
+ div.style.width = width + "px";
564
+ div.style.height = (height) + "px";
565
+ div.style.backgroundColor = "white";
566
+ div.style.display = "none";
567
+
568
+ if (this.isGecko) {
569
+ iframeWidth = width + 2;
570
+ iframeHeight = height + 2;
571
+ } else {
572
+ iframeWidth = width;
573
+ iframeHeight = height + 1;
574
+ }
575
+
576
+ // Create iframe
577
+ iframe.setAttribute("id", id_prefix + "_iframe");
578
+ iframe.setAttribute("name", id_prefix + "_iframe");
579
+ iframe.setAttribute("border", "0");
580
+ iframe.setAttribute("frameBorder", "0");
581
+ iframe.setAttribute("marginWidth", "0");
582
+ iframe.setAttribute("marginHeight", "0");
583
+ iframe.setAttribute("leftMargin", "0");
584
+ iframe.setAttribute("topMargin", "0");
585
+ iframe.setAttribute("width", iframeWidth);
586
+ iframe.setAttribute("height", iframeHeight);
587
+ // iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
588
+ // iframe.setAttribute("allowtransparency", "false");
589
+ iframe.setAttribute("scrolling", "no");
590
+ iframe.style.width = iframeWidth + "px";
591
+ iframe.style.height = iframeHeight + "px";
592
+ iframe.style.backgroundColor = "white";
593
+ div.appendChild(iframe);
594
+
595
+ document.body.appendChild(div);
596
+
597
+ // Fixed MSIE 5.0 issue
598
+ div.innerHTML = div.innerHTML;
599
+
600
+ if (this.isSafari) {
601
+ // Give Safari some time to setup
602
+ window.setTimeout(function() {
603
+ var doc = window.frames[id_prefix + '_iframe'].document;
604
+ doc.open();
605
+ doc.write(html);
606
+ doc.close();
607
+ }, 10);
608
+ } else {
609
+ doc = window.frames[id_prefix + '_iframe'].window.document;
610
+ doc.open();
611
+ doc.write(html);
612
+ doc.close();
613
+ }
614
+
615
+ div.style.display = "block";
616
+
617
+ return div;
618
+ };
619
+
620
+ // Window instance
621
+ function TinyMCE_Window() {
622
+ };
623
+
624
+ TinyMCE_Window.prototype.focus = function() {
625
+ if (this != mcWindows.selectedWindow) {
626
+ this.winElement.style.zIndex = ++mcWindows.zindex;
627
+ mcWindows.lastSelectedWindow = mcWindows.selectedWindow;
628
+ mcWindows.selectedWindow = this;
629
+ }
630
+ };
631
+
632
+ TinyMCE_Window.prototype.minimize = function() {
633
+ };
634
+
635
+ TinyMCE_Window.prototype.maximize = function() {
636
+ if (this.restoreSize) {
637
+ this.moveTo(this.restoreSize[0], this.restoreSize[1]);
638
+ this.resizeTo(this.restoreSize[2], this.restoreSize[3]);
639
+ this.updateClamping();
640
+ this.restoreSize = null;
641
+ } else {
642
+ var bounds = mcWindows.getBounds();
643
+ this.restoreSize = [
644
+ this.left, this.top,
645
+ this.winElement.scrollWidth,
646
+ this.winElement.scrollHeight
647
+ ];
648
+ this.moveTo(bounds[0], bounds[1]);
649
+ this.resizeTo(
650
+ bounds[2] - bounds[0],
651
+ bounds[3] - bounds[1]
652
+ );
653
+ }
654
+ };
655
+
656
+ TinyMCE_Window.prototype.startResize = function() {
657
+ mcWindows.action = "resize";
658
+ };
659
+
660
+ TinyMCE_Window.prototype.startMove = function(e) {
661
+ mcWindows.action = "move";
662
+ };
663
+
664
+ TinyMCE_Window.prototype.close = function() {
665
+ if (this.frame && this.frame['tinyMCEPopup'])
666
+ this.frame['tinyMCEPopup'].restoreSelection();
667
+
668
+ if (mcWindows.lastSelectedWindow != null)
669
+ mcWindows.lastSelectedWindow.focus();
670
+
671
+ var mcWindowsNew = new Array();
672
+ for (var n in mcWindows.windows) {
673
+ var win = mcWindows.windows[n];
674
+ if (typeof(win) == 'function')
675
+ continue;
676
+
677
+ if (win.name != this.name)
678
+ mcWindowsNew[n] = win;
679
+ }
680
+
681
+ mcWindows.windows = mcWindowsNew;
682
+
683
+ // alert(mcWindows.doc.getElementById(this.id + "_iframe"));
684
+
685
+ var e = mcWindows.doc.getElementById(this.id + "_iframe");
686
+ e.parentNode.removeChild(e);
687
+
688
+ var e = mcWindows.doc.getElementById(this.id + "_div");
689
+ e.parentNode.removeChild(e);
690
+
691
+ mcWindows.setDocumentLock(false);
692
+ };
693
+
694
+ TinyMCE_Window.prototype.onMouseMove = function(e) {
695
+ var clamp;
696
+ // Calculate real X, Y
697
+ var dx = e.screenX - mcWindows.mouseDownScreenX;
698
+ var dy = e.screenY - mcWindows.mouseDownScreenY;
699
+
700
+ switch (mcWindows.action) {
701
+ case "resize":
702
+ clamp = mcWindows.clampBoxSize(
703
+ this.left, this.top,
704
+ mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX),
705
+ mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY),
706
+ this.features.minWidth, this.features.minHeight
707
+ );
708
+
709
+ this.resizeTo(clamp[2], clamp[3]);
710
+
711
+ mcWindows.cancelEvent(e);
712
+ break;
713
+
714
+ case "move":
715
+ this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
716
+ this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
717
+ this.updateClamping();
718
+
719
+ mcWindows.cancelEvent(e);
720
+ break;
721
+ }
722
+ };
723
+
724
+ TinyMCE_Window.prototype.moveTo = function (x, y) {
725
+ this.left = x;
726
+ this.top = y;
727
+
728
+ this.winElement.style.left = this.left + "px";
729
+ this.winElement.style.top = this.top + "px";
730
+ };
731
+
732
+ TinyMCE_Window.prototype.resizeTo = function (width, height) {
733
+ this.wrapperIFrameElement.style.width = (width+2) + 'px';
734
+ this.wrapperIFrameElement.style.height = (height+2) + 'px';
735
+ this.wrapperIFrameElement.width = width+2;
736
+ this.wrapperIFrameElement.height = height+2;
737
+ this.winElement.style.width = width + 'px';
738
+ this.winElement.style.height = height + 'px';
739
+
740
+ height = height - this.deltaHeight;
741
+
742
+ this.containerElement.style.width = width + 'px';
743
+ this.iframeElement.style.width = width + 'px';
744
+ this.iframeElement.style.height = height + 'px';
745
+ this.bodyElement.style.width = width + 'px';
746
+ this.bodyElement.style.height = height + 'px';
747
+ this.headElement.style.width = width + 'px';
748
+ //this.statusElement.style.width = width + 'px';
749
+ };
750
+
751
+ TinyMCE_Window.prototype.updateClamping = function () {
752
+ var clamp, oversize;
753
+
754
+ clamp = mcWindows.clampBoxPosition(
755
+ this.left, this.top,
756
+ this.winElement.scrollWidth,
757
+ this.winElement.scrollHeight,
758
+ this.features.minWidth, this.features.minHeight
759
+ );
760
+ oversize = (
761
+ clamp[2] != this.winElement.scrollWidth ||
762
+ clamp[3] != this.winElement.scrollHeight
763
+ ) ? true : false;
764
+
765
+ this.moveTo(clamp[0], clamp[1]);
766
+ if (this.features.resizable == "yes" && oversize)
767
+ this.resizeTo(clamp[2], clamp[3]);
768
+ };
769
+
770
+ function debug(msg) {
771
+ document.getElementById('debug').value += msg + "\n";
772
+ }
773
+
774
+ TinyMCE_Window.prototype.onMouseUp = function(e) {
775
+ mcWindows.action = "none";
776
+ };
777
+
778
+ TinyMCE_Window.prototype.onFocus = function(e) {
779
+ // Gecko only handler
780
+ var winRef = e.currentTarget;
781
+
782
+ for (var n in mcWindows.windows) {
783
+ var win = mcWindows.windows[n];
784
+ if (typeof(win) == 'function')
785
+ continue;
786
+
787
+ if (winRef.name == win.id + "_iframe") {
788
+ win.focus();
789
+ return;
790
+ }
791
+ }
792
+ };
793
+
794
+ TinyMCE_Window.prototype.onMouseDown = function(e) {
795
+ var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
796
+
797
+ mcWindows.mouseDownScreenX = e.screenX;
798
+ mcWindows.mouseDownScreenY = e.screenY;
799
+ mcWindows.mouseDownLayerX = this.left;
800
+ mcWindows.mouseDownLayerY = this.top;
801
+ mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
802
+ mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
803
+
804
+ if (this.resizeElement != null && elm == this.resizeElement.firstChild)
805
+ this.startResize(e);
806
+ else
807
+ this.startMove(e);
808
+
809
+ mcWindows.cancelEvent(e);
810
+ };
811
+
812
+ // Global instance
813
+ var mcWindows = new TinyMCE_Windows();
814
+
815
+ // Initialize windows
816
+ mcWindows.init({
817
+ images_path : tinyMCE.baseURL + "/plugins/inlinepopups/images",
818
+ css_file : tinyMCE.baseURL + "/plugins/inlinepopups/css/inlinepopup.css"
819
+ });
js/tiny_mce/plugins/inlinepopups/images/spacer.gif ADDED
Binary file
js/tiny_mce/plugins/inlinepopups/images/window_close.gif ADDED
Binary file
js/tiny_mce/plugins/inlinepopups/images/window_maximize.gif ADDED
Binary file
js/tiny_mce/plugins/inlinepopups/images/window_minimize.gif ADDED
Binary file
js/tiny_mce/plugins/inlinepopups/images/window_resize.gif ADDED
Binary file
js/tiny_mce/plugins/inlinepopups/jscripts/mcwindows.js ADDED
@@ -0,0 +1,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: mcwindows.js 18 2006-06-29 14:11:23Z spocke $
3
+ *
4
+ * Moxiecode DHTML Windows script.
5
+ *
6
+ * @author Moxiecode
7
+ * @copyright Copyright � 2004, Moxiecode Systems AB, All rights reserved.
8
+ */
9
+
10
+ // Windows handler
11
+ function MCWindows() {
12
+ this.settings = new Array();
13
+ this.windows = new Array();
14
+ this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
15
+ this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
16
+ this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
17
+ this.isMac = navigator.userAgent.indexOf('Mac') != -1;
18
+ this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
19
+ this.action = "none";
20
+ this.selectedWindow = null;
21
+ this.zindex = 100;
22
+ this.mouseDownScreenX = 0;
23
+ this.mouseDownScreenY = 0;
24
+ this.mouseDownLayerX = 0;
25
+ this.mouseDownLayerY = 0;
26
+ this.mouseDownWidth = 0;
27
+ this.mouseDownHeight = 0;
28
+ };
29
+
30
+ MCWindows.prototype.init = function(settings) {
31
+ this.settings = settings;
32
+
33
+ if (this.isMSIE)
34
+ this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
35
+ else
36
+ this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
37
+
38
+ this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
39
+ };
40
+
41
+ MCWindows.prototype.getParam = function(name, default_value) {
42
+ var value = null;
43
+
44
+ value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
45
+
46
+ // Fix bool values
47
+ if (value == "true" || value == "false")
48
+ return (value == "true");
49
+
50
+ return value;
51
+ };
52
+
53
+ MCWindows.prototype.eventDispatcher = function(e) {
54
+ e = typeof(e) == "undefined" ? window.event : e;
55
+
56
+ if (mcWindows.selectedWindow == null)
57
+ return;
58
+
59
+ // Switch focus
60
+ if (mcWindows.isGecko && e.type == "mousedown") {
61
+ var elm = e.currentTarget;
62
+
63
+ for (var n in mcWindows.windows) {
64
+ var win = mcWindows.windows[n];
65
+ if (typeof(win) == 'function')
66
+ continue;
67
+
68
+ if (win.headElement == elm || win.resizeElement == elm) {
69
+ win.focus();
70
+ break;
71
+ }
72
+ }
73
+ }
74
+
75
+ switch (e.type) {
76
+ case "mousemove":
77
+ mcWindows.selectedWindow.onMouseMove(e);
78
+ break;
79
+
80
+ case "mouseup":
81
+ mcWindows.selectedWindow.onMouseUp(e);
82
+ break;
83
+
84
+ case "mousedown":
85
+ mcWindows.selectedWindow.onMouseDown(e);
86
+ break;
87
+
88
+ case "focus":
89
+ mcWindows.selectedWindow.onFocus(e);
90
+ break;
91
+ }
92
+ }
93
+
94
+ MCWindows.prototype.addEvent = function(obj, name, handler) {
95
+ if (this.isMSIE)
96
+ obj.attachEvent("on" + name, handler);
97
+ else
98
+ obj.addEventListener(name, handler, true);
99
+ };
100
+
101
+ MCWindows.prototype.cancelEvent = function(e) {
102
+ if (this.isMSIE) {
103
+ e.returnValue = false;
104
+ e.cancelBubble = true;
105
+ } else
106
+ e.preventDefault();
107
+ };
108
+
109
+ MCWindows.prototype.parseFeatures = function(opts) {
110
+ // Cleanup the options
111
+ opts = opts.toLowerCase();
112
+ opts = opts.replace(/;/g, ",");
113
+ opts = opts.replace(/[^0-9a-z=,]/g, "");
114
+
115
+ var optionChunks = opts.split(',');
116
+ var options = new Array();
117
+
118
+ options['left'] = 10;
119
+ options['top'] = 10;
120
+ options['width'] = 300;
121
+ options['height'] = 300;
122
+ options['resizable'] = true;
123
+ options['minimizable'] = true;
124
+ options['maximizable'] = true;
125
+ options['close'] = true;
126
+ options['movable'] = true;
127
+
128
+ if (opts == "")
129
+ return options;
130
+
131
+ for (var i=0; i<optionChunks.length; i++) {
132
+ var parts = optionChunks[i].split('=');
133
+
134
+ if (parts.length == 2)
135
+ options[parts[0]] = parts[1];
136
+ }
137
+
138
+ return options;
139
+ };
140
+
141
+ MCWindows.prototype.open = function(url, name, features) {
142
+ var win = new MCWindow();
143
+ var winDiv, html = "", id;
144
+
145
+ features = this.parseFeatures(features);
146
+
147
+ // Create div
148
+ id = "mcWindow_" + name;
149
+
150
+ width = parseInt(features['width']);
151
+ height = parseInt(features['height'])-12-19;
152
+
153
+ if (this.isMSIE)
154
+ width -= 2;
155
+
156
+ // Setup first part of window
157
+ win.id = id;
158
+ win.url = url;
159
+ win.name = name;
160
+ win.features = features;
161
+ this.windows[name] = win;
162
+
163
+ iframeWidth = width;
164
+ iframeHeight = height;
165
+
166
+ // Create inner content
167
+ html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
168
+ html += '<html>';
169
+ html += '<head>';
170
+ html += '<title>Wrapper iframe</title>';
171
+ html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
172
+ html += '<link href="../jscripts/tiny_mce/themes/advanced/css/editor_ui.css" rel="stylesheet" type="text/css" />';
173
+ html += '</head>';
174
+ html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
175
+
176
+ html += '<div id="' + id + '_container" class="mceWindow">';
177
+ html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
178
+ html += ' <div id="' + id + '_title" class="mceWindowTitle"';
179
+ html += ' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;">No name window</div>';
180
+ html += ' <div class="mceWindowHeadTools">';
181
+ html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" onmousedown="return false;" class="mceWindowClose"><img border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_close.gif" /></a>';
182
+ // html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" onmousedown="return false;" class="mceWindowMaximize"></a>';
183
+ // html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" onmousedown="return false;" class="mceWindowMinimize"></a>';
184
+ html += ' </div>';
185
+ html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
186
+ html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" onfocus="parent.mcWindows.windows[\'' + name + '\'].focus();" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe"></iframe></div>';
187
+ html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
188
+ html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_resize.gif" /></div>';
189
+ html += '</div>';
190
+ html += '</div>';
191
+
192
+ html += '</body>';
193
+ html += '</html>';
194
+
195
+ // Create iframe
196
+ this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
197
+ };
198
+
199
+ // Gets called when wrapper iframe is initialized
200
+ MCWindows.prototype.onLoad = function(name) {
201
+ var win = mcWindows.windows[name];
202
+ var id = "mcWindow_" + name;
203
+ var wrapperIframe = window.frames[id + "_iframe"].frames[0];
204
+ var wrapperDoc = window.frames[id + "_iframe"].document;
205
+ var doc = window.frames[id + "_iframe"].document;
206
+ var winDiv = document.getElementById("mcWindow_" + name + "_div");
207
+ var realIframe = window.frames[id + "_iframe"].frames[0];
208
+
209
+ // Set window data
210
+ win.id = "mcWindow_" + name + "_iframe";
211
+ win.winElement = winDiv;
212
+ win.bodyElement = doc.getElementById(id + '_body');
213
+ win.iframeElement = doc.getElementById(id + '_iframe');
214
+ win.headElement = doc.getElementById(id + '_head');
215
+ win.titleElement = doc.getElementById(id + '_title');
216
+ win.resizeElement = doc.getElementById(id + '_resize');
217
+ win.containerElement = doc.getElementById(id + '_container');
218
+ win.left = win.features['left'];
219
+ win.top = win.features['top'];
220
+ win.frame = window.frames[id + '_iframe'].frames[0];
221
+ win.wrapperFrame = window.frames[id + '_iframe'];
222
+ win.wrapperIFrameElement = document.getElementById(id + "_iframe");
223
+
224
+ // Add event handlers
225
+ mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
226
+ mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
227
+
228
+ if (mcWindows.isMSIE) {
229
+ mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
230
+ mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
231
+ } else {
232
+ mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
233
+ mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
234
+ mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
235
+ }
236
+
237
+ for (var i=0; i<window.frames.length; i++) {
238
+ if (!window.frames[i]._hasMouseHandlers) {
239
+ if (mcWindows.isMSIE) {
240
+ mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
241
+ mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
242
+ } else {
243
+ mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
244
+ mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
245
+ }
246
+
247
+ window.frames[i]._hasMouseHandlers = true;
248
+ }
249
+ }
250
+
251
+ if (mcWindows.isMSIE) {
252
+ mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
253
+ mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
254
+ } else {
255
+ mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
256
+ mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
257
+ mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
258
+ }
259
+
260
+ this.selectedWindow = win;
261
+ };
262
+
263
+ MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
264
+ var iframe = document.createElement("iframe");
265
+ var div = document.createElement("div");
266
+
267
+ width = parseInt(width);
268
+ height = parseInt(height)+1;
269
+
270
+ // Create wrapper div
271
+ div.setAttribute("id", id_prefix + "_div");
272
+ div.setAttribute("width", width);
273
+ div.setAttribute("height", (height));
274
+ div.style.position = "absolute";
275
+ div.style.left = left + "px";
276
+ div.style.top = top + "px";
277
+ div.style.width = width + "px";
278
+ div.style.height = (height) + "px";
279
+ div.style.backgroundColor = "white";
280
+ div.style.display = "none";
281
+
282
+ if (this.isGecko) {
283
+ iframeWidth = width + 2;
284
+ iframeHeight = height + 2;
285
+ } else {
286
+ iframeWidth = width;
287
+ iframeHeight = height + 1;
288
+ }
289
+
290
+ // Create iframe
291
+ iframe.setAttribute("id", id_prefix + "_iframe");
292
+ iframe.setAttribute("name", id_prefix + "_iframe");
293
+ iframe.setAttribute("border", "0");
294
+ iframe.setAttribute("frameBorder", "0");
295
+ iframe.setAttribute("marginWidth", "0");
296
+ iframe.setAttribute("marginHeight", "0");
297
+ iframe.setAttribute("leftMargin", "0");
298
+ iframe.setAttribute("topMargin", "0");
299
+ iframe.setAttribute("width", iframeWidth);
300
+ iframe.setAttribute("height", iframeHeight);
301
+ // iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
302
+ // iframe.setAttribute("allowtransparency", "false");
303
+ iframe.setAttribute("scrolling", "no");
304
+ iframe.style.width = iframeWidth + "px";
305
+ iframe.style.height = iframeHeight + "px";
306
+ iframe.style.backgroundColor = "white";
307
+ div.appendChild(iframe);
308
+
309
+ document.body.appendChild(div);
310
+
311
+ // Fixed MSIE 5.0 issue
312
+ div.innerHTML = div.innerHTML;
313
+
314
+ if (this.isSafari) {
315
+ // Give Safari some time to setup
316
+ window.setTimeout(function() {
317
+ doc = window.frames[id_prefix + '_iframe'].document;
318
+ doc.open();
319
+ doc.write(html);
320
+ doc.close();
321
+ }, 10);
322
+ } else {
323
+ doc = window.frames[id_prefix + '_iframe'].window.document
324
+ doc.open();
325
+ doc.write(html);
326
+ doc.close();
327
+ }
328
+
329
+ div.style.display = "block";
330
+
331
+ return div;
332
+ };
333
+
334
+ // Window instance
335
+ function MCWindow() {
336
+ };
337
+
338
+ MCWindow.prototype.focus = function() {
339
+ this.winElement.style.zIndex = mcWindows.zindex++;
340
+ mcWindows.selectedWindow = this;
341
+ };
342
+
343
+ MCWindow.prototype.minimize = function() {
344
+ };
345
+
346
+ MCWindow.prototype.maximize = function() {
347
+
348
+ };
349
+
350
+ MCWindow.prototype.startResize = function() {
351
+ mcWindows.action = "resize";
352
+ };
353
+
354
+ MCWindow.prototype.startMove = function(e) {
355
+ mcWindows.action = "move";
356
+ };
357
+
358
+ MCWindow.prototype.close = function() {
359
+ document.body.removeChild(this.winElement);
360
+ mcWindows.windows[this.name] = null;
361
+ };
362
+
363
+ MCWindow.prototype.onMouseMove = function(e) {
364
+ var scrollX = 0;//this.doc.body.scrollLeft;
365
+ var scrollY = 0;//this.doc.body.scrollTop;
366
+
367
+ // Calculate real X, Y
368
+ var dx = e.screenX - mcWindows.mouseDownScreenX;
369
+ var dy = e.screenY - mcWindows.mouseDownScreenY;
370
+
371
+ switch (mcWindows.action) {
372
+ case "resize":
373
+ width = mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX);
374
+ height = mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY);
375
+
376
+ width = width < 100 ? 100 : width;
377
+ height = height < 100 ? 100 : height;
378
+
379
+ this.wrapperIFrameElement.style.width = width+2;
380
+ this.wrapperIFrameElement.style.height = height+2;
381
+ this.wrapperIFrameElement.width = width+2;
382
+ this.wrapperIFrameElement.height = height+2;
383
+ this.winElement.style.width = width;
384
+ this.winElement.style.height = height;
385
+
386
+ height = height-12-19;
387
+
388
+ this.containerElement.style.width = width;
389
+
390
+ this.iframeElement.style.width = width;
391
+ this.iframeElement.style.height = height;
392
+ this.bodyElement.style.width = width;
393
+ this.bodyElement.style.height = height;
394
+ this.headElement.style.width = width;
395
+ //this.statusElement.style.width = width;
396
+
397
+ mcWindows.cancelEvent(e);
398
+ break;
399
+
400
+ case "move":
401
+ this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
402
+ this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
403
+ this.winElement.style.left = this.left + "px";
404
+ this.winElement.style.top = this.top + "px";
405
+
406
+ mcWindows.cancelEvent(e);
407
+ break;
408
+ }
409
+ };
410
+
411
+ MCWindow.prototype.onMouseUp = function(e) {
412
+ mcWindows.action = "none";
413
+ };
414
+
415
+ MCWindow.prototype.onFocus = function(e) {
416
+ // Gecko only handler
417
+ var winRef = e.currentTarget;
418
+
419
+ for (var n in mcWindows.windows) {
420
+ var win = mcWindows.windows[n];
421
+ if (typeof(win) == 'function')
422
+ continue;
423
+
424
+ if (winRef.name == win.id) {
425
+ win.focus();
426
+ return;
427
+ }
428
+ }
429
+ };
430
+
431
+ MCWindow.prototype.onMouseDown = function(e) {
432
+ var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
433
+
434
+ var scrollX = 0;//this.doc.body.scrollLeft;
435
+ var scrollY = 0;//this.doc.body.scrollTop;
436
+
437
+ mcWindows.mouseDownScreenX = e.screenX;
438
+ mcWindows.mouseDownScreenY = e.screenY;
439
+ mcWindows.mouseDownLayerX = this.left;
440
+ mcWindows.mouseDownLayerY = this.top;
441
+ mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
442
+ mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
443
+
444
+ if (elm == this.resizeElement.firstChild)
445
+ this.startResize(e);
446
+ else
447
+ this.startMove(e);
448
+
449
+ mcWindows.cancelEvent(e);
450
+ };
451
+
452
+ // Global instance
453
+ var mcWindows = new MCWindows();
js/tiny_mce/plugins/inlinepopups/readme.txt ADDED
File without changes
js/tiny_mce/plugins/insertdatetime/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('insertdatetime');var TinyMCE_InsertDateTimePlugin={getInfo:function(){return{longname:'Insert date/time',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"insertdate":return tinyMCE.getButtonHTML(cn,'lang_insertdate_desc','{$pluginurl}/images/insertdate.gif','mceInsertDate');case"inserttime":return tinyMCE.getButtonHTML(cn,'lang_inserttime_desc','{$pluginurl}/images/inserttime.gif','mceInsertTime')}return""},execCommand:function(editor_id,element,command,user_interface,value){function addZeros(value,len){value=""+value;if(value.length<len){for(var i=0;i<(len-value.length);i++)value="0"+value}return value}function getDateTime(d,fmt){fmt=fmt.replace("%D","%m/%d/%y");fmt=fmt.replace("%r","%I:%M:%S %p");fmt=fmt.replace("%Y",""+d.getFullYear());fmt=fmt.replace("%y",""+d.getYear());fmt=fmt.replace("%m",addZeros(d.getMonth()+1,2));fmt=fmt.replace("%d",addZeros(d.getDate(),2));fmt=fmt.replace("%H",""+addZeros(d.getHours(),2));fmt=fmt.replace("%M",""+addZeros(d.getMinutes(),2));fmt=fmt.replace("%S",""+addZeros(d.getSeconds(),2));fmt=fmt.replace("%I",""+((d.getHours()+11)%12+1));fmt=fmt.replace("%p",""+(d.getHours()<12?"AM":"PM"));fmt=fmt.replace("%B",""+tinyMCE.getLang("lang_inserttime_months_long")[d.getMonth()]);fmt=fmt.replace("%b",""+tinyMCE.getLang("lang_inserttime_months_short")[d.getMonth()]);fmt=fmt.replace("%A",""+tinyMCE.getLang("lang_inserttime_day_long")[d.getDay()]);fmt=fmt.replace("%a",""+tinyMCE.getLang("lang_inserttime_day_short")[d.getDay()]);fmt=fmt.replace("%%","%");return fmt}switch(command){case"mceInsertDate":tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,getDateTime(new Date(),tinyMCE.getParam("plugin_insertdate_dateFormat",tinyMCE.getLang('lang_insertdate_def_fmt'))));return true;case"mceInsertTime":tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,getDateTime(new Date(),tinyMCE.getParam("plugin_insertdate_timeFormat",tinyMCE.getLang('lang_inserttime_def_fmt'))));return true}return false}};tinyMCE.addPlugin("insertdatetime",TinyMCE_InsertDateTimePlugin);
js/tiny_mce/plugins/insertdatetime/editor_plugin_src.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('insertdatetime');
10
+
11
+ var TinyMCE_InsertDateTimePlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Insert date/time',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ /**
23
+ * Returns the HTML contents of the insertdate, inserttime controls.
24
+ */
25
+ getControlHTML : function(cn) {
26
+ switch (cn) {
27
+ case "insertdate":
28
+ return tinyMCE.getButtonHTML(cn, 'lang_insertdate_desc', '{$pluginurl}/images/insertdate.gif', 'mceInsertDate');
29
+
30
+ case "inserttime":
31
+ return tinyMCE.getButtonHTML(cn, 'lang_inserttime_desc', '{$pluginurl}/images/inserttime.gif', 'mceInsertTime');
32
+ }
33
+
34
+ return "";
35
+ },
36
+
37
+ /**
38
+ * Executes the mceInsertDate command.
39
+ */
40
+ execCommand : function(editor_id, element, command, user_interface, value) {
41
+ /* Adds zeros infront of value */
42
+ function addZeros(value, len) {
43
+ value = "" + value;
44
+
45
+ if (value.length < len) {
46
+ for (var i=0; i<(len-value.length); i++)
47
+ value = "0" + value;
48
+ }
49
+
50
+ return value;
51
+ }
52
+
53
+ function getDateTime(d, fmt) {
54
+ fmt = fmt.replace("%D", "%m/%d/%y");
55
+ fmt = fmt.replace("%r", "%I:%M:%S %p");
56
+ fmt = fmt.replace("%Y", "" + d.getFullYear());
57
+ fmt = fmt.replace("%y", "" + d.getYear());
58
+ fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
59
+ fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
60
+ fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
61
+ fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
62
+ fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
63
+ fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
64
+ fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
65
+ fmt = fmt.replace("%B", "" + tinyMCE.getLang("lang_inserttime_months_long")[d.getMonth()]);
66
+ fmt = fmt.replace("%b", "" + tinyMCE.getLang("lang_inserttime_months_short")[d.getMonth()]);
67
+ fmt = fmt.replace("%A", "" + tinyMCE.getLang("lang_inserttime_day_long")[d.getDay()]);
68
+ fmt = fmt.replace("%a", "" + tinyMCE.getLang("lang_inserttime_day_short")[d.getDay()]);
69
+ fmt = fmt.replace("%%", "%");
70
+
71
+ return fmt;
72
+ }
73
+
74
+ // Handle commands
75
+ switch (command) {
76
+ case "mceInsertDate":
77
+ tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_dateFormat", tinyMCE.getLang('lang_insertdate_def_fmt'))));
78
+ return true;
79
+
80
+ case "mceInsertTime":
81
+ tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_timeFormat", tinyMCE.getLang('lang_inserttime_def_fmt'))));
82
+ return true;
83
+ }
84
+
85
+ // Pass to next handler in chain
86
+ return false;
87
+ }
88
+ };
89
+
90
+ tinyMCE.addPlugin("insertdatetime", TinyMCE_InsertDateTimePlugin);
js/tiny_mce/plugins/insertdatetime/images/insertdate.gif ADDED
Binary file
js/tiny_mce/plugins/insertdatetime/images/inserttime.gif ADDED
Binary file
js/tiny_mce/plugins/insertdatetime/langs/en.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ insertdate_def_fmt : '%Y-%m-%d',
5
+ inserttime_def_fmt : '%H:%M:%S',
6
+ insertdate_desc : 'Insert date',
7
+ inserttime_desc : 'Insert time',
8
+ inserttime_months_long : new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"),
9
+ inserttime_months_short : new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),
10
+ inserttime_day_long : new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"),
11
+ inserttime_day_short : new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
12
+ });
js/tiny_mce/plugins/insertdatetime/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/layer/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('layer');var TinyMCE_LayerPlugin={getInfo:function(){return{longname:'Layer',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(tinyMCE.isMSIE&&!tinyMCE.isOpera)inst.getDoc().execCommand('2D-Position')},handleEvent:function(e){var inst=tinyMCE.selectedInstance;var w=inst.getWin(),le=inst._lastStyleElm,e;if(tinyMCE.isGecko){e=this._getParentLayer(inst.getFocusElement());if(e){if(!inst._lastStyleElm){e.style.overflow='auto';inst._lastStyleElm=e}}else if(le){le=inst._lastStyleElm;le.style.width=le.scrollWidth+'px';le.style.height=le.scrollHeight+'px';le.style.overflow='';inst._lastStyleElm=null}}return true},handleVisualAid:function(el,deep,state,inst){var nl=inst.getDoc().getElementsByTagName("div"),i;for(i=0;i<nl.length;i++){if(new RegExp('absolute|relative|static','gi').test(nl[i].style.position)){if(state)tinyMCE.addCSSClass(nl[i],'mceVisualAid');else tinyMCE.removeCSSClass(nl[i],'mceVisualAid')}}},getControlHTML:function(cn){switch(cn){case"moveforward":return tinyMCE.getButtonHTML(cn,'lang_layer_forward_desc','{$pluginurl}/images/moveforward.gif','mceMoveForward',true);case"movebackward":return tinyMCE.getButtonHTML(cn,'lang_layer_backward_desc','{$pluginurl}/images/movebackward.gif','mceMoveBackward',true);case"absolute":return tinyMCE.getButtonHTML(cn,'lang_layer_absolute_desc','{$pluginurl}/images/absolute.gif','mceMakeAbsolute',true);case"insertlayer":return tinyMCE.getButtonHTML(cn,'lang_layer_insertlayer_desc','{$pluginurl}/images/insertlayer.gif','mceInsertLayer',true)}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceInsertLayer":this._insertLayer();return true;case"mceMoveForward":this._move(1);return true;case"mceMoveBackward":this._move(-1);return true;case"mceMakeAbsolute":this._toggleAbsolute();return true}return false},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){var inst=tinyMCE.getInstanceById(editor_id);var le=this._getParentLayer(inst.getFocusElement());var p=tinyMCE.getParentElement(inst.getFocusElement(),'div,p,img');tinyMCE.switchClass(editor_id+'_absolute','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_moveforward','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_movebackward','mceButtonDisabled');if(p)tinyMCE.switchClass(editor_id+'_absolute','mceButtonNormal');if(le&&le.style.position.toLowerCase()=="absolute"){tinyMCE.switchClass(editor_id+'_absolute','mceButtonSelected');tinyMCE.switchClass(editor_id+'_moveforward','mceButtonNormal');tinyMCE.switchClass(editor_id+'_movebackward','mceButtonNormal')}},_move:function(d){var inst=tinyMCE.selectedInstance,i,z=new Array();var le=this._getParentLayer(inst.getFocusElement()),ci=-1,fi=-1;var nl=tinyMCE.selectNodes(inst.getBody(),function(n){return n.nodeType==1&&new RegExp('absolute|relative|static','gi').test(n.style.position)});for(i=0;i<nl.length;i++){z[i]=nl[i].style.zIndex?parseInt(nl[i].style.zIndex):0;if(ci<0&&nl[i]==le)ci=i}if(d<0){for(i=0;i<z.length;i++){if(z[i]<z[ci]){fi=i;break}}if(fi>-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci]}else{if(z[ci]>0)nl[ci].style.zIndex=z[ci]-1}}else{for(i=0;i<z.length;i++){if(z[i]>z[ci]){fi=i;break}}if(fi>-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci]}else nl[ci].style.zIndex=z[ci]+1}inst.repaint()},_getParentLayer:function(n){return tinyMCE.getParentNode(n,function(n){return n.nodeType==1&&new RegExp('absolute|relative|static','gi').test(n.style.position)})},_insertLayer:function(){var inst=tinyMCE.selectedInstance;var e=tinyMCE.getParentElement(inst.getFocusElement());var p=tinyMCE.getAbsPosition(e);var d=inst.getDoc();var ne=d.createElement('div');var h=inst.selection.getSelectedHTML();ne.style.position='absolute';ne.style.left=p.absLeft+'px';ne.style.top=(p.absTop>20?p.absTop:20)+'px';ne.style.width='100px';ne.style.height='100px';ne.className='mceVisualAid';if(!h)h=tinyMCE.getLang('lang_layer_content');ne.innerHTML=h;d.body.appendChild(ne)},_toggleAbsolute:function(){var inst=tinyMCE.selectedInstance;var le=this._getParentLayer(inst.getFocusElement());if(le==null)le=tinyMCE.getParentElement(inst.getFocusElement(),'div,p,img');if(le){if(le.style.position.toLowerCase()=="absolute"){le.style.position="";le.style.left="";le.style.top=""}else{le.style.position="absolute";if(le.style.left=="")le.style.left=20+'px';if(le.style.top=="")le.style.top=20+'px';if(le.style.width=="")le.style.width=le.width?(le.width+'px'):'100px';if(le.style.height=="")le.style.height=le.height?(le.height+'px'):'100px';tinyMCE.handleVisualAid(inst.getBody(),true,inst.visualAid,inst)}inst.repaint();tinyMCE.triggerNodeChange()}}};tinyMCE.addPlugin("layer",TinyMCE_LayerPlugin);
js/tiny_mce/plugins/layer/editor_plugin_src.js ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('layer');
10
+
11
+ var TinyMCE_LayerPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Layer',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ if (tinyMCE.isMSIE && !tinyMCE.isOpera)
24
+ inst.getDoc().execCommand('2D-Position');
25
+ },
26
+
27
+ handleEvent : function(e) {
28
+ var inst = tinyMCE.selectedInstance;
29
+ var w = inst.getWin(), le = inst._lastStyleElm, e;
30
+
31
+ if (tinyMCE.isGecko) {
32
+ e = this._getParentLayer(inst.getFocusElement());
33
+
34
+ if (e) {
35
+ if (!inst._lastStyleElm) {
36
+ e.style.overflow = 'auto';
37
+ inst._lastStyleElm = e;
38
+ }
39
+ } else if (le) {
40
+ le = inst._lastStyleElm;
41
+ le.style.width = le.scrollWidth + 'px';
42
+ le.style.height = le.scrollHeight + 'px';
43
+ le.style.overflow = '';
44
+ inst._lastStyleElm = null;
45
+ }
46
+ }
47
+
48
+ return true;
49
+ },
50
+
51
+ handleVisualAid : function(el, deep, state, inst) {
52
+ var nl = inst.getDoc().getElementsByTagName("div"), i;
53
+
54
+ for (i=0; i<nl.length; i++) {
55
+ if (new RegExp('absolute|relative|static', 'gi').test(nl[i].style.position)) {
56
+ if (state)
57
+ tinyMCE.addCSSClass(nl[i], 'mceVisualAid');
58
+ else
59
+ tinyMCE.removeCSSClass(nl[i], 'mceVisualAid');
60
+ }
61
+ }
62
+ },
63
+
64
+ getControlHTML : function(cn) {
65
+ switch (cn) {
66
+ case "moveforward":
67
+ return tinyMCE.getButtonHTML(cn, 'lang_layer_forward_desc', '{$pluginurl}/images/moveforward.gif', 'mceMoveForward', true);
68
+
69
+ case "movebackward":
70
+ return tinyMCE.getButtonHTML(cn, 'lang_layer_backward_desc', '{$pluginurl}/images/movebackward.gif', 'mceMoveBackward', true);
71
+
72
+ case "absolute":
73
+ return tinyMCE.getButtonHTML(cn, 'lang_layer_absolute_desc', '{$pluginurl}/images/absolute.gif', 'mceMakeAbsolute', true);
74
+
75
+ case "insertlayer":
76
+ return tinyMCE.getButtonHTML(cn, 'lang_layer_insertlayer_desc', '{$pluginurl}/images/insertlayer.gif', 'mceInsertLayer', true);
77
+ }
78
+
79
+ return "";
80
+ },
81
+
82
+ execCommand : function(editor_id, element, command, user_interface, value) {
83
+ // Handle commands
84
+ switch (command) {
85
+ case "mceInsertLayer":
86
+ this._insertLayer();
87
+ return true;
88
+
89
+ case "mceMoveForward":
90
+ this._move(1);
91
+ return true;
92
+
93
+ case "mceMoveBackward":
94
+ this._move(-1);
95
+ return true;
96
+
97
+ case "mceMakeAbsolute":
98
+ this._toggleAbsolute();
99
+ return true;
100
+ }
101
+
102
+ // Pass to next handler in chain
103
+ return false;
104
+ },
105
+
106
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
107
+ var inst = tinyMCE.getInstanceById(editor_id);
108
+ var le = this._getParentLayer(inst.getFocusElement());
109
+ var p = tinyMCE.getParentElement(inst.getFocusElement(), 'div,p,img');
110
+
111
+ tinyMCE.switchClass(editor_id + '_absolute', 'mceButtonDisabled');
112
+ tinyMCE.switchClass(editor_id + '_moveforward', 'mceButtonDisabled');
113
+ tinyMCE.switchClass(editor_id + '_movebackward', 'mceButtonDisabled');
114
+
115
+ if (p)
116
+ tinyMCE.switchClass(editor_id + '_absolute', 'mceButtonNormal');
117
+
118
+ if (le && le.style.position.toLowerCase() == "absolute") {
119
+ tinyMCE.switchClass(editor_id + '_absolute', 'mceButtonSelected');
120
+ tinyMCE.switchClass(editor_id + '_moveforward', 'mceButtonNormal');
121
+ tinyMCE.switchClass(editor_id + '_movebackward', 'mceButtonNormal');
122
+ }
123
+ },
124
+
125
+ // Private plugin specific methods
126
+
127
+ _move : function(d) {
128
+ var inst = tinyMCE.selectedInstance, i, z = new Array();
129
+ var le = this._getParentLayer(inst.getFocusElement()), ci = -1, fi = -1;
130
+ var nl = tinyMCE.selectNodes(inst.getBody(), function(n) {
131
+ return n.nodeType == 1 && new RegExp('absolute|relative|static', 'gi').test(n.style.position);
132
+ });
133
+
134
+ // Find z-indexes
135
+ for (i=0; i<nl.length; i++) {
136
+ z[i] = nl[i].style.zIndex ? parseInt(nl[i].style.zIndex) : 0;
137
+
138
+ if (ci < 0 && nl[i] == le)
139
+ ci = i;
140
+ }
141
+
142
+ if (d < 0) {
143
+ // Move back
144
+
145
+ // Try find a lower one
146
+ for (i=0; i<z.length; i++) {
147
+ if (z[i] < z[ci]) {
148
+ fi = i;
149
+ break;
150
+ }
151
+ }
152
+
153
+ if (fi > -1) {
154
+ nl[ci].style.zIndex = z[fi];
155
+ nl[fi].style.zIndex = z[ci];
156
+ } else {
157
+ if (z[ci] > 0)
158
+ nl[ci].style.zIndex = z[ci] - 1;
159
+ }
160
+ } else {
161
+ // Move forward
162
+
163
+ // Try find a higher one
164
+ for (i=0; i<z.length; i++) {
165
+ if (z[i] > z[ci]) {
166
+ fi = i;
167
+ break;
168
+ }
169
+ }
170
+
171
+ if (fi > -1) {
172
+ nl[ci].style.zIndex = z[fi];
173
+ nl[fi].style.zIndex = z[ci];
174
+ } else
175
+ nl[ci].style.zIndex = z[ci] + 1;
176
+ }
177
+
178
+ inst.repaint();
179
+ },
180
+
181
+ _getParentLayer : function(n) {
182
+ return tinyMCE.getParentNode(n, function(n) {
183
+ return n.nodeType == 1 && new RegExp('absolute|relative|static', 'gi').test(n.style.position);
184
+ });
185
+ },
186
+
187
+ _insertLayer : function() {
188
+ var inst = tinyMCE.selectedInstance;
189
+ var e = tinyMCE.getParentElement(inst.getFocusElement());
190
+ var p = tinyMCE.getAbsPosition(e);
191
+ var d = inst.getDoc();
192
+ var ne = d.createElement('div');
193
+ var h = inst.selection.getSelectedHTML();
194
+
195
+ // Move div
196
+ ne.style.position = 'absolute';
197
+ ne.style.left = p.absLeft + 'px';
198
+ ne.style.top = (p.absTop > 20 ? p.absTop : 20) + 'px';
199
+ ne.style.width = '100px';
200
+ ne.style.height = '100px';
201
+ ne.className = 'mceVisualAid';
202
+
203
+ if (!h)
204
+ h = tinyMCE.getLang('lang_layer_content');
205
+
206
+ ne.innerHTML = h;
207
+
208
+ // Add it
209
+ d.body.appendChild(ne);
210
+ },
211
+
212
+ _toggleAbsolute : function() {
213
+ var inst = tinyMCE.selectedInstance;
214
+ var le = this._getParentLayer(inst.getFocusElement());
215
+
216
+ if (le == null)
217
+ le = tinyMCE.getParentElement(inst.getFocusElement(), 'div,p,img');
218
+
219
+ if (le) {
220
+ if (le.style.position.toLowerCase() == "absolute") {
221
+ le.style.position = "";
222
+ le.style.left = "";
223
+ le.style.top = "";
224
+ } else {
225
+ le.style.position = "absolute";
226
+
227
+ if (le.style.left == "")
228
+ le.style.left = 20 + 'px';
229
+
230
+ if (le.style.top == "")
231
+ le.style.top = 20 + 'px';
232
+
233
+ if (le.style.width == "")
234
+ le.style.width = le.width ? (le.width + 'px') : '100px';
235
+
236
+ if (le.style.height == "")
237
+ le.style.height = le.height ? (le.height + 'px') : '100px';
238
+
239
+ tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
240
+ }
241
+
242
+ inst.repaint();
243
+ tinyMCE.triggerNodeChange();
244
+ }
245
+ }
246
+ };
247
+
248
+ tinyMCE.addPlugin("layer", TinyMCE_LayerPlugin);
js/tiny_mce/plugins/layer/images/absolute.gif ADDED
Binary file
js/tiny_mce/plugins/layer/images/backward.gif ADDED
Binary file
js/tiny_mce/plugins/layer/images/forward.gif ADDED
Binary file
js/tiny_mce/plugins/layer/images/insert_layer.gif ADDED
Binary file
js/tiny_mce/plugins/layer/images/insertlayer.gif ADDED
Binary file
js/tiny_mce/plugins/layer/images/movebackward.gif ADDED
Binary file
js/tiny_mce/plugins/layer/images/moveforward.gif ADDED
Binary file
js/tiny_mce/plugins/layer/langs/en.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('layer',{
4
+ insertlayer_desc : 'Insert new layer',
5
+ forward_desc : 'Move forward',
6
+ backward_desc : 'Move backward',
7
+ absolute_desc : 'Toggle absolute positioning',
8
+ content : 'New layer...'
9
+ });
js/tiny_mce/plugins/layer/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/media/css/content.css ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {
2
+ border: 1px dotted #cc0000;
3
+ background-position: center;
4
+ background-repeat: no-repeat;
5
+ background-color: #ffffcc;
6
+ }
7
+
8
+ .mceItemShockWave {
9
+ background-image: url('../images/shockwave.gif');
10
+ }
11
+
12
+ .mceItemFlash {
13
+ background-image: url('../images/flash.gif');
14
+ }
15
+
16
+ .mceItemQuickTime {
17
+ background-image: url('../images/quicktime.gif');
18
+ }
19
+
20
+ .mceItemWindowsMedia {
21
+ background-image: url('../images/windowsmedia.gif');
22
+ }
23
+
24
+ .mceItemRealMedia {
25
+ background-image: url('../images/realmedia.gif');
26
+ }
js/tiny_mce/plugins/media/css/media.css ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #id, #name, #hspace, #vspace, #class_name, #align {
2
+ width: 100px;
3
+ }
4
+
5
+ #hspace, #vspace {
6
+ width: 50px;
7
+ }
8
+
9
+ #flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode {
10
+ width: 100px;
11
+ }
12
+
13
+ #flash_base, #flash_flashvars {
14
+ width: 240px;
15
+ }
16
+
17
+ #width, #height {
18
+ width: 40px;
19
+ }
20
+
21
+ #src, #media_type {
22
+ width: 250px;
23
+ }
24
+
25
+ #class {
26
+ width: 120px;
27
+ }
28
+
29
+ #prev {
30
+ margin: 0;
31
+ border: 1px solid black;
32
+ width: 99%;
33
+ height: 230px;
34
+ overflow: auto;
35
+ }
36
+
37
+ .panel_wrapper div.current {
38
+ height: 390px;
39
+ overflow: auto;
40
+ }
41
+
42
+ #flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options {
43
+ display: none;
44
+ }
45
+
46
+ .mceAddSelectValue {
47
+ background-color: #DDDDDD;
48
+ }
49
+
50
+ #qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume {
51
+ width: 70px;
52
+ }
53
+
54
+ #wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume {
55
+ width: 70px;
56
+ }
57
+
58
+ #rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks {
59
+ width: 70px;
60
+ }
61
+
62
+ #shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle {
63
+ width: 90px;
64
+ }
65
+
66
+ #qt_qtsrc {
67
+ width: 200px;
68
+ }
js/tiny_mce/plugins/media/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('media');var TinyMCE_MediaPlugin={getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(inst.hasPlugin('flash')&&!tinyMCE.flashWarn){alert('Flash plugin is deprecated and should not be used together with the media plugin.');tinyMCE.flashWarn=true}if(!tinyMCE.settings['media_skip_plugin_css'])tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/media/css/content.css")},getControlHTML:function(cn){switch(cn){case"media":return tinyMCE.getButtonHTML(cn,'lang_media_desc','{$pluginurl}/images/media.gif','mceMedia')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceMedia":tinyMCE.openWindow({file:'../../plugins/media/media.htm',width:430+tinyMCE.getLang('lang_media_delta_width',0),height:470+tinyMCE.getLang('lang_media_delta_height',0)},{editor_id:editor_id,inline:"yes"});return true}return false},cleanup:function(type,content,inst){var nl,img,i,ne,d,s,ci;switch(type){case"insert_to_editor":img=tinyMCE.getParam("theme_href")+'/images/spacer.gif';content=content.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,'<img class="mceItem$1" title="$2" src="'+img+'" />');content=content.replace(/<object([^>]*)>/gi,'<div class="mceItemObject" $1>');content=content.replace(/<embed([^>]*)>/gi,'<div class="mceItemObjectEmbed" $1>');content=content.replace(/<\/(object|embed)([^>]*)>/gi,'</div>');content=content.replace(/<param([^>]*)>/gi,'<div $1 class="mceItemParam"></div>');content=content.replace(new RegExp('\\/ class="mceItemParam"><\\/div>','gi'),'class="mceItemParam"></div>');break;case"insert_to_editor_dom":d=inst.getDoc();nl=content.getElementsByTagName("img");for(i=0;i<nl.length;i++){if(/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(nl[i].className)){nl[i].width=nl[i].title.replace(/.*width:[^0-9]?([0-9]+)%?.*/g,'$1');nl[i].height=nl[i].title.replace(/.*height:[^0-9]?([0-9]+)%?.*/g,'$1');}}nl=tinyMCE.selectElements(content,'DIV',function(n){return tinyMCE.hasCSSClass(n,'mceItemObject')});for(i=0;i<nl.length;i++){ci=tinyMCE.getAttrib(nl[i],"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemFlash',d,nl[i]),nl[i]);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemShockWave',d,nl[i]),nl[i]);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemWindowsMedia',d,nl[i]),nl[i]);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemQuickTime',d,nl[i]),nl[i]);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemRealMedia',d,nl[i]),nl[i]);break}}nl=tinyMCE.selectNodes(content,function(n){return n.className=='mceItemObjectEmbed'});for(i=0;i<nl.length;i++){switch(tinyMCE.getAttrib(nl[i],'type')){case'application/x-shockwave-flash':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemFlash');break;case'application/x-director':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemShockWave');break;case'application/x-mplayer2':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemWindowsMedia');break;case'video/quicktime':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemQuickTime');break;case'audio/x-pn-realaudio-plugin':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemRealMedia');break}}break;case"get_from_editor":var startPos=-1,endPos,attribs,chunkBefore,chunkAfter,embedHTML,at,pl,cb,mt,ex;while((startPos=content.indexOf('<img',startPos+1))!=-1){endPos=content.indexOf('/>',startPos);attribs=TinyMCE_MediaPlugin._parseAttributes(content.substring(startPos+4,endPos));if(!/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(attribs['class']))continue;endPos+=2;at=attribs['title'];if(at){at=at.replace(/&(#39|apos);/g,"'");at=at.replace(/&#quot;/g,'"');try{pl=eval('x={'+at+'};')}catch(ex){pl={}}}if(!tinyMCE.getParam('media_use_script',false)){switch(attribs['class']){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166B1BCA-3F9C-11CF-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=tinyMCE.getParam('media_wmp6_compatible')?'05589FA1-C356-11CE-BF01-00AA0055595A':'6BF52A52-394A-11D3-B153-00C04F79FAA6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break}if(!tinyMCE.getParam("relative_urls"))pl.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],pl.src);embedHTML=TinyMCE_MediaPlugin._getEmbed(ci,cb,mt,pl,attribs)}else{switch(attribs['class']){case'mceItemFlash':s='writeFlash';break;case'mceItemShockWave':s='writeShockWave';break;case'mceItemWindowsMedia':s='writeWindowsMedia';break;case'mceItemQuickTime':s='writeQuickTime';break;case'mceItemRealMedia':s='writeRealMedia';break}if(attribs.width)at=at.replace(/width:[^0-9]?[0-9]+%?[^0-9]?/g,"width:'"+attribs.width+"'");if(attribs.height)at=at.replace(/height:[^0-9]?[0-9]+%?[^0-9]?/g,"height:'"+attribs.height+"'");if(!tinyMCE.getParam("relative_urls")){pl.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],pl.src);at=at.replace(new RegExp("src:'[^']*'","g"),"src:'"+pl.src+"'")}embedHTML='<script type="text/javascript">'+s+'({'+at+'});</script>'}chunkBefore=content.substring(0,startPos);chunkAfter=content.substring(endPos);content=chunkBefore+embedHTML+chunkAfter}break}return content},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(node,'class'))){tinyMCE.switchClass(editor_id+'_media','mceButtonSelected');return true}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_media','mceButtonNormal');return true},_createImgFromEmbed:function(n,d,cl){var ne,at,i,ti='',an;ne=d.createElement('img');ne.src=tinyMCE.getParam("theme_href")+'/images/spacer.gif';ne.width=tinyMCE.getAttrib(n,'width');ne.height=tinyMCE.getAttrib(n,'height');ne.className=cl;at=n.attributes;for(i=0;i<at.length;i++){if(at[i].specified&&at[i].nodeValue){an=at[i].nodeName.toLowerCase();if(an=='src')continue;if(an=='mce_src')an='src';if(an.indexOf('mce_')==-1&&!new RegExp('^(class|type)$').test(an))ti+=an.toLowerCase()+':\''+at[i].nodeValue+"',"}}ti=ti.length>0?ti.substring(0,ti.length-1):ti;ne.title=ti;n.parentNode.replaceChild(ne,n)},_createImg:function(cl,d,n){var i,nl,ti="",an,av,al=new Array();ne=d.createElement('img');ne.src=tinyMCE.getParam("theme_href")+'/images/spacer.gif';ne.width=tinyMCE.getAttrib(n,'width');ne.height=tinyMCE.getAttrib(n,'height');ne.className=cl;al.id=tinyMCE.getAttrib(n,'id');al.name=tinyMCE.getAttrib(n,'name');al.width=tinyMCE.getAttrib(n,'width');al.height=tinyMCE.getAttrib(n,'height');al.bgcolor=tinyMCE.getAttrib(n,'bgcolor');al.align=tinyMCE.getAttrib(n,'align');al.class_name=tinyMCE.getAttrib(n,'mce_class');nl=n.getElementsByTagName('div');for(i=0;i<nl.length;i++){av=tinyMCE.getAttrib(nl[i],'value');av=av.replace(new RegExp('\\\\','g'),'\\\\');av=av.replace(new RegExp('"','g'),'\\"');av=av.replace(new RegExp("'",'g'),"\\'");an=tinyMCE.getAttrib(nl[i],'name');al[an]=av}if(al.movie){al.src=al.movie;al.movie=null}for(an in al){if(al[an]!=null&&typeof(al[an])!="function"&&al[an]!='')ti+=an.toLowerCase()+':\''+al[an]+"',"}ti=ti.length>0?ti.substring(0,ti.length-1):ti;ne.title=ti;return ne},_getEmbed:function(cls,cb,mt,p,at){var h='',n;p.width=at.width?at.width:p.width;p.height=at.height?at.height:p.height;h+='<object classid="clsid:'+cls+'" codebase="'+cb+'"';h+=typeof(p.id)!="undefined"?' id="'+p.id+'"':'';h+=typeof(p.name)!="undefined"?' name="'+p.name+'"':'';h+=typeof(p.width)!="undefined"?' width="'+p.width+'"':'';h+=typeof(p.height)!="undefined"?' height="'+p.height+'"':'';h+=typeof(p.align)!="undefined"?' align="'+p.align+'"':'';h+='>';for(n in p){if(typeof(p[n])!="undefined"&&typeof(p[n])!="function"){h+='<param name="'+n+'" value="'+p[n]+'" />';if(n=='src'&&p[n].indexOf('://')!=-1&&mt=='application/x-mplayer2')h+='<param name="url" value="'+p[n]+'" />'}}h+='<embed type="'+mt+'"';for(n in p){if(typeof(p[n])=="function")continue;if(!(n=='url'&&mt=='application/x-mplayer2'))h+=' '+n+'="'+p[n]+'"'}h+='></embed></object>';return h},_parseAttributes:function(attribute_string){var attributeName="",endChr='"';var attributeValue="";var withInName;var withInValue;var attributes=new Array();var whiteSpaceRegExp=new RegExp('^[ \n\r\t]+','g');if(attribute_string==null||attribute_string.length<2)return null;withInName=withInValue=false;for(var i=0;i<attribute_string.length;i++){var chr=attribute_string.charAt(i);if((chr=='"'||chr=="'")&&!withInValue){withInValue=true;endChr=chr}else if(chr==endChr&&withInValue){withInValue=false;var pos=attributeName.lastIndexOf(' ');if(pos!=-1)attributeName=attributeName.substring(pos+1);attributes[attributeName.toLowerCase()]=attributeValue.substring(1);attributeName="";attributeValue=""}else if(!whiteSpaceRegExp.test(chr)&&!withInName&&!withInValue)withInName=true;if(chr=='='&&withInName)withInName=false;if(withInName)attributeName+=chr;if(withInValue)attributeValue+=chr}return attributes}};tinyMCE.addPlugin("media",TinyMCE_MediaPlugin);
js/tiny_mce/plugins/media/editor_plugin_src.js ADDED
@@ -0,0 +1,435 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 275 2007-05-01 15:35:08Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('media');
10
+
11
+ var TinyMCE_MediaPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Media',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ // Warn if user has flash plugin and media plugin at the same time
24
+ if (inst.hasPlugin('flash') && !tinyMCE.flashWarn) {
25
+ alert('Flash plugin is deprecated and should not be used together with the media plugin.');
26
+ tinyMCE.flashWarn = true;
27
+ }
28
+
29
+ if (!tinyMCE.settings['media_skip_plugin_css'])
30
+ tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/media/css/content.css");
31
+ },
32
+
33
+ getControlHTML : function(cn) {
34
+ switch (cn) {
35
+ case "media":
36
+ return tinyMCE.getButtonHTML(cn, 'lang_media_desc', '{$pluginurl}/images/media.gif', 'mceMedia');
37
+ }
38
+
39
+ return "";
40
+ },
41
+
42
+ execCommand : function(editor_id, element, command, user_interface, value) {
43
+ // Handle commands
44
+ switch (command) {
45
+ case "mceMedia":
46
+ tinyMCE.openWindow({
47
+ file : '../../plugins/media/media.htm',
48
+ width : 430 + tinyMCE.getLang('lang_media_delta_width', 0),
49
+ height : 470 + tinyMCE.getLang('lang_media_delta_height', 0)
50
+ }, {
51
+ editor_id : editor_id,
52
+ inline : "yes"
53
+ });
54
+
55
+ return true;
56
+ }
57
+
58
+ // Pass to next handler in chain
59
+ return false;
60
+ },
61
+
62
+ cleanup : function(type, content, inst) {
63
+ var nl, img, i, ne, d, s, ci;
64
+
65
+ switch (type) {
66
+ case "insert_to_editor":
67
+ img = tinyMCE.getParam("theme_href") + '/images/spacer.gif';
68
+ content = content.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, '<img class="mceItem$1" title="$2" src="' + img + '" />');
69
+ content = content.replace(/<object([^>]*)>/gi, '<div class="mceItemObject" $1>');
70
+ content = content.replace(/<embed([^>]*)>/gi, '<div class="mceItemObjectEmbed" $1>');
71
+ content = content.replace(/<\/(object|embed)([^>]*)>/gi, '</div>');
72
+ content = content.replace(/<param([^>]*)>/gi, '<div $1 class="mceItemParam"></div>');
73
+ content = content.replace(new RegExp('\\/ class="mceItemParam"><\\/div>', 'gi'), 'class="mceItemParam"></div>');
74
+ break;
75
+
76
+ case "insert_to_editor_dom":
77
+ d = inst.getDoc();
78
+ nl = content.getElementsByTagName("img");
79
+ for (i=0; i<nl.length; i++) {
80
+ if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(nl[i].className)) {
81
+ nl[i].width = nl[i].title.replace(/.*width:[^0-9]?([0-9]+)%?.*/g, '$1');
82
+ nl[i].height = nl[i].title.replace(/.*height:[^0-9]?([0-9]+)%?.*/g, '$1');
83
+ //nl[i].align = nl[i].title.replace(/.*align:([a-z]+).*/gi, '$1');
84
+ }
85
+ }
86
+
87
+ nl = tinyMCE.selectElements(content, 'DIV', function (n) {return tinyMCE.hasCSSClass(n, 'mceItemObject');});
88
+ for (i=0; i<nl.length; i++) {
89
+ ci = tinyMCE.getAttrib(nl[i], "classid").toLowerCase().replace(/\s+/g, '');
90
+
91
+ switch (ci) {
92
+ case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':
93
+ nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemFlash', d, nl[i]), nl[i]);
94
+ break;
95
+
96
+ case 'clsid:166b1bca-3f9c-11cf-8075-444553540000':
97
+ nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemShockWave', d, nl[i]), nl[i]);
98
+ break;
99
+
100
+ case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':
101
+ case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':
102
+ case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':
103
+ nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemWindowsMedia', d, nl[i]), nl[i]);
104
+ break;
105
+
106
+ case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':
107
+ nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemQuickTime', d, nl[i]), nl[i]);
108
+ break;
109
+
110
+ case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':
111
+ nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemRealMedia', d, nl[i]), nl[i]);
112
+ break;
113
+ }
114
+ }
115
+
116
+ // Handle embed (if any)
117
+ nl = tinyMCE.selectNodes(content, function (n) {return n.className == 'mceItemObjectEmbed';});
118
+ for (i=0; i<nl.length; i++) {
119
+ switch (tinyMCE.getAttrib(nl[i], 'type')) {
120
+ case 'application/x-shockwave-flash':
121
+ TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemFlash');
122
+ break;
123
+
124
+ case 'application/x-director':
125
+ TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemShockWave');
126
+ break;
127
+
128
+ case 'application/x-mplayer2':
129
+ TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemWindowsMedia');
130
+ break;
131
+
132
+ case 'video/quicktime':
133
+ TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemQuickTime');
134
+ break;
135
+
136
+ case 'audio/x-pn-realaudio-plugin':
137
+ TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemRealMedia');
138
+ break;
139
+ }
140
+ }
141
+ break;
142
+
143
+ case "get_from_editor":
144
+ var startPos = -1, endPos, attribs, chunkBefore, chunkAfter, embedHTML, at, pl, cb, mt, ex;
145
+
146
+ while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
147
+ endPos = content.indexOf('/>', startPos);
148
+ attribs = TinyMCE_MediaPlugin._parseAttributes(content.substring(startPos + 4, endPos));
149
+
150
+ // Is not flash, skip it
151
+ if (!/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(attribs['class']))
152
+ continue;
153
+
154
+ endPos += 2;
155
+
156
+ // Parse attributes
157
+ at = attribs['title'];
158
+ if (at) {
159
+ at = at.replace(/&(#39|apos);/g, "'");
160
+ at = at.replace(/&#quot;/g, '"');
161
+
162
+ try {
163
+ pl = eval('x={' + at + '};');
164
+ } catch (ex) {
165
+ pl = {};
166
+ }
167
+ }
168
+
169
+ // Use object/embed
170
+ if (!tinyMCE.getParam('media_use_script', false)) {
171
+ switch (attribs['class']) {
172
+ case 'mceItemFlash':
173
+ ci = 'd27cdb6e-ae6d-11cf-96b8-444553540000';
174
+ cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
175
+ mt = 'application/x-shockwave-flash';
176
+ break;
177
+
178
+ case 'mceItemShockWave':
179
+ ci = '166B1BCA-3F9C-11CF-8075-444553540000';
180
+ cb = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
181
+ mt = 'application/x-director';
182
+ break;
183
+
184
+ case 'mceItemWindowsMedia':
185
+ ci = tinyMCE.getParam('media_wmp6_compatible') ? '05589FA1-C356-11CE-BF01-00AA0055595A' : '6BF52A52-394A-11D3-B153-00C04F79FAA6';
186
+ cb = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
187
+ mt = 'application/x-mplayer2';
188
+ break;
189
+
190
+ case 'mceItemQuickTime':
191
+ ci = '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
192
+ cb = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
193
+ mt = 'video/quicktime';
194
+ break;
195
+
196
+ case 'mceItemRealMedia':
197
+ ci = 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';
198
+ cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
199
+ mt = 'audio/x-pn-realaudio-plugin';
200
+ break;
201
+ }
202
+
203
+ // Force absolute URL
204
+ if (!tinyMCE.getParam("relative_urls"))
205
+ pl.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], pl.src);
206
+
207
+ embedHTML = TinyMCE_MediaPlugin._getEmbed(ci, cb, mt, pl, attribs);
208
+ } else {
209
+ // Use script version
210
+ switch (attribs['class']) {
211
+ case 'mceItemFlash':
212
+ s = 'writeFlash';
213
+ break;
214
+
215
+ case 'mceItemShockWave':
216
+ s = 'writeShockWave';
217
+ break;
218
+
219
+ case 'mceItemWindowsMedia':
220
+ s = 'writeWindowsMedia';
221
+ break;
222
+
223
+ case 'mceItemQuickTime':
224
+ s = 'writeQuickTime';
225
+ break;
226
+
227
+ case 'mceItemRealMedia':
228
+ s = 'writeRealMedia';
229
+ break;
230
+ }
231
+
232
+ if (attribs.width)
233
+ at = at.replace(/width:[^0-9]?[0-9]+%?[^0-9]?/g, "width:'" + attribs.width + "'");
234
+
235
+ if (attribs.height)
236
+ at = at.replace(/height:[^0-9]?[0-9]+%?[^0-9]?/g, "height:'" + attribs.height + "'");
237
+
238
+ // Force absolute URL
239
+ if (!tinyMCE.getParam("relative_urls")) {
240
+ pl.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], pl.src);
241
+ at = at.replace(new RegExp("src:'[^']*'", "g"), "src:'" + pl.src + "'");
242
+ }
243
+
244
+ embedHTML = '<script type="text/javascript">' + s + '({' + at + '});</script>';
245
+ }
246
+
247
+ // Insert embed/object chunk
248
+ chunkBefore = content.substring(0, startPos);
249
+ chunkAfter = content.substring(endPos);
250
+ content = chunkBefore + embedHTML + chunkAfter;
251
+ }
252
+ break;
253
+ }
254
+
255
+ return content;
256
+ },
257
+
258
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
259
+ if (node == null)
260
+ return;
261
+
262
+ do {
263
+ if (node.nodeName == "IMG" && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(node, 'class'))) {
264
+ tinyMCE.switchClass(editor_id + '_media', 'mceButtonSelected');
265
+ return true;
266
+ }
267
+ } while ((node = node.parentNode));
268
+
269
+ tinyMCE.switchClass(editor_id + '_media', 'mceButtonNormal');
270
+
271
+ return true;
272
+ },
273
+
274
+ _createImgFromEmbed : function(n, d, cl) {
275
+ var ne, at, i, ti = '', an;
276
+
277
+ ne = d.createElement('img');
278
+ ne.src = tinyMCE.getParam("theme_href") + '/images/spacer.gif';
279
+ ne.width = tinyMCE.getAttrib(n, 'width');
280
+ ne.height = tinyMCE.getAttrib(n, 'height');
281
+ ne.className = cl;
282
+
283
+ at = n.attributes;
284
+ for (i=0; i<at.length; i++) {
285
+ if (at[i].specified && at[i].nodeValue) {
286
+ an = at[i].nodeName.toLowerCase();
287
+
288
+ if (an == 'src')
289
+ continue;
290
+
291
+ if (an == 'mce_src')
292
+ an = 'src';
293
+
294
+ if (an.indexOf('mce_') == -1 && !new RegExp('^(class|type)$').test(an))
295
+ ti += an.toLowerCase() + ':\'' + at[i].nodeValue + "',";
296
+ }
297
+ }
298
+
299
+ ti = ti.length > 0 ? ti.substring(0, ti.length - 1) : ti;
300
+ ne.title = ti;
301
+
302
+ n.parentNode.replaceChild(ne, n);
303
+ },
304
+
305
+ _createImg : function(cl, d, n) {
306
+ var i, nl, ti = "", an, av, al = new Array();
307
+
308
+ ne = d.createElement('img');
309
+ ne.src = tinyMCE.getParam("theme_href") + '/images/spacer.gif';
310
+ ne.width = tinyMCE.getAttrib(n, 'width');
311
+ ne.height = tinyMCE.getAttrib(n, 'height');
312
+ ne.className = cl;
313
+
314
+ al.id = tinyMCE.getAttrib(n, 'id');
315
+ al.name = tinyMCE.getAttrib(n, 'name');
316
+ al.width = tinyMCE.getAttrib(n, 'width');
317
+ al.height = tinyMCE.getAttrib(n, 'height');
318
+ al.bgcolor = tinyMCE.getAttrib(n, 'bgcolor');
319
+ al.align = tinyMCE.getAttrib(n, 'align');
320
+ al.class_name = tinyMCE.getAttrib(n, 'mce_class');
321
+
322
+ nl = n.getElementsByTagName('div');
323
+ for (i=0; i<nl.length; i++) {
324
+ av = tinyMCE.getAttrib(nl[i], 'value');
325
+ av = av.replace(new RegExp('\\\\', 'g'), '\\\\');
326
+ av = av.replace(new RegExp('"', 'g'), '\\"');
327
+ av = av.replace(new RegExp("'", 'g'), "\\'");
328
+ an = tinyMCE.getAttrib(nl[i], 'name');
329
+ al[an] = av;
330
+ }
331
+
332
+ if (al.movie) {
333
+ al.src = al.movie;
334
+ al.movie = null;
335
+ }
336
+
337
+ for (an in al) {
338
+ if (al[an] != null && typeof(al[an]) != "function" && al[an] != '')
339
+ ti += an.toLowerCase() + ':\'' + al[an] + "',";
340
+ }
341
+
342
+ ti = ti.length > 0 ? ti.substring(0, ti.length - 1) : ti;
343
+ ne.title = ti;
344
+
345
+ return ne;
346
+ },
347
+
348
+ _getEmbed : function(cls, cb, mt, p, at) {
349
+ var h = '', n;
350
+
351
+ p.width = at.width ? at.width : p.width;
352
+ p.height = at.height ? at.height : p.height;
353
+
354
+ h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
355
+ h += typeof(p.id) != "undefined" ? ' id="' + p.id + '"' : '';
356
+ h += typeof(p.name) != "undefined" ? ' name="' + p.name + '"' : '';
357
+ h += typeof(p.width) != "undefined" ? ' width="' + p.width + '"' : '';
358
+ h += typeof(p.height) != "undefined" ? ' height="' + p.height + '"' : '';
359
+ h += typeof(p.align) != "undefined" ? ' align="' + p.align + '"' : '';
360
+ h += '>';
361
+
362
+ for (n in p) {
363
+ if (typeof(p[n]) != "undefined" && typeof(p[n]) != "function") {
364
+ h += '<param name="' + n + '" value="' + p[n] + '" />';
365
+
366
+ // Add extra url parameter if it's an absolute URL on WMP
367
+ if (n == 'src' && p[n].indexOf('://') != -1 && mt == 'application/x-mplayer2')
368
+ h += '<param name="url" value="' + p[n] + '" />';
369
+ }
370
+ }
371
+
372
+ h += '<embed type="' + mt + '"';
373
+
374
+ for (n in p) {
375
+ if (typeof(p[n]) == "function")
376
+ continue;
377
+
378
+ // Skip url parameter for embed tag on WMP
379
+ if (!(n == 'url' && mt == 'application/x-mplayer2'))
380
+ h += ' ' + n + '="' + p[n] + '"';
381
+ }
382
+
383
+ h += '></embed></object>';
384
+
385
+ return h;
386
+ },
387
+
388
+ _parseAttributes : function(attribute_string) {
389
+ var attributeName = "", endChr = '"';
390
+ var attributeValue = "";
391
+ var withInName;
392
+ var withInValue;
393
+ var attributes = new Array();
394
+ var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
395
+
396
+ if (attribute_string == null || attribute_string.length < 2)
397
+ return null;
398
+
399
+ withInName = withInValue = false;
400
+
401
+ for (var i=0; i<attribute_string.length; i++) {
402
+ var chr = attribute_string.charAt(i);
403
+
404
+ if ((chr == '"' || chr == "'") && !withInValue) {
405
+ withInValue = true;
406
+ endChr = chr;
407
+ } else if (chr == endChr && withInValue) {
408
+ withInValue = false;
409
+
410
+ var pos = attributeName.lastIndexOf(' ');
411
+ if (pos != -1)
412
+ attributeName = attributeName.substring(pos+1);
413
+
414
+ attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
415
+
416
+ attributeName = "";
417
+ attributeValue = "";
418
+ } else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
419
+ withInName = true;
420
+
421
+ if (chr == '=' && withInName)
422
+ withInName = false;
423
+
424
+ if (withInName)
425
+ attributeName += chr;
426
+
427
+ if (withInValue)
428
+ attributeValue += chr;
429
+ }
430
+
431
+ return attributes;
432
+ }
433
+ };
434
+
435
+ tinyMCE.addPlugin("media", TinyMCE_MediaPlugin);
js/tiny_mce/plugins/media/images/flash.gif ADDED
Binary file
js/tiny_mce/plugins/media/images/media.gif ADDED
Binary file
js/tiny_mce/plugins/media/images/quicktime.gif ADDED
Binary file
js/tiny_mce/plugins/media/images/realmedia.gif ADDED
Binary file
js/tiny_mce/plugins/media/images/shockwave.gif ADDED
Binary file
js/tiny_mce/plugins/media/images/windowsmedia.gif ADDED
Binary file
js/tiny_mce/plugins/media/jscripts/embed.js ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
3
+ */
4
+
5
+ function writeFlash(p) {
6
+ writeEmbed(
7
+ 'D27CDB6E-AE6D-11cf-96B8-444553540000',
8
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
9
+ 'application/x-shockwave-flash',
10
+ p
11
+ );
12
+ }
13
+
14
+ function writeShockWave(p) {
15
+ writeEmbed(
16
+ '166B1BCA-3F9C-11CF-8075-444553540000',
17
+ 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
18
+ 'application/x-director',
19
+ p
20
+ );
21
+ }
22
+
23
+ function writeQuickTime(p) {
24
+ writeEmbed(
25
+ '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
26
+ 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
27
+ 'video/quicktime',
28
+ p
29
+ );
30
+ }
31
+
32
+ function writeRealMedia(p) {
33
+ writeEmbed(
34
+ 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
35
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
36
+ 'audio/x-pn-realaudio-plugin',
37
+ p
38
+ );
39
+ }
40
+
41
+ function writeWindowsMedia(p) {
42
+ p.url = p.src;
43
+ writeEmbed(
44
+ '6BF52A52-394A-11D3-B153-00C04F79FAA6',
45
+ 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
46
+ 'application/x-mplayer2',
47
+ p
48
+ );
49
+ }
50
+
51
+ function writeEmbed(cls, cb, mt, p) {
52
+ var h = '', n;
53
+
54
+ h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
55
+ h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
56
+ h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
57
+ h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
58
+ h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
59
+ h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
60
+ h += '>';
61
+
62
+ for (n in p)
63
+ h += '<param name="' + n + '" value="' + p[n] + '">';
64
+
65
+ h += '<embed type="' + mt + '"';
66
+
67
+ for (n in p)
68
+ h += n + '="' + p[n] + '" ';
69
+
70
+ h += '></embed></object>';
71
+
72
+ document.write(h);
73
+ }
js/tiny_mce/plugins/media/jscripts/media.js ADDED
@@ -0,0 +1,590 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var oldWidth, oldHeight;
2
+ var url = tinyMCE.getParam("media_external_list_url");
3
+ if (url != null) {
4
+ // Fix relative
5
+ if (url.charAt(0) != '/' && url.indexOf('://') == -1)
6
+ url = tinyMCE.documentBasePath + "/" + url;
7
+
8
+ document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
9
+ }
10
+
11
+ function init() {
12
+ var pl = "", f, val;
13
+ var type = "flash", fe, i;
14
+
15
+ tinyMCEPopup.resizeToInnerSize();
16
+ f = document.forms[0]
17
+
18
+ fe = tinyMCE.selectedInstance.getFocusElement();
19
+ if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(fe, 'class'))) {
20
+ pl = "x={" + fe.title + "};";
21
+
22
+ switch (tinyMCE.getAttrib(fe, 'class')) {
23
+ case 'mceItemFlash':
24
+ type = 'flash';
25
+ break;
26
+
27
+ case 'mceItemShockWave':
28
+ type = 'shockwave';
29
+ break;
30
+
31
+ case 'mceItemWindowsMedia':
32
+ type = 'wmp';
33
+ break;
34
+
35
+ case 'mceItemQuickTime':
36
+ type = 'qt';
37
+ break;
38
+
39
+ case 'mceItemRealMedia':
40
+ type = 'rmp';
41
+ break;
42
+ }
43
+
44
+ document.forms[0].insert.value = tinyMCE.getLang('lang_update', 'Insert', true);
45
+ }
46
+
47
+ document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
48
+ document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media');
49
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
50
+
51
+ var html = getMediaListHTML('filebrowser','src','media','media');
52
+ if (html == "")
53
+ document.getElementById("linklistrow").style.display = 'none';
54
+ else
55
+ document.getElementById("linklistcontainer").innerHTML = html;
56
+
57
+ // Resize some elements
58
+ if (isVisible('filebrowsercontainer'))
59
+ document.getElementById('src').style.width = '230px';
60
+
61
+ // Setup form
62
+ if (pl != "") {
63
+ pl = eval(pl);
64
+
65
+ switch (type) {
66
+ case "flash":
67
+ setBool(pl, 'flash', 'play');
68
+ setBool(pl, 'flash', 'loop');
69
+ setBool(pl, 'flash', 'menu');
70
+ setBool(pl, 'flash', 'swliveconnect');
71
+ setStr(pl, 'flash', 'quality');
72
+ setStr(pl, 'flash', 'scale');
73
+ setStr(pl, 'flash', 'salign');
74
+ setStr(pl, 'flash', 'wmode');
75
+ setStr(pl, 'flash', 'base');
76
+ setStr(pl, 'flash', 'flashvars');
77
+ break;
78
+
79
+ case "qt":
80
+ setBool(pl, 'qt', 'loop');
81
+ setBool(pl, 'qt', 'autoplay');
82
+ setBool(pl, 'qt', 'cache');
83
+ setBool(pl, 'qt', 'controller');
84
+ setBool(pl, 'qt', 'correction');
85
+ setBool(pl, 'qt', 'enablejavascript');
86
+ setBool(pl, 'qt', 'kioskmode');
87
+ setBool(pl, 'qt', 'autohref');
88
+ setBool(pl, 'qt', 'playeveryframe');
89
+ setBool(pl, 'qt', 'tarsetcache');
90
+ setStr(pl, 'qt', 'scale');
91
+ setStr(pl, 'qt', 'starttime');
92
+ setStr(pl, 'qt', 'endtime');
93
+ setStr(pl, 'qt', 'tarset');
94
+ setStr(pl, 'qt', 'qtsrcchokespeed');
95
+ setStr(pl, 'qt', 'volume');
96
+ setStr(pl, 'qt', 'qtsrc');
97
+ break;
98
+
99
+ case "shockwave":
100
+ setBool(pl, 'shockwave', 'sound');
101
+ setBool(pl, 'shockwave', 'progress');
102
+ setBool(pl, 'shockwave', 'autostart');
103
+ setBool(pl, 'shockwave', 'swliveconnect');
104
+ setStr(pl, 'shockwave', 'swvolume');
105
+ setStr(pl, 'shockwave', 'swstretchstyle');
106
+ setStr(pl, 'shockwave', 'swstretchhalign');
107
+ setStr(pl, 'shockwave', 'swstretchvalign');
108
+ break;
109
+
110
+ case "wmp":
111
+ setBool(pl, 'wmp', 'autostart');
112
+ setBool(pl, 'wmp', 'enabled');
113
+ setBool(pl, 'wmp', 'enablecontextmenu');
114
+ setBool(pl, 'wmp', 'fullscreen');
115
+ setBool(pl, 'wmp', 'invokeurls');
116
+ setBool(pl, 'wmp', 'mute');
117
+ setBool(pl, 'wmp', 'stretchtofit');
118
+ setBool(pl, 'wmp', 'windowlessvideo');
119
+ setStr(pl, 'wmp', 'balance');
120
+ setStr(pl, 'wmp', 'baseurl');
121
+ setStr(pl, 'wmp', 'captioningid');
122
+ setStr(pl, 'wmp', 'currentmarker');
123
+ setStr(pl, 'wmp', 'currentposition');
124
+ setStr(pl, 'wmp', 'defaultframe');
125
+ setStr(pl, 'wmp', 'playcount');
126
+ setStr(pl, 'wmp', 'rate');
127
+ setStr(pl, 'wmp', 'uimode');
128
+ setStr(pl, 'wmp', 'volume');
129
+ break;
130
+
131
+ case "rmp":
132
+ setBool(pl, 'rmp', 'autostart');
133
+ setBool(pl, 'rmp', 'loop');
134
+ setBool(pl, 'rmp', 'autogotourl');
135
+ setBool(pl, 'rmp', 'center');
136
+ setBool(pl, 'rmp', 'imagestatus');
137
+ setBool(pl, 'rmp', 'maintainaspect');
138
+ setBool(pl, 'rmp', 'nojava');
139
+ setBool(pl, 'rmp', 'prefetch');
140
+ setBool(pl, 'rmp', 'shuffle');
141
+ setStr(pl, 'rmp', 'console');
142
+ setStr(pl, 'rmp', 'controls');
143
+ setStr(pl, 'rmp', 'numloop');
144
+ setStr(pl, 'rmp', 'scriptcallbacks');
145
+ break;
146
+ }
147
+
148
+ setStr(pl, null, 'src');
149
+ setStr(pl, null, 'id');
150
+ setStr(pl, null, 'name');
151
+ setStr(pl, null, 'vspace');
152
+ setStr(pl, null, 'hspace');
153
+ setStr(pl, null, 'bgcolor');
154
+ setStr(pl, null, 'align');
155
+ setStr(pl, null, 'width');
156
+ setStr(pl, null, 'height');
157
+
158
+ if ((val = tinyMCE.getAttrib(fe, "width")) != "")
159
+ pl.width = f.width.value = val;
160
+
161
+ if ((val = tinyMCE.getAttrib(fe, "height")) != "")
162
+ pl.height = f.height.value = val;
163
+
164
+ oldWidth = pl.width ? parseInt(pl.width) : 0;
165
+ oldHeight = pl.height ? parseInt(pl.height) : 0;
166
+ } else
167
+ oldWidth = oldHeight = 0;
168
+
169
+ selectByValue(f, 'media_type', type);
170
+ changedType(type);
171
+ updateColor('bgcolor_pick', 'bgcolor');
172
+
173
+ TinyMCE_EditableSelects.init();
174
+ generatePreview();
175
+ }
176
+
177
+ function insertMedia() {
178
+ var fe, f = document.forms[0], h;
179
+
180
+ if (!AutoValidator.validate(f)) {
181
+ alert(tinyMCE.getLang('lang_invalid_data'));
182
+ return false;
183
+ }
184
+
185
+ f.width.value = f.width.value == "" ? 100 : f.width.value;
186
+ f.height.value = f.height.value == "" ? 100 : f.height.value;
187
+
188
+ fe = tinyMCE.selectedInstance.getFocusElement();
189
+ if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(fe, 'class'))) {
190
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
191
+ case "flash":
192
+ fe.className = "mceItemFlash";
193
+ break;
194
+
195
+ case "shockwave":
196
+ fe.className = "mceItemShockWave";
197
+ break;
198
+
199
+ case "qt":
200
+ fe.className = "mceItemQuickTime";
201
+ break;
202
+
203
+ case "wmp":
204
+ fe.className = "mceItemWindowsMedia";
205
+ break;
206
+
207
+ case "rmp":
208
+ fe.className = "mceItemRealMedia";
209
+ break;
210
+ }
211
+
212
+ if (fe.width != f.width.value || fe.height != f.height.height)
213
+ tinyMCE.selectedInstance.repaint();
214
+
215
+ fe.title = serializeParameters();
216
+ fe.width = f.width.value;
217
+ fe.height = f.height.value;
218
+ fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : '');
219
+ fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : '');
220
+ fe.align = f.align.options[f.align.selectedIndex].value;
221
+ } else {
222
+ h = '<img src="' + tinyMCE.getParam("theme_href") + '/images/spacer.gif"' ;
223
+
224
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
225
+ case "flash":
226
+ h += ' class="mceItemFlash"';
227
+ break;
228
+
229
+ case "shockwave":
230
+ h += ' class="mceItemShockWave"';
231
+ break;
232
+
233
+ case "qt":
234
+ h += ' class="mceItemQuickTime"';
235
+ break;
236
+
237
+ case "wmp":
238
+ h += ' class="mceItemWindowsMedia"';
239
+ break;
240
+
241
+ case "rmp":
242
+ h += ' class="mceItemRealMedia"';
243
+ break;
244
+ }
245
+
246
+ h += ' title="' + serializeParameters() + '"';
247
+ h += ' width="' + f.width.value + '"';
248
+ h += ' height="' + f.height.value + '"';
249
+ h += ' align="' + f.align.options[f.align.selectedIndex].value + '"';
250
+
251
+ h += ' />';
252
+
253
+ tinyMCE.selectedInstance.execCommand('mceInsertContent', false, h);
254
+ }
255
+
256
+ tinyMCEPopup.close();
257
+ }
258
+
259
+ function getMediaListHTML() {
260
+ if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
261
+ var html = "";
262
+
263
+ html += '<select id="linklist" name="linklist" style="width: 250px" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.src.value=this.options[this.selectedIndex].value;">';
264
+ html += '<option value="">---</option>';
265
+
266
+ for (var i=0; i<tinyMCEMediaList.length; i++)
267
+ html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
268
+
269
+ html += '</select>';
270
+
271
+ return html;
272
+ }
273
+
274
+ return "";
275
+ }
276
+
277
+ function getType(v) {
278
+ var fo, i, c, el, x, f = document.forms[0];
279
+
280
+ fo = tinyMCE.getParam("media_types", "flash=swf;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';');
281
+
282
+ // YouTube
283
+ if (v.indexOf('http://www.youtube.com/watch?v=') == 0) {
284
+ f.width.value = '425';
285
+ f.height.value = '350';
286
+ f.src.value = 'http://www.youtube.com/v/' + v.substring('http://www.youtube.com/watch?v='.length);
287
+ return 'flash';
288
+ }
289
+
290
+ // Google video
291
+ if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {
292
+ f.width.value = '425';
293
+ f.height.value = '326';
294
+ f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en';
295
+ return 'flash';
296
+ }
297
+
298
+ for (i=0; i<fo.length; i++) {
299
+ c = fo[i].split('=');
300
+
301
+ el = c[1].split(',');
302
+ for (x=0; x<el.length; x++)
303
+ if (v.indexOf('.' + el[x]) != -1)
304
+ return c[0];
305
+ }
306
+
307
+ return null;
308
+ }
309
+
310
+ function switchType(v) {
311
+ var t = getType(v), d = document, f = d.forms[0];
312
+
313
+ if (!t)
314
+ return;
315
+
316
+ selectByValue(d.forms[0], 'media_type', t);
317
+ changedType(t);
318
+
319
+ // Update qtsrc also
320
+ if (t == 'qt' && f.src.value.toLowerCase().indexOf('rtsp://') != -1) {
321
+ alert(tinyMCE.getLang("lang_media_qt_stream_warn"));
322
+
323
+ if (f.qt_qtsrc.value == '')
324
+ f.qt_qtsrc.value = f.src.value;
325
+ }
326
+ }
327
+
328
+ function changedType(t) {
329
+ var d = document;
330
+
331
+ d.getElementById('flash_options').style.display = 'none';
332
+ d.getElementById('qt_options').style.display = 'none';
333
+ d.getElementById('shockwave_options').style.display = 'none';
334
+ d.getElementById('wmp_options').style.display = 'none';
335
+ d.getElementById('rmp_options').style.display = 'none';
336
+ d.getElementById(t + '_options').style.display = 'block';
337
+ }
338
+
339
+ function serializeParameters() {
340
+ var d = document, f = d.forms[0], s = '';
341
+
342
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
343
+ case "flash":
344
+ s += getBool('flash', 'play', true);
345
+ s += getBool('flash', 'loop', true);
346
+ s += getBool('flash', 'menu', true);
347
+ s += getBool('flash', 'swliveconnect', false);
348
+ s += getStr('flash', 'quality');
349
+ s += getStr('flash', 'scale');
350
+ s += getStr('flash', 'salign');
351
+ s += getStr('flash', 'wmode');
352
+ s += getStr('flash', 'base');
353
+ s += getStr('flash', 'flashvars');
354
+ break;
355
+
356
+ case "qt":
357
+ s += getBool('qt', 'loop', false);
358
+ s += getBool('qt', 'autoplay', true);
359
+ s += getBool('qt', 'cache', false);
360
+ s += getBool('qt', 'controller', true);
361
+ s += getBool('qt', 'correction', false, 'none', 'full');
362
+ s += getBool('qt', 'enablejavascript', false);
363
+ s += getBool('qt', 'kioskmode', false);
364
+ s += getBool('qt', 'autohref', false);
365
+ s += getBool('qt', 'playeveryframe', false);
366
+ s += getBool('qt', 'targetcache', false);
367
+ s += getStr('qt', 'scale');
368
+ s += getStr('qt', 'starttime');
369
+ s += getStr('qt', 'endtime');
370
+ s += getStr('qt', 'target');
371
+ s += getStr('qt', 'qtsrcchokespeed');
372
+ s += getStr('qt', 'volume');
373
+ s += getStr('qt', 'qtsrc');
374
+ break;
375
+
376
+ case "shockwave":
377
+ s += getBool('shockwave', 'sound');
378
+ s += getBool('shockwave', 'progress');
379
+ s += getBool('shockwave', 'autostart');
380
+ s += getBool('shockwave', 'swliveconnect');
381
+ s += getStr('shockwave', 'swvolume');
382
+ s += getStr('shockwave', 'swstretchstyle');
383
+ s += getStr('shockwave', 'swstretchhalign');
384
+ s += getStr('shockwave', 'swstretchvalign');
385
+ break;
386
+
387
+ case "wmp":
388
+ s += getBool('wmp', 'autostart', true);
389
+ s += getBool('wmp', 'enabled', false);
390
+ s += getBool('wmp', 'enablecontextmenu', true);
391
+ s += getBool('wmp', 'fullscreen', false);
392
+ s += getBool('wmp', 'invokeurls', true);
393
+ s += getBool('wmp', 'mute', false);
394
+ s += getBool('wmp', 'stretchtofit', false);
395
+ s += getBool('wmp', 'windowlessvideo', false);
396
+ s += getStr('wmp', 'balance');
397
+ s += getStr('wmp', 'baseurl');
398
+ s += getStr('wmp', 'captioningid');
399
+ s += getStr('wmp', 'currentmarker');
400
+ s += getStr('wmp', 'currentposition');
401
+ s += getStr('wmp', 'defaultframe');
402
+ s += getStr('wmp', 'playcount');
403
+ s += getStr('wmp', 'rate');
404
+ s += getStr('wmp', 'uimode');
405
+ s += getStr('wmp', 'volume');
406
+ break;
407
+
408
+ case "rmp":
409
+ s += getBool('rmp', 'autostart', false);
410
+ s += getBool('rmp', 'loop', false);
411
+ s += getBool('rmp', 'autogotourl', true);
412
+ s += getBool('rmp', 'center', false);
413
+ s += getBool('rmp', 'imagestatus', true);
414
+ s += getBool('rmp', 'maintainaspect', false);
415
+ s += getBool('rmp', 'nojava', false);
416
+ s += getBool('rmp', 'prefetch', false);
417
+ s += getBool('rmp', 'shuffle', false);
418
+ s += getStr('rmp', 'console');
419
+ s += getStr('rmp', 'controls');
420
+ s += getStr('rmp', 'numloop');
421
+ s += getStr('rmp', 'scriptcallbacks');
422
+ break;
423
+ }
424
+
425
+ s += getStr(null, 'id');
426
+ s += getStr(null, 'name');
427
+ s += getStr(null, 'src');
428
+ s += getStr(null, 'align');
429
+ s += getStr(null, 'bgcolor');
430
+ s += getInt(null, 'vspace');
431
+ s += getInt(null, 'hspace');
432
+ s += getStr(null, 'width');
433
+ s += getStr(null, 'height');
434
+
435
+ s = s.length > 0 ? s.substring(0, s.length - 1) : s;
436
+
437
+ return s;
438
+ }
439
+
440
+ function setBool(pl, p, n) {
441
+ if (typeof(pl[n]) == "undefined")
442
+ return;
443
+
444
+ document.forms[0].elements[p + "_" + n].checked = pl[n];
445
+ }
446
+
447
+ function setStr(pl, p, n) {
448
+ var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n];
449
+
450
+ if (typeof(pl[n]) == "undefined")
451
+ return;
452
+
453
+ if (e.type == "text")
454
+ e.value = pl[n];
455
+ else
456
+ selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]);
457
+ }
458
+
459
+ function getBool(p, n, d, tv, fv) {
460
+ var v = document.forms[0].elements[p + "_" + n].checked;
461
+
462
+ tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'";
463
+ fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'";
464
+
465
+ return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ',');
466
+ }
467
+
468
+ function getStr(p, n, d) {
469
+ var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
470
+ var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
471
+
472
+ return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',");
473
+ }
474
+
475
+ function getInt(p, n, d) {
476
+ var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
477
+ var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
478
+
479
+ return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ",");
480
+ }
481
+
482
+ function jsEncode(s) {
483
+ s = s.replace(new RegExp('\\\\', 'g'), '\\\\');
484
+ s = s.replace(new RegExp('"', 'g'), '\\"');
485
+ s = s.replace(new RegExp("'", 'g'), "\\'");
486
+
487
+ return s;
488
+ }
489
+
490
+ function generatePreview(c) {
491
+ var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
492
+
493
+ p.innerHTML = '<!-- x --->';
494
+
495
+ nw = parseInt(f.width.value);
496
+ nh = parseInt(f.height.value);
497
+
498
+ if (f.width.value != "" && f.height.value != "") {
499
+ if (f.constrain.checked) {
500
+ if (c == 'width' && oldWidth != 0) {
501
+ wp = nw / oldWidth;
502
+ nh = Math.round(wp * nh);
503
+ f.height.value = nh;
504
+ } else if (c == 'height' && oldHeight != 0) {
505
+ hp = nh / oldHeight;
506
+ nw = Math.round(hp * nw);
507
+ f.width.value = nw;
508
+ }
509
+ }
510
+ }
511
+
512
+ if (f.width.value != "")
513
+ oldWidth = nw;
514
+
515
+ if (f.height.value != "")
516
+ oldHeight = nh;
517
+
518
+ // After constrain
519
+ pl = serializeParameters();
520
+
521
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
522
+ case "flash":
523
+ cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
524
+ codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
525
+ type = 'application/x-shockwave-flash';
526
+ break;
527
+
528
+ case "shockwave":
529
+ cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000';
530
+ codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
531
+ type = 'application/x-director';
532
+ break;
533
+
534
+ case "qt":
535
+ cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
536
+ codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
537
+ type = 'video/quicktime';
538
+ break;
539
+
540
+ case "wmp":
541
+ cls = tinyMCE.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6';
542
+ codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
543
+ type = 'application/x-mplayer2';
544
+ break;
545
+
546
+ case "rmp":
547
+ cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';
548
+ codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
549
+ type = 'audio/x-pn-realaudio-plugin';
550
+ break;
551
+ }
552
+
553
+ if (pl == '') {
554
+ p.innerHTML = '';
555
+ return;
556
+ }
557
+
558
+ pl = eval('x={' + pl + '};');
559
+
560
+ if (!pl.src) {
561
+ p.innerHTML = '';
562
+ return;
563
+ }
564
+
565
+ pl.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], pl.src);
566
+ pl.width = !pl.width ? 100 : pl.width;
567
+ pl.height = !pl.height ? 100 : pl.height;
568
+ pl.id = !pl.id ? 'obj' : pl.id;
569
+ pl.name = !pl.name ? 'eobj' : pl.name;
570
+ pl.align = !pl.align ? '' : pl.align;
571
+
572
+ h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
573
+
574
+ for (n in pl) {
575
+ h += '<param name="' + n + '" value="' + pl[n] + '">';
576
+
577
+ // Add extra url parameter if it's an absolute URL
578
+ if (n == 'src' && pl[n].indexOf('://') != -1)
579
+ h += '<param name="url" value="' + pl[n] + '" />';
580
+ }
581
+
582
+ h += '<embed type="' + type + '" ';
583
+
584
+ for (n in pl)
585
+ h += n + '="' + pl[n] + '" ';
586
+
587
+ h += '></embed></object>';
588
+
589
+ p.innerHTML = "<!-- x --->" + h;
590
+ }
js/tiny_mce/plugins/media/langs/en.js ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('media',{
4
+ title : 'Insert / edit embedded media',
5
+ desc : 'Insert / edit embedded media',
6
+ general : 'General',
7
+ advanced : 'Advanced',
8
+ file : 'File/URL',
9
+ list : 'List',
10
+ size : 'Dimensions',
11
+ preview : 'Preview',
12
+ constrain_proportions : 'Constrain proportions',
13
+ type : 'Type',
14
+ id : 'Id',
15
+ name : 'Name',
16
+ class_name : 'Class',
17
+ vspace : 'V-Space',
18
+ hspace : 'H-Space',
19
+ play : 'Auto play',
20
+ loop : 'Loop',
21
+ menu : 'Show menu',
22
+ quality : 'Quality',
23
+ scale : 'Scale',
24
+ align : 'Align',
25
+ salign : 'SAlign',
26
+ wmode : 'WMode',
27
+ bgcolor : 'Background',
28
+ base : 'Base',
29
+ flashvars : 'Flashvars',
30
+ liveconnect : 'SWLiveConnect',
31
+ autohref : 'AutoHREF',
32
+ cache : 'Cache',
33
+ hidden : 'Hidden',
34
+ controller : 'Controller',
35
+ kioskmode : 'Kiosk mode',
36
+ playeveryframe : 'Play every frame',
37
+ targetcache : 'Target cache',
38
+ correction : 'No correction',
39
+ enablejavascript : 'Enable JavaScript',
40
+ starttime : 'Start time',
41
+ endtime : 'End time',
42
+ href : 'Href',
43
+ qtsrcchokespeed : 'Choke speed',
44
+ target : 'Target',
45
+ volume : 'Volume',
46
+ autostart : 'Auto start',
47
+ enabled : 'Enabled',
48
+ fullscreen : 'Fullscreen',
49
+ invokeurls : 'Invoke URLs',
50
+ mute : 'Mute',
51
+ stretchtofit : 'Stretch to fit',
52
+ windowlessvideo : 'Windowless video',
53
+ balance : 'Balance',
54
+ baseurl : 'Base URL',
55
+ captioningid : 'Captioning id',
56
+ currentmarker : 'Current marker',
57
+ currentposition : 'Current position',
58
+ defaultframe : 'Default frame',
59
+ playcount : 'Play count',
60
+ rate : 'Rate',
61
+ uimode : 'UI Mode',
62
+ flash_options : 'Flash options',
63
+ qt_options : 'Quicktime options',
64
+ wmp_options : 'Windows media player options',
65
+ rmp_options : 'Real media player options',
66
+ shockwave_options : 'Shockwave options',
67
+ autogotourl : 'Auto goto URL',
68
+ center : 'Center',
69
+ imagestatus : 'Image status',
70
+ maintainaspect : 'Maintain aspect',
71
+ nojava : 'No java',
72
+ prefetch : 'Prefetch',
73
+ shuffle : 'Shuffle',
74
+ console : 'Console',
75
+ numloop : 'Num loops',
76
+ controls : 'Controls',
77
+ scriptcallbacks : 'Script callbacks',
78
+ swstretchstyle : 'Stretch style',
79
+ swstretchhalign : 'Stretch H-Align',
80
+ swstretchvalign : 'Stretch V-Align',
81
+ sound : 'Sound',
82
+ progress : 'Progress',
83
+ qtsrc : 'QT Src',
84
+ qt_stream_warn : 'Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..',
85
+ align_top : 'Top',
86
+ align_right : 'Right',
87
+ align_bottom : 'Bottom',
88
+ align_left : 'Left',
89
+ align_center : 'Center',
90
+ align_top_left : 'Top left',
91
+ align_top_right : 'Top right',
92
+ align_bottom_left : 'Bottom left',
93
+ align_bottom_right : 'Bottom right'
94
+ });
js/tiny_mce/plugins/media/media.htm ADDED
@@ -0,0 +1,723 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_media_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="jscripts/media.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/validate.js"></script>
8
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
9
+ <script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
10
+ <link href="css/media.css" rel="stylesheet" type="text/css" />
11
+ <base target="_self" />
12
+ </head>
13
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
14
+ <form onsubmit="insertMedia();return false;" action="#">
15
+ <div class="tabs">
16
+ <ul>
17
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');generatePreview();" onmousedown="return false;">{$lang_media_general}</a></span></li>
18
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_media_advanced}</a></span></li>
19
+ </ul>
20
+ </div>
21
+
22
+ <div class="panel_wrapper">
23
+ <div id="general_panel" class="panel current">
24
+ <fieldset>
25
+ <legend>{$lang_media_general}</legend>
26
+
27
+ <table border="0" cellpadding="4" cellspacing="0">
28
+ <tr>
29
+ <td><label for="media_type">{$lang_media_type}</label></td>
30
+ <td>
31
+ <select id="media_type" name="media_type" onchange="changedType(this.value);generatePreview();">
32
+ <option value="flash">Flash</option>
33
+ <option value="qt">Quicktime</option>
34
+ <option value="shockwave">Shockware</option>
35
+ <option value="wmp">Windows Media</option>
36
+ <option value="rmp">Real Media</option>
37
+ </select>
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <td><label for="src">{$lang_media_file}</label></td>
42
+ <td>
43
+ <table border="0" cellspacing="0" cellpadding="0">
44
+ <tr>
45
+ <td><input id="src" name="src" type="text" value="" onchange="switchType(this.value);generatePreview();" /></td>
46
+ <td id="filebrowsercontainer">&nbsp;</td>
47
+ </tr>
48
+ </table>
49
+ </td>
50
+ </tr>
51
+ <tr id="linklistrow">
52
+ <td><label for="linklist">{$lang_media_list}</label></td>
53
+ <td id="linklistcontainer">&nbsp;</td>
54
+ </tr>
55
+ <tr>
56
+ <td><label for="width">{$lang_media_size}</label></td>
57
+ <td>
58
+ <table border="0" cellpadding="0" cellspacing="0">
59
+ <tr>
60
+ <td><input type="text" id="width" name="width" value="" class="size" onchange="generatePreview('width');" /> x <input type="text" id="height" name="height" value="" class="size" onchange="generatePreview('height');" /></td>
61
+ <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
62
+ <td><label id="constrainlabel" for="constrain">{$lang_media_constrain_proportions}</label></td>
63
+ </tr>
64
+ </table>
65
+ </tr>
66
+ </table>
67
+ </fieldset>
68
+
69
+ <fieldset>
70
+ <legend>{$lang_media_preview}</legend>
71
+ <div id="prev"></div>
72
+ </fieldset>
73
+ </div>
74
+
75
+ <div id="advanced_panel" class="panel">
76
+ <fieldset>
77
+ <legend>{$lang_media_advanced}</legend>
78
+
79
+ <table border="0" cellpadding="4" cellspacing="0" width="100%">
80
+ <tr>
81
+ <td><label for="id">{$lang_media_id}</label></td>
82
+ <td><input type="text" id="id" name="id" onchange="generatePreview();" /></td>
83
+ <td><label for="name">{$lang_media_name}</label></td>
84
+ <td><input type="text" id="name" name="name" onchange="generatePreview();" /></td>
85
+ </tr>
86
+
87
+ <tr>
88
+ <td><label for="align">{$lang_media_align}</label></td>
89
+ <td>
90
+ <select id="align" name="align" onchange="generatePreview();">
91
+ <option value="">{$lang_not_set}</option>
92
+ <option value="top">{$lang_media_align_top}</option>
93
+ <option value="right">{$lang_media_align_right}</option>
94
+ <option value="bottom">{$lang_media_align_bottom}</option>
95
+ <option value="left">{$lang_media_align_left}</option>
96
+ </select>
97
+ </td>
98
+
99
+ <td><label for="bgcolor">{$lang_media_bgcolor}</label></td>
100
+ <td>
101
+ <table border="0" cellpadding="0" cellspacing="0">
102
+ <tr>
103
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');generatePreview();" /></td>
104
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
105
+ </tr>
106
+ </table>
107
+ </td>
108
+ </tr>
109
+
110
+ <tr>
111
+ <td><label for="vspace">{$lang_media_vspace}</label></td>
112
+ <td><input type="text" id="vspace" name="vspace" class="number" onchange="generatePreview();" /></td>
113
+ <td><label for="hspace">{$lang_media_hspace}</label></td>
114
+ <td><input type="text" id="hspace" name="hspace" class="number" onchange="generatePreview();" /></td>
115
+ </tr>
116
+ </table>
117
+ </fieldset>
118
+
119
+ <fieldset id="flash_options">
120
+ <legend>{$lang_media_flash_options}</legend>
121
+
122
+ <table border="0" cellpadding="4" cellspacing="0">
123
+ <tr>
124
+ <td><label for="flash_quality">{$lang_media_quality}</label></td>
125
+ <td>
126
+ <select id="flash_quality" name="flash_quality" onchange="generatePreview();">
127
+ <option value="">{$lang_not_set}</option>
128
+ <option value="high">high</option>
129
+ <option value="low">low</option>
130
+ <option value="autolow">autolow</option>
131
+ <option value="autohigh">autohigh</option>
132
+ <option value="best">best</option>
133
+ </select>
134
+ </td>
135
+
136
+ <td><label for="flash_scale">{$lang_media_scale}</label></td>
137
+ <td>
138
+ <select id="flash_scale" name="flash_scale" onchange="generatePreview();">
139
+ <option value="">{$lang_not_set}</option>
140
+ <option value="showall">showall</option>
141
+ <option value="noborder">noborder</option>
142
+ <option value="exactfit">exactfit</option>
143
+ </select>
144
+ </td>
145
+ </tr>
146
+
147
+ <tr>
148
+ <td><label for="flash_wmode">{$lang_media_wmode}</label></td>
149
+ <td>
150
+ <select id="flash_wmode" name="flash_wmode" onchange="generatePreview();">
151
+ <option value="">{$lang_not_set}</option>
152
+ <option value="window">window</option>
153
+ <option value="opaque">opaque</option>
154
+ <option value="transparent">transparent</option>
155
+ </select>
156
+ </td>
157
+
158
+ <td><label for="flash_salign">{$lang_media_salign}</label></td>
159
+ <td>
160
+ <select id="flash_salign" name="flash_salign" onchange="generatePreview();">
161
+ <option value="">{$lang_not_set}</option>
162
+ <option value="l">{$lang_media_align_left}</option>
163
+ <option value="t">{$lang_media_align_top}</option>
164
+ <option value="r">{$lang_media_align_right}</option>
165
+ <option value="b">{$lang_media_align_bottom}</option>
166
+ <option value="tl">{$lang_media_align_top_left}</option>
167
+ <option value="tr">{$lang_media_align_top_right}</option>
168
+ <option value="bl">{$lang_media_align_bottom_left}</option>
169
+ <option value="br">{$lang_media_align_bottom_right}</option>
170
+ </select>
171
+ </td>
172
+ </tr>
173
+
174
+ <tr>
175
+ <td colspan="2">
176
+ <table border="0" cellpadding="0" cellspacing="0">
177
+ <tr>
178
+ <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="generatePreview();" /></td>
179
+ <td><label for="flash_play">{$lang_media_play}</label></td>
180
+ </tr>
181
+ </table>
182
+ </td>
183
+
184
+ <td colspan="2">
185
+ <table border="0" cellpadding="0" cellspacing="0">
186
+ <tr>
187
+ <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="generatePreview();" /></td>
188
+ <td><label for="flash_loop">{$lang_media_loop}</label></td>
189
+ </tr>
190
+ </table>
191
+ </td>
192
+ </tr>
193
+
194
+ <tr>
195
+ <td colspan="2">
196
+ <table border="0" cellpadding="0" cellspacing="0">
197
+ <tr>
198
+ <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="generatePreview();" /></td>
199
+ <td><label for="flash_menu">{$lang_media_menu}</label></td>
200
+ </tr>
201
+ </table>
202
+ </td>
203
+
204
+ <td colspan="2">
205
+ <table border="0" cellpadding="0" cellspacing="0">
206
+ <tr>
207
+ <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="generatePreview();" /></td>
208
+ <td><label for="flash_swliveconnect">{$lang_media_liveconnect}</label></td>
209
+ </tr>
210
+ </table>
211
+ </td>
212
+ </tr>
213
+ </table>
214
+
215
+ <table>
216
+ <tr>
217
+ <td><label for="flash_base">{$lang_media_base}</label></td>
218
+ <td><input type="text" id="flash_base" name="flash_base" onchange="generatePreview();" /></td>
219
+ </tr>
220
+
221
+ <tr>
222
+ <td><label for="flash_flashvars">{$lang_media_flashvars}</label></td>
223
+ <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="generatePreview();" /></td>
224
+ </tr>
225
+ </table>
226
+ </fieldset>
227
+
228
+ <fieldset id="qt_options">
229
+ <legend>{$lang_media_qt_options}</legend>
230
+
231
+ <table border="0" cellpadding="4" cellspacing="0">
232
+ <tr>
233
+ <td colspan="2">
234
+ <table border="0" cellpadding="0" cellspacing="0">
235
+ <tr>
236
+ <td><input type="checkbox" class="checkbox" id="qt_loop" name="qt_loop" onchange="generatePreview();" /></td>
237
+ <td><label for="qt_loop">{$lang_media_loop}</label></td>
238
+ </tr>
239
+ </table>
240
+ </td>
241
+
242
+ <td colspan="2">
243
+ <table border="0" cellpadding="0" cellspacing="0">
244
+ <tr>
245
+ <td><input type="checkbox" class="checkbox" id="qt_autoplay" name="qt_autoplay" checked="checked" onchange="generatePreview();" /></td>
246
+ <td><label for="qt_autoplay">{$lang_media_play}</label></td>
247
+ </tr>
248
+ </table>
249
+ </td>
250
+ </tr>
251
+
252
+ <tr>
253
+ <td colspan="2">
254
+ <table border="0" cellpadding="0" cellspacing="0">
255
+ <tr>
256
+ <td><input type="checkbox" class="checkbox" id="qt_cache" name="qt_cache" onchange="generatePreview();" /></td>
257
+ <td><label for="qt_cache">{$lang_media_cache}</label></td>
258
+ </tr>
259
+ </table>
260
+ </td>
261
+
262
+ <td colspan="2">
263
+ <table border="0" cellpadding="0" cellspacing="0">
264
+ <tr>
265
+ <td><input type="checkbox" class="checkbox" id="qt_controller" name="qt_controller" checked="checked" onchange="generatePreview();" /></td>
266
+ <td><label for="qt_controller">{$lang_media_controller}</label></td>
267
+ </tr>
268
+ </table>
269
+ </td>
270
+ </tr>
271
+
272
+ <tr>
273
+ <td colspan="2">
274
+ <table border="0" cellpadding="0" cellspacing="0">
275
+ <tr>
276
+ <td><input type="checkbox" class="checkbox" id="qt_correction" name="qt_correction" onchange="generatePreview();" /></td>
277
+ <td><label for="qt_correction">{$lang_media_correction}</label></td>
278
+ </tr>
279
+ </table>
280
+ </td>
281
+
282
+ <td colspan="2">
283
+ <table border="0" cellpadding="0" cellspacing="0">
284
+ <tr>
285
+ <td><input type="checkbox" class="checkbox" id="qt_enablejavascript" name="qt_enablejavascript" onchange="generatePreview();" /></td>
286
+ <td><label for="qt_enablejavascript">{$lang_media_enablejavascript}</label></td>
287
+ </tr>
288
+ </table>
289
+ </td>
290
+ </tr>
291
+
292
+ <tr>
293
+ <td colspan="2">
294
+ <table border="0" cellpadding="0" cellspacing="0">
295
+ <tr>
296
+ <td><input type="checkbox" class="checkbox" id="qt_kioskmode" name="qt_kioskmode" onchange="generatePreview();" /></td>
297
+ <td><label for="qt_kioskmode">{$lang_media_kioskmode}</label></td>
298
+ </tr>
299
+ </table>
300
+ </td>
301
+
302
+ <td colspan="2">
303
+ <table border="0" cellpadding="0" cellspacing="0">
304
+ <tr>
305
+ <td><input type="checkbox" class="checkbox" id="qt_autohref" name="qt_autohref" onchange="generatePreview();" /></td>
306
+ <td><label for="qt_autohref">{$lang_media_autohref}</label></td>
307
+ </tr>
308
+ </table>
309
+ </td>
310
+ </tr>
311
+
312
+ <tr>
313
+ <td colspan="2">
314
+ <table border="0" cellpadding="0" cellspacing="0">
315
+ <tr>
316
+ <td><input type="checkbox" class="checkbox" id="qt_playeveryframe" name="qt_playeveryframe" onchange="generatePreview();" /></td>
317
+ <td><label for="qt_playeveryframe">{$lang_media_playeveryframe}</label></td>
318
+ </tr>
319
+ </table>
320
+ </td>
321
+
322
+ <td colspan="2">
323
+ <table border="0" cellpadding="0" cellspacing="0">
324
+ <tr>
325
+ <td><input type="checkbox" class="checkbox" id="qt_targetcache" name="qt_targetcache" onchange="generatePreview();" /></td>
326
+ <td><label for="qt_targetcache">{$lang_media_targetcache}</label></td>
327
+ </tr>
328
+ </table>
329
+ </td>
330
+ </tr>
331
+
332
+ <tr>
333
+ <td><label for="qt_scale">{$lang_media_scale}</label></td>
334
+ <td><select id="qt_scale" name="qt_scale" class="mceEditableSelect" onchange="generatePreview();">
335
+ <option value="">{$lang_not_set}</option>
336
+ <option value="tofit">tofit</option>
337
+ <option value="aspect">aspect</option>
338
+ </select>
339
+ </td>
340
+
341
+ <td colspan="2">&nbsp;</td>
342
+ </tr>
343
+
344
+ <tr>
345
+ <td><label for="qt_starttime">{$lang_media_starttime}</label></td>
346
+ <td><input type="text" id="qt_starttime" name="qt_starttime" onchange="generatePreview();" /></td>
347
+
348
+ <td><label for="qt_endtime">{$lang_media_endtime}</label></td>
349
+ <td><input type="text" id="qt_endtime" name="qt_endtime" onchange="generatePreview();" /></td>
350
+ </tr>
351
+
352
+ <tr>
353
+ <td><label for="qt_target">{$lang_media_target}</label></td>
354
+ <td><input type="text" id="qt_target" name="qt_target" onchange="generatePreview();" /></td>
355
+
356
+ <td><label for="qt_href">{$lang_media_href}</label></td>
357
+ <td><input type="text" id="qt_href" name="qt_href" onchange="generatePreview();" /></td>
358
+ </tr>
359
+
360
+ <tr>
361
+ <td><label for="qt_qtsrcchokespeed">{$lang_media_qtsrcchokespeed}</label></td>
362
+ <td><input type="text" id="qt_qtsrcchokespeed" name="qt_qtsrcchokespeed" onchange="generatePreview();" /></td>
363
+
364
+ <td><label for="qt_volume">{$lang_media_volume}</label></td>
365
+ <td><input type="text" id="qt_volume" name="qt_volume" onchange="generatePreview();" /></td>
366
+ </tr>
367
+
368
+ <tr>
369
+ <td><label for="qt_qtsrc">{$lang_media_qtsrc}</label></td>
370
+ <td colspan="4">
371
+ <table border="0" cellspacing="0" cellpadding="0">
372
+ <tr>
373
+ <td><input type="text" id="qt_qtsrc" name="qt_qtsrc" onchange="generatePreview();" /></td>
374
+ <td id="qtsrcfilebrowsercontainer">&nbsp;</td>
375
+ </tr>
376
+ </table>
377
+ </td>
378
+ </tr>
379
+ </table>
380
+ </fieldset>
381
+
382
+ <fieldset id="wmp_options">
383
+ <legend>{$lang_media_wmp_options}</legend>
384
+
385
+ <table border="0" cellpadding="4" cellspacing="0">
386
+ <tr>
387
+ <td colspan="2">
388
+ <table border="0" cellpadding="0" cellspacing="0">
389
+ <tr>
390
+ <td><input type="checkbox" class="checkbox" id="wmp_autostart" name="wmp_autostart" checked="checked" onchange="generatePreview();" /></td>
391
+ <td><label for="wmp_autostart">{$lang_media_autostart}</label></td>
392
+ </tr>
393
+ </table>
394
+ </td>
395
+
396
+ <td colspan="2">
397
+ <table border="0" cellpadding="0" cellspacing="0">
398
+ <tr>
399
+ <td><input type="checkbox" class="checkbox" id="wmp_enabled" name="wmp_enabled" onchange="generatePreview();" /></td>
400
+ <td><label for="wmp_enabled">{$lang_media_enabled}</label></td>
401
+ </tr>
402
+ </table>
403
+ </td>
404
+ </tr>
405
+
406
+ <tr>
407
+ <td colspan="2">
408
+ <table border="0" cellpadding="0" cellspacing="0">
409
+ <tr>
410
+ <td><input type="checkbox" class="checkbox" id="wmp_enablecontextmenu" name="wmp_enablecontextmenu" checked="checked" onchange="generatePreview();" /></td>
411
+ <td><label for="wmp_enablecontextmenu">{$lang_media_menu}</label></td>
412
+ </tr>
413
+ </table>
414
+ </td>
415
+
416
+ <td colspan="2">
417
+ <table border="0" cellpadding="0" cellspacing="0">
418
+ <tr>
419
+ <td><input type="checkbox" class="checkbox" id="wmp_fullscreen" name="wmp_fullscreen" onchange="generatePreview();" /></td>
420
+ <td><label for="wmp_fullscreen">{$lang_media_fullscreen}</label></td>
421
+ </tr>
422
+ </table>
423
+ </td>
424
+ </tr>
425
+
426
+ <tr>
427
+ <td colspan="2">
428
+ <table border="0" cellpadding="0" cellspacing="0">
429
+ <tr>
430
+ <td><input type="checkbox" class="checkbox" id="wmp_invokeurls" name="wmp_invokeurls" checked="checked" onchange="generatePreview();" /></td>
431
+ <td><label for="wmp_invokeurls">{$lang_media_invokeurls}</label></td>
432
+ </tr>
433
+ </table>
434
+ </td>
435
+
436
+ <td colspan="2">
437
+ <table border="0" cellpadding="0" cellspacing="0">
438
+ <tr>
439
+ <td><input type="checkbox" class="checkbox" id="wmp_mute" name="wmp_mute" onchange="generatePreview();" /></td>
440
+ <td><label for="wmp_mute">{$lang_media_mute}</label></td>
441
+ </tr>
442
+ </table>
443
+ </td>
444
+ </tr>
445
+
446
+ <tr>
447
+ <td colspan="2">
448
+ <table border="0" cellpadding="0" cellspacing="0">
449
+ <tr>
450
+ <td><input type="checkbox" class="checkbox" id="wmp_stretchtofit" name="wmp_stretchtofit" onchange="generatePreview();" /></td>
451
+ <td><label for="wmp_stretchtofit">{$lang_media_stretchtofit}</label></td>
452
+ </tr>
453
+ </table>
454
+ </td>
455
+
456
+ <td colspan="2">
457
+ <table border="0" cellpadding="0" cellspacing="0">
458
+ <tr>
459
+ <td><input type="checkbox" class="checkbox" id="wmp_windowlessvideo" name="wmp_windowlessvideo" onchange="generatePreview();" /></td>
460
+ <td><label for="wmp_windowlessvideo">{$lang_media_windowlessvideo}</label></td>
461
+ </tr>
462
+ </table>
463
+ </td>
464
+ </tr>
465
+
466
+ <tr>
467
+ <td><label for="wmp_balance">{$lang_media_balance}</label></td>
468
+ <td><input type="text" id="wmp_balance" name="wmp_balance" onchange="generatePreview();" /></td>
469
+
470
+ <td><label for="wmp_baseurl">{$lang_media_baseurl}</label></td>
471
+ <td><input type="text" id="wmp_baseurl" name="wmp_baseurl" onchange="generatePreview();" /></td>
472
+ </tr>
473
+
474
+ <tr>
475
+ <td><label for="wmp_captioningid">{$lang_media_captioningid}</label></td>
476
+ <td><input type="text" id="wmp_captioningid" name="wmp_captioningid" onchange="generatePreview();" /></td>
477
+
478
+ <td><label for="wmp_currentmarker">{$lang_media_currentmarker}</label></td>
479
+ <td><input type="text" id="wmp_currentmarker" name="wmp_currentmarker" onchange="generatePreview();" /></td>
480
+ </tr>
481
+
482
+ <tr>
483
+ <td><label for="wmp_currentposition">{$lang_media_currentposition}</label></td>
484
+ <td><input type="text" id="wmp_currentposition" name="wmp_currentposition" onchange="generatePreview();" /></td>
485
+
486
+ <td><label for="wmp_defaultframe">{$lang_media_defaultframe}</label></td>
487
+ <td><input type="text" id="wmp_defaultframe" name="wmp_defaultframe" onchange="generatePreview();" /></td>
488
+ </tr>
489
+
490
+ <tr>
491
+ <td><label for="wmp_playcount">{$lang_media_playcount}</label></td>
492
+ <td><input type="text" id="wmp_playcount" name="wmp_playcount" onchange="generatePreview();" /></td>
493
+
494
+ <td><label for="wmp_rate">{$lang_media_rate}</label></td>
495
+ <td><input type="text" id="wmp_rate" name="wmp_rate" onchange="generatePreview();" /></td>
496
+ </tr>
497
+
498
+ <tr>
499
+ <td><label for="wmp_uimode">{$lang_media_uimode}</label></td>
500
+ <td><input type="text" id="wmp_uimode" name="wmp_uimode" onchange="generatePreview();" /></td>
501
+
502
+ <td><label for="wmp_volume">{$lang_media_volume}</label></td>
503
+ <td><input type="text" id="wmp_volume" name="wmp_volume" onchange="generatePreview();" /></td>
504
+ </tr>
505
+
506
+ </table>
507
+ </fieldset>
508
+
509
+ <fieldset id="rmp_options">
510
+ <legend>{$lang_media_rmp_options}</legend>
511
+
512
+ <table border="0" cellpadding="4" cellspacing="0">
513
+ <tr>
514
+ <td colspan="2">
515
+ <table border="0" cellpadding="0" cellspacing="0">
516
+ <tr>
517
+ <td><input type="checkbox" class="checkbox" id="rmp_autostart" name="rmp_autostart" onchange="generatePreview();" /></td>
518
+ <td><label for="rmp_autostart">{$lang_media_autostart}</label></td>
519
+ </tr>
520
+ </table>
521
+ </td>
522
+
523
+ <td colspan="2">
524
+ <table border="0" cellpadding="0" cellspacing="0">
525
+ <tr>
526
+ <td><input type="checkbox" class="checkbox" id="rmp_loop" name="rmp_loop" onchange="generatePreview();" /></td>
527
+ <td><label for="rmp_loop">{$lang_media_loop}</label></td>
528
+ </tr>
529
+ </table>
530
+ </td>
531
+ </tr>
532
+
533
+ <tr>
534
+ <td colspan="2">
535
+ <table border="0" cellpadding="0" cellspacing="0">
536
+ <tr>
537
+ <td><input type="checkbox" class="checkbox" id="rmp_autogotourl" name="rmp_autogotourl" checked="checked" onchange="generatePreview();" /></td>
538
+ <td><label for="rmp_autogotourl">{$lang_media_autogotourl}</label></td>
539
+ </tr>
540
+ </table>
541
+ </td>
542
+
543
+ <td colspan="2">
544
+ <table border="0" cellpadding="0" cellspacing="0">
545
+ <tr>
546
+ <td><input type="checkbox" class="checkbox" id="rmp_center" name="rmp_center" onchange="generatePreview();" /></td>
547
+ <td><label for="rmp_center">{$lang_media_center}</label></td>
548
+ </tr>
549
+ </table>
550
+ </td>
551
+ </tr>
552
+
553
+ <tr>
554
+ <td colspan="2">
555
+ <table border="0" cellpadding="0" cellspacing="0">
556
+ <tr>
557
+ <td><input type="checkbox" class="checkbox" id="rmp_imagestatus" name="rmp_imagestatus" checked="checked" onchange="generatePreview();" /></td>
558
+ <td><label for="rmp_imagestatus">{$lang_media_imagestatus}</label></td>
559
+ </tr>
560
+ </table>
561
+ </td>
562
+
563
+ <td colspan="2">
564
+ <table border="0" cellpadding="0" cellspacing="0">
565
+ <tr>
566
+ <td><input type="checkbox" class="checkbox" id="rmp_maintainaspect" name="rmp_maintainaspect" onchange="generatePreview();" /></td>
567
+ <td><label for="rmp_maintainaspect">{$lang_media_maintainaspect}</label></td>
568
+ </tr>
569
+ </table>
570
+ </td>
571
+ </tr>
572
+
573
+ <tr>
574
+ <td colspan="2">
575
+ <table border="0" cellpadding="0" cellspacing="0">
576
+ <tr>
577
+ <td><input type="checkbox" class="checkbox" id="rmp_nojava" name="rmp_nojava" onchange="generatePreview();" /></td>
578
+ <td><label for="rmp_nojava">{$lang_media_nojava}</label></td>
579
+ </tr>
580
+ </table>
581
+ </td>
582
+
583
+ <td colspan="2">
584
+ <table border="0" cellpadding="0" cellspacing="0">
585
+ <tr>
586
+ <td><input type="checkbox" class="checkbox" id="rmp_prefetch" name="rmp_prefetch" onchange="generatePreview();" /></td>
587
+ <td><label for="rmp_prefetch">{$lang_media_prefetch}</label></td>
588
+ </tr>
589
+ </table>
590
+ </td>
591
+ </tr>
592
+
593
+ <tr>
594
+ <td colspan="2">
595
+ <table border="0" cellpadding="0" cellspacing="0">
596
+ <tr>
597
+ <td><input type="checkbox" class="checkbox" id="rmp_shuffle" name="rmp_shuffle" onchange="generatePreview();" /></td>
598
+ <td><label for="rmp_shuffle">{$lang_media_shuffle}</label></td>
599
+ </tr>
600
+ </table>
601
+ </td>
602
+
603
+ <td colspan="2">
604
+ &nbsp;
605
+ </td>
606
+ </tr>
607
+
608
+ <tr>
609
+ <td><label for="rmp_console">{$lang_media_console}</label></td>
610
+ <td><input type="text" id="rmp_console" name="rmp_console" onchange="generatePreview();" /></td>
611
+
612
+ <td><label for="rmp_controls">{$lang_media_controls}</label></td>
613
+ <td><input type="text" id="rmp_controls" name="rmp_controls" onchange="generatePreview();" /></td>
614
+ </tr>
615
+
616
+ <tr>
617
+ <td><label for="rmp_numloop">{$lang_media_numloop}</label></td>
618
+ <td><input type="text" id="rmp_numloop" name="rmp_numloop" onchange="generatePreview();" /></td>
619
+
620
+ <td><label for="rmp_scriptcallbacks">{$lang_media_scriptcallbacks}</label></td>
621
+ <td><input type="text" id="rmp_scriptcallbacks" name="rmp_scriptcallbacks" onchange="generatePreview();" /></td>
622
+ </tr>
623
+ </table>
624
+ </fieldset>
625
+
626
+ <fieldset id="shockwave_options">
627
+ <legend>{$lang_media_shockwave_options}</legend>
628
+
629
+ <table border="0" cellpadding="4" cellspacing="0">
630
+ <tr>
631
+ <td><label for="shockwave_swstretchstyle">{$lang_media_swstretchstyle}</label></td>
632
+ <td>
633
+ <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="generatePreview();">
634
+ <option value="none">{$lang_not_set}</option>
635
+ <option value="meet">Meet</option>
636
+ <option value="fill">Fill</option>
637
+ <option value="stage">Stage</option>
638
+ </select>
639
+ </td>
640
+
641
+ <td><label for="shockwave_swvolume">{$lang_media_volume}</label></td>
642
+ <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="generatePreview();" /></td>
643
+ </tr>
644
+
645
+ <tr>
646
+ <td><label for="shockwave_swstretchhalign">{$lang_media_swstretchhalign}</label></td>
647
+ <td>
648
+ <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="generatePreview();">
649
+ <option value="none">{$lang_not_set}</option>
650
+ <option value="left">{$lang_media_align_left}</option>
651
+ <option value="center">{$lang_media_align_center}</option>
652
+ <option value="right">{$lang_media_align_right}</option>
653
+ </select>
654
+ </td>
655
+
656
+ <td><label for="shockwave_swstretchvalign">{$lang_media_swstretchvalign}</label></td>
657
+ <td>
658
+ <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="generatePreview();">
659
+ <option value="none">{$lang_not_set}</option>
660
+ <option value="meet">Meet</option>
661
+ <option value="fill">Fill</option>
662
+ <option value="stage">Stage</option>
663
+ </select>
664
+ </td>
665
+ </tr>
666
+
667
+ <tr>
668
+ <td colspan="2">
669
+ <table border="0" cellpadding="0" cellspacing="0">
670
+ <tr>
671
+ <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="generatePreview();" checked="checked" /></td>
672
+ <td><label for="shockwave_autostart">{$lang_media_autostart}</label></td>
673
+ </tr>
674
+ </table>
675
+ </td>
676
+
677
+ <td colspan="2">
678
+ <table border="0" cellpadding="0" cellspacing="0">
679
+ <tr>
680
+ <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="generatePreview();" checked="checked" /></td>
681
+ <td><label for="shockwave_sound">{$lang_media_sound}</label></td>
682
+ </tr>
683
+ </table>
684
+ </td>
685
+ </tr>
686
+
687
+
688
+ <tr>
689
+ <td colspan="2">
690
+ <table border="0" cellpadding="0" cellspacing="0">
691
+ <tr>
692
+ <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="generatePreview();" /></td>
693
+ <td><label for="shockwave_swliveconnect">{$lang_media_liveconnect}</label></td>
694
+ </tr>
695
+ </table>
696
+ </td>
697
+
698
+ <td colspan="2">
699
+ <table border="0" cellpadding="0" cellspacing="0">
700
+ <tr>
701
+ <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="generatePreview();" checked="checked" /></td>
702
+ <td><label for="shockwave_progress">{$lang_media_progress}</label></td>
703
+ </tr>
704
+ </table>
705
+ </td>
706
+ </tr>
707
+ </table>
708
+ </fieldset>
709
+ </div>
710
+ </div>
711
+
712
+ <div class="mceActionPanel">
713
+ <div style="float: left">
714
+ <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertMedia();" />
715
+ </div>
716
+
717
+ <div style="float: right">
718
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
719
+ </div>
720
+ </div>
721
+ </form>
722
+ </body>
723
+ </html>
js/tiny_mce/plugins/nonbreaking/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('nonbreaking');var TinyMCE_NonBreakingPlugin={getInfo:function(){return{longname:'Nonbreaking space',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"nonbreaking":return tinyMCE.getButtonHTML(cn,'lang_nonbreaking_desc','{$pluginurl}/images/nonbreaking.gif','mceNonBreaking',false)}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id),h;switch(command){case"mceNonBreaking":h=(inst.visualChars&&inst.visualChars.state)?'<span class="mceItemHiddenVisualChar">&middot;</span>':'&nbsp;';tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,h);return true}return false},handleEvent:function(e){var inst,h;if(!tinyMCE.isOpera&&e.type=='keydown'&&e.keyCode==9&&tinyMCE.getParam('nonbreaking_force_tab',false)){inst=tinyMCE.selectedInstance;h=(inst.visualChars&&inst.visualChars.state)?'<span class="mceItemHiddenVisualChar">&middot;&middot;&middot;</span>':'&nbsp;&nbsp;&nbsp;';tinyMCE.execInstanceCommand(inst.editorId,'mceInsertContent',false,h);tinyMCE.cancelEvent(e);return false}return true}};tinyMCE.addPlugin("nonbreaking",TinyMCE_NonBreakingPlugin);
js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('nonbreaking');
10
+
11
+ var TinyMCE_NonBreakingPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Nonbreaking space',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ getControlHTML : function(cn) {
23
+ switch (cn) {
24
+ case "nonbreaking":
25
+ return tinyMCE.getButtonHTML(cn, 'lang_nonbreaking_desc', '{$pluginurl}/images/nonbreaking.gif', 'mceNonBreaking', false);
26
+ }
27
+
28
+ return "";
29
+ },
30
+
31
+
32
+ execCommand : function(editor_id, element, command, user_interface, value) {
33
+ var inst = tinyMCE.getInstanceById(editor_id), h;
34
+
35
+ switch (command) {
36
+ case "mceNonBreaking":
37
+ h = (inst.visualChars && inst.visualChars.state) ? '<span class="mceItemHiddenVisualChar">&middot;</span>' : '&nbsp;';
38
+ tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, h);
39
+ return true;
40
+ }
41
+
42
+ return false;
43
+ },
44
+
45
+ handleEvent : function(e) {
46
+ var inst, h;
47
+
48
+ if (!tinyMCE.isOpera && e.type == 'keydown' && e.keyCode == 9 && tinyMCE.getParam('nonbreaking_force_tab', false)) {
49
+ inst = tinyMCE.selectedInstance;
50
+
51
+ h = (inst.visualChars && inst.visualChars.state) ? '<span class="mceItemHiddenVisualChar">&middot;&middot;&middot;</span>' : '&nbsp;&nbsp;&nbsp;';
52
+ tinyMCE.execInstanceCommand(inst.editorId, 'mceInsertContent', false, h);
53
+
54
+ tinyMCE.cancelEvent(e);
55
+ return false;
56
+ }
57
+
58
+ return true;
59
+ }
60
+ };
61
+
62
+ tinyMCE.addPlugin("nonbreaking", TinyMCE_NonBreakingPlugin);
js/tiny_mce/plugins/nonbreaking/images/nonbreaking.gif ADDED
Binary file
js/tiny_mce/plugins/nonbreaking/langs/en.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('nonbreaking',{
4
+ desc : 'Insert non-breaking space character'
5
+ });
js/tiny_mce/plugins/noneditable/css/noneditable.css ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /* This is the CSS file for the noneditable elements plugin */
2
+
3
+ .mceEditable {
4
+ /*border: 1px dotted #0000cc;*/
5
+ }
6
+
7
+ .mceNonEditable {
8
+ /*border: 1px dotted #cc0000;*/
9
+ }
js/tiny_mce/plugins/noneditable/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ var TinyMCE_NonEditablePlugin={getInfo:function(){return{longname:'Non editable elements',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/noneditable/css/noneditable.css");if(tinyMCE.isMSIE5_0)tinyMCE.settings['plugins']=tinyMCE.settings['plugins'].replace(/noneditable/gi,'Noneditable')},handleEvent:function(e){return this._moveSelection(e,tinyMCE.selectedInstance)},cleanup:function(type,content,inst){switch(type){case"insert_to_editor_dom":var nodes,i,editClass,nonEditClass,editable,elm;if(tinyMCE.isGecko)return content;nodes=tinyMCE.getNodeTree(content,[],1);editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");for(i=0;i<nodes.length;i++){elm=nodes[i];editable=tinyMCE.getAttrib(elm,"contenteditable");if(new RegExp("true|false","gi").test(editable))TinyMCE_NonEditablePlugin._setEditable(elm,editable=="true");if(tinyMCE.isIE){if(tinyMCE.hasCSSClass(elm,editClass))elm.contentEditable=true;if(tinyMCE.hasCSSClass(elm,nonEditClass))elm.contentEditable=false}}break;case"insert_to_editor":var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");content=content.replace(/mceItemEditable/g,editClass);content=content.replace(/mceItemNonEditable/g,nonEditClass);if(tinyMCE.isIE&&(content.indexOf(editClass)!=-1||content.indexOf(nonEditClass)!=-1)){content=content.replace(new RegExp("class=\"(.+)("+editClass+")\"","gi"),'class="$1$2" contenteditable="true"');content=content.replace(new RegExp("class=\"(.+)("+nonEditClass+")\"","gi"),'class="$1$2" contenteditable="false"');content=content.replace(new RegExp("class=\"("+editClass+")([^\"]*)\"","gi"),'class="$1$2" contenteditable="true"');content=content.replace(new RegExp("class=\"("+nonEditClass+")([^\"]*)\"","gi"),'class="$1$2" contenteditable="false"');content=content.replace(new RegExp("class=\"(.+)("+editClass+")([^\"]*)\"","gi"),'class="$1$2$3" contenteditable="true"');content=content.replace(new RegExp("class=\"(.+)("+nonEditClass+")([^\"]*)\"","gi"),'class="$1$2$3" contenteditable="false"')}break;case"get_from_editor_dom":if(tinyMCE.isGecko)return content;if(tinyMCE.getParam("noneditable_leave_contenteditable",false)){var nodes=tinyMCE.getNodeTree(content,new Array(),1);for(var i=0;i<nodes.length;i++)nodes[i].removeAttribute("contenteditable")}break}return content},_moveSelection:function(e,inst){var s,r,sc,ec,el,c=tinyMCE.getParam('noneditable_editable_class','mceNonEditable');if(!inst)return true;if(tinyMCE.isGecko){s=inst.selection.getSel();r=s.getRangeAt(0);sc=tinyMCE.getParentNode(r.startContainer,function(n){return tinyMCE.hasCSSClass(n,c)});ec=tinyMCE.getParentNode(r.endContainer,function(n){return tinyMCE.hasCSSClass(n,c)});sc&&r.setStartBefore(sc);ec&&r.setEndAfter(ec);if(sc||ec){if(e.type=='keypress'&&e.keyCode==39){el=sc||ec;}s.removeAllRanges();s.addRange(r);return tinyMCE.cancelEvent(e)}}return true},_setEditable:function(elm,state){var editClass=tinyMCE.getParam("noneditable_editable_class","mceEditable");var nonEditClass=tinyMCE.getParam("noneditable_noneditable_class","mceNonEditable");var className=elm.className?elm.className:"";if(className.indexOf(editClass)!=-1||className.indexOf(nonEditClass)!=-1)return;if((className=tinyMCE.getAttrib(elm,"class"))!="")className+=" ";className+=state?editClass:nonEditClass;elm.setAttribute("class",className);elm.className=className}};tinyMCE.addPlugin("noneditable",TinyMCE_NonEditablePlugin);
js/tiny_mce/plugins/noneditable/editor_plugin_src.js ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 205 2007-02-12 18:58:29Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ var TinyMCE_NonEditablePlugin = {
9
+ getInfo : function() {
10
+ return {
11
+ longname : 'Non editable elements',
12
+ author : 'Moxiecode Systems AB',
13
+ authorurl : 'http://tinymce.moxiecode.com',
14
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',
15
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
16
+ };
17
+ },
18
+
19
+ initInstance : function(inst) {
20
+ tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/noneditable/css/noneditable.css");
21
+
22
+ // Ugly hack
23
+ if (tinyMCE.isMSIE5_0)
24
+ tinyMCE.settings['plugins'] = tinyMCE.settings['plugins'].replace(/noneditable/gi, 'Noneditable');
25
+ },
26
+
27
+ handleEvent : function(e) {
28
+ return this._moveSelection(e, tinyMCE.selectedInstance);
29
+ },
30
+
31
+ cleanup : function(type, content, inst) {
32
+ switch (type) {
33
+ case "insert_to_editor_dom":
34
+ var nodes, i, editClass, nonEditClass, editable, elm;
35
+
36
+ // Pass through Gecko
37
+ if (tinyMCE.isGecko)
38
+ return content;
39
+
40
+ nodes = tinyMCE.getNodeTree(content, [], 1);
41
+
42
+ editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
43
+ nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
44
+
45
+ for (i=0; i<nodes.length; i++) {
46
+ elm = nodes[i];
47
+
48
+ // Convert contenteditable to classes
49
+ editable = tinyMCE.getAttrib(elm, "contenteditable");
50
+ if (new RegExp("true|false","gi").test(editable))
51
+ TinyMCE_NonEditablePlugin._setEditable(elm, editable == "true");
52
+
53
+ if (tinyMCE.isIE) {
54
+ if (tinyMCE.hasCSSClass(elm, editClass))
55
+ elm.contentEditable = true;
56
+
57
+ if (tinyMCE.hasCSSClass(elm, nonEditClass))
58
+ elm.contentEditable = false;
59
+ }
60
+ }
61
+
62
+ break;
63
+
64
+ case "insert_to_editor":
65
+ var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
66
+ var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
67
+
68
+ // Replace mceItem to new school
69
+ content = content.replace(/mceItemEditable/g, editClass);
70
+ content = content.replace(/mceItemNonEditable/g, nonEditClass);
71
+
72
+ if (tinyMCE.isIE && (content.indexOf(editClass) != -1 || content.indexOf(nonEditClass) != -1)) {
73
+ content = content.replace(new RegExp("class=\"(.+)(" + editClass + ")\"", "gi"), 'class="$1$2" contenteditable="true"');
74
+ content = content.replace(new RegExp("class=\"(.+)(" + nonEditClass + ")\"", "gi"), 'class="$1$2" contenteditable="false"');
75
+ content = content.replace(new RegExp("class=\"(" + editClass + ")([^\"]*)\"", "gi"), 'class="$1$2" contenteditable="true"');
76
+ content = content.replace(new RegExp("class=\"(" + nonEditClass + ")([^\"]*)\"", "gi"), 'class="$1$2" contenteditable="false"');
77
+ content = content.replace(new RegExp("class=\"(.+)(" + editClass + ")([^\"]*)\"", "gi"), 'class="$1$2$3" contenteditable="true"');
78
+ content = content.replace(new RegExp("class=\"(.+)(" + nonEditClass + ")([^\"]*)\"", "gi"), 'class="$1$2$3" contenteditable="false"');
79
+ }
80
+
81
+ break;
82
+
83
+ case "get_from_editor_dom":
84
+ // Pass through Gecko
85
+ if (tinyMCE.isGecko)
86
+ return content;
87
+
88
+ if (tinyMCE.getParam("noneditable_leave_contenteditable", false)) {
89
+ var nodes = tinyMCE.getNodeTree(content, new Array(), 1);
90
+
91
+ for (var i=0; i<nodes.length; i++)
92
+ nodes[i].removeAttribute("contenteditable");
93
+ }
94
+
95
+ break;
96
+ }
97
+
98
+ return content;
99
+ },
100
+
101
+ _moveSelection : function(e, inst) {
102
+ var s, r, sc, ec, el, c = tinyMCE.getParam('noneditable_editable_class', 'mceNonEditable');
103
+
104
+ if (!inst)
105
+ return true;
106
+
107
+ // Always select whole element
108
+ if (tinyMCE.isGecko) {
109
+ s = inst.selection.getSel();
110
+ r = s.getRangeAt(0);
111
+ sc = tinyMCE.getParentNode(r.startContainer, function (n) {return tinyMCE.hasCSSClass(n, c);});
112
+ ec = tinyMCE.getParentNode(r.endContainer, function (n) {return tinyMCE.hasCSSClass(n, c);});
113
+
114
+ sc && r.setStartBefore(sc);
115
+ ec && r.setEndAfter(ec);
116
+
117
+ if (sc || ec) {
118
+ if (e.type == 'keypress' && e.keyCode == 39) {
119
+ el = sc || ec;
120
+
121
+ // Try!!
122
+ }
123
+
124
+ s.removeAllRanges();
125
+ s.addRange(r);
126
+
127
+ return tinyMCE.cancelEvent(e);
128
+ }
129
+ }
130
+
131
+ return true;
132
+ },
133
+
134
+ _setEditable : function(elm, state) {
135
+ var editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable");
136
+ var nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable");
137
+
138
+ var className = elm.className ? elm.className : "";
139
+
140
+ if (className.indexOf(editClass) != -1 || className.indexOf(nonEditClass) != -1)
141
+ return;
142
+
143
+ if ((className = tinyMCE.getAttrib(elm, "class")) != "")
144
+ className += " ";
145
+
146
+ className += state ? editClass : nonEditClass;
147
+
148
+ elm.setAttribute("class", className);
149
+ elm.className = className;
150
+ }
151
+ };
152
+
153
+ tinyMCE.addPlugin("noneditable", TinyMCE_NonEditablePlugin);
js/tiny_mce/plugins/noneditable/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/paste/blank.htm ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>blank_page</title>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <script language="javascript">
6
+ function init() {
7
+ document.body.contentEditable = true;
8
+ document.designMode = 'on';
9
+ parent.initIframe(document);
10
+ window.focus();
11
+ }
12
+ </script>
13
+ <link href="css/blank.css" rel="stylesheet" type="text/css" />
14
+ <base target="_self" />
15
+ </head>
16
+ <body onload="init();">
17
+
18
+ </body>
19
+ </html>
js/tiny_mce/plugins/paste/css/blank.css ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ background-color: #FFFFFF;
3
+ font-family: Verdana, Arial, Helvetica, sans-serif;
4
+ font-size: 10px;
5
+ scrollbar-3dlight-color: #F0F0EE;
6
+ scrollbar-arrow-color: #676662;
7
+ scrollbar-base-color: #F0F0EE;
8
+ scrollbar-darkshadow-color: #DDDDDD;
9
+ scrollbar-face-color: #E0E0DD;
10
+ scrollbar-highlight-color: #F0F0EE;
11
+ scrollbar-shadow-color: #F0F0EE;
12
+ scrollbar-track-color: #F5F5F5;
13
+ }
js/tiny_mce/plugins/paste/css/pasteword.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .sourceIframe {
2
+ border: 1px solid #808080;
3
+ }
js/tiny_mce/plugins/paste/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('paste');var TinyMCE_PastePlugin={getInfo:function(){return{longname:'Paste text/word',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(tinyMCE.isMSIE&&tinyMCE.getParam("paste_auto_cleanup_on_paste",false))tinyMCE.addEvent(inst.getBody(),"paste",TinyMCE_PastePlugin._handlePasteEvent)},handleEvent:function(e){if(!tinyMCE.isRealIE&&tinyMCE.getParam("paste_auto_cleanup_on_paste",false)&&e.ctrlKey&&e.keyCode==86&&e.type=="keydown"){window.setTimeout('tinyMCE.selectedInstance.execCommand("mcePasteText",true)',1);return tinyMCE.cancelEvent(e)}return true},getControlHTML:function(cn){switch(cn){case"pastetext":return tinyMCE.getButtonHTML(cn,'lang_paste_text_desc','{$pluginurl}/images/pastetext.gif','mcePasteText',true);case"pasteword":return tinyMCE.getButtonHTML(cn,'lang_paste_word_desc','{$pluginurl}/images/pasteword.gif','mcePasteWord',true);case"selectall":return tinyMCE.getButtonHTML(cn,'lang_selectall_desc','{$pluginurl}/images/selectall.gif','mceSelectAll',true)}return''},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePasteText":if(user_interface){if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&!tinyMCE.getParam('paste_use_dialog',false))TinyMCE_PastePlugin._insertText(clipboardData.getData("Text"),true);else{var template=new Array();template['file']='../../plugins/paste/pastetext.htm';template['width']=450;template['height']=400;var plain_text="";tinyMCE.openWindow(template,{editor_id:editor_id,plain_text:plain_text,resizable:"yes",scrollbars:"no",inline:"yes",mceDo:'insert'})}}else TinyMCE_PastePlugin._insertText(value['html'],value['linebreaks']);return true;case"mcePasteWord":if(user_interface){if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&!tinyMCE.getParam('paste_use_dialog',false)){TinyMCE_PastePlugin._insertWordContent(TinyMCE_PastePlugin._clipboardHTML())}else{var template=new Array();template['file']='../../plugins/paste/pasteword.htm';template['width']=450;template['height']=400;var plain_text="";tinyMCE.openWindow(template,{editor_id:editor_id,plain_text:plain_text,resizable:"yes",scrollbars:"no",inline:"yes",mceDo:'insert'})}}else TinyMCE_PastePlugin._insertWordContent(value);return true;case"mceSelectAll":tinyMCE.execInstanceCommand(editor_id,'selectall');return true}return false},_handlePasteEvent:function(e){switch(e.type){case"paste":var html=TinyMCE_PastePlugin._clipboardHTML();var r,inst=tinyMCE.selectedInstance;if(inst&&(r=inst.getRng())&&r.text.length>0)tinyMCE.execCommand('delete');if(html&&html.length>0)tinyMCE.execCommand('mcePasteWord',false,html);tinyMCE.cancelEvent(e);return false}return true},_insertText:function(content,bLinebreaks){if(content&&content.length>0){if(bLinebreaks){if(tinyMCE.getParam("paste_create_paragraphs",true)){var rl=tinyMCE.getParam("paste_replace_list",'\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i<rl.length;i+=2)content=content.replace(new RegExp(rl[i],'gi'),rl[i+1]);content=tinyMCE.regexpReplace(content,"\r\n\r\n","</p><p>","gi");content=tinyMCE.regexpReplace(content,"\r\r","</p><p>","gi");content=tinyMCE.regexpReplace(content,"\n\n","</p><p>","gi");if((pos=content.indexOf('</p><p>'))!=-1){tinyMCE.execCommand("Delete");var node=tinyMCE.selectedInstance.getFocusElement();var breakElms=new Array();do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node}}while(node=node.parentNode);var before="",after="</p>";before+=content.substring(0,pos);for(var i=0;i<breakElms.length;i++){before+="</"+breakElms[i].nodeName+">";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">"}before+="<p>";content=before+content.substring(pos+7)+after}}if(tinyMCE.getParam("paste_create_linebreaks",true)){content=tinyMCE.regexpReplace(content,"\r\n","<br />","gi");content=tinyMCE.regexpReplace(content,"\r","<br />","gi");content=tinyMCE.regexpReplace(content,"\n","<br />","gi")}}tinyMCE.execCommand("mceInsertRawHTML",false,content)}},_insertWordContent:function(content){if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);var cb;if((cb=tinyMCE.getParam("paste_insert_word_content_callback",""))!="")content=eval(cb+"('before', content)");var rl=tinyMCE.getParam("paste_replace_list",'\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i<rl.length;i+=2)content=content.replace(new RegExp(rl[i],'gi'),rl[i+1]);if(tinyMCE.getParam("paste_convert_headers_to_strong",false)){content=content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>','gi'),'<p><b>$1</b></p>')}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)<BR>","gi"),"<p>"+middot+"$1</p>");content=content.replace(new RegExp('<SPAN style="mso-list: Ignore">','gi'),"<span>"+bull);content=content.replace(/<o:p><\/o:p>/gi,"");content=content.replace(new RegExp('<br style="page-break-before: always;.*>','gi'),'-- page break --');content=content.replace(new RegExp('<(!--)([^>]*)(--)>','g'),"");if(tinyMCE.getParam("paste_remove_spans",true))content=content.replace(/<\/?span[^>]*>/gi,"");if(tinyMCE.getParam("paste_remove_styles",true))content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(tinyMCE.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");break;case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break}content=content.replace(new RegExp('href="?'+TinyMCE_PastePlugin._reEscape(""+document.location)+'','gi'),'href="'+tinyMCE.settings['document_base_url']);content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/-- page break --\s*<p>&nbsp;<\/p>/gi,"");content=content.replace(/-- page break --/gi,"");if(!tinyMCE.settings['force_p_newlines']){content=content.replace('','','gi');content=content.replace('</p>','<br /><br />','gi')}if(!tinyMCE.isMSIE&&!tinyMCE.settings['force_p_newlines']){content=content.replace(/<\/?p[^>]*>/gi,"")}content=content.replace(/<\/?div[^>]*>/gi,"");if(tinyMCE.getParam("paste_convert_middot_lists",true)){var div=document.createElement("div");div.innerHTML=content;var className=tinyMCE.getParam("paste_unindented_list_class","unIndentedList");while(TinyMCE_PastePlugin._convertMiddots(div,"--list--"));while(TinyMCE_PastePlugin._convertMiddots(div,middot,className));while(TinyMCE_PastePlugin._convertMiddots(div,bull));content=div.innerHTML}if(tinyMCE.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/<h[1-6]>&nbsp;<\/h[1-6]>/gi,'<p>&nbsp;&nbsp;</p>');content=content.replace(/<h[1-6]>/gi,'<p><b>');content=content.replace(/<\/h[1-6]>/gi,'</b></p>');content=content.replace(/<b>&nbsp;<\/b>/gi,'<b>&nbsp;&nbsp;</b>');content=content.replace(/^(&nbsp;)*/gi,'')}content=content.replace(/--list--/gi,"");if((cb=tinyMCE.getParam("paste_insert_word_content_callback",""))!="")content=eval(cb+"('after', content)");tinyMCE.execCommand("mceInsertContent",false,content);if(tinyMCE.getParam('paste_force_cleanup_wordpaste',true))window.setTimeout('tinyMCE.execCommand("mceCleanup");',1);}},_reEscape:function(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i<s.length;i++){var c=s.charAt(i);if(l.indexOf(c)!=-1)o+='\\'+c;else o+=c}return o},_convertMiddots:function(div,search,class_name){var mdot=String.fromCharCode(183);var bull=String.fromCharCode(8226);var nodes=div.getElementsByTagName("p");var prevul;for(var i=0;i<nodes.length;i++){var p=nodes[i];if(p.innerHTML.indexOf(search)==0){var ul=document.createElement("ul");if(class_name)ul.className=class_name;var li=document.createElement("li");li.innerHTML=p.innerHTML.replace(new RegExp(''+mdot+'|'+bull+'|--list--|&nbsp;',"gi"),'');ul.appendChild(li);var np=p.nextSibling;while(np){if(np.nodeType==3&&new RegExp('^\\s$','m').test(np.nodeValue)){np=np.nextSibling;continue}if(search==mdot){if(np.nodeType==1&&new RegExp('^o(\\s+|&nbsp;)').test(np.innerHTML)){if(!prevul){prevul=ul;ul=document.createElement("ul");prevul.appendChild(ul)}np.innerHTML=np.innerHTML.replace(/^o/,'')}else{if(prevul){ul=prevul;prevul=null}if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0)break}}else{if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0)break}var cp=np.nextSibling;var li=document.createElement("li");li.innerHTML=np.innerHTML.replace(new RegExp(''+mdot+'|'+bull+'|--list--|&nbsp;',"gi"),'');np.parentNode.removeChild(np);ul.appendChild(li);np=cp}p.parentNode.replaceChild(ul,p);return true}}return false},_clipboardHTML:function(){var div=document.getElementById('_TinyMCE_clipboardHTML');if(!div){var div=document.createElement('DIV');div.id='_TinyMCE_clipboardHTML';with(div.style){visibility='hidden';overflow='hidden';position='absolute';width=1;height=1}document.body.appendChild(div)}div.innerHTML='';var rng=document.body.createTextRange();rng.moveToElementText(div);rng.execCommand('Paste');var html=div.innerHTML;div.innerHTML='';return html}};tinyMCE.addPlugin("paste",TinyMCE_PastePlugin);
js/tiny_mce/plugins/paste/editor_plugin_src.js ADDED
@@ -0,0 +1,395 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('paste');
10
+
11
+ var TinyMCE_PastePlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Paste text/word',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ if (tinyMCE.isMSIE && tinyMCE.getParam("paste_auto_cleanup_on_paste", false))
24
+ tinyMCE.addEvent(inst.getBody(), "paste", TinyMCE_PastePlugin._handlePasteEvent);
25
+ },
26
+
27
+ handleEvent : function(e) {
28
+ // Force paste dialog if non IE browser
29
+ if (!tinyMCE.isRealIE && tinyMCE.getParam("paste_auto_cleanup_on_paste", false) && e.ctrlKey && e.keyCode == 86 && e.type == "keydown") {
30
+ window.setTimeout('tinyMCE.selectedInstance.execCommand("mcePasteText",true)', 1);
31
+ return tinyMCE.cancelEvent(e);
32
+ }
33
+
34
+ return true;
35
+ },
36
+
37
+ getControlHTML : function(cn) {
38
+ switch (cn) {
39
+ case "pastetext":
40
+ return tinyMCE.getButtonHTML(cn, 'lang_paste_text_desc', '{$pluginurl}/images/pastetext.gif', 'mcePasteText', true);
41
+
42
+ case "pasteword":
43
+ return tinyMCE.getButtonHTML(cn, 'lang_paste_word_desc', '{$pluginurl}/images/pasteword.gif', 'mcePasteWord', true);
44
+
45
+ case "selectall":
46
+ return tinyMCE.getButtonHTML(cn, 'lang_selectall_desc', '{$pluginurl}/images/selectall.gif', 'mceSelectAll', true);
47
+ }
48
+
49
+ return '';
50
+ },
51
+
52
+ execCommand : function(editor_id, element, command, user_interface, value) {
53
+ switch (command) {
54
+ case "mcePasteText":
55
+ if (user_interface) {
56
+ if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false))
57
+ TinyMCE_PastePlugin._insertText(clipboardData.getData("Text"), true);
58
+ else {
59
+ var template = new Array();
60
+ template['file'] = '../../plugins/paste/pastetext.htm'; // Relative to theme
61
+ template['width'] = 450;
62
+ template['height'] = 400;
63
+ var plain_text = "";
64
+ tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'});
65
+ }
66
+ } else
67
+ TinyMCE_PastePlugin._insertText(value['html'], value['linebreaks']);
68
+
69
+ return true;
70
+
71
+ case "mcePasteWord":
72
+ if (user_interface) {
73
+ if ((tinyMCE.isMSIE && !tinyMCE.isOpera) && !tinyMCE.getParam('paste_use_dialog', false)) {
74
+ TinyMCE_PastePlugin._insertWordContent(TinyMCE_PastePlugin._clipboardHTML());
75
+ } else {
76
+ var template = new Array();
77
+ template['file'] = '../../plugins/paste/pasteword.htm'; // Relative to theme
78
+ template['width'] = 450;
79
+ template['height'] = 400;
80
+ var plain_text = "";
81
+ tinyMCE.openWindow(template, {editor_id : editor_id, plain_text: plain_text, resizable : "yes", scrollbars : "no", inline : "yes", mceDo : 'insert'});
82
+ }
83
+ } else
84
+ TinyMCE_PastePlugin._insertWordContent(value);
85
+
86
+ return true;
87
+
88
+ case "mceSelectAll":
89
+ tinyMCE.execInstanceCommand(editor_id, 'selectall');
90
+ return true;
91
+
92
+ }
93
+
94
+ // Pass to next handler in chain
95
+ return false;
96
+ },
97
+
98
+ // Private plugin internal methods
99
+
100
+ _handlePasteEvent : function(e) {
101
+ switch (e.type) {
102
+ case "paste":
103
+ var html = TinyMCE_PastePlugin._clipboardHTML();
104
+ var r, inst = tinyMCE.selectedInstance;
105
+
106
+ // Removes italic, strong etc, the if was needed due to bug #1437114
107
+ if (inst && (r = inst.getRng()) && r.text.length > 0)
108
+ tinyMCE.execCommand('delete');
109
+
110
+ if (html && html.length > 0)
111
+ tinyMCE.execCommand('mcePasteWord', false, html);
112
+
113
+ tinyMCE.cancelEvent(e);
114
+ return false;
115
+ }
116
+
117
+ return true;
118
+ },
119
+
120
+ _insertText : function(content, bLinebreaks) {
121
+ if (content && content.length > 0) {
122
+ if (bLinebreaks) {
123
+ // Special paragraph treatment
124
+ if (tinyMCE.getParam("paste_create_paragraphs", true)) {
125
+ var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
126
+ for (var i=0; i<rl.length; i+=2)
127
+ content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
128
+
129
+ content = tinyMCE.regexpReplace(content, "\r\n\r\n", "</p><p>", "gi");
130
+ content = tinyMCE.regexpReplace(content, "\r\r", "</p><p>", "gi");
131
+ content = tinyMCE.regexpReplace(content, "\n\n", "</p><p>", "gi");
132
+
133
+ // Has paragraphs
134
+ if ((pos = content.indexOf('</p><p>')) != -1) {
135
+ tinyMCE.execCommand("Delete");
136
+
137
+ var node = tinyMCE.selectedInstance.getFocusElement();
138
+
139
+ // Get list of elements to break
140
+ var breakElms = new Array();
141
+
142
+ do {
143
+ if (node.nodeType == 1) {
144
+ // Don't break tables and break at body
145
+ if (node.nodeName == "TD" || node.nodeName == "BODY")
146
+ break;
147
+
148
+ breakElms[breakElms.length] = node;
149
+ }
150
+ } while(node = node.parentNode);
151
+
152
+ var before = "", after = "</p>";
153
+ before += content.substring(0, pos);
154
+
155
+ for (var i=0; i<breakElms.length; i++) {
156
+ before += "</" + breakElms[i].nodeName + ">";
157
+ after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">";
158
+ }
159
+
160
+ before += "<p>";
161
+ content = before + content.substring(pos+7) + after;
162
+ }
163
+ }
164
+
165
+ if (tinyMCE.getParam("paste_create_linebreaks", true)) {
166
+ content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi");
167
+ content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi");
168
+ content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi");
169
+ }
170
+ }
171
+
172
+ tinyMCE.execCommand("mceInsertRawHTML", false, content);
173
+ }
174
+ },
175
+
176
+ _insertWordContent : function(content) {
177
+ if (content && content.length > 0) {
178
+ // Cleanup Word content
179
+ var bull = String.fromCharCode(8226);
180
+ var middot = String.fromCharCode(183);
181
+ var cb;
182
+
183
+ if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")
184
+ content = eval(cb + "('before', content)");
185
+
186
+ var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');
187
+ for (var i=0; i<rl.length; i+=2)
188
+ content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);
189
+
190
+ if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
191
+ content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>');
192
+ }
193
+
194
+ content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--");
195
+ content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>");
196
+ content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); // Covert to bull list
197
+ content = content.replace(/<o:p><\/o:p>/gi, "");
198
+ content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); // Replace pagebreaks
199
+ content = content.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), ""); // Word comments
200
+
201
+ if (tinyMCE.getParam("paste_remove_spans", true))
202
+ content = content.replace(/<\/?span[^>]*>/gi, "");
203
+
204
+ if (tinyMCE.getParam("paste_remove_styles", true))
205
+ content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3");
206
+
207
+ content = content.replace(/<\/?font[^>]*>/gi, "");
208
+
209
+ // Strips class attributes.
210
+ switch (tinyMCE.getParam("paste_strip_class_attributes", "all")) {
211
+ case "all":
212
+ content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
213
+ break;
214
+
215
+ case "mso":
216
+ content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3");
217
+ break;
218
+ }
219
+
220
+ content = content.replace(new RegExp('href="?' + TinyMCE_PastePlugin._reEscape("" + document.location) + '', 'gi'), 'href="' + tinyMCE.settings['document_base_url']);
221
+ content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
222
+ content = content.replace(/<\\?\?xml[^>]*>/gi, "");
223
+ content = content.replace(/<\/?\w+:[^>]*>/gi, "");
224
+ content = content.replace(/-- page break --\s*<p>&nbsp;<\/p>/gi, ""); // Remove pagebreaks
225
+ content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks
226
+
227
+ // content = content.replace(/\/?&nbsp;*/gi, ""); &nbsp;
228
+ // content = content.replace(/<p>&nbsp;<\/p>/gi, '');
229
+
230
+ if (!tinyMCE.settings['force_p_newlines']) {
231
+ content = content.replace('', '' ,'gi');
232
+ content = content.replace('</p>', '<br /><br />' ,'gi');
233
+ }
234
+
235
+ if (!tinyMCE.isMSIE && !tinyMCE.settings['force_p_newlines']) {
236
+ content = content.replace(/<\/?p[^>]*>/gi, "");
237
+ }
238
+
239
+ content = content.replace(/<\/?div[^>]*>/gi, "");
240
+
241
+ // Convert all middlot lists to UL lists
242
+ if (tinyMCE.getParam("paste_convert_middot_lists", true)) {
243
+ var div = document.createElement("div");
244
+ div.innerHTML = content;
245
+
246
+ // Convert all middot paragraphs to li elements
247
+ var className = tinyMCE.getParam("paste_unindented_list_class", "unIndentedList");
248
+
249
+ while (TinyMCE_PastePlugin._convertMiddots(div, "--list--")) ; // bull
250
+ while (TinyMCE_PastePlugin._convertMiddots(div, middot, className)) ; // Middot
251
+ while (TinyMCE_PastePlugin._convertMiddots(div, bull)) ; // bull
252
+
253
+ content = div.innerHTML;
254
+ }
255
+
256
+ // Replace all headers with strong and fix some other issues
257
+ if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {
258
+ content = content.replace(/<h[1-6]>&nbsp;<\/h[1-6]>/gi, '<p>&nbsp;&nbsp;</p>');
259
+ content = content.replace(/<h[1-6]>/gi, '<p><b>');
260
+ content = content.replace(/<\/h[1-6]>/gi, '</b></p>');
261
+ content = content.replace(/<b>&nbsp;<\/b>/gi, '<b>&nbsp;&nbsp;</b>');
262
+ content = content.replace(/^(&nbsp;)*/gi, '');
263
+ }
264
+
265
+ content = content.replace(/--list--/gi, ""); // Remove --list--
266
+
267
+ if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")
268
+ content = eval(cb + "('after', content)");
269
+
270
+ // Insert cleaned content
271
+ tinyMCE.execCommand("mceInsertContent", false, content);
272
+
273
+ if (tinyMCE.getParam('paste_force_cleanup_wordpaste', true))
274
+ window.setTimeout('tinyMCE.execCommand("mceCleanup");', 1); // Do normal cleanup detached from this thread
275
+ }
276
+ },
277
+
278
+ _reEscape : function(s) {
279
+ var l = "?.\\*[](){}+^$:";
280
+ var o = "";
281
+
282
+ for (var i=0; i<s.length; i++) {
283
+ var c = s.charAt(i);
284
+
285
+ if (l.indexOf(c) != -1)
286
+ o += '\\' + c;
287
+ else
288
+ o += c;
289
+ }
290
+
291
+ return o;
292
+ },
293
+
294
+ _convertMiddots : function(div, search, class_name) {
295
+ var mdot = String.fromCharCode(183);
296
+ var bull = String.fromCharCode(8226);
297
+
298
+ var nodes = div.getElementsByTagName("p");
299
+ var prevul;
300
+ for (var i=0; i<nodes.length; i++) {
301
+ var p = nodes[i];
302
+
303
+ // Is middot
304
+ if (p.innerHTML.indexOf(search) == 0) {
305
+ var ul = document.createElement("ul");
306
+
307
+ if (class_name)
308
+ ul.className = class_name;
309
+
310
+ // Add the first one
311
+ var li = document.createElement("li");
312
+ li.innerHTML = p.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--|&nbsp;', "gi"), '');
313
+ ul.appendChild(li);
314
+
315
+ // Add the rest
316
+ var np = p.nextSibling;
317
+ while (np) {
318
+ // If the node is whitespace, then
319
+ // ignore it and continue on.
320
+ if (np.nodeType == 3 && new RegExp('^\\s$', 'm').test(np.nodeValue)) {
321
+ np = np.nextSibling;
322
+ continue;
323
+ }
324
+
325
+ if (search == mdot) {
326
+ if (np.nodeType == 1 && new RegExp('^o(\\s+|&nbsp;)').test(np.innerHTML)) {
327
+ // Second level of nesting
328
+ if (!prevul) {
329
+ prevul = ul;
330
+ ul = document.createElement("ul");
331
+ prevul.appendChild(ul);
332
+ }
333
+ np.innerHTML = np.innerHTML.replace(/^o/, '');
334
+ } else {
335
+ // Pop the stack if we're going back up to the first level
336
+ if (prevul) {
337
+ ul = prevul;
338
+ prevul = null;
339
+ }
340
+ // Not element or middot paragraph
341
+ if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
342
+ break;
343
+ }
344
+ } else {
345
+ // Not element or middot paragraph
346
+ if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0)
347
+ break;
348
+ }
349
+
350
+ var cp = np.nextSibling;
351
+ var li = document.createElement("li");
352
+ li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--|&nbsp;', "gi"), '');
353
+ np.parentNode.removeChild(np);
354
+ ul.appendChild(li);
355
+ np = cp;
356
+ }
357
+
358
+ p.parentNode.replaceChild(ul, p);
359
+
360
+ return true;
361
+ }
362
+ }
363
+
364
+ return false;
365
+ },
366
+
367
+ _clipboardHTML : function() {
368
+ var div = document.getElementById('_TinyMCE_clipboardHTML');
369
+
370
+ if (!div) {
371
+ var div = document.createElement('DIV');
372
+ div.id = '_TinyMCE_clipboardHTML';
373
+
374
+ with (div.style) {
375
+ visibility = 'hidden';
376
+ overflow = 'hidden';
377
+ position = 'absolute';
378
+ width = 1;
379
+ height = 1;
380
+ }
381
+
382
+ document.body.appendChild(div);
383
+ }
384
+
385
+ div.innerHTML = '';
386
+ var rng = document.body.createTextRange();
387
+ rng.moveToElementText(div);
388
+ rng.execCommand('Paste');
389
+ var html = div.innerHTML;
390
+ div.innerHTML = '';
391
+ return html;
392
+ }
393
+ };
394
+
395
+ tinyMCE.addPlugin("paste", TinyMCE_PastePlugin);
js/tiny_mce/plugins/paste/images/pastetext.gif ADDED
Binary file
js/tiny_mce/plugins/paste/images/pasteword.gif ADDED
Binary file
js/tiny_mce/plugins/paste/images/selectall.gif ADDED
Binary file
js/tiny_mce/plugins/paste/jscripts/pastetext.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function saveContent() {
2
+ if (document.forms[0].htmlSource.value == '') {
3
+ tinyMCEPopup.close();
4
+ return false;
5
+ }
6
+
7
+ tinyMCEPopup.execCommand('mcePasteText', false, {
8
+ html : document.forms[0].htmlSource.value,
9
+ linebreaks : document.forms[0].linebreaks.checked
10
+ });
11
+
12
+ tinyMCEPopup.close();
13
+ }
14
+
15
+ function onLoadInit() {
16
+ tinyMCEPopup.resizeToInnerSize();
17
+
18
+ // Remove Gecko spellchecking
19
+ if (tinyMCE.isGecko)
20
+ document.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
21
+
22
+ resizeInputs();
23
+ }
24
+
25
+ var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
26
+
27
+ function resizeInputs() {
28
+ if (!tinyMCE.isMSIE) {
29
+ wHeight = self.innerHeight-80;
30
+ wWidth = self.innerWidth-17;
31
+ } else {
32
+ wHeight = document.body.clientHeight-80;
33
+ wWidth = document.body.clientWidth-17;
34
+ }
35
+
36
+ document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
37
+ document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
38
+ }
js/tiny_mce/plugins/paste/jscripts/pasteword.js ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function saveContent() {
2
+ var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;
3
+
4
+ if (html == ''){
5
+ tinyMCEPopup.close();
6
+ return false;
7
+ }
8
+
9
+ tinyMCEPopup.execCommand('mcePasteWord', false, html);
10
+ tinyMCEPopup.close();
11
+ }
12
+
13
+ function onLoadInit() {
14
+ tinyMCEPopup.resizeToInnerSize();
15
+
16
+ // Fix for endless reloading in FF
17
+ window.setTimeout('createIFrame();', 10);
18
+ }
19
+
20
+ function createIFrame() {
21
+ document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" height="280" width="400" frameborder="0" style="background-color:#FFFFFF; width:100%;" dir="ltr" wrap="soft"></iframe>';
22
+ }
23
+
24
+ var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
25
+
26
+ function initIframe(doc) {
27
+ var dir = tinyMCE.selectedInstance.settings['directionality'];
28
+
29
+ doc.body.dir = dir;
30
+
31
+ // Remove Gecko spellchecking
32
+ if (tinyMCE.isGecko)
33
+ doc.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
34
+
35
+ resizeInputs();
36
+ }
37
+
38
+ function resizeInputs() {
39
+ if (!tinyMCE.isMSIE) {
40
+ wHeight = self.innerHeight - 80;
41
+ wWidth = self.innerWidth - 18;
42
+ } else {
43
+ wHeight = document.body.clientHeight - 80;
44
+ wWidth = document.body.clientWidth - 18;
45
+ }
46
+
47
+ var elm = document.getElementById('frmData');
48
+ if (elm) {
49
+ elm.style.height = Math.abs(wHeight) + 'px';
50
+ elm.style.width = Math.abs(wWidth) + 'px';
51
+ }
52
+ }
js/tiny_mce/plugins/paste/langs/en.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ paste_text_desc : 'Paste as Plain Text',
5
+ paste_text_title : 'Use CTRL+V on your keyboard to paste the text into the window.',
6
+ paste_text_linebreaks : 'Keep linebreaks',
7
+ paste_word_desc : 'Paste from Word',
8
+ paste_word_title : 'Use CTRL+V on your keyboard to paste the text into the window.',
9
+ selectall_desc : 'Select All'
10
+ });
js/tiny_mce/plugins/paste/pastetext.htm ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_paste_text_desc}</title>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script language="javascript" type="text/javascript" src="jscripts/pastetext.js"></script>
7
+ <base target="_self" />
8
+ </head>
9
+ <body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');" onresize="resizeInputs();" style="display: none">
10
+ <form name="source" onsubmit="saveContent();">
11
+ <div style="float: left" class="title">{$lang_paste_text_desc}</div>
12
+
13
+ <div style="float: right">
14
+ <input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{$lang_paste_text_linebreaks}</label>
15
+ </div>
16
+
17
+ <br style="clear: both" />
18
+
19
+ <div>{$lang_paste_text_title}</div>
20
+
21
+ <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft"></textarea>
22
+
23
+ <div class="mceActionPanel">
24
+ <div style="float: left">
25
+ <input type="button" name="insert" value="{$lang_insert}" onclick="saveContent();" id="insert" />
26
+ </div>
27
+
28
+ <div style="float: right">
29
+ <input type="button" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
30
+ </div>
31
+ </div>
32
+ </form>
33
+ </body>
34
+ </html>
js/tiny_mce/plugins/paste/pasteword.htm ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
4
+ <title>{$lang_paste_word_desc}</title>
5
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script language="javascript" type="text/javascript" src="jscripts/pasteword.js"></script>
7
+ <link href="css/pasteword.css" rel="stylesheet" type="text/css" />
8
+ <base target="_self" />
9
+ </head>
10
+ <body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');" onresize="resizeInputs();" style="display: none">
11
+ <form name="source" onsubmit="saveContent();" action="#">
12
+ <div class="title">{$lang_paste_word_desc}</div>
13
+
14
+ <div>{$lang_paste_word_title}</div>
15
+
16
+ <div id="iframecontainer"></div>
17
+
18
+ <div class="mceActionPanel">
19
+ <div style="float: left">
20
+ <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="saveContent();" />
21
+ </div>
22
+
23
+ <div style="float: right">
24
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
25
+ </div>
26
+ </div>
27
+ </form>
28
+ </body>
29
+ </html>
js/tiny_mce/plugins/paste/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/preview/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('preview');var TinyMCE_PreviewPlugin={getInfo:function(){return{longname:'Preview',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"preview":return tinyMCE.getButtonHTML(cn,'lang_preview_desc','{$pluginurl}/images/preview.gif','mcePreview')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();template['file']=previewPage;template['width']=previewWidth;template['height']=previewHeight;tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"yes",inline:"yes",content:tinyMCE.getContent(),content_css:tinyMCE.getParam("content_css")})}else{var win=window.open("","mcePreview","menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width="+previewWidth+",height="+previewHeight);var html="",i;var c=tinyMCE.getContent();var pos=c.indexOf('<body'),pos2,css=tinyMCE.getParam("content_css").split(',');if(pos!=-1){pos=c.indexOf('>',pos);pos2=c.lastIndexOf('</body>');c=c.substring(pos+1,pos2)}html+=tinyMCE.getParam('doctype');html+='<html xmlns="http://www.w3.org/1999/xhtml">';html+='<head>';html+='<title>'+tinyMCE.getLang('lang_preview_desc')+'</title>';html+='<base href="'+tinyMCE.settings['base_href']+'" />';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(i=0;i<css.length;i++)html+='<link href="'+css[i]+'" rel="stylesheet" type="text/css" />';html+='<script type="text/javascript">';html+='window.opener.TinyMCE_PreviewPlugin._setDoc(document);';html+='window.opener.TinyMCE_PreviewPlugin._setWin(window);';html+='writeFlash = window.opener.TinyMCE_PreviewPlugin._writeFlash;';html+='writeShockWave = window.opener.TinyMCE_PreviewPlugin._writeShockWave;';html+='writeQuickTime = window.opener.TinyMCE_PreviewPlugin._writeQuickTime;';html+='writeRealMedia = window.opener.TinyMCE_PreviewPlugin._writeRealMedia;';html+='writeWindowsMedia = window.opener.TinyMCE_PreviewPlugin._writeWindowsMedia;';html+='writeEmbed = window.opener.TinyMCE_PreviewPlugin._writeEmbed;';html+='</script>';html+='</head>';html+='<body dir="'+tinyMCE.getParam("directionality")+'" onload="window.opener.TinyMCE_PreviewPlugin._onLoad();">';html+=c;html+='</body>';html+='</html>';win.document.write(html);win.document.close()}return true}return false},_setDoc:function(d){TinyMCE_PreviewPlugin._doc=d;d._embeds=new Array()},_setWin:function(d){TinyMCE_PreviewPlugin._win=d},_onLoad:function(){var nl,i,el=new Array(),d=TinyMCE_PreviewPlugin._doc,sv,ne;nl=d.getElementsByTagName("script");for(i=0;i<nl.length;i++){sv=tinyMCE.isMSIE?nl[i].innerHTML:nl[i].firstChild.nodeValue;if(new RegExp('write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\\(.*','g').test(sv))el[el.length]=nl[i]}for(i=0;i<el.length;i++){ne=d.createElement("div");ne.innerHTML=d._embeds[i];el[i].parentNode.insertBefore(ne.firstChild,el[i])}},_writeFlash:function(p){p.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],p.src);TinyMCE_PreviewPlugin._writeEmbed('D27CDB6E-AE6D-11cf-96B8-444553540000','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0','application/x-shockwave-flash',p)},_writeShockWave:function(p){p.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],p.src);TinyMCE_PreviewPlugin._writeEmbed('166B1BCA-3F9C-11CF-8075-444553540000','http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0','application/x-director',p)},_writeQuickTime:function(p){p.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],p.src);TinyMCE_PreviewPlugin._writeEmbed('02BF25D5-8C17-4B23-BC80-D3488ABDDC6B','http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0','video/quicktime',p)},_writeRealMedia:function(p){p.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],p.src);TinyMCE_PreviewPlugin._writeEmbed('CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0','audio/x-pn-realaudio-plugin',p)},_writeWindowsMedia:function(p){p.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],p.src);p.url=p.src;TinyMCE_PreviewPlugin._writeEmbed('6BF52A52-394A-11D3-B153-00C04F79FAA6','http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701','application/x-mplayer2',p)},_writeEmbed:function(cls,cb,mt,p){var h='',n,d=TinyMCE_PreviewPlugin._doc,ne,c;h+='<object classid="clsid:'+cls+'" codebase="'+cb+'"';h+=typeof(p.id)!="undefined"?'id="'+p.id+'"':'';h+=typeof(p.name)!="undefined"?'name="'+p.name+'"':'';h+=typeof(p.width)!="undefined"?'width="'+p.width+'"':'';h+=typeof(p.height)!="undefined"?'height="'+p.height+'"':'';h+=typeof(p.align)!="undefined"?'align="'+p.align+'"':'';h+='>';for(n in p)h+='<param name="'+n+'" value="'+p[n]+'">';h+='<embed type="'+mt+'"';for(n in p)h+=n+'="'+p[n]+'" ';h+='></embed></object>';d._embeds[d._embeds.length]=h}};tinyMCE.addPlugin("preview",TinyMCE_PreviewPlugin);
js/tiny_mce/plugins/preview/editor_plugin_src.js ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('preview');
10
+
11
+ var TinyMCE_PreviewPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Preview',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ /**
23
+ * Returns the HTML contents of the preview control.
24
+ */
25
+ getControlHTML : function(cn) {
26
+ switch (cn) {
27
+ case "preview":
28
+ return tinyMCE.getButtonHTML(cn, 'lang_preview_desc', '{$pluginurl}/images/preview.gif', 'mcePreview');
29
+ }
30
+
31
+ return "";
32
+ },
33
+
34
+ /**
35
+ * Executes the mcePreview command.
36
+ */
37
+ execCommand : function(editor_id, element, command, user_interface, value) {
38
+ // Handle commands
39
+ switch (command) {
40
+ case "mcePreview":
41
+ var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null);
42
+ var previewWidth = tinyMCE.getParam("plugin_preview_width", "550");
43
+ var previewHeight = tinyMCE.getParam("plugin_preview_height", "600");
44
+
45
+ // Use a custom preview page
46
+ if (previewPage) {
47
+ var template = new Array();
48
+
49
+ template['file'] = previewPage;
50
+ template['width'] = previewWidth;
51
+ template['height'] = previewHeight;
52
+
53
+ tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", inline : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")});
54
+ } else {
55
+ var win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + previewWidth + ",height=" + previewHeight);
56
+ var html = "", i;
57
+ var c = tinyMCE.getContent();
58
+ var pos = c.indexOf('<body'), pos2, css = tinyMCE.getParam("content_css").split(',');
59
+
60
+ if (pos != -1) {
61
+ pos = c.indexOf('>', pos);
62
+ pos2 = c.lastIndexOf('</body>');
63
+ c = c.substring(pos + 1, pos2);
64
+ }
65
+
66
+ html += tinyMCE.getParam('doctype');
67
+ html += '<html xmlns="http://www.w3.org/1999/xhtml">';
68
+ html += '<head>';
69
+ html += '<title>' + tinyMCE.getLang('lang_preview_desc') + '</title>';
70
+ html += '<base href="' + tinyMCE.settings['base_href'] + '" />';
71
+ html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
72
+
73
+ for (i=0; i<css.length; i++)
74
+ html += '<link href="' + css[i] + '" rel="stylesheet" type="text/css" />';
75
+
76
+ html += '<script type="text/javascript">';
77
+ html += 'window.opener.TinyMCE_PreviewPlugin._setDoc(document);';
78
+ html += 'window.opener.TinyMCE_PreviewPlugin._setWin(window);';
79
+ html += 'writeFlash = window.opener.TinyMCE_PreviewPlugin._writeFlash;';
80
+ html += 'writeShockWave = window.opener.TinyMCE_PreviewPlugin._writeShockWave;';
81
+ html += 'writeQuickTime = window.opener.TinyMCE_PreviewPlugin._writeQuickTime;';
82
+ html += 'writeRealMedia = window.opener.TinyMCE_PreviewPlugin._writeRealMedia;';
83
+ html += 'writeWindowsMedia = window.opener.TinyMCE_PreviewPlugin._writeWindowsMedia;';
84
+ html += 'writeEmbed = window.opener.TinyMCE_PreviewPlugin._writeEmbed;';
85
+ html += '</script>';
86
+ html += '</head>';
87
+ html += '<body dir="' + tinyMCE.getParam("directionality") + '" onload="window.opener.TinyMCE_PreviewPlugin._onLoad();">';
88
+ html += c;
89
+ html += '</body>';
90
+ html += '</html>';
91
+
92
+ win.document.write(html);
93
+ win.document.close();
94
+ }
95
+
96
+ return true;
97
+ }
98
+
99
+ return false;
100
+ },
101
+
102
+ _setDoc : function(d) {
103
+ TinyMCE_PreviewPlugin._doc = d;
104
+ d._embeds = new Array();
105
+ },
106
+
107
+ _setWin : function(d) {
108
+ TinyMCE_PreviewPlugin._win = d;
109
+ },
110
+
111
+ _onLoad : function() {
112
+ var nl, i, el = new Array(), d = TinyMCE_PreviewPlugin._doc, sv, ne;
113
+
114
+ nl = d.getElementsByTagName("script");
115
+ for (i=0; i<nl.length; i++) {
116
+ sv = tinyMCE.isMSIE ? nl[i].innerHTML : nl[i].firstChild.nodeValue;
117
+
118
+ if (new RegExp('write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\\(.*', 'g').test(sv))
119
+ el[el.length] = nl[i];
120
+ }
121
+
122
+ for (i=0; i<el.length; i++) {
123
+ ne = d.createElement("div");
124
+ ne.innerHTML = d._embeds[i];
125
+ el[i].parentNode.insertBefore(ne.firstChild, el[i]);
126
+ }
127
+ },
128
+
129
+ _writeFlash : function(p) {
130
+ p.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], p.src);
131
+ TinyMCE_PreviewPlugin._writeEmbed(
132
+ 'D27CDB6E-AE6D-11cf-96B8-444553540000',
133
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
134
+ 'application/x-shockwave-flash',
135
+ p
136
+ );
137
+ },
138
+
139
+ _writeShockWave : function(p) {
140
+ p.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], p.src);
141
+ TinyMCE_PreviewPlugin._writeEmbed(
142
+ '166B1BCA-3F9C-11CF-8075-444553540000',
143
+ 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
144
+ 'application/x-director',
145
+ p
146
+ );
147
+ },
148
+
149
+ _writeQuickTime : function(p) {
150
+ p.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], p.src);
151
+ TinyMCE_PreviewPlugin._writeEmbed(
152
+ '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
153
+ 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
154
+ 'video/quicktime',
155
+ p
156
+ );
157
+ },
158
+
159
+ _writeRealMedia : function(p) {
160
+ p.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], p.src);
161
+ TinyMCE_PreviewPlugin._writeEmbed(
162
+ 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
163
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
164
+ 'audio/x-pn-realaudio-plugin',
165
+ p
166
+ );
167
+ },
168
+
169
+ _writeWindowsMedia : function(p) {
170
+ p.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], p.src);
171
+ p.url = p.src;
172
+ TinyMCE_PreviewPlugin._writeEmbed(
173
+ '6BF52A52-394A-11D3-B153-00C04F79FAA6',
174
+ 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
175
+ 'application/x-mplayer2',
176
+ p
177
+ );
178
+ },
179
+
180
+ _writeEmbed : function(cls, cb, mt, p) {
181
+ var h = '', n, d = TinyMCE_PreviewPlugin._doc, ne, c;
182
+
183
+ h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
184
+ h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
185
+ h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
186
+ h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
187
+ h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
188
+ h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
189
+ h += '>';
190
+
191
+ for (n in p)
192
+ h += '<param name="' + n + '" value="' + p[n] + '">';
193
+
194
+ h += '<embed type="' + mt + '"';
195
+
196
+ for (n in p)
197
+ h += n + '="' + p[n] + '" ';
198
+
199
+ h += '></embed></object>';
200
+
201
+ d._embeds[d._embeds.length] = h;
202
+ }
203
+ };
204
+
205
+ tinyMCE.addPlugin("preview", TinyMCE_PreviewPlugin);
js/tiny_mce/plugins/preview/example.html ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <script language="javascript" src="../../tiny_mce_popup.js"></script>
4
+ <script type="text/javascript" src="jscripts/embed.js"></script>
5
+ <title>Example of a custom preview page</title>
6
+ <link href="{$content_css}" rel="stylesheet" type="text/css" />
7
+ </head>
8
+ <body>
9
+
10
+ Editor contents: <br />
11
+ {$content}
12
+
13
+ </body>
14
+ </html>
js/tiny_mce/plugins/preview/images/preview.gif ADDED
Binary file
js/tiny_mce/plugins/preview/jscripts/embed.js ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
3
+ */
4
+
5
+ function writeFlash(p) {
6
+ writeEmbed(
7
+ 'D27CDB6E-AE6D-11cf-96B8-444553540000',
8
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
9
+ 'application/x-shockwave-flash',
10
+ p
11
+ );
12
+ }
13
+
14
+ function writeShockWave(p) {
15
+ writeEmbed(
16
+ '166B1BCA-3F9C-11CF-8075-444553540000',
17
+ 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
18
+ 'application/x-director',
19
+ p
20
+ );
21
+ }
22
+
23
+ function writeQuickTime(p) {
24
+ writeEmbed(
25
+ '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
26
+ 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
27
+ 'video/quicktime',
28
+ p
29
+ );
30
+ }
31
+
32
+ function writeRealMedia(p) {
33
+ writeEmbed(
34
+ 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
35
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
36
+ 'audio/x-pn-realaudio-plugin',
37
+ p
38
+ );
39
+ }
40
+
41
+ function writeWindowsMedia(p) {
42
+ p.url = p.src;
43
+ writeEmbed(
44
+ '6BF52A52-394A-11D3-B153-00C04F79FAA6',
45
+ 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
46
+ 'application/x-mplayer2',
47
+ p
48
+ );
49
+ }
50
+
51
+ function writeEmbed(cls, cb, mt, p) {
52
+ var h = '', n;
53
+
54
+ h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
55
+ h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
56
+ h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
57
+ h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
58
+ h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
59
+ h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
60
+ h += '>';
61
+
62
+ for (n in p)
63
+ h += '<param name="' + n + '" value="' + p[n] + '">';
64
+
65
+ h += '<embed type="' + mt + '"';
66
+
67
+ for (n in p)
68
+ h += n + '="' + p[n] + '" ';
69
+
70
+ h += '></embed></object>';
71
+
72
+ document.write(h);
73
+ }
js/tiny_mce/plugins/preview/langs/en.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ preview_desc : 'Preview'
5
+ });
js/tiny_mce/plugins/preview/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/print/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('print');var TinyMCE_PrintPlugin={getInfo:function(){return{longname:'Print',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"print":return tinyMCE.getButtonHTML(cn,'lang_print_desc','{$pluginurl}/images/print.gif','mcePrint')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePrint":tinyMCE.getInstanceById(editor_id).contentWindow.print();return true}return false}};tinyMCE.addPlugin("print",TinyMCE_PrintPlugin);
js/tiny_mce/plugins/print/editor_plugin_src.js ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import theme specific language pack */
9
+ tinyMCE.importPluginLanguagePack('print');
10
+
11
+ var TinyMCE_PrintPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Print',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ getControlHTML : function(cn) {
23
+ switch (cn) {
24
+ case "print":
25
+ return tinyMCE.getButtonHTML(cn, 'lang_print_desc', '{$pluginurl}/images/print.gif', 'mcePrint');
26
+ }
27
+
28
+ return "";
29
+ },
30
+
31
+ /**
32
+ * Executes the search/replace commands.
33
+ */
34
+ execCommand : function(editor_id, element, command, user_interface, value) {
35
+ // Handle commands
36
+ switch (command) {
37
+ case "mcePrint":
38
+ tinyMCE.getInstanceById(editor_id).contentWindow.print();
39
+ return true;
40
+ }
41
+
42
+ // Pass to next handler in chain
43
+ return false;
44
+ }
45
+ };
46
+
47
+ tinyMCE.addPlugin("print", TinyMCE_PrintPlugin);
js/tiny_mce/plugins/print/images/print.gif ADDED
Binary file
js/tiny_mce/plugins/print/langs/en.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ print_desc : 'Print'
5
+ });
js/tiny_mce/plugins/print/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ This is the location you place TinyMCE plugins.
js/tiny_mce/plugins/save/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('save');var TinyMCE_SavePlugin={getInfo:function(){return{longname:'Save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){inst.addShortcut('ctrl','s','lang_save_desc','mceSave')},getControlHTML:function(cn){switch(cn){case"save":return tinyMCE.getButtonHTML(cn,'lang_save_desc','{$pluginurl}/images/save.gif','mceSave');case"cancel":return tinyMCE.getButtonHTML(cn,'lang_cancel_desc','{$pluginurl}/images/cancel.gif','mceCancel')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceSave":return this._save(editor_id,element,command,user_interface,value);case"mceCancel":return this._cancel(editor_id,element,command,user_interface,value)}return false},_save:function(editor_id,element,command,user_interface,value){var inst,formObj,os,i,elementId;if(tinyMCE.getParam("fullscreen_is_enabled"))return true;inst=tinyMCE.selectedInstance;formObj=inst.formElement.form;if(tinyMCE.getParam("save_enablewhendirty")&&!inst.isDirty())return true;if(formObj){tinyMCE.triggerSave();if((os=tinyMCE.getParam("save_onsavecallback"))){if(eval(os+'(inst);')){inst.startContent=tinyMCE.trim(inst.getBody().innerHTML);tinyMCE.triggerNodeChange(false,true)}return true}for(i=0;i<formObj.elements.length;i++){elementId=formObj.elements[i].name?formObj.elements[i].name:formObj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)formObj.elements[i].disabled=true}inst.isNotDirty=true;if(formObj.onsubmit==null||formObj.onsubmit()!=false)inst.formElement.form.submit();tinyMCE.triggerNodeChange(false,true)}else alert("Error: No form element found.");return true},_cancel:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id),os,h=tinyMCE.trim(inst.startContent);if((os=tinyMCE.getParam("save_oncancelcallback"))){if(eval(os+'(inst);'))return true}inst.setHTML(h);inst.undoRedo.undoLevels=[];inst.undoRedo.add({content:h});inst.undoRedo.undoIndex=0;inst.undoRedo.typingUndoIndex=-1;tinyMCE.triggerNodeChange(false,true);return true},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){var inst;if(tinyMCE.getParam("fullscreen_is_enabled")){tinyMCE.switchClass(editor_id+'_save','mceButtonDisabled');return true}if(tinyMCE.getParam("save_enablewhendirty")){inst=tinyMCE.getInstanceById(editor_id);if(inst.isDirty()){tinyMCE.switchClass(editor_id+'_save','mceButtonNormal');return true}tinyMCE.switchClass(editor_id+'_save','mceButtonDisabled')}return true}};tinyMCE.addPlugin("save",TinyMCE_SavePlugin);
js/tiny_mce/plugins/save/editor_plugin_src.js ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 251 2007-04-10 20:16:15Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('save');
10
+
11
+ var TinyMCE_SavePlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Save',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ inst.addShortcut('ctrl', 's', 'lang_save_desc', 'mceSave');
24
+ },
25
+
26
+ /**
27
+ * Returns the HTML contents of the save control.
28
+ */
29
+ getControlHTML : function(cn) {
30
+ switch (cn) {
31
+ case "save":
32
+ return tinyMCE.getButtonHTML(cn, 'lang_save_desc', '{$pluginurl}/images/save.gif', 'mceSave');
33
+
34
+ case "cancel":
35
+ return tinyMCE.getButtonHTML(cn, 'lang_cancel_desc', '{$pluginurl}/images/cancel.gif', 'mceCancel');
36
+ }
37
+
38
+ return "";
39
+ },
40
+
41
+ /**
42
+ * Executes the save command.
43
+ */
44
+ execCommand : function(editor_id, element, command, user_interface, value) {
45
+ // Handle commands
46
+ switch (command) {
47
+ case "mceSave":
48
+ return this._save(editor_id, element, command, user_interface, value);
49
+
50
+ case "mceCancel":
51
+ return this._cancel(editor_id, element, command, user_interface, value);
52
+ }
53
+
54
+ // Pass to next handler in chain
55
+ return false;
56
+ },
57
+
58
+ _save : function(editor_id, element, command, user_interface, value) {
59
+ var inst, formObj, os, i, elementId;
60
+
61
+ if (tinyMCE.getParam("fullscreen_is_enabled"))
62
+ return true;
63
+
64
+ inst = tinyMCE.selectedInstance;
65
+ formObj = inst.formElement.form;
66
+
67
+ if (tinyMCE.getParam("save_enablewhendirty") && !inst.isDirty())
68
+ return true;
69
+
70
+ if (formObj) {
71
+ tinyMCE.triggerSave();
72
+
73
+ // Use callback instead
74
+ if ((os = tinyMCE.getParam("save_onsavecallback"))) {
75
+ if (eval(os + '(inst);')) {
76
+ inst.startContent = tinyMCE.trim(inst.getBody().innerHTML);
77
+ /*inst.undoLevels = new Array();
78
+ inst.undoIndex = 0;
79
+ inst.typingUndoIndex = -1;
80
+ inst.undoRedo = true;
81
+ inst.undoLevels[inst.undoLevels.length] = inst.startContent;*/
82
+ tinyMCE.triggerNodeChange(false, true);
83
+ }
84
+
85
+ return true;
86
+ }
87
+
88
+ // Disable all UI form elements that TinyMCE created
89
+ for (i=0; i<formObj.elements.length; i++) {
90
+ elementId = formObj.elements[i].name ? formObj.elements[i].name : formObj.elements[i].id;
91
+
92
+ if (elementId.indexOf('mce_editor_') == 0)
93
+ formObj.elements[i].disabled = true;
94
+ }
95
+
96
+ inst.isNotDirty = true;
97
+
98
+ if (formObj.onsubmit == null || formObj.onsubmit() != false)
99
+ inst.formElement.form.submit();
100
+
101
+ tinyMCE.triggerNodeChange(false, true);
102
+ } else
103
+ alert("Error: No form element found.");
104
+
105
+ return true;
106
+ },
107
+
108
+ _cancel : function(editor_id, element, command, user_interface, value) {
109
+ var inst = tinyMCE.getInstanceById(editor_id), os, h = tinyMCE.trim(inst.startContent);
110
+
111
+ // Use callback instead
112
+ if ((os = tinyMCE.getParam("save_oncancelcallback"))) {
113
+ if (eval(os + '(inst);'))
114
+ return true;
115
+ }
116
+
117
+ inst.setHTML(h);
118
+
119
+ inst.undoRedo.undoLevels = [];
120
+ inst.undoRedo.add({ content : h });
121
+ inst.undoRedo.undoIndex = 0;
122
+ inst.undoRedo.typingUndoIndex = -1;
123
+
124
+ tinyMCE.triggerNodeChange(false, true);
125
+
126
+ return true;
127
+ },
128
+
129
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
130
+ var inst;
131
+
132
+ if (tinyMCE.getParam("fullscreen_is_enabled")) {
133
+ tinyMCE.switchClass(editor_id + '_save', 'mceButtonDisabled');
134
+ return true;
135
+ }
136
+
137
+ if (tinyMCE.getParam("save_enablewhendirty")) {
138
+ inst = tinyMCE.getInstanceById(editor_id);
139
+
140
+ if (inst.isDirty()) {
141
+ tinyMCE.switchClass(editor_id + '_save', 'mceButtonNormal');
142
+ return true;
143
+ }
144
+
145
+ tinyMCE.switchClass(editor_id + '_save', 'mceButtonDisabled');
146
+ }
147
+
148
+ return true;
149
+ }
150
+ };
151
+
152
+ tinyMCE.addPlugin("save", TinyMCE_SavePlugin);
js/tiny_mce/plugins/save/images/cancel.gif ADDED
Binary file
js/tiny_mce/plugins/save/images/save.gif ADDED
Binary file
js/tiny_mce/plugins/save/langs/en.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ save_desc : 'Save',
5
+ cancel_desc : 'Cancel all changes'
6
+ });
js/tiny_mce/plugins/save/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/searchreplace/css/searchreplace.css ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* stylesheet for advsearchreplace plugin*/
2
+
3
+ .panel_wrapper { height: 85px; }
4
+ .panel_wrapper div.current { height: 85px; }
5
+
6
+ /* MS IE only styles */
7
+ * html .panel_wrapper { height: 100px; }
8
+ * html .panel_wrapper div.current { height: 100px; }
9
+
10
+ #replaceBtn, #replaceAllBtn {
11
+ padding-bottom: 2px;
12
+ font-weight: bold;
13
+ width: 90px;
14
+ height: 21px;
15
+ border: 0;
16
+ cursor: pointer;
17
+ }
18
+
19
+ #replaceBtn { background: url(../images/replace_button_bg.gif); }
20
+ #replaceAllBtn { background: url(../images/replace_all_button_bg.gif); }
js/tiny_mce/plugins/searchreplace/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('searchreplace');var TinyMCE_SearchReplacePlugin={getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){inst.addShortcut('ctrl','f','lang_searchreplace_search_desc','mceSearch',true);},getControlHTML:function(cn){switch(cn){case"search":return tinyMCE.getButtonHTML(cn,'lang_searchreplace_search_desc','{$pluginurl}/images/search.gif','mceSearch',true);case"replace":return tinyMCE.getButtonHTML(cn,'lang_searchreplace_replace_desc','{$pluginurl}/images/replace.gif','mceSearchReplace',true)}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id),selectedText=inst.selection.getSelectedText(),rng;function defValue(key,default_value){value[key]=typeof(value[key])=="undefined"?default_value:value[key]}function replaceSel(search_str,str,back){if(!inst.selection.isCollapsed()){if(tinyMCE.isRealIE)inst.selection.getRng().duplicate().pasteHTML(str);else inst.execCommand('mceInsertContent',false,str)}}if(!value)value=[];defValue("editor_id",editor_id);defValue("searchstring",selectedText);defValue("replacestring",null);defValue("replacemode","none");defValue("casesensitive",false);defValue("backwards",false);defValue("wrap",false);defValue("wholeword",false);defValue("inline","yes");defValue("resizable","no");switch(command){case"mceSearch":if(user_interface){var template=new Array();template['file']='../../plugins/searchreplace/searchreplace.htm';template['width']=380;template['height']=155+(tinyMCE.isNS7?20:0)+(tinyMCE.isMSIE?15:0);template['width']+=tinyMCE.getLang('lang_searchreplace_delta_width',0);template['height']+=tinyMCE.getLang('lang_searchreplace_delta_height',0);inst.selection.collapse(true);tinyMCE.openWindow(template,value)}else{var win=tinyMCE.getInstanceById(editor_id).contentWindow;var doc=tinyMCE.getInstanceById(editor_id).contentWindow.document;var body=tinyMCE.getInstanceById(editor_id).contentWindow.document.body;var awin=value.win,found;if(body.innerHTML==""){awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true}if(value['replacemode']=="current"){replaceSel(value['string'],value['replacestring'],value['backwards']);value['replacemode']="none";}inst.selection.collapse(value['backwards']);if(tinyMCE.isMSIE){var rng=inst.selection.getRng();var flags=0;if(value['wholeword'])flags=flags|2;if(value['casesensitive'])flags=flags|4;if(!rng.findText){awin.alert('This operation is currently not supported by this browser.');return true}if(value['replacemode']=="all"){found=false;while(rng.findText(value['string'],value['backwards']?-1:1,flags)){found=true;rng.scrollIntoView();rng.select();replaceSel(value['string'],value['replacestring'],value['backwards'])}if(found)awin.alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));else awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true}if(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select()}else awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'))}else{if(value['replacemode']=="all"){found=false;while(win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false)){found=true;replaceSel(value['string'],value['replacestring'],value['backwards'])}if(found)awin.alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));else awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));return true}if(!win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'))}}return true;case"mceSearchReplace":value['replacestring']="";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true}return false}};tinyMCE.addPlugin("searchreplace",TinyMCE_SearchReplacePlugin);
js/tiny_mce/plugins/searchreplace/editor_plugin_src.js ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ tinyMCE.importPluginLanguagePack('searchreplace');
9
+
10
+ var TinyMCE_SearchReplacePlugin = {
11
+ getInfo : function() {
12
+ return {
13
+ longname : 'Search/Replace',
14
+ author : 'Moxiecode Systems AB',
15
+ authorurl : 'http://tinymce.moxiecode.com',
16
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',
17
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
18
+ };
19
+ },
20
+
21
+ initInstance : function (inst) {
22
+ inst.addShortcut('ctrl', 'f', 'lang_searchreplace_search_desc', 'mceSearch', true);
23
+ // No CTRL+R for "replace" because browsers will reload page instead of executing plugin
24
+ },
25
+
26
+ getControlHTML : function (cn) {
27
+ switch (cn) {
28
+ case "search" :
29
+ return tinyMCE.getButtonHTML(cn, 'lang_searchreplace_search_desc', '{$pluginurl}/images/search.gif','mceSearch', true);
30
+
31
+ case "replace" :
32
+ return tinyMCE.getButtonHTML(cn, 'lang_searchreplace_replace_desc', '{$pluginurl}/images/replace.gif', 'mceSearchReplace', true);
33
+ }
34
+
35
+ return "";
36
+ },
37
+
38
+ execCommand : function (editor_id, element, command, user_interface, value) {
39
+ var inst = tinyMCE.getInstanceById(editor_id), selectedText = inst.selection.getSelectedText(), rng;
40
+
41
+ function defValue(key, default_value) {
42
+ value[key] = typeof(value[key]) == "undefined" ? default_value : value[key];
43
+ }
44
+
45
+ function replaceSel(search_str, str, back) {
46
+ if (!inst.selection.isCollapsed()) {
47
+ if (tinyMCE.isRealIE)
48
+ inst.selection.getRng().duplicate().pasteHTML(str); // Needs to be duplicated due to selection bug in IE
49
+ else
50
+ inst.execCommand('mceInsertContent', false, str);
51
+ }
52
+ }
53
+
54
+ if (!value)
55
+ value = [];
56
+
57
+ defValue("editor_id", editor_id);
58
+ defValue("searchstring", selectedText);
59
+ defValue("replacestring", null);
60
+ defValue("replacemode", "none");
61
+ defValue("casesensitive", false);
62
+ defValue("backwards", false);
63
+ defValue("wrap", false);
64
+ defValue("wholeword", false);
65
+ defValue("inline", "yes");
66
+ defValue("resizable", "no");
67
+
68
+ switch (command) {
69
+ case "mceSearch" :
70
+ if (user_interface) {
71
+ var template = new Array();
72
+
73
+ template['file'] = '../../plugins/searchreplace/searchreplace.htm';
74
+ template['width'] = 380;
75
+ template['height'] = 155 + (tinyMCE.isNS7 ? 20 : 0) + (tinyMCE.isMSIE ? 15 : 0);
76
+ template['width'] += tinyMCE.getLang('lang_searchreplace_delta_width', 0);
77
+ template['height'] += tinyMCE.getLang('lang_searchreplace_delta_height', 0);
78
+
79
+ inst.selection.collapse(true);
80
+
81
+ tinyMCE.openWindow(template, value);
82
+ } else {
83
+ var win = tinyMCE.getInstanceById(editor_id).contentWindow;
84
+ var doc = tinyMCE.getInstanceById(editor_id).contentWindow.document;
85
+ var body = tinyMCE.getInstanceById(editor_id).contentWindow.document.body;
86
+ var awin = value.win, found;
87
+
88
+ if (body.innerHTML == "") {
89
+ awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));
90
+ return true;
91
+ }
92
+
93
+ if (value['replacemode'] == "current") {
94
+ replaceSel(value['string'], value['replacestring'], value['backwards']);
95
+ value['replacemode'] = "none";
96
+ //tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value);
97
+ //return true;
98
+ }
99
+
100
+ inst.selection.collapse(value['backwards']);
101
+
102
+ if (tinyMCE.isMSIE) {
103
+ var rng = inst.selection.getRng();
104
+ var flags = 0;
105
+ if (value['wholeword'])
106
+ flags = flags | 2;
107
+
108
+ if (value['casesensitive'])
109
+ flags = flags | 4;
110
+
111
+ if (!rng.findText) {
112
+ awin.alert('This operation is currently not supported by this browser.');
113
+ return true;
114
+ }
115
+
116
+ if (value['replacemode'] == "all") {
117
+ found = false;
118
+
119
+ while (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) {
120
+ found = true;
121
+ rng.scrollIntoView();
122
+ rng.select();
123
+ replaceSel(value['string'], value['replacestring'], value['backwards']);
124
+ }
125
+
126
+ if (found)
127
+ awin.alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
128
+ else
129
+ awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));
130
+
131
+ return true;
132
+ }
133
+
134
+ if (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) {
135
+ rng.scrollIntoView();
136
+ rng.select();
137
+ } else
138
+ awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));
139
+ } else {
140
+ if (value['replacemode'] == "all") {
141
+ found = false;
142
+
143
+ while (win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false)) {
144
+ found = true;
145
+ replaceSel(value['string'], value['replacestring'], value['backwards']);
146
+ }
147
+
148
+ if (found)
149
+ awin.alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));
150
+ else
151
+ awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));
152
+
153
+ return true;
154
+ }
155
+
156
+ if (!win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false))
157
+ awin.alert(tinyMCE.getLang('lang_searchreplace_notfound'));
158
+ }
159
+ }
160
+
161
+ return true;
162
+
163
+ case "mceSearchReplace" :
164
+ value['replacestring'] = "";
165
+ tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false);
166
+ return true;
167
+ }
168
+
169
+ return false;
170
+ }
171
+ };
172
+
173
+ tinyMCE.addPlugin("searchreplace", TinyMCE_SearchReplacePlugin);
js/tiny_mce/plugins/searchreplace/images/replace.gif ADDED
Binary file
js/tiny_mce/plugins/searchreplace/images/replace_all_button_bg.gif ADDED
Binary file
js/tiny_mce/plugins/searchreplace/images/replace_button_bg.gif ADDED
Binary file
js/tiny_mce/plugins/searchreplace/images/search.gif ADDED
Binary file
js/tiny_mce/plugins/searchreplace/jscripts/searchreplace.js ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function init() {
2
+ tinyMCEPopup.resizeToInnerSize();
3
+
4
+ // start with appropiate tab
5
+ var task = (tinyMCE.getWindowArg("replacestring") != null) ? "replace" : "search";
6
+ mcTabs.displayTab(task + '_tab', task +'_panel');
7
+ manageReplaceButtons();
8
+
9
+ var formObj = document.forms[0];
10
+
11
+ formObj[task + "_panel_searchstring"].value = tinyMCE.getWindowArg("searchstring");
12
+ formObj["replace_panel_replacestring"].value = (tinyMCE.getWindowArg("replacestring") != null) ? tinyMCE.getWindowArg("replacestring") : "";
13
+ formObj[task + "_panel_casesensitivebox"].checked = tinyMCE.getWindowArg("casesensitive");
14
+ formObj[task + "_panel_backwardsu"].checked = tinyMCE.getWindowArg("backwards");
15
+ formObj[task + "_panel_backwardsd"].checked = !tinyMCE.getWindowArg("backwards");
16
+ }
17
+
18
+ function searchNext(replacemode) {
19
+ // "search" or "replace" mode of operation?
20
+ var task = (document.getElementById("search_tab").className == "current") ? "search" : "replace";
21
+
22
+ var formObj = document.forms[0];
23
+
24
+ if (task == "replace") {
25
+ // Whats the point?
26
+ if (formObj[task + "_panel_searchstring"].value == "" || formObj[task + "_panel_searchstring"].value == formObj[task + "_panel_replacestring"].value)
27
+ return false;
28
+ }
29
+
30
+ // Do search
31
+ tinyMCEPopup.execCommand('mceSearch', false, {
32
+ string : formObj[task + "_panel_searchstring"].value,
33
+ replacestring : formObj["replace_panel_replacestring"].value,
34
+ replacemode : replacemode,
35
+ casesensitive : formObj[task + "_panel_casesensitivebox"].checked,
36
+ backwards : formObj[task + "_panel_backwardsu"].checked,
37
+ win : window
38
+ }, false);
39
+
40
+ window.focus();
41
+
42
+ return false;
43
+ }
44
+
45
+ function cancelAction() {
46
+ tinyMCEPopup.close();
47
+ }
48
+
49
+ function manageReplaceButtons() {
50
+ // "search" or "replace" mode of operation?
51
+ var task = (document.getElementById("search_tab").className == "current") ? "search" : "replace";
52
+ document.getElementById("replace_buttons").style.visibility = (task == "replace") ? "visible" : "hidden";
53
+ }
54
+
55
+ function copyValues(link) {
56
+ // check if tab is already active
57
+ var tab = link;
58
+ while (tab.tagName && tab.tagName.toLowerCase() != "li") tab = tab.parentNode;
59
+ if (tab.className) return false; // tab is already active -> no need to copy any values!
60
+
61
+ // copy values from one panel to the other (if they exist there)
62
+ var from_panel_name = tab.id.match(/^search/i) ? "replace_panel" : "search_panel";
63
+ var to_panel_name = (from_panel_name == "search_panel") ? "replace_panel" : "search_panel";
64
+
65
+ // find all elements with IDs to copy their values
66
+ var elms = document.getElementById(from_panel_name).getElementsByTagName("*");
67
+ for (var i = 0; i < elms.length; i++) {
68
+ if (elms[i].id && elms[i].id != "") {
69
+ var checked = "undefined";
70
+ if (elms[i].type.toLowerCase() == "checkbox" || elms[i].type.toLowerCase() == "radio")
71
+ checked = elms[i].checked;
72
+
73
+ // copy values if element exists in other panel
74
+ var to_elm_name = to_panel_name + elms[i].id.substring(from_panel_name.length, elms[i].id.length);
75
+ var to_elm = document.getElementById(to_elm_name);
76
+ if (to_elm) {
77
+ if (checked != "undefined")
78
+ to_elm.checked = checked;
79
+ else
80
+ to_elm.value = elms[i].value;
81
+ }
82
+ }
83
+ }
84
+
85
+ return false;
86
+ }
js/tiny_mce/plugins/searchreplace/langs/en.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('',{
4
+ searchreplace_search_desc : 'Find',
5
+ searchreplace_searchnext_desc : 'Find again',
6
+ searchreplace_replace_desc : 'Find/Replace',
7
+ searchreplace_notfound : 'The search has been completed. The search string could not be found.',
8
+ searchreplace_search_title : 'Find',
9
+ searchreplace_replace_title : 'Find/Replace',
10
+ searchreplace_allreplaced : 'All occurrences of the search string were replaced.',
11
+ searchreplace_findwhat : 'Find what',
12
+ searchreplace_replacewith : 'Replace with',
13
+ searchreplace_direction : 'Direction',
14
+ searchreplace_up : 'Up',
15
+ searchreplace_down : 'Down',
16
+ searchreplace_case : 'Match case',
17
+ searchreplace_findnext : 'Find&nbsp;next',
18
+ searchreplace_replace : 'Replace',
19
+ searchreplace_replaceall : 'Replace&nbsp;all',
20
+ searchreplace_cancel : 'Cancel'
21
+ });
js/tiny_mce/plugins/searchreplace/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/searchreplace/searchreplace.htm ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_searchreplace_replace_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="jscripts/searchreplace.js"></script>
8
+ <link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
9
+ <base target="_self" />
10
+ </head>
11
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none; margin: 4px;">
12
+ <form onsubmit="return false;" action="#">
13
+ <div class="tabs">
14
+ <ul>
15
+ <li id="search_tab"><span><a href="javascript:mcTabs.displayTab('search_tab','search_panel');manageReplaceButtons();" onmousedown="return copyValues(this);">{$lang_searchreplace_search_desc}</a></span></li>
16
+ <li id="replace_tab"><span><a href="javascript:mcTabs.displayTab('replace_tab','replace_panel');manageReplaceButtons();" onmousedown="return copyValues(this);">{$lang_searchreplace_replace}</a></span></li>
17
+ </ul>
18
+ </div>
19
+
20
+ <div class="panel_wrapper">
21
+
22
+ <div id="search_panel" class="panel">
23
+ <table border="0" cellspacing="0" cellpadding="2">
24
+ <tr>
25
+ <td><label for="search_panel_searchstring">{$lang_searchreplace_findwhat}</label></td>
26
+ <td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" /></td>
27
+ </tr>
28
+ <tr>
29
+ <td colspan="2">
30
+ <table border="0" cellspacing="0" cellpadding="0" class="direction">
31
+ <tr>
32
+ <td><label>{$lang_searchreplace_direction}</label></td>
33
+ <td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
34
+ <td><label for="search_panel_backwardsu">{$lang_searchreplace_up}</label></td>
35
+ <td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" /></td>
36
+ <td><label for="search_panel_backwardsd">{$lang_searchreplace_down}</label></td>
37
+ </tr>
38
+ </table>
39
+ </td>
40
+ </tr>
41
+ <tr>
42
+ <td colspan="2">
43
+ <table border="0" cellspacing="0" cellpadding="0">
44
+ <tr>
45
+ <td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
46
+ <td><label for="search_panel_casesensitivebox">{$lang_searchreplace_case}</label></td>
47
+ </tr>
48
+ </table>
49
+ </td>
50
+ </tr>
51
+ </table>
52
+ </div>
53
+
54
+ <div id="replace_panel" class="panel">
55
+ <table border="0" cellspacing="0" cellpadding="2">
56
+ <tr>
57
+ <td><label for="replace_panel_searchstring">{$lang_searchreplace_findwhat}</label></td>
58
+ <td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" /></td>
59
+ </tr>
60
+ <tr>
61
+ <td><label for="replace_panel_replacestring">{$lang_searchreplace_replacewith}</label></td>
62
+ <td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" /></td>
63
+ </tr>
64
+ <tr>
65
+ <td colspan="2">
66
+ <table border="0" cellspacing="0" cellpadding="0" class="direction">
67
+ <tr>
68
+ <td><label>{$lang_searchreplace_direction}</label></td>
69
+ <td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
70
+ <td><label for="replace_panel_backwardsu">{$lang_searchreplace_up}</label></td>
71
+ <td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" /></td>
72
+ <td><label for="replace_panel_backwardsd">{$lang_searchreplace_down}</label></td>
73
+ </tr>
74
+ </table>
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <td colspan="2">
79
+ <table border="0" cellspacing="0" cellpadding="0">
80
+ <tr>
81
+ <td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
82
+ <td><label for="replace_panel_casesensitivebox">{$lang_searchreplace_case}</label></td>
83
+ </tr>
84
+ </table>
85
+ </td>
86
+ </tr>
87
+ </table>
88
+ </div>
89
+
90
+ </div>
91
+
92
+ <div class="mceActionPanel">
93
+ <div style="float: left">
94
+ <input type="button" id="insert" name="insert" value="{$lang_searchreplace_findnext}" onclick="searchNext('none');" />
95
+ <span id="replace_buttons">
96
+ <input type="button" id="replaceBtn" name="replaceBtn" value="{$lang_searchreplace_replace}" onclick="searchNext('current');" />
97
+ <input type="button" id="replaceAllBtn" name="replaceAllBtn" value="{$lang_searchreplace_replaceall}" onclick="searchNext('all');;" />
98
+ </span>
99
+ </div>
100
+
101
+ <div style="float: right">
102
+ <input type="button" id="cancel" name="cancel" value="{$lang_searchreplace_cancel}" onclick="tinyMCEPopup.close();" />
103
+ </div>
104
+ </div>
105
+ </form>
106
+ </body>
107
+ </html>
js/tiny_mce/plugins/style/css/props.css ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #text_font {
2
+ width: 250px;
3
+ }
4
+
5
+ #text_size {
6
+ width: 70px;
7
+ }
8
+
9
+ .mceAddSelectValue {
10
+ background-color: #DDDDDD;
11
+ }
12
+
13
+ select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {
14
+ width: 70px;
15
+ }
16
+
17
+ #box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {
18
+ width: 70px;
19
+ }
20
+
21
+ #positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {
22
+ width: 70px;
23
+ }
24
+
25
+ #positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {
26
+ width: 70px;
27
+ }
28
+
29
+ .panel_wrapper div.current {
30
+ padding-top: 10px;
31
+ height: 230px;
32
+ }
33
+
34
+ .delim {
35
+ border-left: 1px solid gray;
36
+ }
37
+
38
+ .tdelim {
39
+ border-bottom: 1px solid gray;
40
+ }
41
+
42
+ #block_display {
43
+ width: 145px;
44
+ }
45
+
46
+ #list_type {
47
+ width: 115px;
48
+ }
49
+
50
+ .disabled {
51
+ background-color: #EEEEEE;
52
+ }
53
+
54
+ #apply {
55
+ font-weight: bold;
56
+ width: 78px;
57
+ height: 21px;
58
+ border: 0;
59
+ background-image: url('../images/apply_button_bg.gif');
60
+ cursor: pointer;
61
+ }
62
+
js/tiny_mce/plugins/style/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('style');var TinyMCE_StylePlugin={getInfo:function(){return{longname:'Style',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(cn){switch(cn){case"styleprops":return tinyMCE.getButtonHTML(cn,'lang_style_styleinfo_desc','{$pluginurl}/images/styleprops.gif','mceStyleProps',true)}return""},execCommand:function(editor_id,element,command,user_interface,value){var e,inst;switch(command){case"mceStyleProps":TinyMCE_StylePlugin._styleProps();return true;case"mceSetElementStyle":inst=tinyMCE.getInstanceById(editor_id);e=inst.selection.getFocusElement();if(e){e.style.cssText=value;inst.repaint()}return true}return false},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node.nodeName=='BODY')tinyMCE.switchClass(editor_id+'_styleprops','mceButtonDisabled');else tinyMCE.switchClass(editor_id+'_styleprops','mceButtonNormal')},_styleProps:function(){var e=tinyMCE.selectedInstance.selection.getFocusElement();if(!e||e.nodeName=='BODY')return;tinyMCE.openWindow({file:'../../plugins/style/props.htm',width:480+tinyMCE.getLang('lang_style_props_delta_width',0),height:320+tinyMCE.getLang('lang_style_props_delta_height',0)},{editor_id:tinyMCE.selectedInstance.editorId,inline:"yes",style_text:e.style.cssText})}};tinyMCE.addPlugin("style",TinyMCE_StylePlugin);
js/tiny_mce/plugins/style/editor_plugin_src.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('style');
10
+
11
+ var TinyMCE_StylePlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Style',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ getControlHTML : function(cn) {
23
+ switch (cn) {
24
+ case "styleprops":
25
+ return tinyMCE.getButtonHTML(cn, 'lang_style_styleinfo_desc', '{$pluginurl}/images/styleprops.gif', 'mceStyleProps', true);
26
+ }
27
+
28
+ return "";
29
+ },
30
+
31
+ execCommand : function(editor_id, element, command, user_interface, value) {
32
+ var e, inst;
33
+
34
+ // Handle commands
35
+ switch (command) {
36
+ case "mceStyleProps":
37
+ TinyMCE_StylePlugin._styleProps();
38
+ return true;
39
+
40
+ case "mceSetElementStyle":
41
+ inst = tinyMCE.getInstanceById(editor_id);
42
+ e = inst.selection.getFocusElement();
43
+
44
+ if (e) {
45
+ e.style.cssText = value;
46
+ inst.repaint();
47
+ }
48
+
49
+ return true;
50
+ }
51
+
52
+ // Pass to next handler in chain
53
+ return false;
54
+ },
55
+
56
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
57
+ if (node.nodeName == 'BODY')
58
+ tinyMCE.switchClass(editor_id + '_styleprops', 'mceButtonDisabled');
59
+ else
60
+ tinyMCE.switchClass(editor_id + '_styleprops', 'mceButtonNormal');
61
+ },
62
+
63
+ // Private plugin specific methods
64
+
65
+ _styleProps : function() {
66
+ var e = tinyMCE.selectedInstance.selection.getFocusElement();
67
+
68
+ if (!e || e.nodeName == 'BODY')
69
+ return;
70
+
71
+ tinyMCE.openWindow({
72
+ file : '../../plugins/style/props.htm',
73
+ width : 480 + tinyMCE.getLang('lang_style_props_delta_width', 0),
74
+ height : 320 + tinyMCE.getLang('lang_style_props_delta_height', 0)
75
+ }, {
76
+ editor_id : tinyMCE.selectedInstance.editorId,
77
+ inline : "yes",
78
+ style_text : e.style.cssText
79
+ });
80
+ }
81
+ };
82
+
83
+ tinyMCE.addPlugin("style", TinyMCE_StylePlugin);
js/tiny_mce/plugins/style/images/apply_button_bg.gif ADDED
Binary file
js/tiny_mce/plugins/style/images/style_info.gif ADDED
Binary file
js/tiny_mce/plugins/style/images/styleprops.gif ADDED
Binary file
js/tiny_mce/plugins/style/jscripts/props.js ADDED
@@ -0,0 +1,633 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var defaultFonts = "" +
2
+ "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" +
3
+ "Times New Roman, Times, serif=Times New Roman, Times, serif;" +
4
+ "Courier New, Courier, mono=Courier New, Courier, mono;" +
5
+ "Times New Roman, Times, serif=Times New Roman, Times, serif;" +
6
+ "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" +
7
+ "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" +
8
+ "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
9
+
10
+ var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
11
+ var defaultMeasurement = "+pixels=px;points=pt;in;cm;mm;picas;ems;exs;%";
12
+ var defaultSpacingMeasurement = "pixels=px;points=pt;in;cm;mm;picas;+ems;exs;%";
13
+ var defaultIndentMeasurement = "pixels=px;+points=pt;in;cm;mm;picas;ems;exs;%";
14
+ var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
15
+ var defaultTextStyle = "normal;italic;oblique";
16
+ var defaultVariant = "normal;small-caps";
17
+ var defaultLineHeight = "normal";
18
+ var defaultAttachment = "fixed;scroll";
19
+ var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y";
20
+ var defaultPosH = "left;center;right";
21
+ var defaultPosV = "top;center;bottom";
22
+ var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom";
23
+ var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none";
24
+ var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset";
25
+ var defaultBorderWidth = "thin;medium;thick";
26
+ var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
27
+
28
+ function init() {
29
+ var ce = document.getElementById('container'), h;
30
+
31
+ ce.style.cssText = tinyMCEPopup.getWindowArg('style_text');
32
+
33
+ h = getBrowserHTML('background_image_browser','background_image','image','advimage');
34
+ document.getElementById("background_image_browser").innerHTML = h;
35
+
36
+ tinyMCEPopup.resizeToInnerSize();
37
+
38
+ document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color');
39
+ document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color');
40
+ document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top');
41
+ document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right');
42
+ document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom');
43
+ document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left');
44
+
45
+ fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true);
46
+ fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true);
47
+ fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true);
48
+ fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true);
49
+ fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true);
50
+ fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true);
51
+ fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true);
52
+ fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true);
53
+ fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true);
54
+
55
+ fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true);
56
+ fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true);
57
+
58
+ fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true);
59
+ fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true);
60
+
61
+ fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true);
62
+ fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true);
63
+
64
+ fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true);
65
+ fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true);
66
+ fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true);
67
+ fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true);
68
+ fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true);
69
+ fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true);
70
+ fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true);
71
+ fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true);
72
+ fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true);
73
+
74
+ fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true);
75
+ fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true);
76
+ fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true);
77
+ fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true);
78
+ fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true);
79
+ fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true);
80
+ fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true);
81
+ fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true);
82
+ fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true);
83
+ fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true);
84
+ fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true);
85
+ fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true);
86
+
87
+ fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true);
88
+ fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true);
89
+ fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true);
90
+ fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true);
91
+
92
+ fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true);
93
+ fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true);
94
+ fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true);
95
+ fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true);
96
+
97
+ fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true);
98
+ fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true);
99
+ fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true);
100
+ fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true);
101
+
102
+ fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true);
103
+ fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true);
104
+
105
+ fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true);
106
+ fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true);
107
+
108
+ fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true);
109
+ fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true);
110
+ fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true);
111
+
112
+ fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true);
113
+ fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true);
114
+ fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true);
115
+ fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true);
116
+
117
+ fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true);
118
+ fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true);
119
+ fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true);
120
+ fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true);
121
+
122
+ TinyMCE_EditableSelects.init();
123
+ setupFormData();
124
+ showDisabledControls();
125
+ }
126
+
127
+ function setupFormData() {
128
+ var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
129
+
130
+ // Setup text fields
131
+
132
+ selectByValue(f, 'text_font', ce.style.fontFamily, true, true);
133
+ selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true);
134
+ selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize));
135
+ selectByValue(f, 'text_weight', ce.style.fontWeight, true, true);
136
+ selectByValue(f, 'text_style', ce.style.fontStyle, true, true);
137
+ selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true);
138
+ selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight));
139
+ selectByValue(f, 'text_case', ce.style.textTransform, true, true);
140
+ selectByValue(f, 'text_variant', ce.style.fontVariant, true, true);
141
+ f.text_color.value = ce.style.color;
142
+ updateColor('text_color_pick', 'text_color');
143
+ f.text_underline.checked = inStr(ce.style.textDecoration, 'underline');
144
+ f.text_overline.checked = inStr(ce.style.textDecoration, 'overline');
145
+ f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through');
146
+ f.text_blink.checked = inStr(ce.style.textDecoration, 'blink');
147
+
148
+ // Setup background fields
149
+
150
+ f.background_color.value = ce.style.backgroundColor;
151
+ updateColor('background_color_pick', 'background_color');
152
+ f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
153
+ selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true);
154
+ selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true);
155
+ selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true);
156
+ selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0)));
157
+ selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true);
158
+ selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1)));
159
+
160
+ // Setup block fields
161
+
162
+ selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true);
163
+ selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing));
164
+ selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true);
165
+ selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing));
166
+ selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true);
167
+ selectByValue(f, 'block_text_align', ce.style.textAlign, true, true);
168
+ f.block_text_indent.value = getNum(ce.style.textIndent);
169
+ selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent));
170
+ selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true);
171
+ selectByValue(f, 'block_display', ce.style.display, true, true);
172
+
173
+ // Setup box fields
174
+
175
+ f.box_width.value = getNum(ce.style.width);
176
+ selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width));
177
+
178
+ f.box_height.value = getNum(ce.style.height);
179
+ selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height));
180
+
181
+ if (tinyMCE.isGecko)
182
+ selectByValue(f, 'box_float', ce.style.cssFloat, true, true);
183
+ else
184
+ selectByValue(f, 'box_float', ce.style.styleFloat, true, true);
185
+
186
+ selectByValue(f, 'box_clear', ce.style.clear, true, true);
187
+
188
+ setupBox(f, ce, 'box_padding', 'padding', '');
189
+ setupBox(f, ce, 'box_margin', 'margin', '');
190
+
191
+ // Setup border fields
192
+
193
+ setupBox(f, ce, 'border_style', 'border', 'Style');
194
+ setupBox(f, ce, 'border_width', 'border', 'Width');
195
+ setupBox(f, ce, 'border_color', 'border', 'Color');
196
+
197
+ updateColor('border_color_top_pick', 'border_color_top');
198
+ updateColor('border_color_right_pick', 'border_color_right');
199
+ updateColor('border_color_bottom_pick', 'border_color_bottom');
200
+ updateColor('border_color_left_pick', 'border_color_left');
201
+
202
+ // Setup list fields
203
+
204
+ selectByValue(f, 'list_type', ce.style.listStyleType, true, true);
205
+ selectByValue(f, 'list_position', ce.style.listStylePosition, true, true);
206
+ f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
207
+
208
+ // Setup box fields
209
+
210
+ selectByValue(f, 'positioning_type', ce.style.position, true, true);
211
+ selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true);
212
+ selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true);
213
+ f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : "";
214
+
215
+ f.positioning_width.value = getNum(ce.style.width);
216
+ selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width));
217
+
218
+ f.positioning_height.value = getNum(ce.style.height);
219
+ selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height));
220
+
221
+ setupBox(f, ce, 'positioning_placement', '', '', new Array('top', 'right', 'bottom', 'left'));
222
+
223
+ s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1");
224
+ s = s.replace(/,/g, ' ');
225
+
226
+ if (!hasEqualValues(new Array(getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)))) {
227
+ f.positioning_clip_top.value = getNum(getVal(s, 0));
228
+ selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
229
+ f.positioning_clip_right.value = getNum(getVal(s, 1));
230
+ selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1)));
231
+ f.positioning_clip_bottom.value = getNum(getVal(s, 2));
232
+ selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2)));
233
+ f.positioning_clip_left.value = getNum(getVal(s, 3));
234
+ selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3)));
235
+ } else {
236
+ f.positioning_clip_top.value = getNum(getVal(s, 0));
237
+ selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
238
+ f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value;
239
+ }
240
+
241
+ // setupBox(f, ce, '', 'border', 'Color');
242
+ }
243
+
244
+ function getMeasurement(s) {
245
+ return s.replace(/^([0-9]+)(.*)$/, "$2");
246
+ }
247
+
248
+ function getNum(s) {
249
+ if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s))
250
+ return s.replace(/[^0-9]/g, '');
251
+
252
+ return s;
253
+ }
254
+
255
+ function inStr(s, n) {
256
+ return new RegExp(n, 'gi').test(s);
257
+ }
258
+
259
+ function getVal(s, i) {
260
+ var a = tinyMCE.explode(' ', s);
261
+
262
+ if (a.length > 1)
263
+ return a[i];
264
+
265
+ return "";
266
+ }
267
+
268
+ function setValue(f, n, v) {
269
+ if (f.elements[n].type == "text")
270
+ f.elements[n].value = v;
271
+ else
272
+ selectByValue(f, n, v, true, true);
273
+ }
274
+
275
+ function setupBox(f, ce, fp, pr, sf, b) {
276
+ if (typeof(b) == "undefined")
277
+ b = new Array('Top', 'Right', 'Bottom', 'Left');
278
+
279
+ if (isSame(ce, pr, sf, b)) {
280
+ f.elements[fp + "_same"].checked = true;
281
+
282
+ setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
283
+ f.elements[fp + "_top"].disabled = false;
284
+
285
+ f.elements[fp + "_right"].value = "";
286
+ f.elements[fp + "_right"].disabled = true;
287
+ f.elements[fp + "_bottom"].value = "";
288
+ f.elements[fp + "_bottom"].disabled = true;
289
+ f.elements[fp + "_left"].value = "";
290
+ f.elements[fp + "_left"].disabled = true;
291
+
292
+ if (f.elements[fp + "_top_measurement"]) {
293
+ selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
294
+ f.elements[fp + "_left_measurement"].disabled = true;
295
+ f.elements[fp + "_bottom_measurement"].disabled = true;
296
+ f.elements[fp + "_right_measurement"].disabled = true;
297
+ }
298
+ } else {
299
+ f.elements[fp + "_same"].checked = false;
300
+
301
+ setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
302
+ f.elements[fp + "_top"].disabled = false;
303
+
304
+ setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf]));
305
+ f.elements[fp + "_right"].disabled = false;
306
+
307
+ setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf]));
308
+ f.elements[fp + "_bottom"].disabled = false;
309
+
310
+ setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf]));
311
+ f.elements[fp + "_left"].disabled = false;
312
+
313
+ if (f.elements[fp + "_top_measurement"]) {
314
+ selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
315
+ selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf]));
316
+ selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf]));
317
+ selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf]));
318
+ f.elements[fp + "_left_measurement"].disabled = false;
319
+ f.elements[fp + "_bottom_measurement"].disabled = false;
320
+ f.elements[fp + "_right_measurement"].disabled = false;
321
+ }
322
+ }
323
+ }
324
+
325
+ function isSame(e, pr, sf, b) {
326
+ var a = new Array(), i, x;
327
+
328
+ if (typeof(b) == "undefined")
329
+ b = new Array('Top', 'Right', 'Bottom', 'Left');
330
+
331
+ if (typeof(sf) == "undefined" || sf == null)
332
+ sf = "";
333
+
334
+ a[0] = e.style[pr + b[0] + sf];
335
+ a[1] = e.style[pr + b[1] + sf];
336
+ a[2] = e.style[pr + b[2] + sf];
337
+ a[3] = e.style[pr + b[3] + sf];
338
+
339
+ for (i=0; i<a.length; i++) {
340
+ if (a[i] == null)
341
+ return false;
342
+
343
+ for (x=0; x<a.length; x++) {
344
+ if (a[x] != a[i])
345
+ return false;
346
+ }
347
+ }
348
+
349
+ return true;
350
+ };
351
+
352
+ function hasEqualValues(a) {
353
+ var i, x;
354
+
355
+ for (i=0; i<a.length; i++) {
356
+ if (a[i] == null)
357
+ return false;
358
+
359
+ for (x=0; x<a.length; x++) {
360
+ if (a[x] != a[i])
361
+ return false;
362
+ }
363
+ }
364
+
365
+ return true;
366
+ }
367
+
368
+ function applyAction() {
369
+ var ce = document.getElementById('container');
370
+
371
+ generateCSS();
372
+
373
+ tinyMCEPopup.execCommand('mceSetElementStyle', false, tinyMCE.serializeStyle(tinyMCE.parseStyle(ce.style.cssText)));
374
+ }
375
+
376
+ function updateAction() {
377
+ applyAction();
378
+ tinyMCEPopup.close();
379
+ }
380
+
381
+ function generateCSS() {
382
+ var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
383
+
384
+ ce.style.cssText = "";
385
+
386
+ // Build text styles
387
+ ce.style.fontFamily = f.text_font.value;
388
+ ce.style.fontSize = f.text_size.value + (isNum(f.text_size.value) ? f.text_size_measurement.value : "");
389
+ ce.style.fontStyle = f.text_style.value;
390
+ ce.style.lineHeight = f.text_lineheight.value + (isNum(f.text_lineheight.value) ? f.text_lineheight_measurement.value : "");
391
+ ce.style.textTransform = f.text_case.value;
392
+ ce.style.fontWeight = f.text_weight.value;
393
+ ce.style.fontVariant = f.text_variant.value;
394
+ ce.style.color = f.text_color.value;
395
+
396
+ s = "";
397
+ s += f.text_underline.checked ? " underline" : "";
398
+ s += f.text_overline.checked ? " overline" : "";
399
+ s += f.text_linethrough.checked ? " line-through" : "";
400
+ s += f.text_blink.checked ? " blink" : "";
401
+ s = s.length > 0 ? s.substring(1) : s;
402
+
403
+ if (f.text_none.checked)
404
+ s = "none";
405
+
406
+ ce.style.textDecoration = s;
407
+
408
+ // Build background styles
409
+
410
+ ce.style.backgroundColor = f.background_color.value;
411
+ ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : "";
412
+ ce.style.backgroundRepeat = f.background_repeat.value;
413
+ ce.style.backgroundAttachment = f.background_attachment.value;
414
+
415
+ if (f.background_hpos.value != "") {
416
+ s = "";
417
+ s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " ";
418
+ s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : "");
419
+ ce.style.backgroundPosition = s;
420
+ }
421
+
422
+ // Build block styles
423
+
424
+ ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : "");
425
+ ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : "");
426
+ ce.style.verticalAlign = f.block_vertical_alignment.value;
427
+ ce.style.textAlign = f.block_text_align.value;
428
+ ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : "");
429
+ ce.style.whiteSpace = f.block_whitespace.value;
430
+ ce.style.display = f.block_display.value;
431
+
432
+ // Build box styles
433
+
434
+ ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : "");
435
+ ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : "");
436
+ ce.style.styleFloat = f.box_float.value;
437
+
438
+ if (tinyMCE.isGecko)
439
+ ce.style.cssFloat = f.box_float.value;
440
+
441
+ ce.style.clear = f.box_clear.value;
442
+
443
+ if (!f.box_padding_same.checked) {
444
+ ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
445
+ ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : "");
446
+ ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : "");
447
+ ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : "");
448
+ } else
449
+ ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
450
+
451
+ if (!f.box_margin_same.checked) {
452
+ ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
453
+ ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : "");
454
+ ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : "");
455
+ ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : "");
456
+ } else
457
+ ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
458
+
459
+ // Build border styles
460
+
461
+ if (!f.border_style_same.checked) {
462
+ ce.style.borderTopStyle = f.border_style_top.value;
463
+ ce.style.borderRightStyle = f.border_style_right.value;
464
+ ce.style.borderBottomStyle = f.border_style_bottom.value;
465
+ ce.style.borderLeftStyle = f.border_style_left.value;
466
+ } else
467
+ ce.style.borderStyle = f.border_style_top.value;
468
+
469
+ if (!f.border_width_same.checked) {
470
+ ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
471
+ ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : "");
472
+ ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
473
+ ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
474
+ } else
475
+ ce.style.borderWidth = f.border_width_top.value;
476
+
477
+ if (!f.border_color_same.checked) {
478
+ ce.style.borderTopColor = f.border_color_top.value;
479
+ ce.style.borderRightColor = f.border_color_right.value;
480
+ ce.style.borderBottomColor = f.border_color_bottom.value;
481
+ ce.style.borderLeftColor = f.border_color_left.value;
482
+ } else
483
+ ce.style.borderColor = f.border_color_top.value;
484
+
485
+ // Build list styles
486
+
487
+ ce.style.listStyleType = f.list_type.value;
488
+ ce.style.listStylePosition = f.list_position.value;
489
+ ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : "";
490
+
491
+ // Build positioning styles
492
+
493
+ ce.style.position = f.positioning_type.value;
494
+ ce.style.visibility = f.positioning_visibility.value;
495
+
496
+ if (ce.style.width == "")
497
+ ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : "");
498
+
499
+ if (ce.style.height == "")
500
+ ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : "");
501
+
502
+ ce.style.zIndex = f.positioning_zindex.value;
503
+ ce.style.overflow = f.positioning_overflow.value;
504
+
505
+ if (!f.positioning_placement_same.checked) {
506
+ ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
507
+ ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : "");
508
+ ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : "");
509
+ ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : "");
510
+ } else {
511
+ s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
512
+ ce.style.top = s;
513
+ ce.style.right = s;
514
+ ce.style.bottom = s;
515
+ ce.style.left = s;
516
+ }
517
+
518
+ if (!f.positioning_clip_same.checked) {
519
+ s = "rect(";
520
+ s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " ";
521
+ s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " ";
522
+ s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " ";
523
+ s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto");
524
+ s += ")";
525
+
526
+ if (s != "rect(auto auto auto auto)")
527
+ ce.style.clip = s;
528
+ } else {
529
+ s = "rect(";
530
+ t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto";
531
+ s += t + " ";
532
+ s += t + " ";
533
+ s += t + " ";
534
+ s += t + ")";
535
+
536
+ if (s != "rect(auto auto auto auto)")
537
+ ce.style.clip = s;
538
+ }
539
+
540
+ ce.style.cssText = tinyMCE.serializeStyle(tinyMCE.parseStyle(ce.style.cssText));
541
+ }
542
+
543
+ function isNum(s) {
544
+ return new RegExp('[0-9]+', 'g').test(s);
545
+ }
546
+
547
+ function showDisabledControls() {
548
+ var f = document.forms, i, a;
549
+
550
+ for (i=0; i<f.length; i++) {
551
+ for (a=0; a<f[i].elements.length; a++) {
552
+ if (f[i].elements[a].disabled)
553
+ tinyMCE.addCSSClass(f[i].elements[a], "disabled");
554
+ else
555
+ tinyMCE.removeCSSClass(f[i].elements[a], "disabled");
556
+ }
557
+ }
558
+ }
559
+
560
+ function fillSelect(f, s, param, dval, sep, em) {
561
+ var i, ar, p, se;
562
+
563
+ f = document.forms[f];
564
+ sep = typeof(sep) == "undefined" ? ";" : sep;
565
+
566
+ if (em)
567
+ addSelectValue(f, s, "", "");
568
+
569
+ ar = tinyMCE.getParam(param, dval).split(sep);
570
+ for (i=0; i<ar.length; i++) {
571
+ se = false;
572
+
573
+ if (ar[i].charAt(0) == '+') {
574
+ ar[i] = ar[i].substring(1);
575
+ se = true;
576
+ }
577
+
578
+ p = ar[i].split('=');
579
+
580
+ if (p.length > 1) {
581
+ addSelectValue(f, s, p[0], p[1]);
582
+
583
+ if (se)
584
+ selectByValue(f, s, p[1]);
585
+ } else {
586
+ addSelectValue(f, s, p[0], p[0]);
587
+
588
+ if (se)
589
+ selectByValue(f, s, p[0]);
590
+ }
591
+ }
592
+ }
593
+
594
+ function toggleSame(ce, pre) {
595
+ var el = document.forms[0].elements, i;
596
+
597
+ if (ce.checked) {
598
+ el[pre + "_top"].disabled = false;
599
+ el[pre + "_right"].disabled = true;
600
+ el[pre + "_bottom"].disabled = true;
601
+ el[pre + "_left"].disabled = true;
602
+
603
+ if (el[pre + "_top_measurement"]) {
604
+ el[pre + "_top_measurement"].disabled = false;
605
+ el[pre + "_right_measurement"].disabled = true;
606
+ el[pre + "_bottom_measurement"].disabled = true;
607
+ el[pre + "_left_measurement"].disabled = true;
608
+ }
609
+ } else {
610
+ el[pre + "_top"].disabled = false;
611
+ el[pre + "_right"].disabled = false;
612
+ el[pre + "_bottom"].disabled = false;
613
+ el[pre + "_left"].disabled = false;
614
+
615
+ if (el[pre + "_top_measurement"]) {
616
+ el[pre + "_top_measurement"].disabled = false;
617
+ el[pre + "_right_measurement"].disabled = false;
618
+ el[pre + "_bottom_measurement"].disabled = false;
619
+ el[pre + "_left_measurement"].disabled = false;
620
+ }
621
+ }
622
+
623
+ showDisabledControls();
624
+ }
625
+
626
+ function synch(fr, to) {
627
+ var f = document.forms[0];
628
+
629
+ f.elements[to].value = f.elements[fr].value;
630
+
631
+ if (f.elements[fr + "_measurement"])
632
+ selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value);
633
+ }
js/tiny_mce/plugins/style/langs/en.js ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('style',{
4
+ title : 'Edit CSS Style',
5
+ styleinfo_desc : 'Edit CSS Style',
6
+ apply : 'Apply',
7
+ text_tab : 'Text',
8
+ background_tab : 'Background',
9
+ block_tab : 'Block',
10
+ box_tab : 'Box',
11
+ border_tab : 'Border',
12
+ list_tab : 'List',
13
+ positioning_tab : 'Positioning',
14
+ text_props : 'Text',
15
+ text_font : 'Font',
16
+ text_size : 'Size',
17
+ text_weight : 'Weight',
18
+ text_style : 'Style',
19
+ text_variant : 'Variant',
20
+ text_lineheight : 'Line height',
21
+ text_case : 'Case',
22
+ text_color : 'Color',
23
+ text_decoration : 'Decoration',
24
+ text_overline : 'overline',
25
+ text_underline : 'underline',
26
+ text_striketrough : 'strikethrough',
27
+ text_blink : 'blink',
28
+ text_none : 'none',
29
+ background_color : 'Background color',
30
+ background_image : 'Background image',
31
+ background_repeat : 'Repeat',
32
+ background_attachment : 'Attachment',
33
+ background_hpos : 'Horizontal position',
34
+ background_vpos : 'Vertical position',
35
+ block_wordspacing : 'Word spacing',
36
+ block_letterspacing : 'Letter spacing',
37
+ block_vertical_alignment : 'Vertical alignment',
38
+ block_text_align : 'Text align',
39
+ block_text_indent : 'Text indent',
40
+ block_whitespace : 'Whitespace',
41
+ block_display : 'Display',
42
+ box_width : 'Width',
43
+ box_height : 'Height',
44
+ box_float : 'Float',
45
+ box_clear : 'Clear',
46
+ padding : 'Padding',
47
+ same : 'Same for all',
48
+ top : 'Top',
49
+ right : 'Right',
50
+ bottom : 'Bottom',
51
+ left : 'Left',
52
+ margin : 'Margin',
53
+ style : 'Style',
54
+ width : 'Width',
55
+ height : 'Height',
56
+ color : 'Color',
57
+ list_type : 'Type',
58
+ bullet_image : 'Bullet image',
59
+ position : 'Position',
60
+ positioning_type : 'Type',
61
+ visibility : 'Visibility',
62
+ zindex : 'Z-index',
63
+ overflow : 'Overflow',
64
+ placement : 'Placement',
65
+ clip : 'Clip'
66
+ });
js/tiny_mce/plugins/style/props.htm ADDED
@@ -0,0 +1,729 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_style_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/props.js"></script>
9
+ <link href="css/props.css" rel="stylesheet" type="text/css" />
10
+ <base target="_self" />
11
+ </head>
12
+
13
+ <body id="styleprops" onLoad="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
14
+ <form onSubmit="updateAction();return false;" action="#">
15
+ <div class="tabs">
16
+ <ul>
17
+ <li id="text_tab" class="current"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{$lang_style_text_tab}</a></span></li>
18
+ <li id="background_tab"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{$lang_style_background_tab}</a></span></li>
19
+ <li id="block_tab"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{$lang_style_block_tab}</a></span></li>
20
+ <li id="box_tab"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{$lang_style_box_tab}</a></span></li>
21
+ <li id="border_tab"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{$lang_style_border_tab}</a></span></li>
22
+ <li id="list_tab"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{$lang_style_list_tab}</a></span></li>
23
+ <li id="positioning_tab"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{$lang_style_positioning_tab}</a></span></li>
24
+ </ul>
25
+ </div>
26
+
27
+ <div class="panel_wrapper">
28
+ <div id="text_panel" class="panel current">
29
+ <table border="0" width="100%">
30
+ <tr>
31
+ <td><label for="text_font">{$lang_style_text_font}</label></td>
32
+ <td colspan="3">
33
+ <select id="text_font" name="text_font" class="mceEditableSelect" onChange="alert(this.options[this.selectedIndex].value);"></select>
34
+ </td>
35
+ </tr>
36
+ <tr>
37
+ <td><label for="text_size">{$lang_style_text_size}</label></td>
38
+ <td>
39
+ <table border="0" cellspacing="0" cellpadding="0">
40
+ <tr>
41
+ <td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td>
42
+ <td>&nbsp;</td>
43
+ <td><select id="text_size_measurement" name="text_size_measurement"></select></td>
44
+ </tr>
45
+ </table>
46
+ </td>
47
+ <td><label for="text_weight">{$lang_style_text_weight}</label></td>
48
+ <td>
49
+ <select id="text_weight" name="text_weight"></select>
50
+ </td>
51
+ </tr>
52
+ <tr>
53
+ <td><label for="text_style">{$lang_style_text_style}</label></td>
54
+ <td>
55
+ <select id="text_style" name="text_style" class="mceEditableSelect"></select>
56
+ </td>
57
+ <td><label for="text_variant">{$lang_style_text_variant}</label></td>
58
+ <td>
59
+ <select id="text_variant" name="text_variant"></select>
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <td><label for="text_lineheight">{$lang_style_text_lineheight}</label></td>
64
+ <td>
65
+ <table border="0" cellspacing="0" cellpadding="0">
66
+ <tr>
67
+ <td>
68
+ <select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select>
69
+ </td>
70
+ <td>&nbsp;</td>
71
+ <td><select id="text_lineheight_measurement" name="text_lineheight_measurement"></select></td>
72
+ </tr>
73
+ </table>
74
+ </td>
75
+ <td><label for="text_case">{$lang_style_text_case}</label></td>
76
+ <td>
77
+ <select id="text_case" name="text_case"></select>
78
+ </td>
79
+ </tr>
80
+ <tr>
81
+ <td><label for="text_color">{$lang_style_text_color}</label></td>
82
+ <td colspan="2">
83
+ <table border="0" cellpadding="0" cellspacing="0">
84
+ <tr>
85
+ <td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td>
86
+ <td id="text_color_pickcontainer">&nbsp;</td>
87
+ </tr>
88
+ </table>
89
+ </td>
90
+ </tr>
91
+ <tr>
92
+ <td valign="top" style="vertical-align: top; padding-top: 3px;">{$lang_style_text_decoration}</td>
93
+ <td colspan="2">
94
+ <table border="0" cellspacing="0" cellpadding="0">
95
+ <tr>
96
+ <td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td>
97
+ <td><label for="text_underline">{$lang_style_text_underline}</label></td>
98
+ </tr>
99
+ <tr>
100
+ <td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td>
101
+ <td><label for="text_overline">{$lang_style_text_overline}</label></td>
102
+ </tr>
103
+ <tr>
104
+ <td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td>
105
+ <td><label for="text_linethrough">{$lang_style_text_striketrough}</label></td>
106
+ </tr>
107
+ <tr>
108
+ <td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td>
109
+ <td><label for="text_blink">{$lang_style_text_blink}</label></td>
110
+ </tr>
111
+ <tr>
112
+ <td><input id="text_none" name="text_none" class="checkbox" type="checkbox" /></td>
113
+ <td><label for="text_none">{$lang_style_text_none}</label></td>
114
+ </tr>
115
+ </table>
116
+ </td>
117
+ </tr>
118
+ </table>
119
+ </div>
120
+
121
+ <div id="background_panel" class="panel">
122
+ <table border="0">
123
+ <tr>
124
+ <td><label for="background_color">{$lang_style_background_color}</label></td>
125
+ <td>
126
+ <table border="0" cellpadding="0" cellspacing="0">
127
+ <tr>
128
+ <td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td>
129
+ <td id="background_color_pickcontainer">&nbsp;</td>
130
+ </tr>
131
+ </table>
132
+ </td>
133
+ </tr>
134
+
135
+ <tr>
136
+ <td><label for="background_image">{$lang_style_background_image}</label></td>
137
+ <td><table border="0" cellspacing="0" cellpadding="0">
138
+ <tr>
139
+ <td><input id="background_image" name="background_image" type="text" /></td>
140
+ <td id="background_image_browser">&nbsp;</td>
141
+ </tr>
142
+ </table>
143
+ </td>
144
+ </tr>
145
+
146
+ <tr>
147
+ <td><label for="background_repeat">{$lang_style_background_repeat}</label></td>
148
+ <td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td>
149
+ </tr>
150
+
151
+ <tr>
152
+ <td><label for="background_attachment">{$lang_style_background_attachment}</label></td>
153
+ <td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td>
154
+ </tr>
155
+
156
+ <tr>
157
+ <td><label for="background_hpos">{$lang_style_background_hpos}</label></td>
158
+ <td>
159
+ <table border="0" cellspacing="0" cellpadding="0">
160
+ <tr>
161
+ <td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td>
162
+ <td>&nbsp;</td>
163
+ <td><select id="background_hpos_measurement" name="background_hpos_measurement"></select></td>
164
+ </tr>
165
+ </table>
166
+ </td>
167
+ </tr>
168
+
169
+ <tr>
170
+ <td><label for="background_vpos">{$lang_style_background_vpos}</label></td>
171
+ <td>
172
+ <table border="0" cellspacing="0" cellpadding="0">
173
+ <tr>
174
+ <td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td>
175
+ <td>&nbsp;</td>
176
+ <td><select id="background_vpos_measurement" name="background_vpos_measurement"></select></td>
177
+ </tr>
178
+ </table>
179
+ </td>
180
+ </tr>
181
+ </table>
182
+ </div>
183
+
184
+ <div id="block_panel" class="panel">
185
+ <table border="0">
186
+ <tr>
187
+ <td><label for="block_wordspacing">{$lang_style_block_wordspacing}</label></td>
188
+ <td>
189
+ <table border="0" cellspacing="0" cellpadding="0">
190
+ <tr>
191
+ <td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td>
192
+ <td>&nbsp;</td>
193
+ <td><select id="block_wordspacing_measurement" name="block_wordspacing_measurement"></select></td>
194
+ </tr>
195
+ </table>
196
+ </td>
197
+ </tr>
198
+
199
+ <tr>
200
+ <td><label for="block_letterspacing">{$lang_style_block_letterspacing}</label></td>
201
+ <td>
202
+ <table border="0" cellspacing="0" cellpadding="0">
203
+ <tr>
204
+ <td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td>
205
+ <td>&nbsp;</td>
206
+ <td><select id="block_letterspacing_measurement" name="block_letterspacing_measurement"></select></td>
207
+ </tr>
208
+ </table>
209
+ </td>
210
+ </tr>
211
+
212
+ <tr>
213
+ <td><label for="block_vertical_alignment">{$lang_style_block_vertical_alignment}</label></td>
214
+ <td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td>
215
+ </tr>
216
+
217
+ <tr>
218
+ <td><label for="block_text_align">{$lang_style_block_text_align}</label></td>
219
+ <td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td>
220
+ </tr>
221
+
222
+ <tr>
223
+ <td><label for="block_text_indent">{$lang_style_block_text_indent}</label></td>
224
+ <td>
225
+ <table border="0" cellspacing="0" cellpadding="0">
226
+ <tr>
227
+ <td><input type="text" id="block_text_indent" name="block_text_indent" /></td>
228
+ <td>&nbsp;</td>
229
+ <td><select id="block_text_indent_measurement" name="block_text_indent_measurement"></select></td>
230
+ </tr>
231
+ </table>
232
+ </td>
233
+ </tr>
234
+
235
+ <tr>
236
+ <td><label for="block_whitespace">{$lang_style_block_whitespace}</label></td>
237
+ <td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td>
238
+ </tr>
239
+
240
+ <tr>
241
+ <td><label for="block_display">{$lang_style_block_display}</label></td>
242
+ <td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td>
243
+ </tr>
244
+ </table>
245
+ </div>
246
+
247
+ <div id="box_panel" class="panel">
248
+ <table border="0">
249
+ <tr>
250
+ <td><label for="box_width">{$lang_style_box_width}</label></td>
251
+ <td>
252
+ <table border="0" cellspacing="0" cellpadding="0">
253
+ <tr>
254
+ <td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td>
255
+ <td>&nbsp;</td>
256
+ <td><select id="box_width_measurement" name="box_width_measurement"></select></td>
257
+ </tr>
258
+ </table>
259
+ </td>
260
+ <td>&nbsp;&nbsp;&nbsp;<label for="box_float">{$lang_style_box_float}</label></td>
261
+ <td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td>
262
+ </tr>
263
+
264
+ <tr>
265
+ <td><label for="box_height">{$lang_style_box_height}</label></td>
266
+ <td>
267
+ <table border="0" cellspacing="0" cellpadding="0">
268
+ <tr>
269
+ <td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td>
270
+ <td>&nbsp;</td>
271
+ <td><select id="box_height_measurement" name="box_height_measurement"></select></td>
272
+ </tr>
273
+ </table>
274
+ </td>
275
+ <td>&nbsp;&nbsp;&nbsp;<label for="box_clear">{$lang_style_box_clear}</label></td>
276
+ <td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td>
277
+ </tr>
278
+ </table>
279
+ <div style="float: left; width: 49%">
280
+ <fieldset>
281
+ <legend>{$lang_style_padding}</legend>
282
+
283
+ <table border="0">
284
+ <tr>
285
+ <td>&nbsp;</td>
286
+ <td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{$lang_style_same}</label></td>
287
+ </tr>
288
+ <tr>
289
+ <td><label for="box_padding_top">{$lang_style_top}</label></td>
290
+ <td>
291
+ <table border="0" cellspacing="0" cellpadding="0">
292
+ <tr>
293
+ <td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td>
294
+ <td>&nbsp;</td>
295
+ <td><select id="box_padding_top_measurement" name="box_padding_top_measurement"></select></td>
296
+ </tr>
297
+ </table>
298
+ </td>
299
+ </tr>
300
+ <tr>
301
+ <td><label for="box_padding_right">{$lang_style_right}</label></td>
302
+ <td>
303
+ <table border="0" cellspacing="0" cellpadding="0">
304
+ <tr>
305
+ <td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td>
306
+ <td>&nbsp;</td>
307
+ <td><select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled"></select></td>
308
+ </tr>
309
+ </table>
310
+ </td>
311
+ </tr>
312
+ <tr>
313
+ <td><label for="box_padding_bottom">{$lang_style_bottom}</label></td>
314
+ <td>
315
+ <table border="0" cellspacing="0" cellpadding="0">
316
+ <tr>
317
+ <td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td>
318
+ <td>&nbsp;</td>
319
+ <td><select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled"></select></td>
320
+ </tr>
321
+ </table>
322
+ </td>
323
+ </tr>
324
+ <tr>
325
+ <td><label for="box_padding_left">{$lang_style_left}</label></td>
326
+ <td>
327
+ <table border="0" cellspacing="0" cellpadding="0">
328
+ <tr>
329
+ <td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td>
330
+ <td>&nbsp;</td>
331
+ <td><select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled"></select></td>
332
+ </tr>
333
+ </table>
334
+ </td>
335
+ </tr>
336
+ </table>
337
+ </fieldset>
338
+ </div>
339
+
340
+ <div style="float: right; width: 49%">
341
+ <fieldset>
342
+ <legend>{$lang_style_margin}</legend>
343
+
344
+ <table border="0">
345
+ <tr>
346
+ <td>&nbsp;</td>
347
+ <td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{$lang_style_same}</label></td>
348
+ </tr>
349
+ <tr>
350
+ <td><label for="box_margin_top">{$lang_style_top}</label></td>
351
+ <td>
352
+ <table border="0" cellspacing="0" cellpadding="0">
353
+ <tr>
354
+ <td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td>
355
+ <td>&nbsp;</td>
356
+ <td><select id="box_margin_top_measurement" name="box_margin_top_measurement"></select></td>
357
+ </tr>
358
+ </table>
359
+ </td>
360
+ </tr>
361
+ <tr>
362
+ <td><label for="box_margin_right">{$lang_style_right}</label></td>
363
+ <td>
364
+ <table border="0" cellspacing="0" cellpadding="0">
365
+ <tr>
366
+ <td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td>
367
+ <td>&nbsp;</td>
368
+ <td><select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled"></select></td>
369
+ </tr>
370
+ </table>
371
+ </td>
372
+ </tr>
373
+ <tr>
374
+ <td><label for="box_margin_bottom">{$lang_style_bottom}</label></td>
375
+ <td>
376
+ <table border="0" cellspacing="0" cellpadding="0">
377
+ <tr>
378
+ <td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td>
379
+ <td>&nbsp;</td>
380
+ <td><select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled"></select></td>
381
+ </tr>
382
+ </table>
383
+ </td>
384
+ </tr>
385
+ <tr>
386
+ <td><label for="box_margin_left">{$lang_style_left}</label></td>
387
+ <td>
388
+ <table border="0" cellspacing="0" cellpadding="0">
389
+ <tr>
390
+ <td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td>
391
+ <td>&nbsp;</td>
392
+ <td><select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled"></select></td>
393
+ </tr>
394
+ </table>
395
+ </td>
396
+ </tr>
397
+ </table>
398
+ </fieldset>
399
+ </div>
400
+ <br style="clear: both" />
401
+ </div>
402
+
403
+ <div id="border_panel" class="panel">
404
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
405
+ <tr>
406
+ <td class="tdelim">&nbsp;</td>
407
+ <td class="tdelim delim">&nbsp;</td>
408
+ <td class="tdelim">{$lang_style_style}</td>
409
+ <td class="tdelim delim">&nbsp;</td>
410
+ <td class="tdelim">{$lang_style_width}</td>
411
+ <td class="tdelim delim">&nbsp;</td>
412
+ <td class="tdelim">{$lang_style_color}</td>
413
+ </tr>
414
+
415
+ <tr>
416
+ <td>&nbsp;</td>
417
+ <td class="delim">&nbsp;</td>
418
+ <td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{$lang_style_same}</label></td>
419
+ <td class="delim">&nbsp;</td>
420
+ <td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{$lang_style_same}</label></td>
421
+ <td class="delim">&nbsp;</td>
422
+ <td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{$lang_style_same}</label></td>
423
+ </tr>
424
+
425
+ <tr>
426
+ <td>{$lang_style_top}</td>
427
+ <td class="delim">&nbsp;</td>
428
+ <td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td>
429
+ <td class="delim">&nbsp;</td>
430
+ <td>
431
+ <table border="0" cellspacing="0" cellpadding="0">
432
+ <tr>
433
+ <td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td>
434
+ <td>&nbsp;</td>
435
+ <td><select id="border_width_top_measurement" name="border_width_top_measurement"></select></td>
436
+ </tr>
437
+ </table>
438
+ </td>
439
+ <td class="delim">&nbsp;</td>
440
+ <td>
441
+ <table border="0" cellpadding="0" cellspacing="0">
442
+ <tr>
443
+ <td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td>
444
+ <td id="border_color_top_pickcontainer">&nbsp;</td>
445
+ </tr>
446
+ </table>
447
+ </td>
448
+ </tr>
449
+
450
+ <tr>
451
+ <td>{$lang_style_right}</td>
452
+ <td class="delim">&nbsp;</td>
453
+ <td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td>
454
+ <td class="delim">&nbsp;</td>
455
+ <td>
456
+ <table border="0" cellspacing="0" cellpadding="0">
457
+ <tr>
458
+ <td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td>
459
+ <td>&nbsp;</td>
460
+ <td><select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled"></select></td>
461
+ </tr>
462
+ </table>
463
+ </td>
464
+ <td class="delim">&nbsp;</td>
465
+ <td>
466
+ <table border="0" cellpadding="0" cellspacing="0">
467
+ <tr>
468
+ <td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
469
+ <td id="border_color_right_pickcontainer">&nbsp;</td>
470
+ </tr>
471
+ </table>
472
+ </td>
473
+ </tr>
474
+
475
+ <tr>
476
+ <td>{$lang_style_bottom}</td>
477
+ <td class="delim">&nbsp;</td>
478
+ <td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
479
+ <td class="delim">&nbsp;</td>
480
+ <td>
481
+ <table border="0" cellspacing="0" cellpadding="0">
482
+ <tr>
483
+ <td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
484
+ <td>&nbsp;</td>
485
+ <td><select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled"></select></td>
486
+ </tr>
487
+ </table>
488
+ </td>
489
+ <td class="delim">&nbsp;</td>
490
+ <td>
491
+ <table border="0" cellpadding="0" cellspacing="0">
492
+ <tr>
493
+ <td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
494
+ <td id="border_color_bottom_pickcontainer">&nbsp;</td>
495
+ </tr>
496
+ </table>
497
+ </td>
498
+ </tr>
499
+
500
+ <tr>
501
+ <td>{$lang_style_left}</td>
502
+ <td class="delim">&nbsp;</td>
503
+ <td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td>
504
+ <td class="delim">&nbsp;</td>
505
+ <td>
506
+ <table border="0" cellspacing="0" cellpadding="0">
507
+ <tr>
508
+ <td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td>
509
+ <td>&nbsp;</td>
510
+ <td><select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled"></select></td>
511
+ </tr>
512
+ </table>
513
+ </td>
514
+ <td class="delim">&nbsp;</td>
515
+ <td>
516
+ <table border="0" cellpadding="0" cellspacing="0">
517
+ <tr>
518
+ <td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
519
+ <td id="border_color_left_pickcontainer">&nbsp;</td>
520
+ </tr>
521
+ </table>
522
+ </td>
523
+ </tr>
524
+ </table>
525
+ </div>
526
+
527
+ <div id="list_panel" class="panel">
528
+ <table border="0">
529
+ <tr>
530
+ <td><label for="list_type">{$lang_style_list_type}</label></td>
531
+ <td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td>
532
+ </tr>
533
+
534
+ <tr>
535
+ <td><label for="list_bullet_image">{$lang_style_bullet_image}</label></td>
536
+ <td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td>
537
+ </tr>
538
+
539
+ <tr>
540
+ <td><label for="list_position">{$lang_style_position}</label></td>
541
+ <td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td>
542
+ </tr>
543
+ </table>
544
+ </div>
545
+
546
+ <div id="positioning_panel" class="panel">
547
+ <table border="0">
548
+ <tr>
549
+ <td><label for="positioning_type">{$lang_style_positioning_type}</label></td>
550
+ <td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td>
551
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_visibility">{$lang_style_visibility}</label></td>
552
+ <td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td>
553
+ </tr>
554
+
555
+ <tr>
556
+ <td><label for="positioning_width">{$lang_style_width}</label></td>
557
+ <td>
558
+ <table border="0" cellspacing="0" cellpadding="0">
559
+ <tr>
560
+ <td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td>
561
+ <td>&nbsp;</td>
562
+ <td><select id="positioning_width_measurement" name="positioning_width_measurement"></select></td>
563
+ </tr>
564
+ </table>
565
+ </td>
566
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_zindex">{$lang_style_zindex}</label></td>
567
+ <td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td>
568
+ </tr>
569
+
570
+ <tr>
571
+ <td><label for="positioning_height">{$lang_style_height}</label></td>
572
+ <td>
573
+ <table border="0" cellspacing="0" cellpadding="0">
574
+ <tr>
575
+ <td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td>
576
+ <td>&nbsp;</td>
577
+ <td><select id="positioning_height_measurement" name="positioning_height_measurement"></select></td>
578
+ </tr>
579
+ </table>
580
+ </td>
581
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_overflow">{$lang_style_overflow}</label></td>
582
+ <td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td>
583
+ </tr>
584
+ </table>
585
+
586
+ <div style="float: left; width: 49%">
587
+ <fieldset>
588
+ <legend>{$lang_style_placement}</legend>
589
+
590
+ <table border="0">
591
+ <tr>
592
+ <td>&nbsp;</td>
593
+ <td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{$lang_style_same}</label></td>
594
+ </tr>
595
+ <tr>
596
+ <td>{$lang_style_top}</td>
597
+ <td>
598
+ <table border="0" cellspacing="0" cellpadding="0">
599
+ <tr>
600
+ <td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td>
601
+ <td>&nbsp;</td>
602
+ <td><select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement"></select></td>
603
+ </tr>
604
+ </table>
605
+ </td>
606
+ </tr>
607
+ <tr>
608
+ <td>{$lang_style_right}</td>
609
+ <td>
610
+ <table border="0" cellspacing="0" cellpadding="0">
611
+ <tr>
612
+ <td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td>
613
+ <td>&nbsp;</td>
614
+ <td><select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled"></select></td>
615
+ </tr>
616
+ </table>
617
+ </td>
618
+ </tr>
619
+ <tr>
620
+ <td>{$lang_style_bottom}</td>
621
+ <td>
622
+ <table border="0" cellspacing="0" cellpadding="0">
623
+ <tr>
624
+ <td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td>
625
+ <td>&nbsp;</td>
626
+ <td><select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled"></select></td>
627
+ </tr>
628
+ </table>
629
+ </td>
630
+ </tr>
631
+ <tr>
632
+ <td>{$lang_style_left}</td>
633
+ <td>
634
+ <table border="0" cellspacing="0" cellpadding="0">
635
+ <tr>
636
+ <td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td>
637
+ <td>&nbsp;</td>
638
+ <td><select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled"></select></td>
639
+ </tr>
640
+ </table>
641
+ </td>
642
+ </tr>
643
+ </table>
644
+ </fieldset>
645
+ </div>
646
+
647
+ <div style="float: right; width: 49%">
648
+ <fieldset>
649
+ <legend>{$lang_style_clip}</legend>
650
+
651
+ <table border="0">
652
+ <tr>
653
+ <td>&nbsp;</td>
654
+ <td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{$lang_style_same}</label></td>
655
+ </tr>
656
+ <tr>
657
+ <td>{$lang_style_top}</td>
658
+ <td>
659
+ <table border="0" cellspacing="0" cellpadding="0">
660
+ <tr>
661
+ <td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td>
662
+ <td>&nbsp;</td>
663
+ <td><select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement"></select></td>
664
+ </tr>
665
+ </table>
666
+ </td>
667
+ </tr>
668
+ <tr>
669
+ <td>{$lang_style_right}</td>
670
+ <td>
671
+ <table border="0" cellspacing="0" cellpadding="0">
672
+ <tr>
673
+ <td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td>
674
+ <td>&nbsp;</td>
675
+ <td><select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled"></select></td>
676
+ </tr>
677
+ </table>
678
+ </td>
679
+ </tr>
680
+ <tr>
681
+ <td>{$lang_style_bottom}</td>
682
+ <td>
683
+ <table border="0" cellspacing="0" cellpadding="0">
684
+ <tr>
685
+ <td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td>
686
+ <td>&nbsp;</td>
687
+ <td><select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled"></select></td>
688
+ </tr>
689
+ </table>
690
+ </td>
691
+ </tr>
692
+ <tr>
693
+ <td>{$lang_style_left}</td>
694
+ <td>
695
+ <table border="0" cellspacing="0" cellpadding="0">
696
+ <tr>
697
+ <td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td>
698
+ <td>&nbsp;</td>
699
+ <td><select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled"></select></td>
700
+ </tr>
701
+ </table>
702
+ </td>
703
+ </tr>
704
+ </table>
705
+ </fieldset>
706
+ </div>
707
+ <br style="clear: both" />
708
+ </div>
709
+ </div>
710
+
711
+ <div class="mceActionPanel">
712
+ <div style="float: left">
713
+ <div style="float: left"><input type="button" id="insert" name="insert" value="{$lang_update}" onClick="updateAction();" /></div>
714
+
715
+ <div style="float: left">&nbsp;<input type="button" id="apply" name="apply" value="{$lang_style_apply}" onClick="applyAction();" class="updateButton" /></div>
716
+ <br style="clear: both" />
717
+ </div>
718
+
719
+ <div style="float: right">
720
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onClick="tinyMCEPopup.close();" />
721
+ </div>
722
+ </div>
723
+ </form>
724
+
725
+ <div style="display: none">
726
+ <div id="container"></div>
727
+ </div>
728
+ </body>
729
+ </html>
js/tiny_mce/plugins/style/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/table/cell.htm ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_table_cell_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="jscripts/cell.js"></script>
8
+ <link href="css/cell.css" rel="stylesheet" type="text/css" />
9
+ <base target="_self" />
10
+ </head>
11
+ <body id="tablecell" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
12
+ <form onsubmit="updateAction();return false;" action="#">
13
+ <div class="tabs">
14
+ <ul>
15
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_table_general_tab}</a></span></li>
16
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_table_advanced_tab}</a></span></li>
17
+ </ul>
18
+ </div>
19
+
20
+ <div class="panel_wrapper">
21
+ <div id="general_panel" class="panel current">
22
+ <fieldset>
23
+ <legend>{$lang_table_general_props}</legend>
24
+
25
+ <table border="0" cellpadding="4" cellspacing="0">
26
+ <tr>
27
+ <td><label for="align">{$lang_table_align}</label></td>
28
+ <td>
29
+ <select id="align" name="align">
30
+ <option value="">{$lang_not_set}</option>
31
+ <option value="center">{$lang_table_align_middle}</option>
32
+ <option value="left">{$lang_table_align_left}</option>
33
+ <option value="right">{$lang_table_align_right}</option>
34
+ </select>
35
+ </td>
36
+
37
+ <td><label for="celltype">{$lang_table_cell_type}</label></td>
38
+ <td>
39
+ <select id="celltype" name="celltype">
40
+ <option value="td">{$lang_table_td}</option>
41
+ <option value="th">{$lang_table_th}</option>
42
+ </select>
43
+ </td>
44
+ </tr>
45
+
46
+ <tr>
47
+ <td><label for="valign">{$lang_table_valign}</label></td>
48
+ <td>
49
+ <select id="valign" name="valign">
50
+ <option value="">{$lang_not_set}</option>
51
+ <option value="top">{$lang_table_align_top}</option>
52
+ <option value="middle">{$lang_table_align_middle}</option>
53
+ <option value="bottom">{$lang_table_align_bottom}</option>
54
+ </select>
55
+ </td>
56
+
57
+ <td><label for="scope">{$lang_table_scope}</label></td>
58
+ <td>
59
+ <select id="scope" name="scope">
60
+ <option value="">{$lang_not_set}</option>
61
+ <option value="col">{$lang_table_col}</option>
62
+ <option value="row">{$lang_table_row}</option>
63
+ <option value="rowgroup">{$lang_table_rowgroup}</option>
64
+ <option value="colgroup">{$lang_table_colgroup}</option>
65
+ </select>
66
+ </td>
67
+
68
+ </tr>
69
+
70
+ <tr>
71
+ <td><label for="width">{$lang_table_width}</label></td>
72
+ <td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
73
+
74
+ <td><label for="height">{$lang_table_height}</label></td>
75
+ <td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
76
+ </tr>
77
+
78
+ <tr id="styleSelectRow">
79
+ <td><label for="class">{$lang_class_name}</label></td>
80
+ <td colspan="3">
81
+ <select id="class" name="class">
82
+ <option value="" selected="selected">{$lang_not_set}</option>
83
+ </select>
84
+ </td>
85
+ </tr>
86
+ </table>
87
+ </fieldset>
88
+ </div>
89
+
90
+ <div id="advanced_panel" class="panel">
91
+ <fieldset>
92
+ <legend>{$lang_table_advanced_props}</legend>
93
+
94
+ <table border="0" cellpadding="0" cellspacing="4">
95
+ <tr>
96
+ <td class="column1"><label for="id">{$lang_table_id}</label></td>
97
+ <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
98
+ </tr>
99
+
100
+ <tr>
101
+ <td><label for="style">{$lang_table_style}</label></td>
102
+ <td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
103
+ </tr>
104
+
105
+ <tr>
106
+ <td class="column1"><label for="dir">{$lang_table_langdir}</label></td>
107
+ <td>
108
+ <select id="dir" name="dir" style="width: 200px">
109
+ <option value="">{$lang_not_set}</option>
110
+ <option value="ltr">{$lang_table_ltr}</option>
111
+ <option value="rtl">{$lang_table_rtl}</option>
112
+ </select>
113
+ </td>
114
+ </tr>
115
+
116
+ <tr>
117
+ <td class="column1"><label for="lang">{$lang_table_langcode}</label></td>
118
+ <td>
119
+ <input id="lang" name="lang" type="text" value="" style="width: 200px" />
120
+ </td>
121
+ </tr>
122
+
123
+ <tr>
124
+ <td class="column1"><label for="backgroundimage">{$lang_table_bgimage}</label></td>
125
+ <td>
126
+ <table border="0" cellpadding="0" cellspacing="0">
127
+ <tr>
128
+ <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
129
+ <td id="backgroundimagebrowsercontainer">&nbsp;</td>
130
+ </tr>
131
+ </table>
132
+ </td>
133
+ </tr>
134
+
135
+ <tr>
136
+ <td class="column1"><label for="bordercolor">{$lang_table_bordercolor}</label></td>
137
+ <td>
138
+ <table border="0" cellpadding="0" cellspacing="0">
139
+ <tr>
140
+ <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
141
+ <td id="bordercolor_pickcontainer">&nbsp;</td>
142
+ </tr>
143
+ </table>
144
+ </td>
145
+ </tr>
146
+
147
+ <tr>
148
+ <td class="column1"><label for="bgcolor">{$lang_table_bgcolor}</label></td>
149
+ <td>
150
+ <table border="0" cellpadding="0" cellspacing="0">
151
+ <tr>
152
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
153
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
154
+ </tr>
155
+ </table>
156
+ </td>
157
+ </tr>
158
+ </table>
159
+ </fieldset>
160
+ </div>
161
+ </div>
162
+
163
+ <div class="mceActionPanel">
164
+ <div>
165
+ <select id="action" name="action">
166
+ <option value="cell">{$lang_table_cell_cell}</option>
167
+ <option value="row">{$lang_table_cell_row}</option>
168
+ <option value="all">{$lang_table_cell_all}</option>
169
+ </select>
170
+ </div>
171
+
172
+ <div style="float: left">
173
+ <div><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="updateAction();" /></div>
174
+ </div>
175
+
176
+ <div style="float: right">
177
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
178
+ </div>
179
+ </div>
180
+ </form>
181
+ </body>
182
+ </html>
js/tiny_mce/plugins/table/css/cell.css ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* CSS file for cell dialog in the table plugin */
2
+
3
+ .panel_wrapper div.current {
4
+ height: 200px;
5
+ }
6
+
7
+ .advfield {
8
+ width: 200px;
9
+ }
10
+
11
+ #action {
12
+ margin-bottom: 3px;
13
+ }
14
+
15
+ #class {
16
+ width: 150px;
17
+ }
js/tiny_mce/plugins/table/css/row.css ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* CSS file for row dialog in the table plugin */
2
+
3
+ .panel_wrapper div.current {
4
+ height: 200px;
5
+ }
6
+
7
+ .advfield {
8
+ width: 200px;
9
+ }
10
+
11
+ #action {
12
+ margin-bottom: 3px;
13
+ }
14
+
15
+ #rowtype,#align,#valign,#class,#height {
16
+ width: 150px;
17
+ }
18
+
19
+ #height {
20
+ width: 50px;
21
+ }
22
+
23
+ .col2 {
24
+ padding-left: 20px;
25
+ }
js/tiny_mce/plugins/table/css/table.css ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* CSS file for table dialog in the table plugin */
2
+
3
+ .panel_wrapper div.current {
4
+ height: 220px;
5
+ }
6
+
7
+ .advfield {
8
+ width: 200px;
9
+ }
10
+
11
+ #class {
12
+ width: 150px;
13
+ }
js/tiny_mce/plugins/table/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('table');var TinyMCE_TablePlugin={getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(tinyMCE.isGecko){var doc=inst.getDoc();tinyMCE.addEvent(doc,"mouseup",TinyMCE_TablePlugin._mouseDownHandler)}inst.tableRowClipboard=null},getControlHTML:function(control_name){var controls=new Array(['table','table.gif','lang_table_desc','mceInsertTable',true],['delete_table','table_delete.gif','lang_table_del','mceTableDelete'],['delete_col','table_delete_col.gif','lang_table_delete_col_desc','mceTableDeleteCol'],['delete_row','table_delete_row.gif','lang_table_delete_row_desc','mceTableDeleteRow'],['col_after','table_insert_col_after.gif','lang_table_col_after_desc','mceTableInsertColAfter'],['col_before','table_insert_col_before.gif','lang_table_col_before_desc','mceTableInsertColBefore'],['row_after','table_insert_row_after.gif','lang_table_row_after_desc','mceTableInsertRowAfter'],['row_before','table_insert_row_before.gif','lang_table_row_before_desc','mceTableInsertRowBefore'],['row_props','table_row_props.gif','lang_table_row_desc','mceTableRowProps',true],['cell_props','table_cell_props.gif','lang_table_cell_desc','mceTableCellProps',true],['split_cells','table_split_cells.gif','lang_table_split_cells_desc','mceTableSplitCells',true],['merge_cells','table_merge_cells.gif','lang_table_merge_cells_desc','mceTableMergeCells',true]);for(var i=0;i<controls.length;i++){var but=controls[i];var cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+but[3]+'\', '+(but.length>4?but[4]:false)+(but.length>5?', \''+but[5]+'\'':'')+');return false;';if(but[0]==control_name)return tinyMCE.getButtonHTML(control_name,but[2],'{$pluginurl}/images/'+but[1],but[3],(but.length>4?but[4]:false))}if(control_name=="tablecontrols"){var html="";html+=tinyMCE.getControlHTML("table");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("row_props");html+=tinyMCE.getControlHTML("cell_props");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("row_before");html+=tinyMCE.getControlHTML("row_after");html+=tinyMCE.getControlHTML("delete_row");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("col_before");html+=tinyMCE.getControlHTML("col_after");html+=tinyMCE.getControlHTML("delete_col");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("split_cells");html+=tinyMCE.getControlHTML("merge_cells");return html}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":var inst=tinyMCE.getInstanceById(editor_id);inst.execCommand('mceBeginUndoLevel');TinyMCE_TablePlugin._doExecCommand(editor_id,element,command,user_interface,value);inst.execCommand('mceEndUndoLevel');return true}return false},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){var colspan="1",rowspan="1",tdElm;var inst=tinyMCE.getInstanceById(editor_id);tinyMCE.switchClass(editor_id+'_table','mceButtonNormal');tinyMCE.switchClass(editor_id+'_delete_table','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_row_props','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_cell_props','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_row_before','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_row_after','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_delete_row','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_col_before','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_col_after','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_delete_col','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_split_cells','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_merge_cells','mceButtonDisabled');if(tdElm=tinyMCE.getParentElement(node,"td,th")){tinyMCE.switchClass(editor_id+'_cell_props','mceButtonSelected');tinyMCE.switchClass(editor_id+'_delete_table','mceButtonNormal');tinyMCE.switchClass(editor_id+'_row_before','mceButtonNormal');tinyMCE.switchClass(editor_id+'_row_after','mceButtonNormal');tinyMCE.switchClass(editor_id+'_delete_row','mceButtonNormal');tinyMCE.switchClass(editor_id+'_col_before','mceButtonNormal');tinyMCE.switchClass(editor_id+'_col_after','mceButtonNormal');tinyMCE.switchClass(editor_id+'_delete_col','mceButtonNormal');colspan=tinyMCE.getAttrib(tdElm,"colspan");rowspan=tinyMCE.getAttrib(tdElm,"rowspan");colspan=colspan==""?"1":colspan;rowspan=rowspan==""?"1":rowspan;if(colspan!="1"||rowspan!="1")tinyMCE.switchClass(editor_id+'_split_cells','mceButtonNormal')}if(tinyMCE.getParentElement(node,"tr"))tinyMCE.switchClass(editor_id+'_row_props','mceButtonSelected');if(tinyMCE.getParentElement(node,"table")){tinyMCE.switchClass(editor_id+'_table','mceButtonSelected');tinyMCE.switchClass(editor_id+'_merge_cells','mceButtonNormal')}},_mouseDownHandler:function(e){var elm=tinyMCE.isMSIE?event.srcElement:e.target;var focusElm=tinyMCE.selectedInstance.getFocusElement();if(elm.nodeName=="BODY"&&(focusElm.nodeName=="TD"||focusElm.nodeName=="TH"||(focusElm.parentNode&&focusElm.parentNode.nodeName=="TD")||(focusElm.parentNode&&focusElm.parentNode.nodeName=="TH"))){window.setTimeout(function(){var tableElm=tinyMCE.getParentElement(focusElm,"table");tinyMCE.handleVisualAid(tableElm,true,tinyMCE.settings['visual'],tinyMCE.selectedInstance)},10)}},_doExecCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();var trElm=tinyMCE.getParentElement(focusElm,"tr");var tdElm=tinyMCE.getParentElement(focusElm,"td,th");var tableElm=tinyMCE.getParentElement(focusElm,"table");var doc=inst.contentWindow.document;var tableBorder=tableElm?tableElm.getAttribute("border"):"";if(trElm&&tdElm==null)tdElm=trElm.cells[0];function inArray(ar,v){for(var i=0;i<ar.length;i++){if(ar[i].length>0&&inArray(ar[i],v))return true;if(ar[i]==v)return true}return false}function makeTD(){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;"}function getColRowSpan(td){var colspan=tinyMCE.getAttrib(td,"colspan");var rowspan=tinyMCE.getAttrib(td,"rowspan");colspan=colspan==""?1:parseInt(colspan);rowspan=rowspan==""?1:parseInt(rowspan);return{colspan:colspan,rowspan:rowspan}}function getCellPos(grid,td){var x,y;for(y=0;y<grid.length;y++){for(x=0;x<grid[y].length;x++){if(grid[y][x]==td)return{cellindex:x,rowindex:y}}}return null}function getCell(grid,row,col){if(grid[row]&&grid[row][col])return grid[row][col];return null}function getTableGrid(table){var grid=new Array(),rows=table.rows,x,y,td,sd,xstart,x2,y2;for(y=0;y<rows.length;y++){for(x=0;x<rows[y].cells.length;x++){td=rows[y].cells[x];sd=getColRowSpan(td);for(xstart=x;grid[y]&&grid[y][xstart];xstart++);for(y2=y;y2<y+sd['rowspan'];y2++){if(!grid[y2])grid[y2]=new Array();for(x2=xstart;x2<xstart+sd['colspan'];x2++)grid[y2][x2]=td}}}return grid}function trimRow(table,tr,td,new_tr){var grid=getTableGrid(table),cpos=getCellPos(grid,td);var cells,lastElm;if(new_tr.cells.length!=tr.childNodes.length){cells=tr.childNodes;lastElm=null;for(var x=0;td=getCell(grid,cpos.rowindex,x);x++){var remove=true;var sd=getColRowSpan(td);if(inArray(cells,td)){new_tr.childNodes[x]._delete=true}else if((lastElm==null||td!=lastElm)&&sd.colspan>1){for(var i=x;i<x+td.colSpan;i++)new_tr.childNodes[i]._delete=true}if((lastElm==null||td!=lastElm)&&sd.rowspan>1)td.rowSpan=sd.rowspan+1;lastElm=td}deleteMarked(tableElm)}}function prevElm(node,name){while((node=node.previousSibling)!=null){if(node.nodeName==name)return node}return null}function nextElm(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase())return node}}return null}function deleteMarked(tbl){if(tbl.rows==0)return;var tr=tbl.rows[0];do{var next=nextElm(tr,"TR");if(tr._delete){tr.parentNode.removeChild(tr);continue}var td=tr.cells[0];if(td.cells>1){do{var nexttd=nextElm(td,"TD,TH");if(td._delete)td.parentNode.removeChild(td)}while((td=nexttd)!=null)}}while((tr=next)!=null)}function addRows(td_elm,tr_elm,rowspan){td_elm.rowSpan=1;var trNext=nextElm(tr_elm,"TR");for(var i=1;i<rowspan&&trNext;i++){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";if(tinyMCE.isMSIE)trNext.insertBefore(newTD,trNext.cells(td_elm.cellIndex));else trNext.insertBefore(newTD,trNext.cells[td_elm.cellIndex]);trNext=nextElm(trNext,"TR")}}function copyRow(doc,table,tr){var grid=getTableGrid(table);var newTR=tr.cloneNode(false);var cpos=getCellPos(grid,tr.cells[0]);var lastCell=null;var tableBorder=tinyMCE.getAttrib(table,"border");var tdElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){var newTD=null;if(lastCell!=tdElm){for(var i=0;i<tr.cells.length;i++){if(tdElm==tr.cells[i]){newTD=tdElm.cloneNode(true);break}}}if(newTD==null){newTD=doc.createElement("td");newTD.innerHTML="&nbsp;"}newTD.colSpan=1;newTD.rowSpan=1;newTR.appendChild(newTD);lastCell=tdElm}return newTR}switch(command){case"mceTableRowProps":if(trElm==null)return true;if(user_interface){var template=new Array();template['file']='../../plugins/table/row.htm';template['width']=380;template['height']=295;template['width']+=tinyMCE.getLang('lang_table_rowprops_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_rowprops_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes"})}return true;case"mceTableCellProps":if(tdElm==null)return true;if(user_interface){var template=new Array();template['file']='../../plugins/table/cell.htm';template['width']=380;template['height']=295;template['width']+=tinyMCE.getLang('lang_table_cellprops_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_cellprops_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes"})}return true;case"mceInsertTable":if(user_interface){var template=new Array();template['file']='../../plugins/table/table.htm';template['width']=380;template['height']=295;template['width']+=tinyMCE.getLang('lang_table_table_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_table_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes",action:value})}return true;case"mceTableDelete":var table=tinyMCE.getParentElement(inst.getFocusElement(),"table");if(table){table.parentNode.removeChild(table);inst.repaint()}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!tableElm)return true;if(trElm&&tableElm!=trElm.parentNode)tableElm=trElm.parentNode;if(tableElm&&trElm){switch(command){case"mceTableCutRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);inst.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);break;case"mceTablePasteRowBefore":if(!trElm||!tdElm)return true;var newTR=inst.tableRowClipboard.cloneNode(true);var prevTR=prevElm(trElm,"TR");if(prevTR!=null)trimRow(tableElm,prevTR,prevTR.cells[0],newTR);trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTablePasteRowAfter":if(!trElm||!tdElm)return true;var nextTR=nextElm(trElm,"TR");var newTR=inst.tableRowClipboard.cloneNode(true);trimRow(tableElm,trElm,tdElm,newTR);if(nextTR==null)trElm.parentNode.appendChild(newTR);else nextTR.parentNode.insertBefore(newTR,nextTR);break;case"mceTableInsertRowBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD)}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm}}trElm.parentNode.insertBefore(newTR,trElm);grid=getTableGrid(tableElm);inst.selection.selectNode(getCell(grid,cpos.rowindex+1,cpos.cellindex),tinyMCE.isGecko,true);break;case"mceTableInsertRowAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD)}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm}}if(newTR.hasChildNodes()){var nextTR=nextElm(trElm,"TR");if(nextTR)nextTR.parentNode.insertBefore(newTR,nextTR);else tableElm.appendChild(newTR)}grid=getTableGrid(tableElm);inst.selection.selectNode(getCell(grid,cpos.rowindex,cpos.cellindex),tinyMCE.isGecko,true);break;case"mceTableDeleteRow":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);if(grid.length==1){tableElm=tinyMCE.getParentElement(tableElm,"table");tableElm.parentNode.removeChild(tableElm);return true}var cells=trElm.cells;var nextTR=nextElm(trElm,"TR");for(var x=0;x<cells.length;x++){if(cells[x].rowSpan>1){var newTD=cells[x].cloneNode(true);var sd=getColRowSpan(cells[x]);newTD.rowSpan=sd.rowspan-1;var nextTD=nextTR.cells[x];if(nextTD==null)nextTR.appendChild(newTD);else nextTR.insertBefore(newTD,nextTD)}}var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd.rowspan>1){tdElm.rowSpan=sd.rowspan-1}else{trElm=tdElm.parentNode;if(trElm.parentNode)trElm._delete=true}lastTDElm=tdElm}}deleteMarked(tableElm);cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;grid=getTableGrid(tableElm);inst.selection.selectNode(getCell(grid,cpos.rowindex,0),tinyMCE.isGecko,true);break;case"mceTableInsertColBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);newTD.innerHTML="&nbsp;";newTD.rowSpan=tdElm.rowSpan;tdElm.parentNode.insertBefore(newTD,tdElm)}else tdElm.colSpan++;lastTDElm=tdElm}}grid=getTableGrid(tableElm);inst.selection.selectNode(getCell(grid,cpos.rowindex,cpos.cellindex+1),tinyMCE.isGecko,true);break;case"mceTableInsertColAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);newTD.innerHTML="&nbsp;";newTD.rowSpan=tdElm.rowSpan;var nextTD=nextElm(tdElm,"TD,TH");if(nextTD==null)tdElm.parentNode.appendChild(newTD);else nextTD.parentNode.insertBefore(newTD,nextTD)}else tdElm.colSpan++;lastTDElm=tdElm}}grid=getTableGrid(tableElm);inst.selection.selectNode(getCell(grid,cpos.rowindex,cpos.cellindex),tinyMCE.isGecko,true);break;case"mceTableDeleteCol":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;if(grid.length>1&&grid[0].length<=1){tableElm=tinyMCE.getParentElement(tableElm,"table");tableElm.parentNode.removeChild(tableElm);return true}for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']>1)tdElm.colSpan=sd['colspan']-1;else{if(tdElm.parentNode)tdElm.parentNode.removeChild(tdElm)}lastTDElm=tdElm}}cpos.cellindex--;if(cpos.cellindex<0)cpos.cellindex=0;grid=getTableGrid(tableElm);inst.selection.selectNode(getCell(grid,cpos.rowindex,0),tinyMCE.isGecko,true);break;case"mceTableSplitCells":if(!trElm||!tdElm)return true;var spandata=getColRowSpan(tdElm);var colspan=spandata["colspan"];var rowspan=spandata["rowspan"];if(colspan>1||rowspan>1){tdElm.colSpan=1;for(var i=1;i<colspan;i++){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";trElm.insertBefore(newTD,nextElm(tdElm,"TD,TH"));if(rowspan>1)addRows(newTD,trElm,rowspan)}addRows(tdElm,trElm,rowspan)}tableElm=tinyMCE.getParentElement(inst.getFocusElement(),"table");break;case"mceTableMergeCells":var rows=new Array();var sel=inst.getSel();var grid=getTableGrid(tableElm);if(tinyMCE.isMSIE||sel.rangeCount==1){if(user_interface){var template=new Array();var sp=getColRowSpan(tdElm);template['file']='../../plugins/table/merge_cells.htm';template['width']=250;template['height']=105+(tinyMCE.isNS7?25:0);template['width']+=tinyMCE.getLang('lang_table_merge_cells_delta_width',0);template['height']+=tinyMCE.getLang('lang_table_merge_cells_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,inline:"yes",action:"update",numcols:sp.colspan,numrows:sp.rowspan});return true}else{var numRows=parseInt(value['numrows']);var numCols=parseInt(value['numcols']);var cpos=getCellPos(grid,tdElm);if((""+numRows)=="NaN")numRows=1;if((""+numCols)=="NaN")numCols=1;var tRows=tableElm.rows;for(var y=cpos.rowindex;y<grid.length;y++){var rowCells=new Array();for(var x=cpos.cellindex;x<grid[y].length;x++){var td=getCell(grid,y,x);if(td&&!inArray(rows,td)&&!inArray(rowCells,td)){var cp=getCellPos(grid,td);if(cp.cellindex<cpos.cellindex+numCols&&cp.rowindex<cpos.rowindex+numRows)rowCells[rowCells.length]=td}}if(rowCells.length>0)rows[rows.length]=rowCells}}}else{var cells=new Array();var sel=inst.getSel();var lastTR=null;var curRow=null;var x1=-1,y1=-1,x2,y2;if(sel.rangeCount<2)return true;for(var i=0;i<sel.rangeCount;i++){var rng=sel.getRangeAt(i);var tdElm=rng.startContainer.childNodes[rng.startOffset];if(!tdElm)break;if(tdElm.nodeName=="TD")cells[cells.length]=tdElm}var tRows=tableElm.rows;for(var y=0;y<tRows.length;y++){var rowCells=new Array();for(var x=0;x<tRows[y].cells.length;x++){var td=tRows[y].cells[x];for(var i=0;i<cells.length;i++){if(td==cells[i]){rowCells[rowCells.length]=td}}}if(rowCells.length>0)rows[rows.length]=rowCells}var curRow=new Array();var lastTR=null;for(var y=0;y<grid.length;y++){for(var x=0;x<grid[y].length;x++){grid[y][x]._selected=false;for(var i=0;i<cells.length;i++){if(grid[y][x]==cells[i]){if(x1==-1){x1=x;y1=y}x2=x;y2=y;grid[y][x]._selected=true}}}}for(var y=y1;y<=y2;y++){for(var x=x1;x<=x2;x++){if(!grid[y][x]._selected){alert("Invalid selection for merge.");return true}}}}var rowSpan=1,colSpan=1;var lastRowSpan=-1;for(var y=0;y<rows.length;y++){var rowColSpan=0;for(var x=0;x<rows[y].length;x++){var sd=getColRowSpan(rows[y][x]);rowColSpan+=sd['colspan'];if(lastRowSpan!=-1&&sd['rowspan']!=lastRowSpan){alert("Invalid selection for merge.");return true}lastRowSpan=sd['rowspan']}if(rowColSpan>colSpan)colSpan=rowColSpan;lastRowSpan=-1}var lastColSpan=-1;for(var x=0;x<rows[0].length;x++){var colRowSpan=0;for(var y=0;y<rows.length;y++){var sd=getColRowSpan(rows[y][x]);colRowSpan+=sd['rowspan'];if(lastColSpan!=-1&&sd['colspan']!=lastColSpan){alert("Invalid selection for merge.");return true}lastColSpan=sd['colspan']}if(colRowSpan>rowSpan)rowSpan=colRowSpan;lastColSpan=-1}tdElm=rows[0][0];tdElm.rowSpan=rowSpan;tdElm.colSpan=colSpan;for(var y=0;y<rows.length;y++){for(var x=0;x<rows[y].length;x++){var html=rows[y][x].innerHTML;var chk=tinyMCE.regexpReplace(html,"[ \t\r\n]","");if(chk!="<br/>"&&chk!="<br>"&&chk!="&nbsp;"&&(x+y>0))tdElm.innerHTML+=html;if(rows[y][x]!=tdElm&&!rows[y][x]._deleted){var cpos=getCellPos(grid,rows[y][x]);var tr=rows[y][x].parentNode;tr.removeChild(rows[y][x]);rows[y][x]._deleted=true;if(!tr.hasChildNodes()){tr.parentNode.removeChild(tr);var lastCell=null;for(var x=0;cellElm=getCell(grid,cpos.rowindex,x);x++){if(cellElm!=lastCell&&cellElm.rowSpan>1)cellElm.rowSpan--;lastCell=cellElm}if(tdElm.rowSpan>1)tdElm.rowSpan--}}}}break}tableElm=tinyMCE.getParentElement(inst.getFocusElement(),"table");tinyMCE.handleVisualAid(tableElm,true,tinyMCE.settings['visual'],tinyMCE.selectedInstance);tinyMCE.triggerNodeChange();inst.repaint()}return true}return false}};tinyMCE.addPlugin("table",TinyMCE_TablePlugin);
js/tiny_mce/plugins/table/editor_plugin_src.js ADDED
@@ -0,0 +1,1073 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('table');
10
+
11
+ var TinyMCE_TablePlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Tables',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ if (tinyMCE.isGecko) {
24
+ var doc = inst.getDoc();
25
+ tinyMCE.addEvent(doc, "mouseup", TinyMCE_TablePlugin._mouseDownHandler);
26
+ }
27
+
28
+ inst.tableRowClipboard = null;
29
+ },
30
+
31
+ /**
32
+ * Returns the HTML contents of the table control.
33
+ */
34
+ getControlHTML : function(control_name) {
35
+ var controls = new Array(
36
+ ['table', 'table.gif', 'lang_table_desc', 'mceInsertTable', true],
37
+ ['delete_table', 'table_delete.gif', 'lang_table_del', 'mceTableDelete'],
38
+ ['delete_col', 'table_delete_col.gif', 'lang_table_delete_col_desc', 'mceTableDeleteCol'],
39
+ ['delete_row', 'table_delete_row.gif', 'lang_table_delete_row_desc', 'mceTableDeleteRow'],
40
+ ['col_after', 'table_insert_col_after.gif', 'lang_table_col_after_desc', 'mceTableInsertColAfter'],
41
+ ['col_before', 'table_insert_col_before.gif', 'lang_table_col_before_desc', 'mceTableInsertColBefore'],
42
+ ['row_after', 'table_insert_row_after.gif', 'lang_table_row_after_desc', 'mceTableInsertRowAfter'],
43
+ ['row_before', 'table_insert_row_before.gif', 'lang_table_row_before_desc', 'mceTableInsertRowBefore'],
44
+ ['row_props', 'table_row_props.gif', 'lang_table_row_desc', 'mceTableRowProps', true],
45
+ ['cell_props', 'table_cell_props.gif', 'lang_table_cell_desc', 'mceTableCellProps', true],
46
+ ['split_cells', 'table_split_cells.gif', 'lang_table_split_cells_desc', 'mceTableSplitCells', true],
47
+ ['merge_cells', 'table_merge_cells.gif', 'lang_table_merge_cells_desc', 'mceTableMergeCells', true]);
48
+
49
+ // Render table control
50
+ for (var i=0; i<controls.length; i++) {
51
+ var but = controls[i];
52
+ var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + but[3] + '\', ' + (but.length > 4 ? but[4] : false) + (but.length > 5 ? ', \'' + but[5] + '\'' : '') + ');return false;';
53
+
54
+ if (but[0] == control_name)
55
+ return tinyMCE.getButtonHTML(control_name, but[2], '{$pluginurl}/images/'+ but[1], but[3], (but.length > 4 ? but[4] : false));
56
+ }
57
+
58
+ // Special tablecontrols
59
+ if (control_name == "tablecontrols") {
60
+ var html = "";
61
+
62
+ html += tinyMCE.getControlHTML("table");
63
+ html += tinyMCE.getControlHTML("separator");
64
+ html += tinyMCE.getControlHTML("row_props");
65
+ html += tinyMCE.getControlHTML("cell_props");
66
+ html += tinyMCE.getControlHTML("separator");
67
+ html += tinyMCE.getControlHTML("row_before");
68
+ html += tinyMCE.getControlHTML("row_after");
69
+ html += tinyMCE.getControlHTML("delete_row");
70
+ html += tinyMCE.getControlHTML("separator");
71
+ html += tinyMCE.getControlHTML("col_before");
72
+ html += tinyMCE.getControlHTML("col_after");
73
+ html += tinyMCE.getControlHTML("delete_col");
74
+ html += tinyMCE.getControlHTML("separator");
75
+ html += tinyMCE.getControlHTML("split_cells");
76
+ html += tinyMCE.getControlHTML("merge_cells");
77
+
78
+ return html;
79
+ }
80
+
81
+ return "";
82
+ },
83
+
84
+ /**
85
+ * Executes the table commands.
86
+ */
87
+ execCommand : function(editor_id, element, command, user_interface, value) {
88
+ // Is table command
89
+ switch (command) {
90
+ case "mceInsertTable":
91
+ case "mceTableRowProps":
92
+ case "mceTableCellProps":
93
+ case "mceTableSplitCells":
94
+ case "mceTableMergeCells":
95
+ case "mceTableInsertRowBefore":
96
+ case "mceTableInsertRowAfter":
97
+ case "mceTableDeleteRow":
98
+ case "mceTableInsertColBefore":
99
+ case "mceTableInsertColAfter":
100
+ case "mceTableDeleteCol":
101
+ case "mceTableCutRow":
102
+ case "mceTableCopyRow":
103
+ case "mceTablePasteRowBefore":
104
+ case "mceTablePasteRowAfter":
105
+ case "mceTableDelete":
106
+ var inst = tinyMCE.getInstanceById(editor_id);
107
+
108
+ inst.execCommand('mceBeginUndoLevel');
109
+ TinyMCE_TablePlugin._doExecCommand(editor_id, element, command, user_interface, value);
110
+ inst.execCommand('mceEndUndoLevel');
111
+
112
+ return true;
113
+ }
114
+
115
+ // Pass to next handler in chain
116
+ return false;
117
+ },
118
+
119
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
120
+ var colspan = "1", rowspan = "1", tdElm;
121
+
122
+ var inst = tinyMCE.getInstanceById(editor_id);
123
+
124
+ // Reset table controls
125
+ tinyMCE.switchClass(editor_id + '_table', 'mceButtonNormal');
126
+ tinyMCE.switchClass(editor_id + '_delete_table', 'mceButtonDisabled');
127
+ tinyMCE.switchClass(editor_id + '_row_props', 'mceButtonDisabled');
128
+ tinyMCE.switchClass(editor_id + '_cell_props', 'mceButtonDisabled');
129
+ tinyMCE.switchClass(editor_id + '_row_before', 'mceButtonDisabled');
130
+ tinyMCE.switchClass(editor_id + '_row_after', 'mceButtonDisabled');
131
+ tinyMCE.switchClass(editor_id + '_delete_row', 'mceButtonDisabled');
132
+ tinyMCE.switchClass(editor_id + '_col_before', 'mceButtonDisabled');
133
+ tinyMCE.switchClass(editor_id + '_col_after', 'mceButtonDisabled');
134
+ tinyMCE.switchClass(editor_id + '_delete_col', 'mceButtonDisabled');
135
+ tinyMCE.switchClass(editor_id + '_split_cells', 'mceButtonDisabled');
136
+ tinyMCE.switchClass(editor_id + '_merge_cells', 'mceButtonDisabled');
137
+
138
+ // Within a td element
139
+ if (tdElm = tinyMCE.getParentElement(node, "td,th")) {
140
+ tinyMCE.switchClass(editor_id + '_cell_props', 'mceButtonSelected');
141
+ tinyMCE.switchClass(editor_id + '_delete_table', 'mceButtonNormal');
142
+ tinyMCE.switchClass(editor_id + '_row_before', 'mceButtonNormal');
143
+ tinyMCE.switchClass(editor_id + '_row_after', 'mceButtonNormal');
144
+ tinyMCE.switchClass(editor_id + '_delete_row', 'mceButtonNormal');
145
+ tinyMCE.switchClass(editor_id + '_col_before', 'mceButtonNormal');
146
+ tinyMCE.switchClass(editor_id + '_col_after', 'mceButtonNormal');
147
+ tinyMCE.switchClass(editor_id + '_delete_col', 'mceButtonNormal');
148
+
149
+ colspan = tinyMCE.getAttrib(tdElm, "colspan");
150
+ rowspan = tinyMCE.getAttrib(tdElm, "rowspan");
151
+
152
+ colspan = colspan == "" ? "1" : colspan;
153
+ rowspan = rowspan == "" ? "1" : rowspan;
154
+
155
+ if (colspan != "1" || rowspan != "1")
156
+ tinyMCE.switchClass(editor_id + '_split_cells', 'mceButtonNormal');
157
+ }
158
+
159
+ // Within a tr element
160
+ if (tinyMCE.getParentElement(node, "tr"))
161
+ tinyMCE.switchClass(editor_id + '_row_props', 'mceButtonSelected');
162
+
163
+ // Within table
164
+ if (tinyMCE.getParentElement(node, "table")) {
165
+ tinyMCE.switchClass(editor_id + '_table', 'mceButtonSelected');
166
+ tinyMCE.switchClass(editor_id + '_merge_cells', 'mceButtonNormal');
167
+ }
168
+ },
169
+
170
+ // Private plugin internal methods
171
+
172
+ _mouseDownHandler : function(e) {
173
+ var elm = tinyMCE.isMSIE ? event.srcElement : e.target;
174
+ var focusElm = tinyMCE.selectedInstance.getFocusElement();
175
+
176
+ // If press on special Mozilla create TD/TR thingie
177
+ if (elm.nodeName == "BODY" && (focusElm.nodeName == "TD" || focusElm.nodeName == "TH" || (focusElm.parentNode && focusElm.parentNode.nodeName == "TD") ||(focusElm.parentNode && focusElm.parentNode.nodeName == "TH") )) {
178
+ window.setTimeout(function() {
179
+ var tableElm = tinyMCE.getParentElement(focusElm, "table");
180
+ tinyMCE.handleVisualAid(tableElm, true, tinyMCE.settings['visual'], tinyMCE.selectedInstance);
181
+ }, 10);
182
+ }
183
+ },
184
+
185
+ /**
186
+ * Executes the table commands.
187
+ */
188
+ _doExecCommand : function(editor_id, element, command, user_interface, value) {
189
+ var inst = tinyMCE.getInstanceById(editor_id);
190
+ var focusElm = inst.getFocusElement();
191
+ var trElm = tinyMCE.getParentElement(focusElm, "tr");
192
+ var tdElm = tinyMCE.getParentElement(focusElm, "td,th");
193
+ var tableElm = tinyMCE.getParentElement(focusElm, "table");
194
+ var doc = inst.contentWindow.document;
195
+ var tableBorder = tableElm ? tableElm.getAttribute("border") : "";
196
+
197
+ // Get first TD if no TD found
198
+ if (trElm && tdElm == null)
199
+ tdElm = trElm.cells[0];
200
+
201
+ // ------- Inner functions ---------
202
+ function inArray(ar, v) {
203
+ for (var i=0; i<ar.length; i++) {
204
+ // Is array
205
+ if (ar[i].length > 0 && inArray(ar[i], v))
206
+ return true;
207
+
208
+ // Found value
209
+ if (ar[i] == v)
210
+ return true;
211
+ }
212
+
213
+ return false;
214
+ }
215
+
216
+ function makeTD() {
217
+ var newTD = doc.createElement("td");
218
+ newTD.innerHTML = "&nbsp;";
219
+ }
220
+
221
+ function getColRowSpan(td) {
222
+ var colspan = tinyMCE.getAttrib(td, "colspan");
223
+ var rowspan = tinyMCE.getAttrib(td, "rowspan");
224
+
225
+ colspan = colspan == "" ? 1 : parseInt(colspan);
226
+ rowspan = rowspan == "" ? 1 : parseInt(rowspan);
227
+
228
+ return {colspan : colspan, rowspan : rowspan};
229
+ }
230
+
231
+ function getCellPos(grid, td) {
232
+ var x, y;
233
+
234
+ for (y=0; y<grid.length; y++) {
235
+ for (x=0; x<grid[y].length; x++) {
236
+ if (grid[y][x] == td)
237
+ return {cellindex : x, rowindex : y};
238
+ }
239
+ }
240
+
241
+ return null;
242
+ }
243
+
244
+ function getCell(grid, row, col) {
245
+ if (grid[row] && grid[row][col])
246
+ return grid[row][col];
247
+
248
+ return null;
249
+ }
250
+
251
+ function getTableGrid(table) {
252
+ var grid = new Array(), rows = table.rows, x, y, td, sd, xstart, x2, y2;
253
+
254
+ for (y=0; y<rows.length; y++) {
255
+ for (x=0; x<rows[y].cells.length; x++) {
256
+ td = rows[y].cells[x];
257
+ sd = getColRowSpan(td);
258
+
259
+ // All ready filled
260
+ for (xstart = x; grid[y] && grid[y][xstart]; xstart++) ;
261
+
262
+ // Fill box
263
+ for (y2=y; y2<y+sd['rowspan']; y2++) {
264
+ if (!grid[y2])
265
+ grid[y2] = new Array();
266
+
267
+ for (x2=xstart; x2<xstart+sd['colspan']; x2++)
268
+ grid[y2][x2] = td;
269
+ }
270
+ }
271
+ }
272
+
273
+ return grid;
274
+ }
275
+
276
+ function trimRow(table, tr, td, new_tr) {
277
+ var grid = getTableGrid(table), cpos = getCellPos(grid, td);
278
+ var cells, lastElm;
279
+
280
+ // Time to crop away some
281
+ if (new_tr.cells.length != tr.childNodes.length) {
282
+ cells = tr.childNodes;
283
+ lastElm = null;
284
+
285
+ for (var x=0; td = getCell(grid, cpos.rowindex, x); x++) {
286
+ var remove = true;
287
+ var sd = getColRowSpan(td);
288
+
289
+ // Remove due to rowspan
290
+ if (inArray(cells, td)) {
291
+ new_tr.childNodes[x]._delete = true;
292
+ } else if ((lastElm == null || td != lastElm) && sd.colspan > 1) { // Remove due to colspan
293
+ for (var i=x; i<x+td.colSpan; i++)
294
+ new_tr.childNodes[i]._delete = true;
295
+ }
296
+
297
+ if ((lastElm == null || td != lastElm) && sd.rowspan > 1)
298
+ td.rowSpan = sd.rowspan + 1;
299
+
300
+ lastElm = td;
301
+ }
302
+
303
+ deleteMarked(tableElm);
304
+ }
305
+ }
306
+
307
+ function prevElm(node, name) {
308
+ while ((node = node.previousSibling) != null) {
309
+ if (node.nodeName == name)
310
+ return node;
311
+ }
312
+
313
+ return null;
314
+ }
315
+
316
+ function nextElm(node, names) {
317
+ var namesAr = names.split(',');
318
+
319
+ while ((node = node.nextSibling) != null) {
320
+ for (var i=0; i<namesAr.length; i++) {
321
+ if (node.nodeName.toLowerCase() == namesAr[i].toLowerCase() )
322
+ return node;
323
+ }
324
+ }
325
+
326
+ return null;
327
+ }
328
+
329
+ function deleteMarked(tbl) {
330
+ if (tbl.rows == 0)
331
+ return;
332
+
333
+ var tr = tbl.rows[0];
334
+ do {
335
+ var next = nextElm(tr, "TR");
336
+
337
+ // Delete row
338
+ if (tr._delete) {
339
+ tr.parentNode.removeChild(tr);
340
+ continue;
341
+ }
342
+
343
+ // Delete cells
344
+ var td = tr.cells[0];
345
+ if (td.cells > 1) {
346
+ do {
347
+ var nexttd = nextElm(td, "TD,TH");
348
+
349
+ if (td._delete)
350
+ td.parentNode.removeChild(td);
351
+ } while ((td = nexttd) != null);
352
+ }
353
+ } while ((tr = next) != null);
354
+ }
355
+
356
+ function addRows(td_elm, tr_elm, rowspan) {
357
+ // Add rows
358
+ td_elm.rowSpan = 1;
359
+ var trNext = nextElm(tr_elm, "TR");
360
+ for (var i=1; i<rowspan && trNext; i++) {
361
+ var newTD = doc.createElement("td");
362
+ newTD.innerHTML = "&nbsp;";
363
+
364
+ if (tinyMCE.isMSIE)
365
+ trNext.insertBefore(newTD, trNext.cells(td_elm.cellIndex));
366
+ else
367
+ trNext.insertBefore(newTD, trNext.cells[td_elm.cellIndex]);
368
+
369
+ trNext = nextElm(trNext, "TR");
370
+ }
371
+ }
372
+
373
+ function copyRow(doc, table, tr) {
374
+ var grid = getTableGrid(table);
375
+ var newTR = tr.cloneNode(false);
376
+ var cpos = getCellPos(grid, tr.cells[0]);
377
+ var lastCell = null;
378
+ var tableBorder = tinyMCE.getAttrib(table, "border");
379
+ var tdElm = null;
380
+
381
+ for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) {
382
+ var newTD = null;
383
+
384
+ if (lastCell != tdElm) {
385
+ for (var i=0; i<tr.cells.length; i++) {
386
+ if (tdElm == tr.cells[i]) {
387
+ newTD = tdElm.cloneNode(true);
388
+ break;
389
+ }
390
+ }
391
+ }
392
+
393
+ if (newTD == null) {
394
+ newTD = doc.createElement("td");
395
+ newTD.innerHTML = "&nbsp;";
396
+ }
397
+
398
+ // Reset col/row span
399
+ newTD.colSpan = 1;
400
+ newTD.rowSpan = 1;
401
+
402
+ newTR.appendChild(newTD);
403
+
404
+ lastCell = tdElm;
405
+ }
406
+
407
+ return newTR;
408
+ }
409
+
410
+ // ---- Commands -----
411
+
412
+ // Handle commands
413
+ switch (command) {
414
+ case "mceTableRowProps":
415
+ if (trElm == null)
416
+ return true;
417
+
418
+ if (user_interface) {
419
+ // Setup template
420
+ var template = new Array();
421
+
422
+ template['file'] = '../../plugins/table/row.htm';
423
+ template['width'] = 380;
424
+ template['height'] = 295;
425
+
426
+ // Language specific width and height addons
427
+ template['width'] += tinyMCE.getLang('lang_table_rowprops_delta_width', 0);
428
+ template['height'] += tinyMCE.getLang('lang_table_rowprops_delta_height', 0);
429
+
430
+ // Open window
431
+ tinyMCE.openWindow(template, {editor_id : inst.editorId, inline : "yes"});
432
+ }
433
+
434
+ return true;
435
+
436
+ case "mceTableCellProps":
437
+ if (tdElm == null)
438
+ return true;
439
+
440
+ if (user_interface) {
441
+ // Setup template
442
+ var template = new Array();
443
+
444
+ template['file'] = '../../plugins/table/cell.htm';
445
+ template['width'] = 380;
446
+ template['height'] = 295;
447
+
448
+ // Language specific width and height addons
449
+ template['width'] += tinyMCE.getLang('lang_table_cellprops_delta_width', 0);
450
+ template['height'] += tinyMCE.getLang('lang_table_cellprops_delta_height', 0);
451
+
452
+ // Open window
453
+ tinyMCE.openWindow(template, {editor_id : inst.editorId, inline : "yes"});
454
+ }
455
+
456
+ return true;
457
+
458
+ case "mceInsertTable":
459
+ if (user_interface) {
460
+ // Setup template
461
+ var template = new Array();
462
+
463
+ template['file'] = '../../plugins/table/table.htm';
464
+ template['width'] = 380;
465
+ template['height'] = 295;
466
+
467
+ // Language specific width and height addons
468
+ template['width'] += tinyMCE.getLang('lang_table_table_delta_width', 0);
469
+ template['height'] += tinyMCE.getLang('lang_table_table_delta_height', 0);
470
+
471
+ // Open window
472
+ tinyMCE.openWindow(template, {editor_id : inst.editorId, inline : "yes", action : value});
473
+ }
474
+
475
+ return true;
476
+
477
+ case "mceTableDelete":
478
+ var table = tinyMCE.getParentElement(inst.getFocusElement(), "table");
479
+ if (table) {
480
+ table.parentNode.removeChild(table);
481
+ inst.repaint();
482
+ }
483
+ return true;
484
+
485
+ case "mceTableSplitCells":
486
+ case "mceTableMergeCells":
487
+ case "mceTableInsertRowBefore":
488
+ case "mceTableInsertRowAfter":
489
+ case "mceTableDeleteRow":
490
+ case "mceTableInsertColBefore":
491
+ case "mceTableInsertColAfter":
492
+ case "mceTableDeleteCol":
493
+ case "mceTableCutRow":
494
+ case "mceTableCopyRow":
495
+ case "mceTablePasteRowBefore":
496
+ case "mceTablePasteRowAfter":
497
+ // No table just return (invalid command)
498
+ if (!tableElm)
499
+ return true;
500
+
501
+ // Table has a tbody use that reference
502
+ // Changed logic by ApTest 2005.07.12 (www.aptest.com)
503
+ // Now lookk at the focused element and take its parentNode. That will be a tbody or a table.
504
+ if (trElm && tableElm != trElm.parentNode)
505
+ tableElm = trElm.parentNode;
506
+
507
+ if (tableElm && trElm) {
508
+ switch (command) {
509
+ case "mceTableCutRow":
510
+ if (!trElm || !tdElm)
511
+ return true;
512
+
513
+ inst.tableRowClipboard = copyRow(doc, tableElm, trElm);
514
+ inst.execCommand("mceTableDeleteRow");
515
+ break;
516
+
517
+ case "mceTableCopyRow":
518
+ if (!trElm || !tdElm)
519
+ return true;
520
+
521
+ inst.tableRowClipboard = copyRow(doc, tableElm, trElm);
522
+ break;
523
+
524
+ case "mceTablePasteRowBefore":
525
+ if (!trElm || !tdElm)
526
+ return true;
527
+
528
+ var newTR = inst.tableRowClipboard.cloneNode(true);
529
+
530
+ var prevTR = prevElm(trElm, "TR");
531
+ if (prevTR != null)
532
+ trimRow(tableElm, prevTR, prevTR.cells[0], newTR);
533
+
534
+ trElm.parentNode.insertBefore(newTR, trElm);
535
+ break;
536
+
537
+ case "mceTablePasteRowAfter":
538
+ if (!trElm || !tdElm)
539
+ return true;
540
+
541
+ var nextTR = nextElm(trElm, "TR");
542
+ var newTR = inst.tableRowClipboard.cloneNode(true);
543
+
544
+ trimRow(tableElm, trElm, tdElm, newTR);
545
+
546
+ if (nextTR == null)
547
+ trElm.parentNode.appendChild(newTR);
548
+ else
549
+ nextTR.parentNode.insertBefore(newTR, nextTR);
550
+
551
+ break;
552
+
553
+ case "mceTableInsertRowBefore":
554
+ if (!trElm || !tdElm)
555
+ return true;
556
+
557
+ var grid = getTableGrid(tableElm);
558
+ var cpos = getCellPos(grid, tdElm);
559
+ var newTR = doc.createElement("tr");
560
+ var lastTDElm = null;
561
+
562
+ cpos.rowindex--;
563
+ if (cpos.rowindex < 0)
564
+ cpos.rowindex = 0;
565
+
566
+ // Create cells
567
+ for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) {
568
+ if (tdElm != lastTDElm) {
569
+ var sd = getColRowSpan(tdElm);
570
+
571
+ if (sd['rowspan'] == 1) {
572
+ var newTD = doc.createElement("td");
573
+
574
+ newTD.innerHTML = "&nbsp;";
575
+ newTD.colSpan = tdElm.colSpan;
576
+
577
+ newTR.appendChild(newTD);
578
+ } else
579
+ tdElm.rowSpan = sd['rowspan'] + 1;
580
+
581
+ lastTDElm = tdElm;
582
+ }
583
+ }
584
+
585
+ trElm.parentNode.insertBefore(newTR, trElm);
586
+
587
+ grid = getTableGrid(tableElm);
588
+ inst.selection.selectNode(getCell(grid, cpos.rowindex + 1, cpos.cellindex), tinyMCE.isGecko, true); // Only collape on gecko
589
+ break;
590
+
591
+ case "mceTableInsertRowAfter":
592
+ if (!trElm || !tdElm)
593
+ return true;
594
+
595
+ var grid = getTableGrid(tableElm);
596
+ var cpos = getCellPos(grid, tdElm);
597
+ var newTR = doc.createElement("tr");
598
+ var lastTDElm = null;
599
+
600
+ // Create cells
601
+ for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) {
602
+ if (tdElm != lastTDElm) {
603
+ var sd = getColRowSpan(tdElm);
604
+
605
+ if (sd['rowspan'] == 1) {
606
+ var newTD = doc.createElement("td");
607
+
608
+ newTD.innerHTML = "&nbsp;";
609
+ newTD.colSpan = tdElm.colSpan;
610
+
611
+ newTR.appendChild(newTD);
612
+ } else
613
+ tdElm.rowSpan = sd['rowspan'] + 1;
614
+
615
+ lastTDElm = tdElm;
616
+ }
617
+ }
618
+
619
+ if (newTR.hasChildNodes()) {
620
+ var nextTR = nextElm(trElm, "TR");
621
+ if (nextTR)
622
+ nextTR.parentNode.insertBefore(newTR, nextTR);
623
+ else
624
+ tableElm.appendChild(newTR);
625
+ }
626
+
627
+ grid = getTableGrid(tableElm);
628
+ inst.selection.selectNode(getCell(grid, cpos.rowindex, cpos.cellindex), tinyMCE.isGecko, true); // Only collape on gecko
629
+ break;
630
+
631
+ case "mceTableDeleteRow":
632
+ if (!trElm || !tdElm)
633
+ return true;
634
+
635
+ var grid = getTableGrid(tableElm);
636
+ var cpos = getCellPos(grid, tdElm);
637
+
638
+ // Only one row, remove whole table
639
+ if (grid.length == 1) {
640
+ tableElm = tinyMCE.getParentElement(tableElm, "table"); // Look for table instead of tbody
641
+ tableElm.parentNode.removeChild(tableElm);
642
+ return true;
643
+ }
644
+
645
+ // Move down row spanned cells
646
+ var cells = trElm.cells;
647
+ var nextTR = nextElm(trElm, "TR");
648
+ for (var x=0; x<cells.length; x++) {
649
+ if (cells[x].rowSpan > 1) {
650
+ var newTD = cells[x].cloneNode(true);
651
+ var sd = getColRowSpan(cells[x]);
652
+
653
+ newTD.rowSpan = sd.rowspan - 1;
654
+
655
+ var nextTD = nextTR.cells[x];
656
+
657
+ if (nextTD == null)
658
+ nextTR.appendChild(newTD);
659
+ else
660
+ nextTR.insertBefore(newTD, nextTD);
661
+ }
662
+ }
663
+
664
+ // Delete cells
665
+ var lastTDElm = null;
666
+ for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) {
667
+ if (tdElm != lastTDElm) {
668
+ var sd = getColRowSpan(tdElm);
669
+
670
+ if (sd.rowspan > 1) {
671
+ tdElm.rowSpan = sd.rowspan - 1;
672
+ } else {
673
+ trElm = tdElm.parentNode;
674
+
675
+ if (trElm.parentNode)
676
+ trElm._delete = true;
677
+ }
678
+
679
+ lastTDElm = tdElm;
680
+ }
681
+ }
682
+
683
+ deleteMarked(tableElm);
684
+
685
+ cpos.rowindex--;
686
+ if (cpos.rowindex < 0)
687
+ cpos.rowindex = 0;
688
+
689
+ // Recalculate grid and select
690
+ grid = getTableGrid(tableElm);
691
+ inst.selection.selectNode(getCell(grid, cpos.rowindex, 0), tinyMCE.isGecko, true); // Only collape on gecko
692
+ break;
693
+
694
+ case "mceTableInsertColBefore":
695
+ if (!trElm || !tdElm)
696
+ return true;
697
+
698
+ var grid = getTableGrid(tableElm);
699
+ var cpos = getCellPos(grid, tdElm);
700
+ var lastTDElm = null;
701
+
702
+ for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) {
703
+ if (tdElm != lastTDElm) {
704
+ var sd = getColRowSpan(tdElm);
705
+
706
+ if (sd['colspan'] == 1) {
707
+ var newTD = doc.createElement(tdElm.nodeName);
708
+
709
+ newTD.innerHTML = "&nbsp;";
710
+ newTD.rowSpan = tdElm.rowSpan;
711
+
712
+ tdElm.parentNode.insertBefore(newTD, tdElm);
713
+ } else
714
+ tdElm.colSpan++;
715
+
716
+ lastTDElm = tdElm;
717
+ }
718
+ }
719
+
720
+ grid = getTableGrid(tableElm);
721
+ inst.selection.selectNode(getCell(grid, cpos.rowindex, cpos.cellindex + 1), tinyMCE.isGecko, true); // Only collape on gecko
722
+ break;
723
+
724
+ case "mceTableInsertColAfter":
725
+ if (!trElm || !tdElm)
726
+ return true;
727
+
728
+ var grid = getTableGrid(tableElm);
729
+ var cpos = getCellPos(grid, tdElm);
730
+ var lastTDElm = null;
731
+
732
+ for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) {
733
+ if (tdElm != lastTDElm) {
734
+ var sd = getColRowSpan(tdElm);
735
+
736
+ if (sd['colspan'] == 1) {
737
+ var newTD = doc.createElement(tdElm.nodeName);
738
+
739
+ newTD.innerHTML = "&nbsp;";
740
+ newTD.rowSpan = tdElm.rowSpan;
741
+
742
+ var nextTD = nextElm(tdElm, "TD,TH");
743
+ if (nextTD == null)
744
+ tdElm.parentNode.appendChild(newTD);
745
+ else
746
+ nextTD.parentNode.insertBefore(newTD, nextTD);
747
+ } else
748
+ tdElm.colSpan++;
749
+
750
+ lastTDElm = tdElm;
751
+ }
752
+ }
753
+
754
+ grid = getTableGrid(tableElm);
755
+ inst.selection.selectNode(getCell(grid, cpos.rowindex, cpos.cellindex), tinyMCE.isGecko, true); // Only collape on gecko
756
+ break;
757
+
758
+ case "mceTableDeleteCol":
759
+ if (!trElm || !tdElm)
760
+ return true;
761
+
762
+ var grid = getTableGrid(tableElm);
763
+ var cpos = getCellPos(grid, tdElm);
764
+ var lastTDElm = null;
765
+
766
+ // Only one col, remove whole table
767
+ if (grid.length > 1 && grid[0].length <= 1) {
768
+ tableElm = tinyMCE.getParentElement(tableElm, "table"); // Look for table instead of tbody
769
+ tableElm.parentNode.removeChild(tableElm);
770
+ return true;
771
+ }
772
+
773
+ // Delete cells
774
+ for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) {
775
+ if (tdElm != lastTDElm) {
776
+ var sd = getColRowSpan(tdElm);
777
+
778
+ if (sd['colspan'] > 1)
779
+ tdElm.colSpan = sd['colspan'] - 1;
780
+ else {
781
+ if (tdElm.parentNode)
782
+ tdElm.parentNode.removeChild(tdElm);
783
+ }
784
+
785
+ lastTDElm = tdElm;
786
+ }
787
+ }
788
+
789
+ cpos.cellindex--;
790
+ if (cpos.cellindex < 0)
791
+ cpos.cellindex = 0;
792
+
793
+ // Recalculate grid and select
794
+ grid = getTableGrid(tableElm);
795
+ inst.selection.selectNode(getCell(grid, cpos.rowindex, 0), tinyMCE.isGecko, true); // Only collape on gecko
796
+ break;
797
+
798
+ case "mceTableSplitCells":
799
+ if (!trElm || !tdElm)
800
+ return true;
801
+
802
+ var spandata = getColRowSpan(tdElm);
803
+
804
+ var colspan = spandata["colspan"];
805
+ var rowspan = spandata["rowspan"];
806
+
807
+ // Needs splitting
808
+ if (colspan > 1 || rowspan > 1) {
809
+ // Generate cols
810
+ tdElm.colSpan = 1;
811
+ for (var i=1; i<colspan; i++) {
812
+ var newTD = doc.createElement("td");
813
+
814
+ newTD.innerHTML = "&nbsp;";
815
+
816
+ trElm.insertBefore(newTD, nextElm(tdElm, "TD,TH"));
817
+
818
+ if (rowspan > 1)
819
+ addRows(newTD, trElm, rowspan);
820
+ }
821
+
822
+ addRows(tdElm, trElm, rowspan);
823
+ }
824
+
825
+ // Apply visual aids
826
+ tableElm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
827
+ break;
828
+
829
+ case "mceTableMergeCells":
830
+ var rows = new Array();
831
+ var sel = inst.getSel();
832
+ var grid = getTableGrid(tableElm);
833
+
834
+ if (tinyMCE.isMSIE || sel.rangeCount == 1) {
835
+ if (user_interface) {
836
+ // Setup template
837
+ var template = new Array();
838
+ var sp = getColRowSpan(tdElm);
839
+
840
+ template['file'] = '../../plugins/table/merge_cells.htm';
841
+ template['width'] = 250;
842
+ template['height'] = 105 + (tinyMCE.isNS7 ? 25 : 0);
843
+
844
+ // Language specific width and height addons
845
+ template['width'] += tinyMCE.getLang('lang_table_merge_cells_delta_width', 0);
846
+ template['height'] += tinyMCE.getLang('lang_table_merge_cells_delta_height', 0);
847
+
848
+ // Open window
849
+ tinyMCE.openWindow(template, {editor_id : inst.editorId, inline : "yes", action : "update", numcols : sp.colspan, numrows : sp.rowspan});
850
+
851
+ return true;
852
+ } else {
853
+ var numRows = parseInt(value['numrows']);
854
+ var numCols = parseInt(value['numcols']);
855
+ var cpos = getCellPos(grid, tdElm);
856
+
857
+ if (("" + numRows) == "NaN")
858
+ numRows = 1;
859
+
860
+ if (("" + numCols) == "NaN")
861
+ numCols = 1;
862
+
863
+ // Get rows and cells
864
+ var tRows = tableElm.rows;
865
+ for (var y=cpos.rowindex; y<grid.length; y++) {
866
+ var rowCells = new Array();
867
+
868
+ for (var x=cpos.cellindex; x<grid[y].length; x++) {
869
+ var td = getCell(grid, y, x);
870
+
871
+ if (td && !inArray(rows, td) && !inArray(rowCells, td)) {
872
+ var cp = getCellPos(grid, td);
873
+
874
+ // Within range
875
+ if (cp.cellindex < cpos.cellindex+numCols && cp.rowindex < cpos.rowindex+numRows)
876
+ rowCells[rowCells.length] = td;
877
+ }
878
+ }
879
+
880
+ if (rowCells.length > 0)
881
+ rows[rows.length] = rowCells;
882
+ }
883
+
884
+ //return true;
885
+ }
886
+ } else {
887
+ var cells = new Array();
888
+ var sel = inst.getSel();
889
+ var lastTR = null;
890
+ var curRow = null;
891
+ var x1 = -1, y1 = -1, x2, y2;
892
+
893
+ // Only one cell selected, whats the point?
894
+ if (sel.rangeCount < 2)
895
+ return true;
896
+
897
+ // Get all selected cells
898
+ for (var i=0; i<sel.rangeCount; i++) {
899
+ var rng = sel.getRangeAt(i);
900
+ var tdElm = rng.startContainer.childNodes[rng.startOffset];
901
+
902
+ if (!tdElm)
903
+ break;
904
+
905
+ if (tdElm.nodeName == "TD")
906
+ cells[cells.length] = tdElm;
907
+ }
908
+
909
+ // Get rows and cells
910
+ var tRows = tableElm.rows;
911
+ for (var y=0; y<tRows.length; y++) {
912
+ var rowCells = new Array();
913
+
914
+ for (var x=0; x<tRows[y].cells.length; x++) {
915
+ var td = tRows[y].cells[x];
916
+
917
+ for (var i=0; i<cells.length; i++) {
918
+ if (td == cells[i]) {
919
+ rowCells[rowCells.length] = td;
920
+ }
921
+ }
922
+ }
923
+
924
+ if (rowCells.length > 0)
925
+ rows[rows.length] = rowCells;
926
+ }
927
+
928
+ // Find selected cells in grid and box
929
+ var curRow = new Array();
930
+ var lastTR = null;
931
+ for (var y=0; y<grid.length; y++) {
932
+ for (var x=0; x<grid[y].length; x++) {
933
+ grid[y][x]._selected = false;
934
+
935
+ for (var i=0; i<cells.length; i++) {
936
+ if (grid[y][x] == cells[i]) {
937
+ // Get start pos
938
+ if (x1 == -1) {
939
+ x1 = x;
940
+ y1 = y;
941
+ }
942
+
943
+ // Get end pos
944
+ x2 = x;
945
+ y2 = y;
946
+
947
+ grid[y][x]._selected = true;
948
+ }
949
+ }
950
+ }
951
+ }
952
+
953
+ // Is there gaps, if so deny
954
+ for (var y=y1; y<=y2; y++) {
955
+ for (var x=x1; x<=x2; x++) {
956
+ if (!grid[y][x]._selected) {
957
+ alert("Invalid selection for merge.");
958
+ return true;
959
+ }
960
+ }
961
+ }
962
+ }
963
+
964
+ // Validate selection and get total rowspan and colspan
965
+ var rowSpan = 1, colSpan = 1;
966
+
967
+ // Validate horizontal and get total colspan
968
+ var lastRowSpan = -1;
969
+ for (var y=0; y<rows.length; y++) {
970
+ var rowColSpan = 0;
971
+
972
+ for (var x=0; x<rows[y].length; x++) {
973
+ var sd = getColRowSpan(rows[y][x]);
974
+
975
+ rowColSpan += sd['colspan'];
976
+
977
+ if (lastRowSpan != -1 && sd['rowspan'] != lastRowSpan) {
978
+ alert("Invalid selection for merge.");
979
+ return true;
980
+ }
981
+
982
+ lastRowSpan = sd['rowspan'];
983
+ }
984
+
985
+ if (rowColSpan > colSpan)
986
+ colSpan = rowColSpan;
987
+
988
+ lastRowSpan = -1;
989
+ }
990
+
991
+ // Validate vertical and get total rowspan
992
+ var lastColSpan = -1;
993
+ for (var x=0; x<rows[0].length; x++) {
994
+ var colRowSpan = 0;
995
+
996
+ for (var y=0; y<rows.length; y++) {
997
+ var sd = getColRowSpan(rows[y][x]);
998
+
999
+ colRowSpan += sd['rowspan'];
1000
+
1001
+ if (lastColSpan != -1 && sd['colspan'] != lastColSpan) {
1002
+ alert("Invalid selection for merge.");
1003
+ return true;
1004
+ }
1005
+
1006
+ lastColSpan = sd['colspan'];
1007
+ }
1008
+
1009
+ if (colRowSpan > rowSpan)
1010
+ rowSpan = colRowSpan;
1011
+
1012
+ lastColSpan = -1;
1013
+ }
1014
+
1015
+ // Setup td
1016
+ tdElm = rows[0][0];
1017
+ tdElm.rowSpan = rowSpan;
1018
+ tdElm.colSpan = colSpan;
1019
+
1020
+ // Merge cells
1021
+ for (var y=0; y<rows.length; y++) {
1022
+ for (var x=0; x<rows[y].length; x++) {
1023
+ var html = rows[y][x].innerHTML;
1024
+ var chk = tinyMCE.regexpReplace(html, "[ \t\r\n]", "");
1025
+
1026
+ if (chk != "<br/>" && chk != "<br>" && chk != "&nbsp;" && (x+y > 0))
1027
+ tdElm.innerHTML += html;
1028
+
1029
+ // Not current cell
1030
+ if (rows[y][x] != tdElm && !rows[y][x]._deleted) {
1031
+ var cpos = getCellPos(grid, rows[y][x]);
1032
+ var tr = rows[y][x].parentNode;
1033
+
1034
+ tr.removeChild(rows[y][x]);
1035
+ rows[y][x]._deleted = true;
1036
+
1037
+ // Empty TR, remove it
1038
+ if (!tr.hasChildNodes()) {
1039
+ tr.parentNode.removeChild(tr);
1040
+
1041
+ var lastCell = null;
1042
+ for (var x=0; cellElm = getCell(grid, cpos.rowindex, x); x++) {
1043
+ if (cellElm != lastCell && cellElm.rowSpan > 1)
1044
+ cellElm.rowSpan--;
1045
+
1046
+ lastCell = cellElm;
1047
+ }
1048
+
1049
+ if (tdElm.rowSpan > 1)
1050
+ tdElm.rowSpan--;
1051
+ }
1052
+ }
1053
+ }
1054
+ }
1055
+
1056
+ break;
1057
+ }
1058
+
1059
+ tableElm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
1060
+ tinyMCE.handleVisualAid(tableElm, true, tinyMCE.settings['visual'], tinyMCE.selectedInstance);
1061
+ tinyMCE.triggerNodeChange();
1062
+ inst.repaint();
1063
+ }
1064
+
1065
+ return true;
1066
+ }
1067
+
1068
+ // Pass to next handler in chain
1069
+ return false;
1070
+ }
1071
+ };
1072
+
1073
+ tinyMCE.addPlugin("table", TinyMCE_TablePlugin);
js/tiny_mce/plugins/table/images/buttons.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_cell_props.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_delete.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_delete_col.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_delete_row.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_insert_col_after.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_insert_col_before.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_insert_row_after.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_insert_row_before.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_merge_cells.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_row_props.gif ADDED
Binary file
js/tiny_mce/plugins/table/images/table_split_cells.gif ADDED
Binary file
js/tiny_mce/plugins/table/jscripts/cell.js ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function init() {
2
+ tinyMCEPopup.resizeToInnerSize();
3
+
4
+ document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
5
+ document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
6
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
7
+
8
+ var inst = tinyMCE.selectedInstance;
9
+ var tdElm = tinyMCE.getParentElement(inst.getFocusElement(), "td,th");
10
+ var formObj = document.forms[0];
11
+ var st = tinyMCE.parseStyle(tinyMCE.getAttrib(tdElm, "style"));
12
+
13
+ // Get table cell data
14
+ var celltype = tdElm.nodeName.toLowerCase();
15
+ var align = tinyMCE.getAttrib(tdElm, 'align');
16
+ var valign = tinyMCE.getAttrib(tdElm, 'valign');
17
+ var width = trimSize(getStyle(tdElm, 'width', 'width'));
18
+ var height = trimSize(getStyle(tdElm, 'height', 'height'));
19
+ var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
20
+ var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
21
+ var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(tdElm, 'class'), false);
22
+ var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
23
+ var id = tinyMCE.getAttrib(tdElm, 'id');
24
+ var lang = tinyMCE.getAttrib(tdElm, 'lang');
25
+ var dir = tinyMCE.getAttrib(tdElm, 'dir');
26
+ var scope = tinyMCE.getAttrib(tdElm, 'scope');
27
+
28
+ // Setup form
29
+ addClassesToList('class', 'table_cell_styles');
30
+ formObj.bordercolor.value = bordercolor;
31
+ formObj.bgcolor.value = bgcolor;
32
+ formObj.backgroundimage.value = backgroundimage;
33
+ formObj.width.value = width;
34
+ formObj.height.value = height;
35
+ formObj.id.value = id;
36
+ formObj.lang.value = lang;
37
+ formObj.style.value = tinyMCE.serializeStyle(st);
38
+ selectByValue(formObj, 'align', align);
39
+ selectByValue(formObj, 'valign', valign);
40
+ selectByValue(formObj, 'class', className);
41
+ selectByValue(formObj, 'celltype', celltype);
42
+ selectByValue(formObj, 'dir', dir);
43
+ selectByValue(formObj, 'scope', scope);
44
+
45
+ // Resize some elements
46
+ if (isVisible('backgroundimagebrowser'))
47
+ document.getElementById('backgroundimage').style.width = '180px';
48
+
49
+ updateColor('bordercolor_pick', 'bordercolor');
50
+ updateColor('bgcolor_pick', 'bgcolor');
51
+ }
52
+
53
+ function updateAction() {
54
+ tinyMCEPopup.restoreSelection();
55
+
56
+ var inst = tinyMCE.selectedInstance;
57
+ var tdElm = tinyMCE.getParentElement(inst.getFocusElement(), "td,th");
58
+ var trElm = tinyMCE.getParentElement(inst.getFocusElement(), "tr");
59
+ var tableElm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
60
+ var formObj = document.forms[0];
61
+
62
+ inst.execCommand('mceBeginUndoLevel');
63
+
64
+ switch (getSelectValue(formObj, 'action')) {
65
+ case "cell":
66
+ var celltype = getSelectValue(formObj, 'celltype');
67
+ var scope = getSelectValue(formObj, 'scope');
68
+
69
+ if (tinyMCE.getParam("accessibility_warnings")) {
70
+ if (celltype == "th" && scope == "")
71
+ var answer = confirm(tinyMCE.getLang('lang_table_missing_scope', '', true));
72
+ else
73
+ var answer = true;
74
+
75
+ if (!answer)
76
+ return;
77
+ }
78
+
79
+ updateCell(tdElm);
80
+ break;
81
+
82
+ case "row":
83
+ var cell = trElm.firstChild;
84
+
85
+ if (cell.nodeName != "TD" && cell.nodeName != "TH")
86
+ cell = nextCell(cell);
87
+
88
+ do {
89
+ cell = updateCell(cell, true);
90
+ } while ((cell = nextCell(cell)) != null);
91
+
92
+ break;
93
+
94
+ case "all":
95
+ var rows = tableElm.getElementsByTagName("tr");
96
+
97
+ for (var i=0; i<rows.length; i++) {
98
+ var cell = rows[i].firstChild;
99
+
100
+ if (cell.nodeName != "TD" && cell.nodeName != "TH")
101
+ cell = nextCell(cell);
102
+
103
+ do {
104
+ cell = updateCell(cell, true);
105
+ } while ((cell = nextCell(cell)) != null);
106
+ }
107
+
108
+ break;
109
+ }
110
+
111
+ tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
112
+ tinyMCE.triggerNodeChange();
113
+ inst.execCommand('mceEndUndoLevel');
114
+ tinyMCEPopup.close();
115
+ }
116
+
117
+ function nextCell(elm) {
118
+ while ((elm = elm.nextSibling) != null) {
119
+ if (elm.nodeName == "TD" || elm.nodeName == "TH")
120
+ return elm;
121
+ }
122
+
123
+ return null;
124
+ }
125
+
126
+ function updateCell(td, skip_id) {
127
+ var inst = tinyMCE.selectedInstance;
128
+ var formObj = document.forms[0];
129
+ var curCellType = td.nodeName.toLowerCase();
130
+ var celltype = getSelectValue(formObj, 'celltype');
131
+ var doc = inst.getDoc();
132
+
133
+ if (!skip_id)
134
+ td.setAttribute('id', formObj.id.value);
135
+
136
+ td.setAttribute('align', formObj.align.value);
137
+ td.setAttribute('vAlign', formObj.valign.value);
138
+ td.setAttribute('lang', formObj.lang.value);
139
+ td.setAttribute('dir', getSelectValue(formObj, 'dir'));
140
+ td.setAttribute('style', tinyMCE.serializeStyle(tinyMCE.parseStyle(formObj.style.value)));
141
+ td.setAttribute('scope', formObj.scope.value);
142
+ tinyMCE.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
143
+
144
+ // Clear deprecated attributes
145
+ tinyMCE.setAttrib(td, 'width', '');
146
+ tinyMCE.setAttrib(td, 'height', '');
147
+ tinyMCE.setAttrib(td, 'bgColor', '');
148
+ tinyMCE.setAttrib(td, 'borderColor', '');
149
+ tinyMCE.setAttrib(td, 'background', '');
150
+
151
+ // Set styles
152
+ td.style.width = getCSSSize(formObj.width.value);
153
+ td.style.height = getCSSSize(formObj.height.value);
154
+ if (formObj.bordercolor.value != "") {
155
+ td.style.borderColor = formObj.bordercolor.value;
156
+ td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
157
+ td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
158
+ } else
159
+ td.style.borderColor = '';
160
+
161
+ td.style.backgroundColor = formObj.bgcolor.value;
162
+
163
+ if (formObj.backgroundimage.value != "")
164
+ td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
165
+ else
166
+ td.style.backgroundImage = '';
167
+
168
+ if (curCellType != celltype) {
169
+ // changing to a different node type
170
+ var newCell = doc.createElement(celltype);
171
+
172
+ for (var c=0; c<td.childNodes.length; c++)
173
+ newCell.appendChild(td.childNodes[c].cloneNode(1));
174
+
175
+ for (var a=0; a<td.attributes.length; a++) {
176
+ var attr = td.attributes[a];
177
+ newCell.setAttribute(attr.name, attr.value);
178
+ }
179
+
180
+ td.parentNode.replaceChild(newCell, td);
181
+ td = newCell;
182
+ }
183
+
184
+ return td;
185
+ }
186
+
187
+ function changedBackgroundImage() {
188
+ var formObj = document.forms[0];
189
+ var st = tinyMCE.parseStyle(formObj.style.value);
190
+
191
+ st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
192
+
193
+ formObj.style.value = tinyMCE.serializeStyle(st);
194
+ }
195
+
196
+ function changedSize() {
197
+ var formObj = document.forms[0];
198
+ var st = tinyMCE.parseStyle(formObj.style.value);
199
+
200
+ var width = formObj.width.value;
201
+ if (width != "")
202
+ st['width'] = getCSSSize(width);
203
+ else
204
+ st['width'] = "";
205
+
206
+ var height = formObj.height.value;
207
+ if (height != "")
208
+ st['height'] = getCSSSize(height);
209
+ else
210
+ st['height'] = "";
211
+
212
+ formObj.style.value = tinyMCE.serializeStyle(st);
213
+ }
214
+
215
+ function changedColor() {
216
+ var formObj = document.forms[0];
217
+ var st = tinyMCE.parseStyle(formObj.style.value);
218
+
219
+ st['background-color'] = formObj.bgcolor.value;
220
+ st['border-color'] = formObj.bordercolor.value;
221
+
222
+ formObj.style.value = tinyMCE.serializeStyle(st);
223
+ }
224
+
225
+ function changedStyle() {
226
+ var formObj = document.forms[0];
227
+ var st = tinyMCE.parseStyle(formObj.style.value);
228
+
229
+ if (st['background-image'])
230
+ formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
231
+ else
232
+ formObj.backgroundimage.value = '';
233
+
234
+ if (st['width'])
235
+ formObj.width.value = trimSize(st['width']);
236
+
237
+ if (st['height'])
238
+ formObj.height.value = trimSize(st['height']);
239
+
240
+ if (st['background-color']) {
241
+ formObj.bgcolor.value = st['background-color'];
242
+ updateColor('bgcolor_pick','bgcolor');
243
+ }
244
+
245
+ if (st['border-color']) {
246
+ formObj.bordercolor.value = st['border-color'];
247
+ updateColor('bordercolor_pick','bordercolor');
248
+ }
249
+ }
js/tiny_mce/plugins/table/jscripts/merge_cells.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function init() {
2
+ tinyMCEPopup.resizeToInnerSize();
3
+
4
+ var formObj = document.forms[0];
5
+
6
+ formObj.numcols.value = tinyMCE.getWindowArg('numcols', 1);
7
+ formObj.numrows.value = tinyMCE.getWindowArg('numrows', 1);
8
+ }
9
+
10
+ function mergeCells() {
11
+ var args = new Array();
12
+ var formObj = document.forms[0];
13
+
14
+ if (!AutoValidator.validate(formObj)) {
15
+ alert(tinyMCE.getLang('lang_invalid_data'));
16
+ return false;
17
+ }
18
+
19
+ args["numcols"] = formObj.numcols.value;
20
+ args["numrows"] = formObj.numrows.value;
21
+
22
+ tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
23
+ tinyMCEPopup.close();
24
+ }
js/tiny_mce/plugins/table/jscripts/row.js ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function init() {
2
+ tinyMCEPopup.resizeToInnerSize();
3
+
4
+ document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
5
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
6
+
7
+ var inst = tinyMCE.selectedInstance;
8
+ var trElm = tinyMCE.getParentElement(inst.getFocusElement(), "tr");
9
+ var formObj = document.forms[0];
10
+ var st = tinyMCE.parseStyle(tinyMCE.getAttrib(trElm, "style"));
11
+
12
+ // Get table row data
13
+ var rowtype = trElm.parentNode.nodeName.toLowerCase();
14
+ var align = tinyMCE.getAttrib(trElm, 'align');
15
+ var valign = tinyMCE.getAttrib(trElm, 'valign');
16
+ var height = trimSize(getStyle(trElm, 'height', 'height'));
17
+ var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(trElm, 'class'), false);
18
+ var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
19
+ var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
20
+ var id = tinyMCE.getAttrib(trElm, 'id');
21
+ var lang = tinyMCE.getAttrib(trElm, 'lang');
22
+ var dir = tinyMCE.getAttrib(trElm, 'dir');
23
+
24
+ // Setup form
25
+ addClassesToList('class', 'table_row_styles');
26
+ formObj.bgcolor.value = bgcolor;
27
+ formObj.backgroundimage.value = backgroundimage;
28
+ formObj.height.value = height;
29
+ formObj.id.value = id;
30
+ formObj.lang.value = lang;
31
+ formObj.style.value = tinyMCE.serializeStyle(st);
32
+ selectByValue(formObj, 'align', align);
33
+ selectByValue(formObj, 'valign', valign);
34
+ selectByValue(formObj, 'class', className);
35
+ selectByValue(formObj, 'rowtype', rowtype);
36
+ selectByValue(formObj, 'dir', dir);
37
+
38
+ // Resize some elements
39
+ if (isVisible('backgroundimagebrowser'))
40
+ document.getElementById('backgroundimage').style.width = '180px';
41
+
42
+ updateColor('bgcolor_pick', 'bgcolor');
43
+ }
44
+
45
+ function updateAction() {
46
+ tinyMCEPopup.restoreSelection();
47
+
48
+ var inst = tinyMCE.selectedInstance;
49
+ var trElm = tinyMCE.getParentElement(inst.getFocusElement(), "tr");
50
+ var tableElm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
51
+ var formObj = document.forms[0];
52
+ var action = getSelectValue(formObj, 'action');
53
+
54
+ inst.execCommand('mceBeginUndoLevel');
55
+
56
+ switch (action) {
57
+ case "row":
58
+ updateRow(trElm);
59
+ break;
60
+
61
+ case "all":
62
+ var rows = tableElm.getElementsByTagName("tr");
63
+
64
+ for (var i=0; i<rows.length; i++)
65
+ updateRow(rows[i], true);
66
+
67
+ break;
68
+
69
+ case "odd":
70
+ case "even":
71
+ var rows = tableElm.getElementsByTagName("tr");
72
+
73
+ for (var i=0; i<rows.length; i++) {
74
+ if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
75
+ updateRow(rows[i], true, true);
76
+ }
77
+
78
+ break;
79
+ }
80
+
81
+ tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
82
+ tinyMCE.triggerNodeChange();
83
+ inst.execCommand('mceEndUndoLevel');
84
+ tinyMCEPopup.close();
85
+ }
86
+
87
+ function updateRow(tr_elm, skip_id, skip_parent) {
88
+ var inst = tinyMCE.selectedInstance;
89
+ var formObj = document.forms[0];
90
+ var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
91
+ var rowtype = getSelectValue(formObj, 'rowtype');
92
+ var doc = inst.getDoc();
93
+
94
+ // Update row element
95
+ if (!skip_id)
96
+ tr_elm.setAttribute('id', formObj.id.value);
97
+
98
+ tr_elm.setAttribute('align', getSelectValue(formObj, 'align'));
99
+ tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign'));
100
+ tr_elm.setAttribute('lang', formObj.lang.value);
101
+ tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir'));
102
+ tr_elm.setAttribute('style', tinyMCE.serializeStyle(tinyMCE.parseStyle(formObj.style.value)));
103
+ tinyMCE.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
104
+
105
+ // Clear deprecated attributes
106
+ tr_elm.setAttribute('background', '');
107
+ tr_elm.setAttribute('bgColor', '');
108
+ tr_elm.setAttribute('height', '');
109
+
110
+ // Set styles
111
+ tr_elm.style.height = getCSSSize(formObj.height.value);
112
+ tr_elm.style.backgroundColor = formObj.bgcolor.value;
113
+
114
+ if (formObj.backgroundimage.value != "")
115
+ tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
116
+ else
117
+ tr_elm.style.backgroundImage = '';
118
+
119
+ // Setup new rowtype
120
+ if (curRowType != rowtype && !skip_parent) {
121
+ // first, clone the node we are working on
122
+ var newRow = tr_elm.cloneNode(1);
123
+
124
+ // next, find the parent of its new destination (creating it if necessary)
125
+ var theTable = tinyMCE.getParentElement(tr_elm, "table");
126
+ var dest = rowtype;
127
+ var newParent = null;
128
+ for (var i = 0; i < theTable.childNodes.length; i++) {
129
+ if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
130
+ newParent = theTable.childNodes[i];
131
+ }
132
+
133
+ if (newParent == null) {
134
+ newParent = doc.createElement(dest);
135
+
136
+ if (dest == "thead")
137
+ theTable.insertBefore(newParent, theTable.firstChild);
138
+ else
139
+ theTable.appendChild(newParent);
140
+ }
141
+
142
+ // append the row to the new parent
143
+ newParent.appendChild(newRow);
144
+
145
+ // remove the original
146
+ tr_elm.parentNode.removeChild(tr_elm);
147
+
148
+ // set tr_elm to the new node
149
+ tr_elm = newRow;
150
+ }
151
+ }
152
+
153
+ function changedBackgroundImage() {
154
+ var formObj = document.forms[0];
155
+ var st = tinyMCE.parseStyle(formObj.style.value);
156
+
157
+ st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
158
+
159
+ formObj.style.value = tinyMCE.serializeStyle(st);
160
+ }
161
+
162
+ function changedStyle() {
163
+ var formObj = document.forms[0];
164
+ var st = tinyMCE.parseStyle(formObj.style.value);
165
+
166
+ if (st['background-image'])
167
+ formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
168
+ else
169
+ formObj.backgroundimage.value = '';
170
+
171
+ if (st['height'])
172
+ formObj.height.value = trimSize(st['height']);
173
+
174
+ if (st['background-color']) {
175
+ formObj.bgcolor.value = st['background-color'];
176
+ updateColor('bgcolor_pick','bgcolor');
177
+ }
178
+ }
179
+
180
+ function changedSize() {
181
+ var formObj = document.forms[0];
182
+ var st = tinyMCE.parseStyle(formObj.style.value);
183
+
184
+ var height = formObj.height.value;
185
+ if (height != "")
186
+ st['height'] = getCSSSize(height);
187
+ else
188
+ st['height'] = "";
189
+
190
+ formObj.style.value = tinyMCE.serializeStyle(st);
191
+ }
192
+
193
+ function changedColor() {
194
+ var formObj = document.forms[0];
195
+ var st = tinyMCE.parseStyle(formObj.style.value);
196
+
197
+ st['background-color'] = formObj.bgcolor.value;
198
+
199
+ formObj.style.value = tinyMCE.serializeStyle(st);
200
+ }
js/tiny_mce/plugins/table/jscripts/table.js ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var action, orgTableWidth, orgTableHeight;
2
+
3
+ function insertTable() {
4
+ var formObj = document.forms[0];
5
+ var inst = tinyMCE.selectedInstance;
6
+ var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption;
7
+ var html = '', capEl;
8
+ var elm = tinyMCE.tableElm;
9
+ var cellLimit, rowLimit, colLimit;
10
+
11
+ if (!AutoValidator.validate(formObj)) {
12
+ alert(tinyMCE.getLang('lang_invalid_data'));
13
+ return false;
14
+ }
15
+
16
+ tinyMCEPopup.restoreSelection();
17
+
18
+ // Get form data
19
+ cols = formObj.elements['cols'].value;
20
+ rows = formObj.elements['rows'].value;
21
+ border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
22
+ cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
23
+ cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
24
+ align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value;
25
+ width = formObj.elements['width'].value;
26
+ height = formObj.elements['height'].value;
27
+ bordercolor = formObj.elements['bordercolor'].value;
28
+ bgcolor = formObj.elements['bgcolor'].value;
29
+ className = formObj.elements['class'].options[formObj.elements['class'].selectedIndex].value;
30
+ id = formObj.elements['id'].value;
31
+ summary = formObj.elements['summary'].value;
32
+ style = formObj.elements['style'].value;
33
+ dir = formObj.elements['dir'].value;
34
+ lang = formObj.elements['lang'].value;
35
+ background = formObj.elements['backgroundimage'].value;
36
+ caption = formObj.elements['caption'].checked;
37
+
38
+ cellLimit = tinyMCE.getParam('table_cell_limit', false);
39
+ rowLimit = tinyMCE.getParam('table_row_limit', false);
40
+ colLimit = tinyMCE.getParam('table_col_limit', false);
41
+
42
+ // Validate table size
43
+ if (colLimit && cols > colLimit) {
44
+ alert(tinyMCE.getLang('lang_table_col_limit', '', true, {cols : colLimit}));
45
+ return false;
46
+ } else if (rowLimit && rows > rowLimit) {
47
+ alert(tinyMCE.getLang('lang_table_row_limit', '', true, {rows : rowLimit}));
48
+ return false;
49
+ } else if (cellLimit && cols * rows > cellLimit) {
50
+ alert(tinyMCE.getLang('lang_table_cell_limit', '', true, {cells : cellLimit}));
51
+ return false;
52
+ }
53
+
54
+ // Update table
55
+ if (action == "update") {
56
+ inst.execCommand('mceBeginUndoLevel');
57
+
58
+ tinyMCE.setAttrib(elm, 'cellPadding', cellpadding, true);
59
+ tinyMCE.setAttrib(elm, 'cellSpacing', cellspacing, true);
60
+ tinyMCE.setAttrib(elm, 'border', border, true);
61
+ tinyMCE.setAttrib(elm, 'align', align);
62
+ tinyMCE.setAttrib(elm, 'class', className);
63
+ tinyMCE.setAttrib(elm, 'style', style);
64
+ tinyMCE.setAttrib(elm, 'id', id);
65
+ tinyMCE.setAttrib(elm, 'summary', summary);
66
+ tinyMCE.setAttrib(elm, 'dir', dir);
67
+ tinyMCE.setAttrib(elm, 'lang', lang);
68
+
69
+ capEl = elm.getElementsByTagName('caption')[0];
70
+
71
+ if (capEl && !caption)
72
+ capEl.parentNode.removeChild(capEl);
73
+
74
+ if (!capEl && caption) {
75
+ capEl = elm.ownerDocument.createElement('caption');
76
+ capEl.innerHTML = '&nbsp;';
77
+ elm.insertBefore(capEl, elm.firstChild);
78
+ }
79
+
80
+ // Not inline styles
81
+ if (!tinyMCE.getParam("inline_styles"))
82
+ tinyMCE.setAttrib(elm, 'width', width, true);
83
+
84
+ // Remove these since they are not valid XHTML
85
+ tinyMCE.setAttrib(elm, 'borderColor', '');
86
+ tinyMCE.setAttrib(elm, 'bgColor', '');
87
+ tinyMCE.setAttrib(elm, 'background', '');
88
+ tinyMCE.setAttrib(elm, 'height', '');
89
+
90
+ if (background != '')
91
+ elm.style.backgroundImage = "url('" + background + "')";
92
+ else
93
+ elm.style.backgroundImage = '';
94
+
95
+ if (tinyMCE.getParam("inline_styles"))
96
+ elm.style.borderWidth = border + "px";
97
+
98
+ if (tinyMCE.getParam("inline_styles")) {
99
+ if (width != '')
100
+ elm.style.width = getCSSSize(width);
101
+ }
102
+
103
+ if (bordercolor != "") {
104
+ elm.style.borderColor = bordercolor;
105
+ elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
106
+ elm.style.borderWidth = border == "" ? "1px" : border;
107
+ } else
108
+ elm.style.borderColor = '';
109
+
110
+ elm.style.backgroundColor = bgcolor;
111
+ elm.style.height = getCSSSize(height);
112
+
113
+ tinyMCE.handleVisualAid(tinyMCE.tableElm, false, inst.visualAid, inst);
114
+
115
+ // Fix for stange MSIE align bug
116
+ tinyMCE.tableElm.outerHTML = tinyMCE.tableElm.outerHTML;
117
+
118
+ tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
119
+ tinyMCE.triggerNodeChange();
120
+ inst.execCommand('mceEndUndoLevel');
121
+
122
+ // Repaint if dimensions changed
123
+ if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
124
+ inst.repaint();
125
+
126
+ tinyMCEPopup.close();
127
+ return true;
128
+ }
129
+
130
+ // Create new table
131
+ html += '<table';
132
+
133
+ html += makeAttrib('id', id);
134
+ html += makeAttrib('border', border);
135
+ html += makeAttrib('cellpadding', cellpadding);
136
+ html += makeAttrib('cellspacing', cellspacing);
137
+ html += makeAttrib('width', width);
138
+ //html += makeAttrib('height', height);
139
+ //html += makeAttrib('bordercolor', bordercolor);
140
+ //html += makeAttrib('bgcolor', bgcolor);
141
+ html += makeAttrib('align', align);
142
+ html += makeAttrib('class', tinyMCE.getVisualAidClass(className, border == 0));
143
+ html += makeAttrib('style', style);
144
+ html += makeAttrib('summary', summary);
145
+ html += makeAttrib('dir', dir);
146
+ html += makeAttrib('lang', lang);
147
+ html += '>';
148
+
149
+ if (caption)
150
+ html += '<caption>&nbsp;</caption>';
151
+
152
+ for (var y=0; y<rows; y++) {
153
+ html += "<tr>";
154
+
155
+ for (var x=0; x<cols; x++)
156
+ html += '<td>&nbsp;</td>';
157
+
158
+ html += "</tr>";
159
+ }
160
+
161
+ html += "</table>";
162
+
163
+ inst.execCommand('mceBeginUndoLevel');
164
+ inst.execCommand('mceInsertContent', false, html);
165
+ tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual']);
166
+ inst.execCommand('mceEndUndoLevel');
167
+
168
+ tinyMCEPopup.close();
169
+ }
170
+
171
+ function makeAttrib(attrib, value) {
172
+ var formObj = document.forms[0];
173
+ var valueElm = formObj.elements[attrib];
174
+
175
+ if (typeof(value) == "undefined" || value == null) {
176
+ value = "";
177
+
178
+ if (valueElm)
179
+ value = valueElm.value;
180
+ }
181
+
182
+ if (value == "")
183
+ return "";
184
+
185
+ // XML encode it
186
+ value = value.replace(/&/g, '&amp;');
187
+ value = value.replace(/\"/g, '&quot;');
188
+ value = value.replace(/</g, '&lt;');
189
+ value = value.replace(/>/g, '&gt;');
190
+
191
+ return ' ' + attrib + '="' + value + '"';
192
+ }
193
+
194
+ function init() {
195
+ tinyMCEPopup.resizeToInnerSize();
196
+
197
+ document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
198
+ document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
199
+ document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
200
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
201
+
202
+ var cols = 2, rows = 2, border = tinyMCE.getParam('table_default_border', '0'), cellpadding = tinyMCE.getParam('table_default_cellpadding', ''), cellspacing = tinyMCE.getParam('table_default_cellspacing', '');
203
+ var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
204
+ var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "";
205
+ var inst = tinyMCE.selectedInstance;
206
+ var formObj = document.forms[0];
207
+ var elm = tinyMCE.getParentElement(inst.getFocusElement(), "table");
208
+
209
+ tinyMCE.tableElm = elm;
210
+ action = tinyMCE.getWindowArg('action');
211
+ if (action == null)
212
+ action = tinyMCE.tableElm ? "update" : "insert";
213
+
214
+ if (tinyMCE.tableElm && action != "insert") {
215
+ var rowsAr = tinyMCE.tableElm.rows;
216
+ var cols = 0;
217
+ for (var i=0; i<rowsAr.length; i++)
218
+ if (rowsAr[i].cells.length > cols)
219
+ cols = rowsAr[i].cells.length;
220
+
221
+ cols = cols;
222
+ rows = rowsAr.length;
223
+
224
+ st = tinyMCE.parseStyle(tinyMCE.getAttrib(tinyMCE.tableElm, "style"));
225
+ border = trimSize(getStyle(elm, 'border', 'borderWidth'));
226
+ cellpadding = tinyMCE.getAttrib(tinyMCE.tableElm, 'cellpadding', "");
227
+ cellspacing = tinyMCE.getAttrib(tinyMCE.tableElm, 'cellspacing', "");
228
+ width = trimSize(getStyle(elm, 'width', 'width'));
229
+ height = trimSize(getStyle(elm, 'height', 'height'));
230
+ bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
231
+ bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
232
+ align = tinyMCE.getAttrib(tinyMCE.tableElm, 'align', align);
233
+ className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(tinyMCE.tableElm, 'class'), false);
234
+ id = tinyMCE.getAttrib(tinyMCE.tableElm, 'id');
235
+ summary = tinyMCE.getAttrib(tinyMCE.tableElm, 'summary');
236
+ style = tinyMCE.serializeStyle(st);
237
+ dir = tinyMCE.getAttrib(tinyMCE.tableElm, 'dir');
238
+ lang = tinyMCE.getAttrib(tinyMCE.tableElm, 'lang');
239
+ background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
240
+ formObj.caption.checked = tinyMCE.tableElm.getElementsByTagName('caption').length > 0;
241
+
242
+ orgTableWidth = width;
243
+ orgTableHeight = height;
244
+
245
+ action = "update";
246
+ }
247
+
248
+ addClassesToList('class', "table_styles");
249
+
250
+ // Update form
251
+ selectByValue(formObj, 'align', align);
252
+ selectByValue(formObj, 'class', className);
253
+ formObj.cols.value = cols;
254
+ formObj.rows.value = rows;
255
+ formObj.border.value = border;
256
+ formObj.cellpadding.value = cellpadding;
257
+ formObj.cellspacing.value = cellspacing;
258
+ formObj.width.value = width;
259
+ formObj.height.value = height;
260
+ formObj.bordercolor.value = bordercolor;
261
+ formObj.bgcolor.value = bgcolor;
262
+ formObj.id.value = id;
263
+ formObj.summary.value = summary;
264
+ formObj.style.value = style;
265
+ formObj.dir.value = dir;
266
+ formObj.lang.value = lang;
267
+ formObj.backgroundimage.value = background;
268
+ formObj.insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true);
269
+
270
+ updateColor('bordercolor_pick', 'bordercolor');
271
+ updateColor('bgcolor_pick', 'bgcolor');
272
+
273
+ // Resize some elements
274
+ if (isVisible('backgroundimagebrowser'))
275
+ document.getElementById('backgroundimage').style.width = '180px';
276
+
277
+ // Disable some fields in update mode
278
+ if (action == "update") {
279
+ formObj.cols.disabled = true;
280
+ formObj.rows.disabled = true;
281
+ }
282
+ }
283
+
284
+ function changedSize() {
285
+ var formObj = document.forms[0];
286
+ var st = tinyMCE.parseStyle(formObj.style.value);
287
+
288
+ var width = formObj.width.value;
289
+ if (width != "")
290
+ st['width'] = tinyMCE.getParam("inline_styles") ? getCSSSize(width) : "";
291
+ else
292
+ st['width'] = "";
293
+
294
+ var height = formObj.height.value;
295
+ if (height != "")
296
+ st['height'] = getCSSSize(height);
297
+ else
298
+ st['height'] = "";
299
+
300
+ formObj.style.value = tinyMCE.serializeStyle(st);
301
+ }
302
+
303
+ function changedBackgroundImage() {
304
+ var formObj = document.forms[0];
305
+ var st = tinyMCE.parseStyle(formObj.style.value);
306
+
307
+ st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
308
+
309
+ formObj.style.value = tinyMCE.serializeStyle(st);
310
+ }
311
+
312
+ function changedBorder() {
313
+ var formObj = document.forms[0];
314
+ var st = tinyMCE.parseStyle(formObj.style.value);
315
+
316
+ // Update border width if the element has a color
317
+ if (formObj.border.value != "" && formObj.bordercolor.value != "")
318
+ st['border-width'] = formObj.border.value + "px";
319
+
320
+ formObj.style.value = tinyMCE.serializeStyle(st);
321
+ }
322
+
323
+ function changedColor() {
324
+ var formObj = document.forms[0];
325
+ var st = tinyMCE.parseStyle(formObj.style.value);
326
+
327
+ st['background-color'] = formObj.bgcolor.value;
328
+
329
+ if (formObj.bordercolor.value != "") {
330
+ st['border-color'] = formObj.bordercolor.value;
331
+
332
+ // Add border-width if it's missing
333
+ if (!st['border-width'])
334
+ st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px";
335
+ }
336
+
337
+ formObj.style.value = tinyMCE.serializeStyle(st);
338
+ }
339
+
340
+ function changedStyle() {
341
+ var formObj = document.forms[0];
342
+ var st = tinyMCE.parseStyle(formObj.style.value);
343
+
344
+ if (st['background-image'])
345
+ formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
346
+ else
347
+ formObj.backgroundimage.value = '';
348
+
349
+ if (st['width'])
350
+ formObj.width.value = trimSize(st['width']);
351
+
352
+ if (st['height'])
353
+ formObj.height.value = trimSize(st['height']);
354
+
355
+ if (st['background-color']) {
356
+ formObj.bgcolor.value = st['background-color'];
357
+ updateColor('bgcolor_pick','bgcolor');
358
+ }
359
+
360
+ if (st['border-color']) {
361
+ formObj.bordercolor.value = st['border-color'];
362
+ updateColor('bordercolor_pick','bordercolor');
363
+ }
364
+ }
js/tiny_mce/plugins/table/langs/en.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('table',{
4
+ general_tab : 'General',
5
+ advanced_tab : 'Advanced',
6
+ general_props : 'General properties',
7
+ advanced_props : 'Advanced properties',
8
+ desc : 'Inserts a new table',
9
+ row_before_desc : 'Insert row before',
10
+ row_after_desc : 'Insert row after',
11
+ delete_row_desc : 'Delete row',
12
+ col_before_desc : 'Insert column before',
13
+ col_after_desc : 'Insert column after',
14
+ delete_col_desc : 'Remove column',
15
+ rowtype : 'Row in table part',
16
+ title : 'Insert/Modify table',
17
+ width : 'Width',
18
+ height : 'Height',
19
+ cols : 'Columns',
20
+ rows : 'Rows',
21
+ cellspacing : 'Cellspacing',
22
+ cellpadding : 'Cellpadding',
23
+ border : 'Border',
24
+ align : 'Alignment',
25
+ align_default : 'Default',
26
+ align_left : 'Left',
27
+ align_right : 'Right',
28
+ align_middle : 'Center',
29
+ row_title : 'Table row properties',
30
+ cell_title : 'Table cell properties',
31
+ cell_type : 'Cell type',
32
+ row_desc : 'Table row properties',
33
+ cell_desc : 'Table cell properties',
34
+ valign : 'Vertical alignment',
35
+ align_top : 'Top',
36
+ align_bottom : 'Bottom',
37
+ props_desc : 'Table properties',
38
+ bordercolor : 'Border color',
39
+ bgcolor : 'Background color',
40
+ merge_cells_title : 'Merge table cells',
41
+ split_cells_desc : 'Split merged table cells',
42
+ merge_cells_desc : 'Merge table cells',
43
+ cut_row_desc : 'Cut table row',
44
+ copy_row_desc : 'Copy table row',
45
+ paste_row_before_desc : 'Paste table row before',
46
+ paste_row_after_desc : 'Paste table row after',
47
+ id : 'Id',
48
+ style: 'Style',
49
+ langdir : 'Language direction',
50
+ langcode : 'Language code',
51
+ mime : 'Target MIME type',
52
+ ltr : 'Left to right',
53
+ rtl : 'Right to left',
54
+ bgimage : 'Background image',
55
+ summary : 'Summary',
56
+ td : "Data",
57
+ th : "Header",
58
+ cell_cell : 'Update current cell',
59
+ cell_row : 'Update all cells in row',
60
+ cell_all : 'Update all cells in table',
61
+ row_row : 'Update current row',
62
+ row_odd : 'Update odd rows in table',
63
+ row_even : 'Update even rows in table',
64
+ row_all : 'Update all rows in table',
65
+ thead : 'Table Head',
66
+ tbody : 'Table Body',
67
+ tfoot : 'Table Foot',
68
+ del : 'Delete table',
69
+ scope : 'Scope',
70
+ row : 'Row',
71
+ col : 'Col',
72
+ rowgroup : 'Row Group',
73
+ colgroup : 'Col Group',
74
+ col_limit : 'You\'ve exceeded the maximum number of columns of {$cols}.',
75
+ row_limit : 'You\'ve exceeded the maximum number of rows of {$rows}.',
76
+ cell_limit : 'You\'ve exceeded the maximum number of cells of {$cells}.',
77
+ missing_scope: 'Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.',
78
+ caption : 'Table caption'
79
+ });
js/tiny_mce/plugins/table/merge_cells.htm ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_table_merge_cells_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/validate.js"></script>
7
+ <script language="javascript" type="text/javascript" src="jscripts/merge_cells.js"></script>
8
+ <base target="_self" />
9
+ </head>
10
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="margin: 8px" style="display: none">
11
+ <form onsubmit="insertTable();return false;" action="#">
12
+ <fieldset>
13
+ <legend>{$lang_table_merge_cells_title}</legend>
14
+ <table border="0" cellpadding="0" cellspacing="3" width="100%">
15
+ <tr>
16
+ <td>{$lang_table_cols}:</td>
17
+ <td align="right"><input type="text" name="numcols" value="" class="number min1" style="width: 30px" /></td>
18
+ <td>
19
+ </tr>
20
+ <tr>
21
+ <td>{$lang_table_rows}:</td>
22
+ <td align="right"><input type="text" name="numrows" value="" class="number min1" style="width: 30px" /></td>
23
+ </tr>
24
+ </table>
25
+ </fieldset>
26
+
27
+ <div class="mceActionPanel">
28
+ <div style="float: left">
29
+ <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="mergeCells();" />
30
+ </div>
31
+
32
+ <div style="float: right">
33
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
34
+ </div>
35
+ </div>
36
+ </form>
37
+ </body>
38
+ </html>
js/tiny_mce/plugins/table/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/plugins/table/row.htm ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_table_row_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="jscripts/row.js"></script>
8
+ <link href="css/row.css" rel="stylesheet" type="text/css" />
9
+ <base target="_self" />
10
+ </head>
11
+ <body id="tablerow" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
12
+ <form onsubmit="updateAction();return false;">
13
+ <div class="tabs">
14
+ <ul>
15
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_table_general_tab}</a></span></li>
16
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_table_advanced_tab}</a></span></li>
17
+ </ul>
18
+ </div>
19
+
20
+ <div class="panel_wrapper">
21
+ <div id="general_panel" class="panel current">
22
+ <fieldset>
23
+ <legend>{$lang_table_general_props}</legend>
24
+
25
+ <table border="0" cellpadding="4" cellspacing="0">
26
+ <tr>
27
+ <td><label for="rowtype">{$lang_table_rowtype}</label></td>
28
+ <td class="col2">
29
+ <select id="rowtype" name="rowtype">
30
+ <option value="thead">{$lang_table_thead}</option>
31
+ <option value="tbody">{$lang_table_tbody}</option>
32
+ <option value="tfoot">{$lang_table_tfoot}</option>
33
+ </select>
34
+ </td>
35
+ </tr>
36
+
37
+ <tr>
38
+ <td><label for="align">{$lang_table_align}</label></td>
39
+ <td class="col2">
40
+ <select id="align" name="align">
41
+ <option value="">{$lang_not_set}</option>
42
+ <option value="center">{$lang_table_align_middle}</option>
43
+ <option value="left">{$lang_table_align_left}</option>
44
+ <option value="right">{$lang_table_align_right}</option>
45
+ </select>
46
+ </td>
47
+ </tr>
48
+
49
+ <tr>
50
+ <td><label for="valign">{$lang_table_valign}</label></td>
51
+ <td class="col2">
52
+ <select id="valign" name="valign">
53
+ <option value="">{$lang_not_set}</option>
54
+ <option value="top">{$lang_table_align_top}</option>
55
+ <option value="middle">{$lang_table_align_middle}</option>
56
+ <option value="bottom">{$lang_table_align_bottom}</option>
57
+ </select>
58
+ </td>
59
+ </tr>
60
+
61
+ <tr id="styleSelectRow">
62
+ <td><label for="class">{$lang_class_name}</label></td>
63
+ <td class="col2">
64
+ <select id="class" name="class">
65
+ <option value="" selected="selected">{$lang_not_set}</option>
66
+ </select>
67
+ </td>
68
+ </tr>
69
+
70
+ <tr>
71
+ <td><label for="height">{$lang_table_height}</label></td>
72
+ <td class="col2"><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
73
+ </tr>
74
+ </table>
75
+ </fieldset>
76
+ </div>
77
+
78
+ <div id="advanced_panel" class="panel">
79
+ <fieldset>
80
+ <legend>{$lang_table_advanced_props}</legend>
81
+
82
+ <table border="0" cellpadding="0" cellspacing="4">
83
+ <tr>
84
+ <td class="column1"><label for="id">{$lang_table_id}</label></td>
85
+ <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
86
+ </tr>
87
+
88
+ <tr>
89
+ <td><label for="style">{$lang_table_style}</label></td>
90
+ <td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
91
+ </tr>
92
+
93
+ <tr>
94
+ <td class="column1"><label for="dir">{$lang_table_langdir}</label></td>
95
+ <td>
96
+ <select id="dir" name="dir" style="width: 200px">
97
+ <option value="">{$lang_not_set}</option>
98
+ <option value="ltr">{$lang_table_ltr}</option>
99
+ <option value="rtl">{$lang_table_rtl}</option>
100
+ </select>
101
+ </td>
102
+ </tr>
103
+
104
+ <tr>
105
+ <td class="column1"><label for="lang">{$lang_table_langcode}</label></td>
106
+ <td>
107
+ <input id="lang" name="lang" type="text" value="" style="width: 200px" />
108
+ </td>
109
+ </tr>
110
+
111
+ <tr>
112
+ <td class="column1"><label for="backgroundimage">{$lang_table_bgimage}</label></td>
113
+ <td>
114
+ <table border="0" cellpadding="0" cellspacing="0">
115
+ <tr>
116
+ <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
117
+ <td id="backgroundimagebrowsercontainer">&nbsp;</td>
118
+ </tr>
119
+ </table>
120
+ </td>
121
+ </tr>
122
+
123
+ <tr>
124
+ <td class="column1"><label for="bgcolor">{$lang_table_bgcolor}</label></td>
125
+ <td>
126
+ <table border="0" cellpadding="0" cellspacing="0">
127
+ <tr>
128
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
129
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
130
+ </tr>
131
+ </table>
132
+ </td>
133
+ </tr>
134
+ </table>
135
+ </fieldset>
136
+ </div>
137
+ </div>
138
+
139
+ <div class="mceActionPanel">
140
+ <div>
141
+ <select id="action" name="action">
142
+ <option value="row">{$lang_table_row_row}</option>
143
+ <option value="odd">{$lang_table_row_odd}</option>
144
+ <option value="even">{$lang_table_row_even}</option>
145
+ <option value="all">{$lang_table_row_all}</option>
146
+ </select>
147
+ </div>
148
+
149
+ <div style="float: left">
150
+ <div><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="updateAction();" /></div>
151
+ </div>
152
+
153
+ <div style="float: right">
154
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
155
+ </div>
156
+ </div>
157
+ </form>
158
+ </body>
159
+ </html>
js/tiny_mce/plugins/table/table.htm ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_table_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/validate.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/table.js"></script>
9
+ <link href="css/table.css" rel="stylesheet" type="text/css" />
10
+ <base target="_self" />
11
+ </head>
12
+ <body id="table" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
13
+ <form onsubmit="insertTable();return false;" action="#">
14
+ <div class="tabs">
15
+ <ul>
16
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_table_general_tab}</a></span></li>
17
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_table_advanced_tab}</a></span></li>
18
+ </ul>
19
+ </div>
20
+
21
+ <div class="panel_wrapper">
22
+ <div id="general_panel" class="panel current">
23
+ <fieldset>
24
+ <legend>{$lang_table_general_props}</legend>
25
+
26
+ <table border="0" cellpadding="4" cellspacing="0" width="100%">
27
+ <tr>
28
+ <td><label id="colslabel" for="cols">{$lang_table_cols}</label></td>
29
+ <td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1" /></td>
30
+ <td><label id="rowslabel" for="rows">{$lang_table_rows}</label></td>
31
+ <td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" /></td>
32
+ </tr>
33
+ <tr>
34
+ <td><label id="cellpaddinglabel" for="cellpadding">{$lang_table_cellpadding}</label></td>
35
+ <td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
36
+ <td><label id="cellspacinglabel" for="cellspacing">{$lang_table_cellspacing}</label></td>
37
+ <td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
38
+ </tr>
39
+ <tr>
40
+ <td><label id="alignlabel" for="align">{$lang_table_align}</label></td>
41
+ <td><select id="align" name="align">
42
+ <option value="">{$lang_not_set}</option>
43
+ <option value="center">{$lang_table_align_middle}</option>
44
+ <option value="left">{$lang_table_align_left}</option>
45
+ <option value="right">{$lang_table_align_right}</option>
46
+ </select></td>
47
+ <td><label id="borderlabel" for="border">{$lang_table_border}</label></td>
48
+ <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" /></td>
49
+ </tr>
50
+ <tr id="width_row">
51
+ <td><label id="widthlabel" for="width">{$lang_table_width}</label></td>
52
+ <td><input name="width" type="text" id="width" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
53
+ <td><label id="heightlabel" for="height">{$lang_table_height}</label></td>
54
+ <td><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
55
+ </tr>
56
+ <tr id="styleSelectRow">
57
+ <td><label id="classlabel" for="class">{$lang_class_name}</label></td>
58
+ <td colspan="3">
59
+ <select id="class" name="class">
60
+ <option value="" selected>{$lang_not_set}</option>
61
+ </select></td>
62
+ </tr>
63
+ <tr>
64
+ <td class="column1"><label for="caption">{$lang_table_caption}</label></td>
65
+ <td><input id="caption" name="caption" type="checkbox" value="true" /></td>
66
+ </tr>
67
+ </table>
68
+ </fieldset>
69
+ </div>
70
+
71
+ <div id="advanced_panel" class="panel">
72
+ <fieldset>
73
+ <legend>{$lang_table_advanced_props}</legend>
74
+
75
+ <table border="0" cellpadding="0" cellspacing="4">
76
+ <tr>
77
+ <td class="column1"><label for="id">{$lang_table_id}</label></td>
78
+ <td><input id="id" name="id" type="text" value="" class="advfield" /></td>
79
+ </tr>
80
+
81
+ <tr>
82
+ <td class="column1"><label for="summary">{$lang_table_summary}</label></td>
83
+ <td><input id="summary" name="summary" type="text" value="" class="advfield" /></td>
84
+ </tr>
85
+
86
+ <tr>
87
+ <td><label for="style">{$lang_table_style}</label></td>
88
+ <td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
89
+ </tr>
90
+
91
+ <tr>
92
+ <td class="column1"><label for="dir">{$lang_table_langdir}</label></td>
93
+ <td>
94
+ <select id="dir" name="dir" class="advfield">
95
+ <option value="">{$lang_not_set}</option>
96
+ <option value="ltr">{$lang_table_ltr}</option>
97
+ <option value="rtl">{$lang_table_rtl}</option>
98
+ </select>
99
+ </td>
100
+ </tr>
101
+
102
+ <tr>
103
+ <td class="column1"><label id="langlabel" for="lang">{$lang_table_langcode}</label></td>
104
+ <td>
105
+ <input id="lang" name="lang" type="text" value="" class="advfield" />
106
+ </td>
107
+ </tr>
108
+
109
+ <tr>
110
+ <td class="column1"><label for="backgroundimage">{$lang_table_bgimage}</label></td>
111
+ <td>
112
+ <table border="0" cellpadding="0" cellspacing="0">
113
+ <tr>
114
+ <td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
115
+ <td id="backgroundimagebrowsercontainer">&nbsp;</td>
116
+ </tr>
117
+ </table>
118
+ </td>
119
+ </tr>
120
+
121
+ <tr>
122
+ <td class="column1"><label for="bordercolor">{$lang_table_bordercolor}</label></td>
123
+ <td>
124
+ <table border="0" cellpadding="0" cellspacing="0">
125
+ <tr>
126
+ <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
127
+ <td id="bordercolor_pickcontainer">&nbsp;</td>
128
+ </tr>
129
+ </table>
130
+ </td>
131
+ </tr>
132
+
133
+ <tr>
134
+ <td class="column1"><label for="bgcolor">{$lang_table_bgcolor}</label></td>
135
+ <td>
136
+ <table border="0" cellpadding="0" cellspacing="0">
137
+ <tr>
138
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
139
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
140
+ </tr>
141
+ </table>
142
+ </td>
143
+ </tr>
144
+ </table>
145
+ </fieldset>
146
+ </div>
147
+ </div>
148
+
149
+ <div class="mceActionPanel">
150
+ <div style="float: left">
151
+ <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertTable();" />
152
+ </div>
153
+
154
+ <div style="float: right">
155
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
156
+ </div>
157
+ </div>
158
+ </form>
159
+ </body>
160
+ </html>
js/tiny_mce/plugins/template/blank.htm ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>blank_page</title>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <script type="text/javascript">
6
+ var tinyMCE = parent.tinyMCE, css = tinyMCE.getParam("content_css").split(','), i, u;
7
+
8
+ // Load content CSS files
9
+ for (i=0; i<css.length; i++) {
10
+ u = css[i];
11
+
12
+ // Fix relative
13
+ if (u.charAt(0) != '/' && u.indexOf('://') == -1)
14
+ u = tinyMCE.documentBasePath + "/" + u;
15
+
16
+ document.write('<link href="' + u + '" rel="stylesheet" type="text/css" />');
17
+ }
18
+ </script>
19
+ </head>
20
+ <body id="mceTemplatePreview">
21
+
22
+ </body>
23
+ </html>
js/tiny_mce/plugins/template/css/template.css ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #frmbody {
2
+ padding: 10px;
3
+ background-color: #FFF;
4
+ border: 1px solid #CCC;
5
+ }
6
+
7
+ .frmRow {
8
+ margin-bottom: 10px;
9
+ }
10
+
11
+ #templatesrc {
12
+ border: none;
13
+ width: 320px;
14
+ height: 240px;
15
+ }
16
+
17
+ .title {
18
+ padding-bottom: 5px;
19
+ }
20
+
21
+ .mceActionPanel {
22
+ padding-top: 5px;
23
+ }
js/tiny_mce/plugins/template/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('template');var TinyMCE_TemplatePlugin={getInfo:function(){return{longname:'Template plugin',author:'Moxiecode Systems AB',authorurl:'http://www.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){var cdate,mdate,content,x=0,key,value,rvals,ds=inst.getData('template');cdate=tinyMCE.getParam("template_cdate_classes",'').split(/\s+/);mdate=tinyMCE.getParam("template_mdate_classes",'').split(/\s+/);content=tinyMCE.getParam("template_selected_content_classes",'').split(/\s+/);for(x=0;x<cdate.length;x++)TinyMCE_TemplatePlugin.functions[cdate[x]]=TinyMCE_TemplatePlugin.functions['cdate'];for(x=0;x<mdate.length;x++)TinyMCE_TemplatePlugin.functions[mdate[x]]=TinyMCE_TemplatePlugin.functions['mdate'];for(x=0;x<content.length;x++)TinyMCE_TemplatePlugin.functions[content[x]]=TinyMCE_TemplatePlugin.functions['selectedContent'];rvals=tinyMCE.getParam("template_replace_values",false);for(key in rvals){value=rvals[key];if(typeof value=="function")TinyMCE_TemplatePlugin.functions[key]=value;else TinyMCE_TemplatePlugin.functions[key]=TinyMCE_TemplatePlugin.functions['generateReplacer'](value)}rvals=tinyMCE.getParam("template_replace_values",false);ds.replace_items={};for(key in rvals)ds.replace_items[key]=rvals[key];inst.addShortcut('ctrl','t','lang_template_desc','mceTemplate');ds.currentAction="insert";ds.currentTmplNode=null},getControlHTML:function(cn){switch(cn){case"template":return tinyMCE.getButtonHTML(cn,'lang_template_desc','{$pluginurl}/images/template.gif','mceTemplate',true)}return""},execCommand:function(editor_id,element,command,user_interface,value){var nodeArray,current,newTmpl,x,inst=tinyMCE.getInstanceById(editor_id),ds=inst.getData('template'),telm;switch(command){case"mceTemplate":if(user_interface){tinyMCE.openWindow({file:'../../plugins/template/template.htm',width:tinyMCE.getParam('template_popup_width',750),height:tinyMCE.getParam('template_popup_height',600)},{editor_id:editor_id,resizable:"yes",scrollbars:"no",pluginObj:TinyMCE_TemplatePlugin})}else{telm=TinyMCE_TemplatePlugin._convertToNode(value.body);nodeArray=tinyMCE.selectElements(telm,'div',function(n){return tinyMCE.hasCSSClass(n,TinyMCE_TemplatePlugin.TMPL)});telm=nodeArray.length>0?nodeArray[0]:null;nodeArray=[];if(ds.currentAction=="insert"){if(telm){tinyMCE.execCommand('mceBeginUndoLevel');ds.currentAction="insert-new";TinyMCE_TemplatePlugin._insertTemplate(editor_id,telm,value.title,value.tsrc,true);ds.currentAction=="insert";tinyMCE.execCommand('mceEndUndoLevel');tinyMCE.execInstanceCommand(editor_id,'mceCleanup',false)}else tinyMCE.execCommand('mceInsertContent',false,this._replaceValues(value.body))}else{nodeArray=TinyMCE_TemplatePlugin._collectTemplateElements(ds.currentTmplNode);current=[];newTmpl=[];tinyMCE.getNodeTree(telm,newTmpl);for(x=0;x<nodeArray.length;x++)tinyMCE.getNodeTree(nodeArray[x],current);var _test=function(elm){var replaced=true;if(elm.className){var names=elm.className.split(/\s+/),c,n;for(c=0;c<names.length;c++){if(names[c].match(/^mce/i))continue;for(n=0;n<newTmpl.length;n++){replaced=false;if(newTmpl[n].className&&newTmpl[n].className.match(new RegExp(names[c],"gi"))){newTmpl[n].innerHTML=elm.innerHTML;replaced=true;break}}}}return replaced};var cont=true;var asked=false;for(x=0;x<current.length;x++){if(!_test(current[x])){cont=(asked||confirm("The new template has less elements than the currently selected content.\nIf you proceed you will loose content.\nAre you sure you want to proceed?","Proceed?"));asked=true;if(!cont)break}};if(cont){tinyMCE.execCommand('mceBeginUndoLevel');TinyMCE_TemplatePlugin._replaceTemplateContent(current[0],editor_id,telm,value.title,value.tsrc);tinyMCE.execCommand('mceEndUndoLevel');tinyMCE.execInstanceCommand(editor_id,'mceCleanup',false)}}tinyMCE.triggerNodeChange(true)}return true}return false},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){var inst=tinyMCE.getInstanceById(editor_id),ds=inst.getData('template');if(tinyMCE.hasCSSClass(node,TinyMCE_TemplatePlugin.TMPL_ELEMENT)||tinyMCE.hasCSSClass(node.parentNode,TinyMCE_TemplatePlugin.TMPL_ELEMENT)){tinyMCE.switchClass(editor_id+'_template','mceButtonSelected');ds.currentAction="update";ds.currentTmplNode=node;return true}ds.currentAction="insert";ds.currentTmplNode=null;tinyMCE.switchClass(editor_id+'_template','mceButtonNormal');return false},cleanup:function(type,content,inst){var nodes=[];switch(type){case"get_from_editor":content=content.replace(new RegExp('<div class="'+TinyMCE_TemplatePlugin.TMPL+'">','gi'),'<!-- '+TinyMCE_TemplatePlugin.TMPL_BEGINS+' -->');content=content.replace(new RegExp('<div class="'+TinyMCE_TemplatePlugin.TMPL+'">(\s|&nbsp;|&#160;)?(<!-- '+TinyMCE_TemplatePlugin.TMPL_ENDS+' -->|\s)?</div>','gi'),'');content=content.replace(new RegExp('<!-- '+TinyMCE_TemplatePlugin.TMPL_ENDS+' --></div>','gi'),'<!-- '+TinyMCE_TemplatePlugin.TMPL_ENDS+' -->');break;case"insert_to_editor":content=content.replace(new RegExp('<!-- '+TinyMCE_TemplatePlugin.TMPL_BEGINS+' -->','gi'),'<div class="'+TinyMCE_TemplatePlugin.TMPL+'">');content=content.replace(new RegExp('<!-- '+TinyMCE_TemplatePlugin.TMPL_ENDS+' -->','gi'),'<!-- '+TinyMCE_TemplatePlugin.TMPL_ENDS+' --></div>');break;case"get_from_editor_dom":nodes=tinyMCE.selectNodes(content,function(n){return tinyMCE.hasCSSClass(n,TinyMCE_TemplatePlugin.TMPL_ELEMENT)});TinyMCE_TemplatePlugin._applyFunctions(nodes,type);break;case"insert_to_editor_dom":nodes=tinyMCE.selectNodes(content,function(n){return tinyMCE.hasCSSClass(n,TinyMCE_TemplatePlugin.TMPL_ELEMENT)});TinyMCE_TemplatePlugin._applyFunctions(nodes,type);break}return content},_convertToNode:function(html){var elm=document.createElement('div');elm.innerHTML=html;return elm},_prepareTemplateContent:function(elms){var x,n,nodes=[];if(!elms)return{};if(!elms.length)elms=[elms];for(x=0;x<elms.length;x++)tinyMCE.getNodeTree(elms[x],nodes,1);for(n=0;n<nodes.length;n++){tinyMCE.addCSSClass(nodes[n],TinyMCE_TemplatePlugin.TMPL_ELEMENT);TinyMCE_TemplatePlugin._applyFunctions(nodes[n],TinyMCE_TemplatePlugin.TMPL_TEMPLATE_EVENT)}return elms},_replaceValues:function(s){var t=this,ds=tinyMCE.selectedInstance.getData('template');return s.replace(/\{\$([^\}]+)\}/g,function(a,b){var it=ds.replace_items[b];if(it){if(typeof(it)!='function')return it}return b})},_applyFunctions:function(elms,editor_event){var x,elm,names,c,f;if(!elms)return{};if(!elms.length)elms=[elms];for(x=0;x<elms.length;x++){elm=elms[x];if(elm.className){names=elm.className.split(/\s+/);for(c=0;c<names.length;c++){if(names[c]==TinyMCE_TemplatePlugin.TMPL_ELEMENT)continue;f=(TinyMCE_TemplatePlugin.functions[names[c]]?TinyMCE_TemplatePlugin.functions[names[c]]:TinyMCE_TemplatePlugin.functions['blank']);f(elm,editor_event)}}}return elms},_collectTemplateElements:function(node){var nodeArray=[],p;p=tinyMCE.getParentElement(node,'DIV',function(n){return tinyMCE.hasCSSClass(n,TinyMCE_TemplatePlugin.TMPL)});if(p)tinyMCE.getNodeTree(p,nodeArray);return nodeArray},_replaceTemplateContent:function(currentNode,editor_id,newTemplate,title,tsrc){TinyMCE_TemplatePlugin._deleteTemplateContent(currentNode);TinyMCE_TemplatePlugin._insertTemplate(editor_id,newTemplate,title,tsrc,false)},_deleteTemplateContent:function(node){var p=tinyMCE.getParentElement(node,'DIV',function(n){return tinyMCE.hasCSSClass(n,TinyMCE_TemplatePlugin.TMPL)});if(p)p.parentNode.removeChild(p,true)},_insertTemplate:function(editor_id,elm,title,tsrc,incComments){var html;TinyMCE_TemplatePlugin._prepareTemplateContent(elm);html='<div class="'+TinyMCE_TemplatePlugin.TMPL+'">';html+=elm.innerHTML;html+='<!-- '+TinyMCE_TemplatePlugin.TMPL_ENDS+' --></div>';tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,html)},functions:{blank:function(elm,editor_event){},cdate:function(elm,editor_event){var d,dsrc;if(editor_event!=TinyMCE_TemplatePlugin.TMPL_TEMPLATE_EVENT)return;d=new Date();dsrc=elm.innerHTML.match(new RegExp("<!-- "+TinyMCE_TemplatePlugin.TMPL_DATE_SRC_ATTR+":(.*) -->","gi"));if(dsrc)d=new Date(RegExp.$1);elm.innerHTML=TinyMCE_TemplatePlugin._getDateTime(d,tinyMCE.getParam("template_cdate_format",tinyMCE.getLang("lang_template_def_date_format")));elm.innerHTML+="<!-- "+TinyMCE_TemplatePlugin.TMPL_DATE_SRC_ATTR+":"+d.toUTCString()+" -->"},mdate:function(elm,editor_event){var d=new Date();elm.innerHTML=TinyMCE_TemplatePlugin._getDateTime(d,tinyMCE.getParam("template_mdate_format",tinyMCE.getLang("lang_template_def_date_format")))},selectedContent:function(elm,editor_event){var ds=tinyMCE.selectedInstance.getData('template');if(editor_event!=TinyMCE_TemplatePlugin.TMPL_TEMPLATE_EVENT)return;if(ds.currentAction=="insert-new"&&!tinyMCE.hasCSSClass(elm,TinyMCE_TemplatePlugin.TMPL_SEL_HTML_DONE)){elm.innerHTML=tinyMCE.selectedInstance.selection.getSelectedHTML();tinyMCE.addCSSClass(elm,TinyMCE_TemplatePlugin.TMPL_SEL_HTML_DONE)}},generateReplacer:function(s){return function(elm,editor_event){elm.innerHTML=""+s}}},_getDateTime:function(d,fmt){if(!fmt)return"";function addZeros(value,len){var i;value=""+value;if(value.length<len){for(i=0;i<(len-value.length);i++)value="0"+value}return value}fmt=fmt.replace("%D","%m/%d/%y");fmt=fmt.replace("%r","%I:%M:%S %p");fmt=fmt.replace("%Y",""+d.getFullYear());fmt=fmt.replace("%y",""+d.getYear());fmt=fmt.replace("%m",addZeros(d.getMonth()+1,2));fmt=fmt.replace("%d",addZeros(d.getDate(),2));fmt=fmt.replace("%H",""+addZeros(d.getHours(),2));fmt=fmt.replace("%M",""+addZeros(d.getMinutes(),2));fmt=fmt.replace("%S",""+addZeros(d.getSeconds(),2));fmt=fmt.replace("%I",""+((d.getHours()+11)%12+1));fmt=fmt.replace("%p",""+(d.getHours()<12?"AM":"PM"));fmt=fmt.replace("%B",""+tinyMCE.getLang("lang_template_months_long")[d.getMonth()]);fmt=fmt.replace("%b",""+tinyMCE.getLang("lang_template_months_short")[d.getMonth()]);fmt=fmt.replace("%A",""+tinyMCE.getLang("lang_template_day_long")[d.getDay()]);fmt=fmt.replace("%a",""+tinyMCE.getLang("lang_template_day_short")[d.getDay()]);fmt=fmt.replace("%%","%");return fmt},TMPL_ELEMENT:'mceTmplElm',TMPL:'mceTmpl',TMPL_BEGINS:'mceTmplBegins',TMPL_SEL_HTML_DONE:'mceSelHTMLDone',TMPL_ENDS:'mceTmplEnds',TMPL_DATE_SRC_ATTR:'mcetmpldtesrc',TMPL_TEMPLATE_EVENT:'prepare_template'};tinyMCE.addPlugin("template",TinyMCE_TemplatePlugin);
js/tiny_mce/plugins/template/editor_plugin_src.js ADDED
@@ -0,0 +1,551 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ tinyMCE.importPluginLanguagePack('template');
9
+
10
+ var TinyMCE_TemplatePlugin = {
11
+ getInfo : function() {
12
+ return {
13
+ longname : 'Template plugin',
14
+ author : 'Moxiecode Systems AB',
15
+ authorurl : 'http://www.moxiecode.com',
16
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template',
17
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
18
+ };
19
+ },
20
+
21
+ initInstance : function(inst) {
22
+ var cdate, mdate, content, x = 0, key, value, rvals, ds = inst.getData('template');
23
+
24
+ // ensure the required elements and sttributes are added
25
+ //inst.cleanup.addRuleStr('*[' + TinyMCE_TemplatePlugin.TMPL_DATE_SRC_ATTR + '],div[title,tsrc]');
26
+
27
+ //setup template content functions
28
+ // creation date and modified date classes
29
+ cdate = tinyMCE.getParam("template_cdate_classes", '').split(/\s+/);
30
+ mdate = tinyMCE.getParam("template_mdate_classes", '').split(/\s+/);
31
+
32
+ // classes that specify where selected content should go
33
+ content = tinyMCE.getParam("template_selected_content_classes", '').split(/\s+/);
34
+
35
+ for (x = 0; x < cdate.length; x++)
36
+ TinyMCE_TemplatePlugin.functions[cdate[x]] = TinyMCE_TemplatePlugin.functions['cdate'];
37
+
38
+ for (x = 0; x < mdate.length; x++)
39
+ TinyMCE_TemplatePlugin.functions[mdate[x]] = TinyMCE_TemplatePlugin.functions['mdate'];
40
+
41
+ for (x = 0; x < content.length; x++)
42
+ TinyMCE_TemplatePlugin.functions[content[x]] = TinyMCE_TemplatePlugin.functions['selectedContent'];
43
+
44
+ // special template functions for replacing template content
45
+ rvals = tinyMCE.getParam("template_replace_values", false);
46
+ for (key in rvals) {
47
+ value = rvals[key];
48
+
49
+ if (typeof value == "function")
50
+ TinyMCE_TemplatePlugin.functions[key] = value;
51
+ else
52
+ TinyMCE_TemplatePlugin.functions[key] = TinyMCE_TemplatePlugin.functions['generateReplacer'](value);
53
+ }
54
+
55
+ // Setup replace_items
56
+ rvals = tinyMCE.getParam("template_replace_values", false);
57
+ ds.replace_items = {};
58
+
59
+ for (key in rvals)
60
+ ds.replace_items[key] = rvals[key];
61
+
62
+ inst.addShortcut('ctrl', 't', 'lang_template_desc', 'mceTemplate');
63
+
64
+ // Setup data storage
65
+ ds.currentAction = "insert";
66
+ ds.currentTmplNode = null;
67
+ },
68
+
69
+ getControlHTML : function(cn) {
70
+ switch (cn) {
71
+ case "template":
72
+ return tinyMCE.getButtonHTML(cn, 'lang_template_desc', '{$pluginurl}/images/template.gif', 'mceTemplate', true);
73
+ }
74
+
75
+ return "";
76
+ },
77
+
78
+ execCommand : function(editor_id, element, command, user_interface, value) {
79
+ var nodeArray, current, newTmpl, x, inst = tinyMCE.getInstanceById(editor_id), ds = inst.getData('template'), telm;
80
+
81
+ switch (command) {
82
+ case "mceTemplate":
83
+ if (user_interface) {
84
+ // called from toolbar button - show the popup
85
+ tinyMCE.openWindow({
86
+ file : '../../plugins/template/template.htm', // Relative to theme
87
+ width : tinyMCE.getParam('template_popup_width', 750),
88
+ height : tinyMCE.getParam('template_popup_height', 600)
89
+ }, {editor_id : editor_id, resizable : "yes", scrollbars : "no", pluginObj : TinyMCE_TemplatePlugin});
90
+ } else {
91
+ // internal command do the template stuff
92
+
93
+ // get the returned HTML string from the pop-up and appened it to a DIV element
94
+ telm = TinyMCE_TemplatePlugin._convertToNode(value.body);
95
+
96
+ // Find template body
97
+ nodeArray = tinyMCE.selectElements(telm, 'div', function(n) {
98
+ return tinyMCE.hasCSSClass(n, TinyMCE_TemplatePlugin.TMPL);
99
+ });
100
+
101
+ telm = nodeArray.length > 0 ? nodeArray[0] : null;
102
+ nodeArray = [];
103
+
104
+ if (ds.currentAction == "insert") {
105
+ //insert new template after applying all the template content functions
106
+
107
+ // Is it a template or snippet
108
+ if (telm) {
109
+ tinyMCE.execCommand('mceBeginUndoLevel');
110
+ ds.currentAction = "insert-new";
111
+ TinyMCE_TemplatePlugin._insertTemplate(editor_id, telm, value.title, value.tsrc, true);
112
+ ds.currentAction == "insert";
113
+ tinyMCE.execCommand('mceEndUndoLevel');
114
+ tinyMCE.execInstanceCommand(editor_id, 'mceCleanup', false);
115
+ } else
116
+ tinyMCE.execCommand('mceInsertContent', false, this._replaceValues(value.body));
117
+ } else {
118
+ // First collect the selected template in the editor
119
+ nodeArray = TinyMCE_TemplatePlugin._collectTemplateElements(ds.currentTmplNode);
120
+ current = [];
121
+ newTmpl = [];
122
+ tinyMCE.getNodeTree(telm, newTmpl);
123
+
124
+ for (x=0; x<nodeArray.length; x++)
125
+ tinyMCE.getNodeTree(nodeArray[x], current);
126
+
127
+ /**
128
+ * inner function used in the loop below.
129
+ * compares the supplied HTML element to the new template to:
130
+ * - find a match with the new template and copy the element's content over
131
+ * - find no match and indicate content will be lost
132
+ */
133
+ var _test = function(elm) {
134
+ var replaced = true;
135
+
136
+ if (elm.className) {
137
+ var names = elm.className.split(/\s+/), c, n;
138
+
139
+ for (c = 0; c<names.length; c++) {
140
+ if (names[c].match(/^mce/i))
141
+ continue; // ignore all internal class names
142
+
143
+ for (n=0; n<newTmpl.length; n++){
144
+ replaced = false;
145
+
146
+ if (newTmpl[n].className && newTmpl[n].className.match(new RegExp(names[c], "gi"))) {
147
+ newTmpl[n].innerHTML = elm.innerHTML;
148
+ //if(tinyMCE.getAttrib(elm,TinyMCE_TemplatePlugin.TMPL_DATE_SRC_ATTR,"") != "") {
149
+ // tinyMCE.setAttrib(newTmpl[n], TinyMCE_TemplatePlugin.TMPL_DATE_SRC_ATTR, tinyMCE.getAttrib(elm,TinyMCE_TemplatePlugin.TMPL_DATE_SRC_ATTR));
150
+ //}
151
+ replaced = true;
152
+ break;
153
+ }
154
+
155
+ }
156
+ }
157
+ }
158
+
159
+ return replaced;
160
+ };
161
+
162
+ // comparison loop - first mis-match alerts user for confirmation.
163
+ var cont = true;
164
+ var asked = false;
165
+
166
+ for (x = 0; x < current.length; x++) {
167
+ if(!_test(current[x])) {
168
+ cont = (asked || confirm("The new template has less elements than the currently selected content.\nIf you proceed you will loose content.\nAre you sure you want to proceed?", "Proceed?"));
169
+ asked = true;
170
+
171
+ if (!cont)
172
+ break;
173
+ }
174
+ };
175
+
176
+ // apply replacement if allowed to
177
+ if (cont) {
178
+ tinyMCE.execCommand('mceBeginUndoLevel');
179
+ TinyMCE_TemplatePlugin._replaceTemplateContent(current[0], editor_id, telm, value.title, value.tsrc);
180
+ tinyMCE.execCommand('mceEndUndoLevel');
181
+ tinyMCE.execInstanceCommand(editor_id, 'mceCleanup', false);
182
+ }
183
+ }
184
+
185
+ tinyMCE.triggerNodeChange(true);
186
+ }
187
+
188
+ return true;
189
+ }
190
+
191
+ return false;
192
+ },
193
+
194
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
195
+ var inst = tinyMCE.getInstanceById(editor_id), ds = inst.getData('template');
196
+
197
+ if (tinyMCE.hasCSSClass(node, TinyMCE_TemplatePlugin.TMPL_ELEMENT) || tinyMCE.hasCSSClass(node.parentNode, TinyMCE_TemplatePlugin.TMPL_ELEMENT)) {
198
+ tinyMCE.switchClass(editor_id + '_template', 'mceButtonSelected');
199
+ ds.currentAction = "update";
200
+ ds.currentTmplNode = node;
201
+
202
+ return true;
203
+ }
204
+
205
+ ds.currentAction = "insert";
206
+ ds.currentTmplNode = null;
207
+ tinyMCE.switchClass(editor_id + '_template', 'mceButtonNormal');
208
+
209
+ return false;
210
+ },
211
+
212
+ cleanup : function(type, content, inst) {
213
+ var nodes = [];
214
+
215
+ switch (type) {
216
+ case "get_from_editor":
217
+ // replace the opening wrapper div tag with a HTML comment
218
+ content = content.replace(
219
+ new RegExp('<div class="' + TinyMCE_TemplatePlugin.TMPL + '">', 'gi'),
220
+ '<!-- ' + TinyMCE_TemplatePlugin.TMPL_BEGINS + ' -->'
221
+ );
222
+
223
+ // delete any empty template wrappers
224
+ content = content.replace(
225
+ new RegExp('<div class="' + TinyMCE_TemplatePlugin.TMPL + '">(\s|&nbsp;|&#160;)?(<!-- ' + TinyMCE_TemplatePlugin.TMPL_ENDS + ' -->|\s)?</div>', 'gi'),
226
+ ''
227
+ );
228
+
229
+ // replace the closing wrapper tag
230
+ content = content.replace(
231
+ new RegExp('<!-- ' + TinyMCE_TemplatePlugin.TMPL_ENDS + ' --></div>', 'gi'),
232
+ '<!-- ' + TinyMCE_TemplatePlugin.TMPL_ENDS + ' -->'
233
+ );
234
+
235
+ break;
236
+
237
+ case "insert_to_editor":
238
+ // replace HTML comment with DIV wrapper
239
+ content = content.replace(
240
+ new RegExp('<!-- ' + TinyMCE_TemplatePlugin.TMPL_BEGINS + ' -->', 'gi'),
241
+ '<div class="' + TinyMCE_TemplatePlugin.TMPL + '">'
242
+ );
243
+
244
+ content = content.replace(
245
+ new RegExp('<!-- ' + TinyMCE_TemplatePlugin.TMPL_ENDS + ' -->', 'gi'),
246
+ '<!-- ' + TinyMCE_TemplatePlugin.TMPL_ENDS + ' --></div>'
247
+ );
248
+
249
+ break;
250
+
251
+ case "get_from_editor_dom":
252
+ // apply template content replacement functions
253
+ nodes = tinyMCE.selectNodes(content, function(n) {
254
+ return tinyMCE.hasCSSClass(n, TinyMCE_TemplatePlugin.TMPL_ELEMENT);
255
+ }
256
+ );
257
+
258
+ TinyMCE_TemplatePlugin._applyFunctions(nodes, type);
259
+
260
+ break;
261
+
262
+ case "insert_to_editor_dom":
263
+ // apply template content replacement functions
264
+ nodes = tinyMCE.selectNodes(content, function(n) {
265
+ return tinyMCE.hasCSSClass(n, TinyMCE_TemplatePlugin.TMPL_ELEMENT);
266
+ }
267
+ );
268
+
269
+ TinyMCE_TemplatePlugin._applyFunctions(nodes, type);
270
+
271
+ break;
272
+ }
273
+
274
+ return content;
275
+ },
276
+
277
+ // Private plugin internal methods
278
+
279
+ /**
280
+ * Creates a HTML DIV element and sets the innerHTML to equal the temlate innerHTML so that the template can be manipulated as DOM nodes.
281
+ *
282
+ * @param {string} Template innerHTML
283
+ * @return a HTML Element
284
+ * @type HTMLElement
285
+ */
286
+ _convertToNode : function(html) {
287
+ var elm = document.createElement('div');
288
+
289
+ elm.innerHTML = html;
290
+
291
+ return elm;
292
+ },
293
+
294
+ /**
295
+ * pass an array of template html elements and they will have the template class name added and any template functions applied
296
+ *
297
+ * @param {array} template HTML elements
298
+ * @return array of template HTML elements
299
+ * @type array
300
+ */
301
+ _prepareTemplateContent : function(elms) {
302
+ var x, n, nodes = [];
303
+
304
+ if (!elms)
305
+ return {};
306
+
307
+ if (!elms.length)
308
+ elms = [elms];
309
+
310
+ for (x = 0; x<elms.length; x++)
311
+ tinyMCE.getNodeTree(elms[x], nodes, 1);
312
+
313
+ for (n = 0; n<nodes.length; n++) {
314
+ tinyMCE.addCSSClass(nodes[n], TinyMCE_TemplatePlugin.TMPL_ELEMENT);
315
+ TinyMCE_TemplatePlugin._applyFunctions(nodes[n], TinyMCE_TemplatePlugin.TMPL_TEMPLATE_EVENT);
316
+ }
317
+
318
+ return elms;
319
+ },
320
+
321
+ _replaceValues : function(s) {
322
+ var t = this, ds = tinyMCE.selectedInstance.getData('template');
323
+
324
+ return s.replace(/\{\$([^\}]+)\}/g, function(a, b) {
325
+ var it = ds.replace_items[b];
326
+
327
+ if (it) {
328
+ // Only supports text for now
329
+ if (typeof(it) != 'function')
330
+ return it;
331
+ }
332
+
333
+ return b;
334
+ });
335
+ },
336
+
337
+ /**
338
+ * Applies any special functions to the template elements
339
+ *
340
+ * @param {array} template HTML elements
341
+ * @return array of template HTML elements
342
+ * @type array
343
+ */
344
+ _applyFunctions : function(elms, editor_event) {
345
+ var x, elm, names, c, f;
346
+
347
+ if (!elms)
348
+ return {};
349
+
350
+ if (!elms.length)
351
+ elms = [elms];
352
+
353
+ for(x = 0; x < elms.length; x++) {
354
+ elm = elms[x];
355
+
356
+ if (elm.className){
357
+ names = elm.className.split(/\s+/);
358
+
359
+ for (c = 0; c < names.length; c++){
360
+ if (names[c] == TinyMCE_TemplatePlugin.TMPL_ELEMENT)
361
+ continue;
362
+
363
+ f = (TinyMCE_TemplatePlugin.functions[names[c]] ? TinyMCE_TemplatePlugin.functions[names[c]] : TinyMCE_TemplatePlugin.functions['blank']);
364
+ f(elm, editor_event);
365
+ }
366
+ }
367
+ }
368
+
369
+ return elms;
370
+ },
371
+
372
+ /**
373
+ * Given one node reference this function will collect all the nodes of the template to which it belongs.
374
+ * It does this by finding the parent template wrapper DIV and returning all child nodes.
375
+ *
376
+ * @param {HTMLElement} a HTMLElement which is part of a template
377
+ * @return array of template HTML elements
378
+ * @type array
379
+ */
380
+ _collectTemplateElements : function(node) {
381
+ var nodeArray = [], p;
382
+
383
+ p = tinyMCE.getParentElement(node, 'DIV', function(n) {
384
+ return tinyMCE.hasCSSClass(n, TinyMCE_TemplatePlugin.TMPL);
385
+ });
386
+
387
+ if (p)
388
+ tinyMCE.getNodeTree(p, nodeArray);
389
+
390
+ return nodeArray;
391
+ },
392
+
393
+ /**
394
+ * Simply calls TinyMCE_TemplatePlugin._deleteTemplateContent and then TinyMCE_TemplatePlugin._insertTemplate
395
+ *
396
+ * @param {HTMLElement} currently selected template node in editor
397
+ * @param {string} id of editor instance
398
+ * @param {HTMLElement} template contents as a HTMLElement (the parent DIV wrapper)
399
+ * @param {string} title of template (unused as yet)
400
+ * @param {string} source URI of the template file (unused as yet)
401
+ * @return array of template HTML elements
402
+ * @type array
403
+ */
404
+ _replaceTemplateContent : function(currentNode, editor_id, newTemplate, title, tsrc) {
405
+ TinyMCE_TemplatePlugin._deleteTemplateContent(currentNode);
406
+ TinyMCE_TemplatePlugin._insertTemplate(editor_id, newTemplate, title, tsrc, false);
407
+ },
408
+
409
+ /**
410
+ * Deletes a template from the editor content
411
+ * Finds the parent DIV wrapper and deletes it and all children
412
+ * @param {HTMLElement} currently selected template node in editor
413
+ */
414
+ _deleteTemplateContent : function(node) {
415
+ var p = tinyMCE.getParentElement(node, 'DIV', function(n) {
416
+ return tinyMCE.hasCSSClass(n, TinyMCE_TemplatePlugin.TMPL);
417
+ });
418
+
419
+ if (p)
420
+ p.parentNode.removeChild(p, true);
421
+ },
422
+
423
+ /**
424
+ * Inserts a template into the specified editor
425
+ *
426
+ * @param {string} id of editor instance
427
+ * @param {HTMLElement} template contents as a HTMLElement (the parent DIV wrapper)
428
+ * @param {string} title of template (unused as yet)
429
+ * @param {string} source URI of the template file (unused as yet)
430
+ */
431
+ _insertTemplate : function(editor_id, elm, title, tsrc, incComments) {
432
+ var html;
433
+
434
+ TinyMCE_TemplatePlugin._prepareTemplateContent(elm);
435
+
436
+ html = '<div class="' + TinyMCE_TemplatePlugin.TMPL + '">';
437
+ html += elm.innerHTML;
438
+ html += '<!-- ' + TinyMCE_TemplatePlugin.TMPL_ENDS + ' --></div>';
439
+
440
+ tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, html);
441
+ },
442
+
443
+ /**
444
+ * template functions - functions for modifying template content
445
+ */
446
+ functions : {
447
+ blank : function(elm, editor_event) {},
448
+
449
+ cdate : function(elm, editor_event) {
450
+ var d, dsrc;
451
+
452
+ if (editor_event != TinyMCE_TemplatePlugin.TMPL_TEMPLATE_EVENT)
453
+ return;
454
+
455
+ d = new Date();
456
+ // find out if the creation date was previously stored
457
+ dsrc = elm.innerHTML.match(new RegExp("<!-- " + TinyMCE_TemplatePlugin.TMPL_DATE_SRC_ATTR + ":(.*) -->", "gi"));
458
+
459
+ if (dsrc)
460
+ d = new Date(RegExp.$1);
461
+
462
+ elm.innerHTML = TinyMCE_TemplatePlugin._getDateTime(d, tinyMCE.getParam("template_cdate_format", tinyMCE.getLang("lang_template_def_date_format")));
463
+ //now we have to store the date value in a format easily read again, in case a future template change changes the date format...
464
+ elm.innerHTML += "<!-- " + TinyMCE_TemplatePlugin.TMPL_DATE_SRC_ATTR + ":" + d.toUTCString() + " -->";
465
+ },
466
+
467
+ mdate : function(elm, editor_event) {
468
+ var d = new Date();
469
+ elm.innerHTML = TinyMCE_TemplatePlugin._getDateTime(d, tinyMCE.getParam("template_mdate_format", tinyMCE.getLang("lang_template_def_date_format")));
470
+ },
471
+
472
+ /**
473
+ * This will insert the currently selected editor content into the template element.
474
+ * It only does this if the template inserted is a new one and if the element does not have the special class.
475
+ * The special class name prevents this from happening more than once.
476
+ */
477
+ selectedContent : function(elm, editor_event) {
478
+ var ds = tinyMCE.selectedInstance.getData('template');
479
+
480
+ if (editor_event != TinyMCE_TemplatePlugin.TMPL_TEMPLATE_EVENT)
481
+ return;
482
+
483
+ if (ds.currentAction == "insert-new" && !tinyMCE.hasCSSClass(elm, TinyMCE_TemplatePlugin.TMPL_SEL_HTML_DONE)) {
484
+ elm.innerHTML = tinyMCE.selectedInstance.selection.getSelectedHTML();
485
+ tinyMCE.addCSSClass(elm, TinyMCE_TemplatePlugin.TMPL_SEL_HTML_DONE);
486
+ }
487
+ },
488
+
489
+ /**
490
+ * When the plugin is initialised this generates the functions that insert configured strings into template elements.
491
+ */
492
+ generateReplacer : function(s) {
493
+ return function(elm, editor_event) {elm.innerHTML = "" + s;};
494
+ }
495
+ },
496
+
497
+ /**
498
+ * formats a date according to the format string - straight from the 'insert date/time' plugin
499
+ *
500
+ * @param {Date} date object
501
+ * @param {string} format string
502
+ * @return formatted date
503
+ * @type string
504
+ */
505
+ _getDateTime : function(d,fmt) {
506
+ if (!fmt)
507
+ return "";
508
+
509
+ function addZeros(value, len) {
510
+ var i;
511
+
512
+ value = "" + value;
513
+
514
+ if (value.length < len) {
515
+ for (i=0; i<(len-value.length); i++)
516
+ value = "0" + value;
517
+ }
518
+
519
+ return value;
520
+ }
521
+
522
+ fmt = fmt.replace("%D", "%m/%d/%y");
523
+ fmt = fmt.replace("%r", "%I:%M:%S %p");
524
+ fmt = fmt.replace("%Y", "" + d.getFullYear());
525
+ fmt = fmt.replace("%y", "" + d.getYear());
526
+ fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
527
+ fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
528
+ fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
529
+ fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
530
+ fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
531
+ fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
532
+ fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
533
+ fmt = fmt.replace("%B", "" + tinyMCE.getLang("lang_template_months_long")[d.getMonth()]);
534
+ fmt = fmt.replace("%b", "" + tinyMCE.getLang("lang_template_months_short")[d.getMonth()]);
535
+ fmt = fmt.replace("%A", "" + tinyMCE.getLang("lang_template_day_long")[d.getDay()]);
536
+ fmt = fmt.replace("%a", "" + tinyMCE.getLang("lang_template_day_short")[d.getDay()]);
537
+ fmt = fmt.replace("%%", "%");
538
+
539
+ return fmt;
540
+ },
541
+
542
+ TMPL_ELEMENT : 'mceTmplElm',
543
+ TMPL : 'mceTmpl',
544
+ TMPL_BEGINS : 'mceTmplBegins',
545
+ TMPL_SEL_HTML_DONE : 'mceSelHTMLDone',
546
+ TMPL_ENDS : 'mceTmplEnds',
547
+ TMPL_DATE_SRC_ATTR : 'mcetmpldtesrc',
548
+ TMPL_TEMPLATE_EVENT : 'prepare_template'
549
+ };
550
+
551
+ tinyMCE.addPlugin("template", TinyMCE_TemplatePlugin);
js/tiny_mce/plugins/template/images/template.gif ADDED
Binary file
js/tiny_mce/plugins/template/jscripts/template.js ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Import external list url javascript
2
+ var url = tinyMCE.getParam("template_external_list_url");
3
+ if (url != null) {
4
+ // Fix relative
5
+ if (url.charAt(0) != '/' && url.indexOf('://') == -1)
6
+ url = tinyMCE.documentBasePath + "/" + url;
7
+
8
+ document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
9
+ }
10
+
11
+ var TPU = { //Template Popup Utils
12
+ currentTemplateHTML : null,
13
+ templates : [],
14
+ inst : tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id')),
15
+ plugin : tinyMCE.getWindowArg('pluginObj'),
16
+ data : tinyMCE.selectedInstance.getData('template'),
17
+
18
+ init : function() {
19
+ document.forms[0].insert.value = tinyMCE.getLang('lang_' + this.data.currentAction, 'Insert', true);
20
+ TPU.loadTemplatePaths();
21
+
22
+ if (this.data.currentAction == "update")
23
+ document.getElementById('warning').innerHTML = tinyMCE.getLang('lang_template_warning');
24
+
25
+ this.resizeInputs();
26
+ },
27
+
28
+ loadTemplatePaths : function() {
29
+ var tsrc, sel, x, u;
30
+
31
+ tsrc = tinyMCE.getParam("template_templates", false);
32
+ sel = document.getElementById('tpath');
33
+
34
+ // Setup external template list
35
+ if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') {
36
+ for (x=0, tsrc = []; x<tinyMCETemplateList.length; x++)
37
+ tsrc.push({title : tinyMCETemplateList[x][0], src : tinyMCETemplateList[x][1], description : tinyMCETemplateList[x][2]});
38
+ }
39
+
40
+ for (x=0; x<tsrc.length; x++) {
41
+ u = tsrc[x].src;
42
+
43
+ // Force absolute
44
+ if (u.indexOf('://') == -1 && u.indexOf('/') != 0)
45
+ u = tinyMCE.documentBasePath + "/" + u;
46
+
47
+ tsrc[x].src = u;
48
+ }
49
+
50
+ TPU.templates = tsrc;
51
+
52
+ for (x = 0; x < tsrc.length; x++)
53
+ sel.options[sel.options.length] = new Option(tsrc[x].title, tsrc[x].src);
54
+ },
55
+
56
+ selectTemplate : function(o) {
57
+ var x, d = window.frames['templatesrc'].document;
58
+
59
+ this.currentTemplateHTML = this.plugin._replaceValues(this.getFileContents(o.value));
60
+
61
+ // Force complete document
62
+ /* if (!/<body/gi.test(this.currentTemplateHTML)) {
63
+ this.currentTemplateHTML = '<html xmlns="http://www.w3.org/1999/xhtml">' +
64
+ '<head>' +
65
+ '<title>blank_page</title>' +
66
+ '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' +
67
+ '</head>' +
68
+ '<body>' +
69
+ this.currentTemplateHTML +
70
+ '</body>' +
71
+ '</html>';
72
+ }*/
73
+
74
+ // Write HTML to preview iframe
75
+ d.body.innerHTML = this.currentTemplateHTML;
76
+
77
+ // Display description
78
+ for (x = 0; x < TPU.templates.length; x++) {
79
+ if (TPU.templates[x].src == o.value) {
80
+ document.getElementById('tmpldesc').innerHTML = TPU.templates[x].description;
81
+ break;
82
+ }
83
+ }
84
+ },
85
+
86
+ insertTemplate : function() {
87
+ var sel, opt;
88
+
89
+ sel = document.getElementById('tpath');
90
+ opt = sel.options[sel.selectedIndex];
91
+
92
+ // Is it a template or snippet
93
+ if (TPU.currentTemplateHTML.indexOf('mceTmpl'))
94
+ tinyMCEPopup.execCommand('mceTemplate', false, {title : opt.text, tsrc : opt.value, body : TPU.currentTemplateHTML});
95
+ else
96
+ tinyMCEPopup.execCommand('mceInsertContent', false, TPU.currentTemplateHTML);
97
+
98
+ tinyMCEPopup.close();
99
+ },
100
+
101
+ getFileContents : function(u) {
102
+ var x, d, t = 'text/plain';
103
+
104
+ function g(s) {
105
+ x = 0;
106
+
107
+ try {
108
+ x = new ActiveXObject(s);
109
+ } catch (s) {
110
+ }
111
+
112
+ return x;
113
+ };
114
+
115
+ x = window.ActiveXObject ? g('Msxml2.XMLHTTP') || g('Microsoft.XMLHTTP') : new XMLHttpRequest();
116
+
117
+ // Synchronous AJAX load file
118
+ x.overrideMimeType && x.overrideMimeType(t);
119
+ x.open("GET", u, false);
120
+ x.send(null);
121
+
122
+ return x.responseText;
123
+ },
124
+
125
+ resizeInputs : function() {
126
+ var wHeight, wWidth, elm;
127
+
128
+ if (!self.innerWidth) {
129
+ wHeight = document.body.clientHeight - 160;
130
+ wWidth = document.body.clientWidth - 40;
131
+ } else {
132
+ wHeight = self.innerHeight - 160;
133
+ wWidth = self.innerWidth - 40;
134
+ }
135
+
136
+ elm = document.getElementById('templatesrc');
137
+
138
+ if (elm) {
139
+ elm.style.height = Math.abs(wHeight) + 'px';
140
+ elm.style.width = Math.abs(wWidth - 5) + 'px';
141
+ }
142
+ }
143
+ };
js/tiny_mce/plugins/template/langs/en.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('template',{
4
+ title : 'Templates',
5
+ label : 'Template',
6
+ desc_label : 'Description',
7
+ desc : 'Insert predefined template content',
8
+ select : 'Select a template',
9
+ preview : 'Preview',
10
+ warning : 'Warning: Updating a template with a different one may cause data loss.',
11
+ def_date_format : '%Y-%m-%d %H:%M:%S',
12
+ months_long : new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"),
13
+ months_short : new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),
14
+ day_long : new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"),
15
+ day_short : new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
16
+ });
js/tiny_mce/plugins/template/template.htm ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_template_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="jscripts/template.js"></script>
6
+ <link href="css/template.css" rel="stylesheet" type="text/css" />
7
+ <base target="_self" />
8
+ </head>
9
+ <body onload="tinyMCEPopup.executeOnLoad('TPU.init();');" onresize="TPU.resizeInputs();">
10
+ <form onsubmit="insert();return false;">
11
+ <div id="frmbody">
12
+ <div class="title">{$lang_template_desc}</div>
13
+ <div class="frmRow"><label for="tpath" title="{$lang_template_select}">{$lang_template_label}:</label>
14
+ <select id="tpath" name="tpath" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="TPU.selectTemplate(this.options[this.selectedIndex]);">
15
+ <option value="">{$lang_template_select}...</option>
16
+ </select>
17
+ <span id="warning"></span></div>
18
+ <div class="frmRow"><label for="tdesc">{$lang_template_desc_label}:</label>
19
+ <span id="tmpldesc"></span></div>
20
+ <fieldset>
21
+ <legend>{$lang_template_preview}</legend>
22
+ <iframe id="templatesrc" name="templatesrc" src="blank.htm" width="690" height="400" frameborder="0"></iframe>
23
+ </fieldset>
24
+ </div>
25
+
26
+ <div class="mceActionPanel">
27
+ <div style="float: left">
28
+ <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="TPU.insertTemplate();" />
29
+ </div>
30
+
31
+ <div style="float: right">
32
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
33
+ </div>
34
+ </div>
35
+ </form>
36
+ </body>
37
+ </html>
js/tiny_mce/plugins/visualchars/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('visualchars');var TinyMCE_VisualCharsPlugin={getInfo:function(){return{longname:'Visual characters',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){inst.visualChars={state:false}},getControlHTML:function(cn){switch(cn){case"visualchars":return tinyMCE.getButtonHTML(cn,'lang_visualchars_desc','{$pluginurl}/images/visualchars.gif','mceVisualChars',false)}return""},execCommand:function(editor_id,element,command,user_interface,value){var inst=tinyMCE.getInstanceById(editor_id);switch(command){case"mceVisualChars":this._toggleVisualChars(editor_id,inst);return true}return false},cleanup:function(type,content,inst){if(type=="insert_to_editor_dom"||type=="get_from_editor_dom"){inst.visualChars.state=true;this._toggleVisualChars(inst.editorId,inst)}return content},_toggleVisualChars:function(editor_id,inst){var nl,i,h,d=inst.getDoc(),b=inst.getBody(),nv,s=inst.selection,bo;inst.visualChars.state=!inst.visualChars.state;bo=s.getBookmark(true);tinyMCE.switchClass(editor_id+'_visualchars',inst.visualChars.state?'mceButtonSelected':'mceButtonNormal');if(inst.visualChars.state){nl=tinyMCE.selectNodes(b,function(n){return n.nodeType==3&&n.nodeValue&&n.nodeValue.indexOf('\u00a0')!=-1});for(i=0;i<nl.length;i++){nv=nl[i].nodeValue;nv=nv.replace(/(\u00a0+)/g,'<span class="mceItemHiddenVisualChar">$1</span>');nv=nv.replace(/\u00a0/g,'\u00b7');tinyMCE.setOuterHTML(nl[i],nv,d)}}else{nl=tinyMCE.selectNodes(b,function(n){return n.nodeType==1&&n.nodeName=='SPAN'&&n.className=='mceItemHiddenVisualChar'});for(i=0;i<nl.length;i++)tinyMCE.setOuterHTML(nl[i],nl[i].innerHTML.replace(/(&middot;|\u00b7)/g,'&nbsp;'),d)}}};tinyMCE.addPlugin("visualchars",TinyMCE_VisualCharsPlugin);
js/tiny_mce/plugins/visualchars/editor_plugin_src.js ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('visualchars');
10
+
11
+ var TinyMCE_VisualCharsPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'Visual characters',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ inst.visualChars = {
24
+ state : false
25
+ };
26
+ },
27
+
28
+ getControlHTML : function(cn) {
29
+ switch (cn) {
30
+ case "visualchars":
31
+ return tinyMCE.getButtonHTML(cn, 'lang_visualchars_desc', '{$pluginurl}/images/visualchars.gif', 'mceVisualChars', false);
32
+ }
33
+
34
+ return "";
35
+ },
36
+
37
+ execCommand : function(editor_id, element, command, user_interface, value) {
38
+ var inst = tinyMCE.getInstanceById(editor_id);
39
+
40
+ switch (command) {
41
+ case "mceVisualChars":
42
+ this._toggleVisualChars(editor_id, inst);
43
+ return true;
44
+ }
45
+
46
+ return false;
47
+ },
48
+
49
+ cleanup : function(type, content, inst) {
50
+ if (type == "insert_to_editor_dom" || type == "get_from_editor_dom") {
51
+ inst.visualChars.state = true;
52
+ this._toggleVisualChars(inst.editorId, inst);
53
+ }
54
+
55
+ return content;
56
+ },
57
+
58
+ // Private plugin internal methods
59
+
60
+ _toggleVisualChars : function(editor_id, inst) {
61
+ var nl, i, h, d = inst.getDoc(), b = inst.getBody(), nv, s = inst.selection, bo;
62
+
63
+ inst.visualChars.state = !inst.visualChars.state;
64
+
65
+ bo = s.getBookmark(true);
66
+
67
+ tinyMCE.switchClass(editor_id + '_visualchars', inst.visualChars.state ? 'mceButtonSelected' : 'mceButtonNormal');
68
+
69
+ if (inst.visualChars.state) {
70
+ nl = tinyMCE.selectNodes(b, function(n) {return n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1;});
71
+
72
+ for (i=0; i<nl.length; i++) {
73
+ nv = nl[i].nodeValue;
74
+ nv = nv.replace(/(\u00a0+)/g, '<span class="mceItemHiddenVisualChar">$1</span>');
75
+ nv = nv.replace(/\u00a0/g, '\u00b7');
76
+ tinyMCE.setOuterHTML(nl[i], nv, d);
77
+ }
78
+ } else {
79
+ nl = tinyMCE.selectNodes(b, function(n) {return n.nodeType == 1 && n.nodeName == 'SPAN' && n.className == 'mceItemHiddenVisualChar';});
80
+
81
+ for (i=0; i<nl.length; i++)
82
+ tinyMCE.setOuterHTML(nl[i], nl[i].innerHTML.replace(/(&middot;|\u00b7)/g, '&nbsp;'), d);
83
+ }
84
+
85
+ //s.moveToBookmark(bo);
86
+ }
87
+ };
88
+
89
+ tinyMCE.addPlugin("visualchars", TinyMCE_VisualCharsPlugin);
js/tiny_mce/plugins/visualchars/images/visualchars.gif ADDED
Binary file
js/tiny_mce/plugins/visualchars/langs/en.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ // EN lang variables
2
+
3
+ tinyMCE.addToLang('visualchars',{
4
+ desc : 'Visual control characters on/off.'
5
+ });
js/tiny_mce/plugins/xhtmlxtras/abbr.htm ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_xhtmlxtras_title_abbr_element}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/element_common.js"></script>
9
+ <script language="javascript" type="text/javascript" src="jscripts/abbr.js"></script>
10
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
11
+ <base target="_self" />
12
+ </head>
13
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
14
+ <form onsubmit="insertAbbr();return false;" action="#">
15
+ <div class="tabs">
16
+ <ul>
17
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_xhtmlxtras_general_tab}</a></span></li>
18
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{$lang_xhtmlxtras_events_tab}</a></span></li> -->
19
+ </ul>
20
+ </div>
21
+
22
+ <div class="panel_wrapper">
23
+ <div id="general_panel" class="panel current">
24
+ <fieldset>
25
+ <legend>{$lang_xhtmlxtras_fieldset_attrib_tab}</legend>
26
+ <table border="0" cellpadding="0" cellspacing="4">
27
+ <tr>
28
+ <td class="label"><label id="titlelabel" for="title">{$lang_xhtmlxtras_attribute_label_title}</label>:</td>
29
+ <td><input id="title" name="title" type="text" value="" class="field" /></td>
30
+ </tr>
31
+ <tr>
32
+ <td class="label"><label id="idlabel" for="id">{$lang_xhtmlxtras_attribute_label_id}</label>:</td>
33
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
34
+ </tr>
35
+ <tr>
36
+ <td class="label"><label id="classlabel" for="class">{$lang_xhtmlxtras_attribute_label_class}</label>:</td>
37
+ <td>
38
+ <select id="class" name="class" class="field mceEditableSelect">
39
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
40
+ </select>
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <td class="label"><label id="stylelabel" for="class">{$lang_xhtmlxtras_attribute_label_style}</label>:</td>
45
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
46
+ </tr>
47
+ <tr>
48
+ <td class="label"><label id="dirlabel" for="dir">{$lang_xhtmlxtras_attribute_label_langdir}</label>:</td>
49
+ <td>
50
+ <select id="dir" name="dir" class="field">
51
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
52
+ <option value="ltr">{$lang_xhtmlxtras_attribute_option_ltr}</option>
53
+ <option value="rtl">{$lang_xhtmlxtras_attribute_option_rtl}</option>
54
+ </select>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <td class="label"><label id="langlabel" for="lang">{$lang_xhtmlxtras_attribute_label_langcode}</label>:</td>
59
+ <td>
60
+ <input id="lang" name="lang" type="text" value="" class="field" />
61
+ </td>
62
+ </tr>
63
+ </table>
64
+ </fieldset>
65
+ </div>
66
+ <div id="events_panel" class="panel">
67
+ <fieldset>
68
+ <legend>{$lang_xhtmlxtras_fieldset_events_tab}</legend>
69
+
70
+ <table border="0" cellpadding="0" cellspacing="4">
71
+ <tr>
72
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
73
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
74
+ </tr>
75
+
76
+ <tr>
77
+ <td class="label"><label for="onblur">onblur</label>:</td>
78
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
79
+ </tr>
80
+
81
+ <tr>
82
+ <td class="label"><label for="onclick">onclick</label>:</td>
83
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
84
+ </tr>
85
+
86
+ <tr>
87
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
88
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
89
+ </tr>
90
+
91
+ <tr>
92
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
93
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
94
+ </tr>
95
+
96
+ <tr>
97
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
98
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
99
+ </tr>
100
+
101
+ <tr>
102
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
103
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
104
+ </tr>
105
+
106
+ <tr>
107
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
108
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
109
+ </tr>
110
+
111
+ <tr>
112
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
113
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
114
+ </tr>
115
+
116
+ <tr>
117
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
118
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
119
+ </tr>
120
+
121
+ <tr>
122
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
123
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
124
+ </tr>
125
+
126
+ <tr>
127
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
128
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
129
+ </tr>
130
+ </table>
131
+ </fieldset>
132
+ </div>
133
+ </div>
134
+ <div class="mceActionPanel">
135
+ <div style="float: left">
136
+ <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertAbbr();" />
137
+ </div>
138
+ <div style="float: left">
139
+ <input type="button" id="remove" name="remove" value="{$lang_xhtmlxtras_remove}" onclick="removeAbbr();" style="display: none;" />
140
+ </div>
141
+ <div style="float: right">
142
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
143
+ </div>
144
+ </div>
145
+
146
+ </form>
147
+ </body>
148
+ </html>
js/tiny_mce/plugins/xhtmlxtras/acronym.htm ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_xhtmlxtras_title_acronym_element}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/element_common.js"></script>
9
+ <script language="javascript" type="text/javascript" src="jscripts/acronym.js"></script>
10
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
11
+ <base target="_self" />
12
+ </head>
13
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
14
+ <form onsubmit="insertAcronym();return false;" action="#">
15
+ <div class="tabs">
16
+ <ul>
17
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_xhtmlxtras_general_tab}</a></span></li>
18
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{$lang_xhtmlxtras_events_tab}</a></span></li> -->
19
+ </ul>
20
+ </div>
21
+
22
+ <div class="panel_wrapper">
23
+ <div id="general_panel" class="panel current">
24
+ <fieldset>
25
+ <legend>{$lang_xhtmlxtras_fieldset_attrib_tab}</legend>
26
+ <table border="0" cellpadding="0" cellspacing="4">
27
+ <tr>
28
+ <td class="label"><label id="titlelabel" for="title">{$lang_xhtmlxtras_attribute_label_title}</label>:</td>
29
+ <td><input id="title" name="title" type="text" value="" class="field" /></td>
30
+ </tr>
31
+ <tr>
32
+ <td class="label"><label id="idlabel" for="id">{$lang_xhtmlxtras_attribute_label_id}</label>:</td>
33
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
34
+ </tr>
35
+ <tr>
36
+ <td class="label"><label id="classlabel" for="class">{$lang_xhtmlxtras_attribute_label_class}</label>:</td>
37
+ <td>
38
+ <select id="class" name="class" class="field mceEditableSelect">
39
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
40
+ </select>
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <td class="label"><label id="stylelabel" for="class">{$lang_xhtmlxtras_attribute_label_style}</label>:</td>
45
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
46
+ </tr>
47
+ <tr>
48
+ <td class="label"><label id="dirlabel" for="dir">{$lang_xhtmlxtras_attribute_label_langdir}</label>:</td>
49
+ <td>
50
+ <select id="dir" name="dir" class="field">
51
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
52
+ <option value="ltr">{$lang_xhtmlxtras_attribute_option_ltr}</option>
53
+ <option value="rtl">{$lang_xhtmlxtras_attribute_option_rtl}</option>
54
+ </select>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <td class="label"><label id="langlabel" for="lang">{$lang_xhtmlxtras_attribute_label_langcode}</label>:</td>
59
+ <td>
60
+ <input id="lang" name="lang" type="text" value="" class="field" />
61
+ </td>
62
+ </tr>
63
+ </table>
64
+ </fieldset>
65
+ </div>
66
+ <div id="events_panel" class="panel">
67
+ <fieldset>
68
+ <legend>{$lang_xhtmlxtras_fieldset_events_tab}</legend>
69
+
70
+ <table border="0" cellpadding="0" cellspacing="4">
71
+ <tr>
72
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
73
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
74
+ </tr>
75
+
76
+ <tr>
77
+ <td class="label"><label for="onblur">onblur</label>:</td>
78
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
79
+ </tr>
80
+
81
+ <tr>
82
+ <td class="label"><label for="onclick">onclick</label>:</td>
83
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
84
+ </tr>
85
+
86
+ <tr>
87
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
88
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
89
+ </tr>
90
+
91
+ <tr>
92
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
93
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
94
+ </tr>
95
+
96
+ <tr>
97
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
98
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
99
+ </tr>
100
+
101
+ <tr>
102
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
103
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
104
+ </tr>
105
+
106
+ <tr>
107
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
108
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
109
+ </tr>
110
+
111
+ <tr>
112
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
113
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
114
+ </tr>
115
+
116
+ <tr>
117
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
118
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
119
+ </tr>
120
+
121
+ <tr>
122
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
123
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
124
+ </tr>
125
+
126
+ <tr>
127
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
128
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
129
+ </tr>
130
+ </table>
131
+ </fieldset>
132
+ </div>
133
+ </div>
134
+ <div class="mceActionPanel">
135
+ <div style="float: left">
136
+ <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertAcronym();" />
137
+ </div>
138
+ <div style="float: left">
139
+ <input type="button" id="remove" name="remove" value="{$lang_xhtmlxtras_remove}" onclick="removeAcronym();" style="display: none;" />
140
+ </div>
141
+ <div style="float: right">
142
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
143
+ </div>
144
+ </div>
145
+
146
+ </form>
147
+ </body>
148
+ </html>
js/tiny_mce/plugins/xhtmlxtras/attributes.htm ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_xhtmlxtras_attribs_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/attributes.js"></script>
9
+ <link rel="stylesheet" type="text/css" href="css/attributes.css" />
10
+ <base target="_self" />
11
+ </head>
12
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
13
+ <form onsubmit="insertAction();return false;" action="#">
14
+ <div class="tabs">
15
+ <ul>
16
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_xhtmlxtras_attribute_attrib_tab}</a></span></li>
17
+ <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{$lang_xhtmlxtras_attribute_events_tab}</a></span></li>
18
+ </ul>
19
+ </div>
20
+
21
+ <div class="panel_wrapper">
22
+ <div id="general_panel" class="panel current">
23
+ <fieldset>
24
+ <legend>{$lang_xhtmlxtras_attribute_attrib_tab}</legend>
25
+ <table border="0" cellpadding="0" cellspacing="4">
26
+ <tr>
27
+ <td class="label"><label id="titlelabel" for="title">{$lang_xhtmlxtras_attribute_label_title}</label>:</td>
28
+ <td><input id="title" name="title" type="text" value="" /></td>
29
+ </tr>
30
+ <tr>
31
+ <td class="label"><label id="idlabel" for="id">{$lang_xhtmlxtras_attribute_label_id}</label>:</td>
32
+ <td><input id="id" name="id" type="text" value="" /></td>
33
+ </tr>
34
+ <tr>
35
+ <td><label id="classlabel" for="classlist">{$lang_class_name}</label></td>
36
+ <td>
37
+ <select id="classlist" name="classlist" class="mceEditableSelect">
38
+ <option value="" selected>{$lang_not_set}</option>
39
+ </select>
40
+ </td>
41
+ </tr>
42
+ <tr>
43
+ <td class="label"><label id="stylelabel" for="class">{$lang_xhtmlxtras_attribute_label_style}</label>:</td>
44
+ <td><input id="style" name="style" type="text" value="" /></td>
45
+ </tr>
46
+ <tr>
47
+ <td class="label"><label id="dirlabel" for="dir">{$lang_xhtmlxtras_attribute_label_langdir}</label>:</td>
48
+ <td>
49
+ <select id="dir" name="dir">
50
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
51
+ <option value="ltr">{$lang_xhtmlxtras_option_ltr}</option>
52
+ <option value="rtl">{$lang_xhtmlxtras_option_rtl}</option>
53
+ </select>
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <td class="label"><label id="langlabel" for="lang">{$lang_xhtmlxtras_attribute_label_langcode}</label>:</td>
58
+ <td>
59
+ <input id="lang" name="lang" type="text" value="" />
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <td><label id="tabindexlabel" for="tabindex">{$lang_xhtmlxtras_attribute_label_tabindex}</label></td>
64
+ <td><input type="text" id="tabindex" name="tabindex" value="" /></td>
65
+ </tr>
66
+
67
+ <tr>
68
+ <td><label id="accesskeylabel" for="accesskey">{$lang_xhtmlxtras_attribute_label_accesskey}</label></td>
69
+ <td><input type="text" id="accesskey" name="accesskey" value="" /></td>
70
+ </tr>
71
+ </table>
72
+ </fieldset>
73
+ </div>
74
+ <div id="events_panel" class="panel">
75
+ <fieldset>
76
+ <legend>{$lang_xhtmlxtras_attribute_events_tab}</legend>
77
+
78
+ <table border="0" cellpadding="0" cellspacing="4">
79
+ <tr>
80
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
81
+ <td><input id="onfocus" name="onfocus" type="text" value="" /></td>
82
+ </tr>
83
+
84
+ <tr>
85
+ <td class="label"><label for="onblur">onblur</label>:</td>
86
+ <td><input id="onblur" name="onblur" type="text" value="" /></td>
87
+ </tr>
88
+
89
+ <tr>
90
+ <td class="label"><label for="onclick">onclick</label>:</td>
91
+ <td><input id="onclick" name="onclick" type="text" value="" /></td>
92
+ </tr>
93
+
94
+ <tr>
95
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
96
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
97
+ </tr>
98
+
99
+ <tr>
100
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
101
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
102
+ </tr>
103
+
104
+ <tr>
105
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
106
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
107
+ </tr>
108
+
109
+ <tr>
110
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
111
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
112
+ </tr>
113
+
114
+ <tr>
115
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
116
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
117
+ </tr>
118
+
119
+ <tr>
120
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
121
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
122
+ </tr>
123
+
124
+ <tr>
125
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
126
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
127
+ </tr>
128
+
129
+ <tr>
130
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
131
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
132
+ </tr>
133
+
134
+ <tr>
135
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
136
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
137
+ </tr>
138
+ </table>
139
+ </fieldset>
140
+ </div>
141
+ </div>
142
+ <div class="mceActionPanel">
143
+ <div style="float: left">
144
+ <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertAction();" />
145
+ </div>
146
+ <div style="float: right">
147
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
148
+ </div>
149
+ </div>
150
+
151
+ </form>
152
+ </body>
153
+ </html>
js/tiny_mce/plugins/xhtmlxtras/cite.htm ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_xhtmlxtras_title_cite_element}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/element_common.js"></script>
9
+ <script language="javascript" type="text/javascript" src="jscripts/cite.js"></script>
10
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
11
+ <base target="_self" />
12
+ </head>
13
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
14
+ <form onsubmit="insertCite();return false;" action="#">
15
+ <div class="tabs">
16
+ <ul>
17
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_xhtmlxtras_general_tab}</a></span></li>
18
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{$lang_xhtmlxtras_events_tab}</a></span></li> -->
19
+ </ul>
20
+ </div>
21
+
22
+ <div class="panel_wrapper">
23
+ <div id="general_panel" class="panel current">
24
+ <fieldset>
25
+ <legend>{$lang_xhtmlxtras_fieldset_attrib_tab}</legend>
26
+ <table border="0" cellpadding="0" cellspacing="4">
27
+ <tr>
28
+ <td class="label"><label id="titlelabel" for="title">{$lang_xhtmlxtras_attribute_label_title}</label>:</td>
29
+ <td><input id="title" name="title" type="text" value="" class="field" /></td>
30
+ </tr>
31
+ <tr>
32
+ <td class="label"><label id="idlabel" for="id">{$lang_xhtmlxtras_attribute_label_id}</label>:</td>
33
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
34
+ </tr>
35
+ <tr>
36
+ <td class="label"><label id="classlabel" for="class">{$lang_xhtmlxtras_attribute_label_class}</label>:</td>
37
+ <td>
38
+ <select id="class" name="class" class="field mceEditableSelect">
39
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
40
+ </select>
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <td class="label"><label id="stylelabel" for="class">{$lang_xhtmlxtras_attribute_label_style}</label>:</td>
45
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
46
+ </tr>
47
+ <tr>
48
+ <td class="label"><label id="dirlabel" for="dir">{$lang_xhtmlxtras_attribute_label_langdir}</label>:</td>
49
+ <td>
50
+ <select id="dir" name="dir" class="field">
51
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
52
+ <option value="ltr">{$lang_xhtmlxtras_attribute_option_ltr}</option>
53
+ <option value="rtl">{$lang_xhtmlxtras_attribute_option_rtl}</option>
54
+ </select>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <td class="label"><label id="langlabel" for="lang">{$lang_xhtmlxtras_attribute_label_langcode}</label>:</td>
59
+ <td>
60
+ <input id="lang" name="lang" type="text" value="" class="field" />
61
+ </td>
62
+ </tr>
63
+ </table>
64
+ </fieldset>
65
+ </div>
66
+ <div id="events_panel" class="panel">
67
+ <fieldset>
68
+ <legend>{$lang_xhtmlxtras_fieldset_events_tab}</legend>
69
+
70
+ <table border="0" cellpadding="0" cellspacing="4">
71
+ <tr>
72
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
73
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
74
+ </tr>
75
+
76
+ <tr>
77
+ <td class="label"><label for="onblur">onblur</label>:</td>
78
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
79
+ </tr>
80
+
81
+ <tr>
82
+ <td class="label"><label for="onclick">onclick</label>:</td>
83
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
84
+ </tr>
85
+
86
+ <tr>
87
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
88
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
89
+ </tr>
90
+
91
+ <tr>
92
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
93
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
94
+ </tr>
95
+
96
+ <tr>
97
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
98
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
99
+ </tr>
100
+
101
+ <tr>
102
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
103
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
104
+ </tr>
105
+
106
+ <tr>
107
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
108
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
109
+ </tr>
110
+
111
+ <tr>
112
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
113
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
114
+ </tr>
115
+
116
+ <tr>
117
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
118
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
119
+ </tr>
120
+
121
+ <tr>
122
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
123
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
124
+ </tr>
125
+
126
+ <tr>
127
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
128
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
129
+ </tr>
130
+ </table>
131
+ </fieldset>
132
+ </div>
133
+ </div>
134
+ <div class="mceActionPanel">
135
+ <div style="float: left">
136
+ <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertCite();" />
137
+ </div>
138
+ <div style="float: left">
139
+ <input type="button" id="remove" name="remove" value="{$lang_xhtmlxtras_remove}" onclick="removeCite();" style="display: none;" />
140
+ </div>
141
+ <div style="float: right">
142
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
143
+ </div>
144
+ </div>
145
+
146
+ </form>
147
+ </body>
148
+ </html>
js/tiny_mce/plugins/xhtmlxtras/css/attributes.css ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ .panel_wrapper div.current {
2
+ height: 290px;
3
+ }
4
+
5
+ #id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey {
6
+ width: 200px;
7
+ }
8
+
9
+ #events_panel input {
10
+ width: 200px;
11
+ }
js/tiny_mce/plugins/xhtmlxtras/css/popup.css ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ a.mceButtonNormal img, a.mceButtonSelected img {border: 1px solid #F0F0EE !important;}
2
+ a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default; background-color: #B6BDD2;}
3
+
4
+ img {
5
+ border: 0;
6
+ }
7
+
8
+ input.field, select.field {
9
+ width: 200px;
10
+ }
11
+
12
+ input.picker {
13
+ width: 179px;
14
+ margin-left: 5px;
15
+ }
16
+
17
+ input.disabled {
18
+ border-color: #F2F2F2;
19
+ }
20
+
21
+ img.picker {
22
+ vertical-align: text-bottom;
23
+ cursor: pointer;
24
+ }
25
+
26
+ h1 {
27
+ padding: 0 0 5px 0;
28
+ }
29
+
30
+ #remove {
31
+ font-weight: bold;
32
+ width: 90px;
33
+ height: 21px;
34
+ border: 0px;
35
+ background-image: url('../images/remove_button_bg.gif');
36
+ cursor: pointer;
37
+ margin-left: 3px;
38
+ }
39
+
40
+ .panel_wrapper div.current {
41
+ height: 160px;
42
+ }
43
+
44
+ #xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {
45
+ height: 220px;
46
+ }
js/tiny_mce/plugins/xhtmlxtras/css/xhtmlxtras.css ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ins {
2
+ border-bottom: 1px solid green;
3
+ text-decoration: none;
4
+ color: green;
5
+ }
6
+
7
+ del {
8
+ color: Red;
9
+ text-decoration: line-through;
10
+ }
11
+
12
+ cite {
13
+ border-bottom: 1px dashed blue;
14
+ }
15
+
16
+ acronym {
17
+ border-bottom: 1px dotted #CCC;
18
+ cursor: help;
19
+ }
20
+
21
+ abbr, html\:abbr {
22
+ border-bottom: 1px dashed #CCC;
23
+ cursor: help;
24
+ }
js/tiny_mce/plugins/xhtmlxtras/del.htm ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_xhtmlxtras_title_del_element}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/element_common.js"></script>
9
+ <script language="javascript" type="text/javascript" src="jscripts/del.js"></script>
10
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
11
+ <base target="_self" />
12
+ </head>
13
+ <body id="xhtmlxtrasins" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
14
+ <form onsubmit="insertDel();return false;" action="#">
15
+ <div class="tabs">
16
+ <ul>
17
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_xhtmlxtras_general_tab}</a></span></li>
18
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{$lang_xhtmlxtras_events_tab}</a></span></li> -->
19
+ </ul>
20
+ </div>
21
+
22
+ <div class="panel_wrapper">
23
+ <div id="general_panel" class="panel current">
24
+ <fieldset>
25
+ <legend>{$lang_xhtmlxtras_fieldset_general_tab}</legend>
26
+ <table border="0" cellpadding="0" cellspacing="4">
27
+ <tr>
28
+ <td class="label"><label id="datetimelabel" for="datetime">{$lang_xhtmlxtras_attribute_label_datetime}</label>:</td>
29
+ <td>
30
+ <table border="0" cellspacing="0" cellpadding="0">
31
+ <tr>
32
+ <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field" /></td>
33
+ <td><a href="javascript:insertDateTime('datetime');" class="mceButtonNormal"><img src="images/date_time.gif" class="picker" alt="{$lang_xhtmlxtras_insert_date}" title="{$lang_xhtmlxtras_insert_date}" /></a></td>
34
+ </tr>
35
+ </table>
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <td class="label"><label id="citelabel" for="cite">{$lang_xhtmlxtras_attribute_label_cite}</label>:</td>
40
+ <td><input id="cite" name="cite" type="text" value="" class="field" /></td>
41
+ </tr>
42
+ </table>
43
+ </fieldset>
44
+ <fieldset>
45
+ <legend>{$lang_xhtmlxtras_fieldset_attrib_tab}</legend>
46
+ <table border="0" cellpadding="0" cellspacing="4">
47
+ <tr>
48
+ <td class="label"><label id="titlelabel" for="title">{$lang_xhtmlxtras_attribute_label_title}</label>:</td>
49
+ <td><input id="title" name="title" type="text" value="" class="field" /></td>
50
+ </tr>
51
+ <tr>
52
+ <td class="label"><label id="idlabel" for="id">{$lang_xhtmlxtras_attribute_label_id}</label>:</td>
53
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
54
+ </tr>
55
+ <tr>
56
+ <td class="label"><label id="classlabel" for="class">{$lang_xhtmlxtras_attribute_label_class}</label>:</td>
57
+ <td>
58
+ <select id="class" name="class" class="field mceEditableSelect">
59
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
60
+ </select>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td class="label"><label id="stylelabel" for="class">{$lang_xhtmlxtras_attribute_label_style}</label>:</td>
65
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
66
+ </tr>
67
+ <tr>
68
+ <td class="label"><label id="dirlabel" for="dir">{$lang_xhtmlxtras_attribute_label_langdir}</label>:</td>
69
+ <td>
70
+ <select id="dir" name="dir" class="field">
71
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
72
+ <option value="ltr">{$lang_xhtmlxtras_attribute_option_ltr}</option>
73
+ <option value="rtl">{$lang_xhtmlxtras_attribute_option_rtl}</option>
74
+ </select>
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <td class="label"><label id="langlabel" for="lang">{$lang_xhtmlxtras_attribute_label_langcode}</label>:</td>
79
+ <td>
80
+ <input id="lang" name="lang" type="text" value="" class="field" />
81
+ </td>
82
+ </tr>
83
+ </table>
84
+ </fieldset>
85
+ </div>
86
+ <div id="events_panel" class="panel">
87
+ <fieldset>
88
+ <legend>{$lang_xhtmlxtras_fieldset_events_tab}</legend>
89
+
90
+ <table border="0" cellpadding="0" cellspacing="4">
91
+ <tr>
92
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
93
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
94
+ </tr>
95
+
96
+ <tr>
97
+ <td class="label"><label for="onblur">onblur</label>:</td>
98
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
99
+ </tr>
100
+
101
+ <tr>
102
+ <td class="label"><label for="onclick">onclick</label>:</td>
103
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
104
+ </tr>
105
+
106
+ <tr>
107
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
108
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
109
+ </tr>
110
+
111
+ <tr>
112
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
113
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
114
+ </tr>
115
+
116
+ <tr>
117
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
118
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
119
+ </tr>
120
+
121
+ <tr>
122
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
123
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
124
+ </tr>
125
+
126
+ <tr>
127
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
128
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
129
+ </tr>
130
+
131
+ <tr>
132
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
133
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
134
+ </tr>
135
+
136
+ <tr>
137
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
138
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
139
+ </tr>
140
+
141
+ <tr>
142
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
143
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
144
+ </tr>
145
+
146
+ <tr>
147
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
148
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
149
+ </tr>
150
+ </table>
151
+ </fieldset>
152
+ </div>
153
+ </div>
154
+ <div class="mceActionPanel">
155
+ <div style="float: left">
156
+ <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertDel();" />
157
+ </div>
158
+ <div style="float: left">
159
+ <input type="button" id="remove" name="remove" value="{$lang_xhtmlxtras_remove}" onclick="removeDel();" style="display: none;" />
160
+ </div>
161
+ <div style="float: right">
162
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
163
+ </div>
164
+ </div>
165
+
166
+ </form>
167
+
168
+ </body>
169
+ </html>
js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importPluginLanguagePack('xhtmlxtras');var TinyMCE_XHTMLXtrasPlugin={getInfo:function(){return{longname:'XHTML Xtras Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/xhtmlxtras/css/xhtmlxtras.css")},getControlHTML:function(cn){switch(cn){case"cite":return tinyMCE.getButtonHTML(cn,'lang_xhtmlxtras_cite_desc','{$pluginurl}/images/cite.gif','mceCite',true);case"acronym":return tinyMCE.getButtonHTML(cn,'lang_xhtmlxtras_acronym_desc','{$pluginurl}/images/acronym.gif','mceAcronym',true);case"abbr":return tinyMCE.getButtonHTML(cn,'lang_xhtmlxtras_abbr_desc','{$pluginurl}/images/abbr.gif','mceAbbr',true);case"del":return tinyMCE.getButtonHTML(cn,'lang_xhtmlxtras_del_desc','{$pluginurl}/images/del.gif','mceDel',true);case"ins":return tinyMCE.getButtonHTML(cn,'lang_xhtmlxtras_ins_desc','{$pluginurl}/images/ins.gif','mceIns',true);case"attribs":return tinyMCE.getButtonHTML(cn,'lang_xhtmlxtras_attribs_desc','{$pluginurl}/images/attribs.gif','mceAttributes',true)}return""},execCommand:function(editor_id,element,command,user_interface,value){var template,inst,elm;switch(command){case"mceCite":if(!this._anySel(editor_id))return true;template=new Array();template['file']='../../plugins/xhtmlxtras/cite.htm';template['width']=350;template['height']=250;tinyMCE.openWindow(template,{editor_id:editor_id});return true;case"mceAcronym":if(!this._anySel(editor_id))return true;template=new Array();template['file']='../../plugins/xhtmlxtras/acronym.htm';template['width']=350;template['height']=250;tinyMCE.openWindow(template,{editor_id:editor_id});return true;case"mceAbbr":if(!this._anySel(editor_id))return true;template=new Array();template['file']='../../plugins/xhtmlxtras/abbr.htm';template['width']=350;template['height']=250;tinyMCE.openWindow(template,{editor_id:editor_id});return true;case"mceIns":if(!this._anySel(editor_id))return true;template=new Array();template['file']='../../plugins/xhtmlxtras/ins.htm';template['width']=350;template['height']=310;tinyMCE.openWindow(template,{editor_id:editor_id});return true;case"mceDel":if(!this._anySel(editor_id))return true;template=new Array();template['file']='../../plugins/xhtmlxtras/del.htm';template['width']=350;template['height']=310;tinyMCE.openWindow(template,{editor_id:editor_id});return true;case"mceAttributes":inst=tinyMCE.getInstanceById(editor_id);elm=inst.getFocusElement();if(elm&&elm.nodeName!=='BODY'&&elm.className.indexOf('mceItem')==-1){tinyMCE.openWindow({file:'../../plugins/xhtmlxtras/attributes.htm',width:380,height:370},{editor_id:editor_id})}return true}return false},cleanup:function(type,content,inst){if(type=='insert_to_editor'&&tinyMCE.isIE&&!tinyMCE.isOpera){content=content.replace(/<abbr([^>]+)>/gi,'<html:ABBR $1>');content=content.replace(/<\/abbr>/gi,'</html:ABBR>')}return content},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){var elm=tinyMCE.getParentElement(node);if(node==null)return;tinyMCE.switchClass(editor_id+'_attribs','mceButtonDisabled');if(!any_selection){tinyMCE.switchClass(editor_id+'_cite','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_acronym','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_abbr','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_del','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_ins','mceButtonDisabled')}else{tinyMCE.switchClass(editor_id+'_cite','mceButtonNormal');tinyMCE.switchClass(editor_id+'_acronym','mceButtonNormal');tinyMCE.switchClass(editor_id+'_abbr','mceButtonNormal');tinyMCE.switchClass(editor_id+'_del','mceButtonNormal');tinyMCE.switchClass(editor_id+'_ins','mceButtonNormal')}if(elm&&elm.nodeName!='BODY'&&elm.className.indexOf('mceItem')==-1)tinyMCE.switchClass(editor_id+'_attribs','mceButtonNormal');switch(node.nodeName){case"CITE":tinyMCE.switchClass(editor_id+'_cite','mceButtonSelected');return true;case"ACRONYM":tinyMCE.switchClass(editor_id+'_acronym','mceButtonSelected');return true;case"abbr":case"HTML:ABBR":case"ABBR":tinyMCE.switchClass(editor_id+'_abbr','mceButtonSelected');return true;case"DEL":tinyMCE.switchClass(editor_id+'_del','mceButtonSelected');return true;case"INS":tinyMCE.switchClass(editor_id+'_ins','mceButtonSelected');return true}return true},_anySel:function(editor_id){var inst=tinyMCE.getInstanceById(editor_id),t=inst.selection.getSelectedText(),pe;pe=tinyMCE.getParentElement(inst.getFocusElement(),'CITE,ACRONYM,ABBR,HTML:ABBR,DEL,INS');return pe||inst.getFocusElement().nodeName=="IMG"||(t&&t.length>0)}};tinyMCE.addPlugin("xhtmlxtras",TinyMCE_XHTMLXtrasPlugin);
js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode - based on work by Andrew Tetlaw
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ /* Import plugin specific language pack */
9
+ tinyMCE.importPluginLanguagePack('xhtmlxtras');
10
+
11
+ var TinyMCE_XHTMLXtrasPlugin = {
12
+ getInfo : function() {
13
+ return {
14
+ longname : 'XHTML Xtras Plugin',
15
+ author : 'Moxiecode Systems AB',
16
+ authorurl : 'http://tinymce.moxiecode.com',
17
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',
18
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
19
+ };
20
+ },
21
+
22
+ initInstance : function(inst) {
23
+ tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/xhtmlxtras/css/xhtmlxtras.css");
24
+ },
25
+
26
+ getControlHTML : function(cn) {
27
+ switch (cn) {
28
+ case "cite":
29
+ return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_cite_desc', '{$pluginurl}/images/cite.gif', 'mceCite', true);
30
+
31
+ case "acronym":
32
+ return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_acronym_desc', '{$pluginurl}/images/acronym.gif', 'mceAcronym', true);
33
+
34
+ case "abbr":
35
+ return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_abbr_desc', '{$pluginurl}/images/abbr.gif', 'mceAbbr', true);
36
+
37
+ case "del":
38
+ return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_del_desc', '{$pluginurl}/images/del.gif', 'mceDel', true);
39
+
40
+ case "ins":
41
+ return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_ins_desc', '{$pluginurl}/images/ins.gif', 'mceIns', true);
42
+
43
+ case "attribs":
44
+ return tinyMCE.getButtonHTML(cn, 'lang_xhtmlxtras_attribs_desc', '{$pluginurl}/images/attribs.gif', 'mceAttributes', true);
45
+ }
46
+
47
+ return "";
48
+ },
49
+
50
+ execCommand : function(editor_id, element, command, user_interface, value) {
51
+ var template, inst, elm;
52
+
53
+ switch (command) {
54
+ case "mceCite":
55
+ if (!this._anySel(editor_id))
56
+ return true;
57
+
58
+ template = new Array();
59
+ template['file'] = '../../plugins/xhtmlxtras/cite.htm';
60
+ template['width'] = 350;
61
+ template['height'] = 250;
62
+ tinyMCE.openWindow(template, {editor_id : editor_id});
63
+ return true;
64
+
65
+ case "mceAcronym":
66
+ if (!this._anySel(editor_id))
67
+ return true;
68
+
69
+ template = new Array();
70
+ template['file'] = '../../plugins/xhtmlxtras/acronym.htm';
71
+ template['width'] = 350;
72
+ template['height'] = 250;
73
+ tinyMCE.openWindow(template, {editor_id : editor_id});
74
+ return true;
75
+
76
+ case "mceAbbr":
77
+ if (!this._anySel(editor_id))
78
+ return true;
79
+
80
+ template = new Array();
81
+ template['file'] = '../../plugins/xhtmlxtras/abbr.htm';
82
+ template['width'] = 350;
83
+ template['height'] = 250;
84
+ tinyMCE.openWindow(template, {editor_id : editor_id});
85
+ return true;
86
+
87
+ case "mceIns":
88
+ if (!this._anySel(editor_id))
89
+ return true;
90
+
91
+ template = new Array();
92
+ template['file'] = '../../plugins/xhtmlxtras/ins.htm';
93
+ template['width'] = 350;
94
+ template['height'] = 310;
95
+ tinyMCE.openWindow(template, {editor_id : editor_id});
96
+ return true;
97
+
98
+ case "mceDel":
99
+ if (!this._anySel(editor_id))
100
+ return true;
101
+
102
+ template = new Array();
103
+ template['file'] = '../../plugins/xhtmlxtras/del.htm';
104
+ template['width'] = 350;
105
+ template['height'] = 310;
106
+ tinyMCE.openWindow(template, {editor_id : editor_id});
107
+ return true;
108
+
109
+ case "mceAttributes":
110
+ inst = tinyMCE.getInstanceById(editor_id);
111
+ elm = inst.getFocusElement();
112
+
113
+ if (elm && elm.nodeName !== 'BODY' && elm.className.indexOf('mceItem') == -1) {
114
+ tinyMCE.openWindow({
115
+ file : '../../plugins/xhtmlxtras/attributes.htm',
116
+ width : 380,
117
+ height : 370
118
+ }, {editor_id : editor_id});
119
+ }
120
+
121
+ return true;
122
+ }
123
+
124
+ return false;
125
+ },
126
+
127
+ cleanup : function(type, content, inst) {
128
+ if (type == 'insert_to_editor' && tinyMCE.isIE && !tinyMCE.isOpera) {
129
+ content = content.replace(/<abbr([^>]+)>/gi, '<html:ABBR $1>');
130
+ content = content.replace(/<\/abbr>/gi, '</html:ABBR>');
131
+ }
132
+
133
+ return content;
134
+ },
135
+
136
+ handleNodeChange : function(editor_id, node, undo_index,undo_levels, visual_aid, any_selection) {
137
+ var elm = tinyMCE.getParentElement(node);
138
+
139
+ if (node == null)
140
+ return;
141
+
142
+ tinyMCE.switchClass(editor_id + '_attribs', 'mceButtonDisabled');
143
+
144
+ if (!any_selection) {
145
+ // Disable the buttons
146
+ tinyMCE.switchClass(editor_id + '_cite', 'mceButtonDisabled');
147
+ tinyMCE.switchClass(editor_id + '_acronym', 'mceButtonDisabled');
148
+ tinyMCE.switchClass(editor_id + '_abbr', 'mceButtonDisabled');
149
+ tinyMCE.switchClass(editor_id + '_del', 'mceButtonDisabled');
150
+ tinyMCE.switchClass(editor_id + '_ins', 'mceButtonDisabled');
151
+ } else {
152
+ // A selection means the buttons should be active.
153
+ tinyMCE.switchClass(editor_id + '_cite', 'mceButtonNormal');
154
+ tinyMCE.switchClass(editor_id + '_acronym', 'mceButtonNormal');
155
+ tinyMCE.switchClass(editor_id + '_abbr', 'mceButtonNormal');
156
+ tinyMCE.switchClass(editor_id + '_del', 'mceButtonNormal');
157
+ tinyMCE.switchClass(editor_id + '_ins', 'mceButtonNormal');
158
+ }
159
+
160
+ if (elm && elm.nodeName != 'BODY' && elm.className.indexOf('mceItem') == -1)
161
+ tinyMCE.switchClass(editor_id + '_attribs', 'mceButtonNormal');
162
+
163
+ switch (node.nodeName) {
164
+ case "CITE":
165
+ tinyMCE.switchClass(editor_id + '_cite', 'mceButtonSelected');
166
+ return true;
167
+
168
+ case "ACRONYM":
169
+ tinyMCE.switchClass(editor_id + '_acronym', 'mceButtonSelected');
170
+ return true;
171
+
172
+ case "abbr": // IE
173
+ case "HTML:ABBR": // FF
174
+ case "ABBR":
175
+ tinyMCE.switchClass(editor_id + '_abbr', 'mceButtonSelected');
176
+ return true;
177
+
178
+ case "DEL":
179
+ tinyMCE.switchClass(editor_id + '_del', 'mceButtonSelected');
180
+ return true;
181
+
182
+ case "INS":
183
+ tinyMCE.switchClass(editor_id + '_ins', 'mceButtonSelected');
184
+ return true;
185
+ }
186
+
187
+ return true;
188
+ },
189
+
190
+ _anySel : function(editor_id) {
191
+ var inst = tinyMCE.getInstanceById(editor_id), t = inst.selection.getSelectedText(), pe;
192
+
193
+ pe = tinyMCE.getParentElement(inst.getFocusElement(), 'CITE,ACRONYM,ABBR,HTML:ABBR,DEL,INS');
194
+
195
+ return pe || inst.getFocusElement().nodeName == "IMG" || (t && t.length > 0);
196
+ }
197
+ };
198
+
199
+ tinyMCE.addPlugin("xhtmlxtras", TinyMCE_XHTMLXtrasPlugin);
js/tiny_mce/plugins/xhtmlxtras/images/abbr.gif ADDED
Binary file
js/tiny_mce/plugins/xhtmlxtras/images/acronym.gif ADDED
Binary file
js/tiny_mce/plugins/xhtmlxtras/images/attribs.gif ADDED
Binary file
js/tiny_mce/plugins/xhtmlxtras/images/cite.gif ADDED
Binary file
js/tiny_mce/plugins/xhtmlxtras/images/date_time.gif ADDED
Binary file
js/tiny_mce/plugins/xhtmlxtras/images/del.gif ADDED
Binary file
js/tiny_mce/plugins/xhtmlxtras/images/ins.gif ADDED
Binary file
js/tiny_mce/plugins/xhtmlxtras/images/remove_button_bg.gif ADDED
Binary file
js/tiny_mce/plugins/xhtmlxtras/ins.htm ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_xhtmlxtras_title_ins_element}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
7
+ <script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
8
+ <script language="javascript" type="text/javascript" src="jscripts/element_common.js"></script>
9
+ <script language="javascript" type="text/javascript" src="jscripts/ins.js"></script>
10
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
11
+ <base target="_self" />
12
+ </head>
13
+ <body id="xhtmlxtrasins" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
14
+ <form onsubmit="insertIns();return false;" action="#">
15
+ <div class="tabs">
16
+ <ul>
17
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_xhtmlxtras_general_tab}</a></span></li>
18
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{$lang_xhtmlxtras_events_tab}</a></span></li> -->
19
+ </ul>
20
+ </div>
21
+
22
+ <div class="panel_wrapper">
23
+ <div id="general_panel" class="panel current">
24
+ <fieldset>
25
+ <legend>{$lang_xhtmlxtras_fieldset_general_tab}</legend>
26
+ <table border="0" cellpadding="0" cellspacing="4">
27
+ <tr>
28
+ <td class="label"><label id="datetimelabel" for="datetime">{$lang_xhtmlxtras_attribute_label_datetime}</label>:</td>
29
+ <td>
30
+ <table border="0" cellspacing="0" cellpadding="0">
31
+ <tr>
32
+ <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field" /></td>
33
+ <td><a href="javascript:insertDateTime('datetime');" class="mceButtonNormal"><img src="images/date_time.gif" class="picker" alt="{$lang_xhtmlxtras_insert_date}" title="{$lang_xhtmlxtras_insert_date}" /></a></td>
34
+ </tr>
35
+ </table>
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <td class="label"><label id="citelabel" for="cite">{$lang_xhtmlxtras_attribute_label_cite}</label>:</td>
40
+ <td><input id="cite" name="cite" type="text" value="" class="field" /></td>
41
+ </tr>
42
+ </table>
43
+ </fieldset>
44
+ <fieldset>
45
+ <legend>{$lang_xhtmlxtras_fieldset_attrib_tab}</legend>
46
+ <table border="0" cellpadding="0" cellspacing="4">
47
+ <tr>
48
+ <td class="label"><label id="titlelabel" for="title">{$lang_xhtmlxtras_attribute_label_title}</label>:</td>
49
+ <td><input id="title" name="title" type="text" value="" class="field" /></td>
50
+ </tr>
51
+ <tr>
52
+ <td class="label"><label id="idlabel" for="id">{$lang_xhtmlxtras_attribute_label_id}</label>:</td>
53
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
54
+ </tr>
55
+ <tr>
56
+ <td class="label"><label id="classlabel" for="class">{$lang_xhtmlxtras_attribute_label_class}</label>:</td>
57
+ <td>
58
+ <select id="class" name="class" class="field mceEditableSelect">
59
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
60
+ </select>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td class="label"><label id="stylelabel" for="class">{$lang_xhtmlxtras_attribute_label_style}</label>:</td>
65
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
66
+ </tr>
67
+ <tr>
68
+ <td class="label"><label id="dirlabel" for="dir">{$lang_xhtmlxtras_attribute_label_langdir}</label>:</td>
69
+ <td>
70
+ <select id="dir" name="dir" class="field">
71
+ <option value="">{$lang_xhtmlxtras_not_set}</option>
72
+ <option value="ltr">{$lang_xhtmlxtras_attribute_option_ltr}</option>
73
+ <option value="rtl">{$lang_xhtmlxtras_attribute_option_rtl}</option>
74
+ </select>
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <td class="label"><label id="langlabel" for="lang">{$lang_xhtmlxtras_attribute_label_langcode}</label>:</td>
79
+ <td>
80
+ <input id="lang" name="lang" type="text" value="" class="field" />
81
+ </td>
82
+ </tr>
83
+ </table>
84
+ </fieldset>
85
+ </div>
86
+ <div id="events_panel" class="panel">
87
+ <fieldset>
88
+ <legend>{$lang_xhtmlxtras_fieldset_events_tab}</legend>
89
+
90
+ <table border="0" cellpadding="0" cellspacing="4">
91
+ <tr>
92
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
93
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
94
+ </tr>
95
+
96
+ <tr>
97
+ <td class="label"><label for="onblur">onblur</label>:</td>
98
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
99
+ </tr>
100
+
101
+ <tr>
102
+ <td class="label"><label for="onclick">onclick</label>:</td>
103
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
104
+ </tr>
105
+
106
+ <tr>
107
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
108
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
109
+ </tr>
110
+
111
+ <tr>
112
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
113
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
114
+ </tr>
115
+
116
+ <tr>
117
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
118
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
119
+ </tr>
120
+
121
+ <tr>
122
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
123
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
124
+ </tr>
125
+
126
+ <tr>
127
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
128
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
129
+ </tr>
130
+
131
+ <tr>
132
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
133
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
134
+ </tr>
135
+
136
+ <tr>
137
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
138
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
139
+ </tr>
140
+
141
+ <tr>
142
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
143
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
144
+ </tr>
145
+
146
+ <tr>
147
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
148
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
149
+ </tr>
150
+ </table>
151
+ </fieldset>
152
+ </div>
153
+ </div>
154
+ <div class="mceActionPanel">
155
+ <div style="float: left">
156
+ <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertIns();" />
157
+ </div>
158
+ <div style="float: left">
159
+ <input type="button" id="remove" name="remove" value="{$lang_xhtmlxtras_remove}" onclick="removeIns();" style="display: none;" />
160
+ </div>
161
+ <div style="float: right">
162
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
163
+ </div>
164
+ </div>
165
+
166
+ </form>
167
+
168
+ </body>
169
+ </html>
js/tiny_mce/plugins/xhtmlxtras/jscripts/abbr.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode - based on work by Andrew Tetlaw
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ function preinit() {
9
+ // Initialize
10
+ tinyMCE.setWindowArg('mce_windowresize', false);
11
+ }
12
+
13
+ function init() {
14
+ tinyMCEPopup.resizeToInnerSize();
15
+ SXE.initElementDialog('abbr');
16
+ if (SXE.currentAction == "update") {
17
+ SXE.showRemoveButton();
18
+ }
19
+ }
20
+
21
+ function insertAbbr() {
22
+ SXE.insertElement(tinyMCE.isIE && !tinyMCE.isOpera ? 'html:ABBR' : 'abbr');
23
+ tinyMCEPopup.close();
24
+ }
25
+
26
+ function removeAbbr() {
27
+ SXE.removeElement('abbr');
28
+ tinyMCEPopup.close();
29
+ }
js/tiny_mce/plugins/xhtmlxtras/jscripts/acronym.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode - based on work by Andrew Tetlaw
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ function preinit() {
9
+ // Initialize
10
+ tinyMCE.setWindowArg('mce_windowresize', false);
11
+ }
12
+
13
+ function init() {
14
+ tinyMCEPopup.resizeToInnerSize();
15
+ SXE.initElementDialog('acronym');
16
+ if (SXE.currentAction == "update") {
17
+ SXE.showRemoveButton();
18
+ }
19
+ }
20
+
21
+ function insertAcronym() {
22
+ SXE.insertElement('acronym');
23
+ tinyMCEPopup.close();
24
+ }
25
+
26
+ function removeAcronym() {
27
+ SXE.removeElement('acronym');
28
+ tinyMCEPopup.close();
29
+ }
js/tiny_mce/plugins/xhtmlxtras/jscripts/attributes.js ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode - based on work by Andrew Tetlaw
5
+ * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ function preinit() {
9
+ // Initialize
10
+ tinyMCE.setWindowArg('mce_windowresize', false);
11
+ }
12
+
13
+ function init() {
14
+ tinyMCEPopup.resizeToInnerSize();
15
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
16
+ var elm = inst.getFocusElement();
17
+
18
+ var f = document.forms[0];
19
+
20
+ var onclick = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onclick'));
21
+
22
+ setFormValue('title', tinyMCE.getAttrib(elm, 'title'));
23
+ setFormValue('id', tinyMCE.getAttrib(elm, 'id'));
24
+ setFormValue('style', tinyMCE.serializeStyle(tinyMCE.parseStyle(tinyMCE.getAttrib(elm, "style"))));
25
+ setFormValue('dir', tinyMCE.getAttrib(elm, 'dir'));
26
+ setFormValue('lang', tinyMCE.getAttrib(elm, 'lang'));
27
+ setFormValue('tabindex', tinyMCE.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
28
+ setFormValue('accesskey', tinyMCE.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
29
+ setFormValue('onfocus', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onfocus')));
30
+ setFormValue('onblur', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onblur')));
31
+ setFormValue('onclick', onclick);
32
+ setFormValue('ondblclick', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'ondblclick')));
33
+ setFormValue('onmousedown', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmousedown')));
34
+ setFormValue('onmouseup', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseup')));
35
+ setFormValue('onmouseover', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseover')));
36
+ setFormValue('onmousemove', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmousemove')));
37
+ setFormValue('onmouseout', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onmouseout')));
38
+ setFormValue('onkeypress', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onkeypress')));
39
+ setFormValue('onkeydown', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onkeydown')));
40
+ setFormValue('onkeyup', tinyMCE.cleanupEventStr(tinyMCE.getAttrib(elm, 'onkeyup')));
41
+
42
+ className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(elm, 'class'), false);
43
+
44
+ addClassesToList('classlist', 'advlink_styles');
45
+ selectByValue(f, 'classlist', className, true);
46
+
47
+ TinyMCE_EditableSelects.init();
48
+ }
49
+
50
+ function setFormValue(name, value) {
51
+ if(value && document.forms[0].elements[name]){
52
+ document.forms[0].elements[name].value = value;
53
+ }
54
+ }
55
+
56
+ function insertAction() {
57
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
58
+ var elm = inst.getFocusElement();
59
+
60
+ tinyMCEPopup.execCommand("mceBeginUndoLevel");
61
+ tinyMCEPopup.restoreSelection();
62
+
63
+ setAllAttribs(elm);
64
+
65
+ tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
66
+ tinyMCE._setEventsEnabled(inst.getBody(), false);
67
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
68
+ tinyMCEPopup.close();
69
+ }
70
+
71
+ function setAttrib(elm, attrib, value) {
72
+ var formObj = document.forms[0];
73
+ var valueElm = formObj.elements[attrib.toLowerCase()];
74
+
75
+ if (typeof(value) == "undefined" || value == null) {
76
+ value = "";
77
+
78
+ if (valueElm)
79
+ value = valueElm.value;
80
+ }
81
+
82
+ if (value != "") {
83
+ tinyMCE.setAttrib(elm, attrib.toLowerCase(), value);
84
+
85
+ if (attrib == "style")
86
+ attrib = "style.cssText";
87
+
88
+ if (attrib.substring(0, 2) == 'on')
89
+ value = 'return true;' + value;
90
+
91
+ if (attrib == "class")
92
+ attrib = "className";
93
+
94
+ eval('elm.' + attrib + "=value;");
95
+ } else
96
+ elm.removeAttribute(attrib);
97
+ }
98
+
99
+ function setAllAttribs(elm) {
100
+ var f = document.forms[0];
101
+
102
+ setAttrib(elm, 'title');
103
+ setAttrib(elm, 'id');
104
+ setAttrib(elm, 'style');
105
+ setAttrib(elm, 'class', getSelectValue(f, 'classlist'));
106
+ setAttrib(elm, 'dir');
107
+ setAttrib(elm, 'lang');
108
+ setAttrib(elm, 'tabindex');
109
+ setAttrib(elm, 'accesskey');
110
+ setAttrib(elm, 'onfocus');
111
+ setAttrib(elm, 'onblur');
112
+ setAttrib(elm, 'onclick');
113
+ setAttrib(elm, 'ondblclick');
114
+ setAttrib(elm, 'onmousedown');
115
+ setAttrib(elm, 'onmouseup');
116
+ setAttrib(elm, 'onmouseover');
117
+ setAttrib(elm, 'onmousemove');
118
+ setAttrib(elm, 'onmouseout');
119
+ setAttrib(elm, 'onkeypress');
120
+ setAttrib(elm, 'onkeydown');
121
+ setAttrib(elm, 'onkeyup');
122
+
123
+ // Refresh in old MSIE
124
+ if (tinyMCE.isMSIE5)
125
+ elm.outerHTML = elm.outerHTML;
126
+ }
127
+
128
+ function insertAttribute() {
129
+ tinyMCEPopup.close();
130
+ }
js/tiny_mce/plugins/xhtmlxtras/jscripts/cite.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode - based on work by Andrew Tetlaw
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ function preinit() {
9
+ // Initialize
10
+ tinyMCE.setWindowArg('mce_windowresize', false);
11
+ }
12
+
13
+ function init() {
14
+ tinyMCEPopup.resizeToInnerSize();
15
+ SXE.initElementDialog('cite');
16
+ if (SXE.currentAction == "update") {
17
+ SXE.showRemoveButton();
18
+ }
19
+ }
20
+
21
+ function insertCite() {
22
+ SXE.insertElement('cite');
23
+ tinyMCEPopup.close();
24
+ }
25
+
26
+ function removeCite() {
27
+ SXE.removeElement('cite');
28
+ tinyMCEPopup.close();
29
+ }
js/tiny_mce/plugins/xhtmlxtras/jscripts/del.js ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode - based on work by Andrew Tetlaw
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ function preinit() {
9
+ // Initialize
10
+ tinyMCE.setWindowArg('mce_windowresize', false);
11
+ }
12
+
13
+ function init() {
14
+ tinyMCEPopup.resizeToInnerSize();
15
+ SXE.initElementDialog('del');
16
+ if (SXE.currentAction == "update") {
17
+ setFormValue('datetime', tinyMCE.getAttrib(SXE.updateElement, 'datetime'));
18
+ setFormValue('cite', tinyMCE.getAttrib(SXE.updateElement, 'cite'));
19
+ SXE.showRemoveButton();
20
+ }
21
+ }
22
+
23
+ function setElementAttribs(elm) {
24
+ setAllCommonAttribs(elm);
25
+ setAttrib(elm, 'datetime');
26
+ setAttrib(elm, 'cite');
27
+ }
28
+
29
+ function insertDel() {
30
+ var elm = tinyMCE.getParentElement(SXE.focusElement, 'del');
31
+
32
+ tinyMCEPopup.execCommand('mceBeginUndoLevel');
33
+ if (elm == null) {
34
+ var s = SXE.inst.selection.getSelectedHTML();
35
+ if(s.length > 0) {
36
+ tinyMCEPopup.execCommand('mceInsertContent', false, '<del id="#sxe_temp_del#">' + s + '</del>');
37
+ var elementArray = tinyMCE.getElementsByAttributeValue(SXE.inst.getBody(), 'del', 'id', '#sxe_temp_del#');
38
+ for (var i=0; i<elementArray.length; i++) {
39
+ var elm = elementArray[i];
40
+ setElementAttribs(elm);
41
+ }
42
+ }
43
+ } else {
44
+ setElementAttribs(elm);
45
+ }
46
+ tinyMCE.triggerNodeChange();
47
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
48
+ tinyMCEPopup.close();
49
+ }
50
+
51
+ function removeDel() {
52
+ SXE.removeElement('del');
53
+ tinyMCEPopup.close();
54
+ }
js/tiny_mce/plugins/xhtmlxtras/jscripts/element_common.js ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode - based on work by Andrew Tetlaw
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ function initCommonAttributes(elm) {
9
+ var formObj = document.forms[0];
10
+
11
+ // Setup form data for common element attributes
12
+ setFormValue('title', tinyMCE.getAttrib(elm, 'title'));
13
+ setFormValue('id', tinyMCE.getAttrib(elm, 'id'));
14
+ selectByValue(formObj, 'class', tinyMCE.getAttrib(elm, 'class'), true);
15
+ setFormValue('style', tinyMCE.getAttrib(elm, 'style'));
16
+ selectByValue(formObj, 'dir', tinyMCE.getAttrib(elm, 'dir'));
17
+ setFormValue('lang', tinyMCE.getAttrib(elm, 'lang'));
18
+ setFormValue('onfocus', tinyMCE.getAttrib(elm, 'onfocus'));
19
+ setFormValue('onblur', tinyMCE.getAttrib(elm, 'onblur'));
20
+ setFormValue('onclick', tinyMCE.getAttrib(elm, 'onclick'));
21
+ setFormValue('ondblclick', tinyMCE.getAttrib(elm, 'ondblclick'));
22
+ setFormValue('onmousedown', tinyMCE.getAttrib(elm, 'onmousedown'));
23
+ setFormValue('onmouseup', tinyMCE.getAttrib(elm, 'onmouseup'));
24
+ setFormValue('onmouseover', tinyMCE.getAttrib(elm, 'onmouseover'));
25
+ setFormValue('onmousemove', tinyMCE.getAttrib(elm, 'onmousemove'));
26
+ setFormValue('onmouseout', tinyMCE.getAttrib(elm, 'onmouseout'));
27
+ setFormValue('onkeypress', tinyMCE.getAttrib(elm, 'onkeypress'));
28
+ setFormValue('onkeydown', tinyMCE.getAttrib(elm, 'onkeydown'));
29
+ setFormValue('onkeyup', tinyMCE.getAttrib(elm, 'onkeyup'));
30
+ }
31
+
32
+ function setFormValue(name, value) {
33
+ if(document.forms[0].elements[name]) document.forms[0].elements[name].value = value;
34
+ }
35
+
36
+ function insertDateTime(id) {
37
+ document.getElementById(id).value = getDateTime(new Date(), "%Y-%m-%dT%H:%M:%S");
38
+ }
39
+
40
+ function getDateTime(d, fmt) {
41
+ fmt = fmt.replace("%D", "%m/%d/%y");
42
+ fmt = fmt.replace("%r", "%I:%M:%S %p");
43
+ fmt = fmt.replace("%Y", "" + d.getFullYear());
44
+ fmt = fmt.replace("%y", "" + d.getYear());
45
+ fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
46
+ fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
47
+ fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
48
+ fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
49
+ fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
50
+ fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
51
+ fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
52
+ fmt = fmt.replace("%%", "%");
53
+
54
+ return fmt;
55
+ }
56
+
57
+ function addZeros(value, len) {
58
+ var i;
59
+
60
+ value = "" + value;
61
+
62
+ if (value.length < len) {
63
+ for (i=0; i<(len-value.length); i++)
64
+ value = "0" + value;
65
+ }
66
+
67
+ return value;
68
+ }
69
+
70
+ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
71
+ if (!form_obj || !form_obj.elements[field_name])
72
+ return;
73
+
74
+ var sel = form_obj.elements[field_name];
75
+
76
+ var found = false;
77
+ for (var i=0; i<sel.options.length; i++) {
78
+ var option = sel.options[i];
79
+
80
+ if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
81
+ option.selected = true;
82
+ found = true;
83
+ } else
84
+ option.selected = false;
85
+ }
86
+
87
+ if (!found && add_custom && value != '') {
88
+ var option = new Option('Value: ' + value, value);
89
+ option.selected = true;
90
+ sel.options[sel.options.length] = option;
91
+ }
92
+
93
+ return found;
94
+ }
95
+
96
+ function setAttrib(elm, attrib, value) {
97
+ var formObj = document.forms[0];
98
+ var valueElm = formObj.elements[attrib.toLowerCase()];
99
+
100
+ if (typeof(value) == "undefined" || value == null) {
101
+ value = "";
102
+
103
+ if (valueElm)
104
+ value = valueElm.value;
105
+ }
106
+
107
+ if (value != "") {
108
+ if (attrib == "style")
109
+ attrib = "style.cssText";
110
+
111
+ if (attrib.substring(0, 2) == 'on')
112
+ value = 'return true;' + value;
113
+
114
+ if (attrib == "class") {
115
+ tinyMCE.addCSSClass(elm, value);
116
+ return;
117
+ }
118
+
119
+ elm.setAttribute(attrib.toLowerCase(), value);
120
+ } else
121
+ elm.removeAttribute(attrib);
122
+ }
123
+
124
+ function setAllCommonAttribs(elm) {
125
+ setAttrib(elm, 'title');
126
+ setAttrib(elm, 'id');
127
+ setAttrib(elm, 'class');
128
+ setAttrib(elm, 'style');
129
+ setAttrib(elm, 'dir');
130
+ setAttrib(elm, 'lang');
131
+ /*setAttrib(elm, 'onfocus');
132
+ setAttrib(elm, 'onblur');
133
+ setAttrib(elm, 'onclick');
134
+ setAttrib(elm, 'ondblclick');
135
+ setAttrib(elm, 'onmousedown');
136
+ setAttrib(elm, 'onmouseup');
137
+ setAttrib(elm, 'onmouseover');
138
+ setAttrib(elm, 'onmousemove');
139
+ setAttrib(elm, 'onmouseout');
140
+ setAttrib(elm, 'onkeypress');
141
+ setAttrib(elm, 'onkeydown');
142
+ setAttrib(elm, 'onkeyup');*/
143
+ }
144
+
145
+ SXE = {
146
+ currentAction : "insert",
147
+ inst : tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id')),
148
+ updateElement : null
149
+ }
150
+
151
+ SXE.focusElement = SXE.inst.getFocusElement();
152
+
153
+ SXE.initElementDialog = function(element_name) {
154
+ addClassesToList('class', 'xhtmlxtras_styles');
155
+ TinyMCE_EditableSelects.init();
156
+
157
+ element_name = element_name.toLowerCase();
158
+ var elm = tinyMCE.getParentElement(SXE.focusElement, element_name);
159
+ if (elm != null && elm.nodeName == element_name.toUpperCase()) {
160
+ SXE.currentAction = "update";
161
+ }
162
+
163
+ if (SXE.currentAction == "update") {
164
+ initCommonAttributes(elm);
165
+ SXE.updateElement = elm;
166
+ }
167
+
168
+ document.forms[0].insert.value = tinyMCE.getLang('lang_' + SXE.currentAction, 'Insert', true);
169
+ }
170
+
171
+ SXE.insertElement = function(element_name) {
172
+ var elm = tinyMCE.getParentElement(SXE.focusElement, element_name), h, tagName;
173
+
174
+ tinyMCEPopup.execCommand('mceBeginUndoLevel');
175
+ if (elm == null) {
176
+ var s = SXE.inst.selection.getSelectedHTML();
177
+ if(s.length > 0) {
178
+ tagName = element_name;
179
+
180
+ if (tinyMCE.isIE && !tinyMCE.isOpera && element_name.indexOf('html:') == 0)
181
+ element_name = element_name.substring(5).toLowerCase();
182
+
183
+ h = '<' + tagName + ' id="#sxe_temp_' + element_name + '#">' + s + '</' + tagName + '>';
184
+
185
+ tinyMCEPopup.execCommand('mceInsertContent', false, h);
186
+
187
+ var elementArray = tinyMCE.getElementsByAttributeValue(SXE.inst.getBody(), element_name, 'id', '#sxe_temp_' + element_name + '#');
188
+ for (var i=0; i<elementArray.length; i++) {
189
+ var elm = elementArray[i];
190
+
191
+ elm.id = '';
192
+ elm.setAttribute('id', '');
193
+ elm.removeAttribute('id');
194
+
195
+ setAllCommonAttribs(elm);
196
+ }
197
+ }
198
+ } else {
199
+ setAllCommonAttribs(elm);
200
+ }
201
+ tinyMCE.triggerNodeChange();
202
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
203
+ }
204
+
205
+ SXE.removeElement = function(element_name){
206
+ element_name = element_name.toLowerCase();
207
+ elm = tinyMCE.getParentElement(SXE.focusElement, element_name);
208
+ if(elm && elm.nodeName == element_name.toUpperCase()){
209
+ tinyMCEPopup.execCommand('mceBeginUndoLevel');
210
+ tinyMCE.execCommand('mceRemoveNode', false, elm);
211
+ tinyMCE.triggerNodeChange();
212
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
213
+ }
214
+ }
215
+
216
+ SXE.showRemoveButton = function() {
217
+ document.getElementById("remove").style.display = 'block';
218
+ }
219
+
220
+ SXE.containsClass = function(elm,cl) {
221
+ return (elm.className.indexOf(cl) > -1) ? true : false;
222
+ }
223
+
224
+ SXE.removeClass = function(elm,cl) {
225
+ if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) {
226
+ return true;
227
+ }
228
+ var classNames = elm.className.split(" ");
229
+ var newClassNames = "";
230
+ for (var x = 0, cnl = classNames.length; x < cnl; x++) {
231
+ if (classNames[x] != cl) {
232
+ newClassNames += (classNames[x] + " ");
233
+ }
234
+ }
235
+ elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end
236
+ }
237
+
238
+ SXE.addClass = function(elm,cl) {
239
+ if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl;
240
+ return true;
241
+ }
js/tiny_mce/plugins/xhtmlxtras/jscripts/ins.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
3
+ *
4
+ * @author Moxiecode - based on work by Andrew Tetlaw
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ function preinit() {
9
+ // Initialize
10
+ tinyMCE.setWindowArg('mce_windowresize', false);
11
+ }
12
+
13
+ function init() {
14
+ tinyMCEPopup.resizeToInnerSize();
15
+ SXE.initElementDialog('ins');
16
+ if (SXE.currentAction == "update") {
17
+ setFormValue('datetime', tinyMCE.getAttrib(SXE.updateElement, 'datetime'));
18
+ setFormValue('cite', tinyMCE.getAttrib(SXE.updateElement, 'cite'));
19
+ SXE.showRemoveButton();
20
+ }
21
+ }
22
+
23
+ function setElementAttribs(elm) {
24
+ setAllCommonAttribs(elm);
25
+ setAttrib(elm, 'datetime');
26
+ setAttrib(elm, 'cite');
27
+ }
28
+
29
+ function insertIns() {
30
+ var elm = tinyMCE.getParentElement(SXE.focusElement, 'ins');
31
+ tinyMCEPopup.execCommand('mceBeginUndoLevel');
32
+ if (elm == null) {
33
+ var s = SXE.inst.selection.getSelectedHTML();
34
+ if(s.length > 0) {
35
+ tinyMCEPopup.execCommand('mceInsertContent', false, '<ins id="#sxe_temp_ins#">' + s + '</ins>');
36
+ var elementArray = tinyMCE.getElementsByAttributeValue(SXE.inst.getBody(), 'ins', 'id', '#sxe_temp_ins#');
37
+ for (var i=0; i<elementArray.length; i++) {
38
+ var elm = elementArray[i];
39
+ setElementAttribs(elm);
40
+ }
41
+ }
42
+ } else {
43
+ setElementAttribs(elm);
44
+ }
45
+ tinyMCE.triggerNodeChange();
46
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
47
+ tinyMCEPopup.close();
48
+ }
49
+
50
+ function removeIns() {
51
+ SXE.removeElement('ins');
52
+ tinyMCEPopup.close();
53
+ }
js/tiny_mce/plugins/xhtmlxtras/langs/en.js ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // UK lang variables
2
+
3
+ tinyMCE.addToLang('xhtmlxtras',{
4
+ cite_desc : 'Citation',
5
+ abbr_desc : 'Abbreviation',
6
+ acronym_desc : 'Acronym',
7
+ del_desc : 'Deletion',
8
+ ins_desc : 'Insertion',
9
+ attribute_label_title : 'Title',
10
+ attribute_label_id : 'ID',
11
+ attribute_label_class : 'Class',
12
+ attribute_label_style : 'Style',
13
+ attribute_label_cite : 'Cite',
14
+ attribute_label_datetime : 'Date/Time',
15
+ attribute_label_langdir : 'Text Direction',
16
+ attribute_option_ltr : 'Left to right',
17
+ attribute_option_rtl : 'Right to left',
18
+ attribute_label_langcode : 'Language',
19
+ attribute_label_tabindex : 'TabIndex',
20
+ attribute_label_accesskey : 'AccessKey',
21
+ attribute_label_cite : 'Cite',
22
+ attribute_events_tab : 'Events',
23
+ attribute_attrib_tab : 'Attributes',
24
+ general_tab : 'General',
25
+ attrib_tab : 'Attributes',
26
+ events_tab : 'Events',
27
+ fieldset_general_tab : 'General Settings',
28
+ fieldset_attrib_tab : 'Element Attributes',
29
+ fieldset_events_tab : 'Element Events',
30
+ title_ins_element : 'Insertion Element',
31
+ title_del_element : 'Deletion Element',
32
+ title_acronym_element : 'Acronym Element',
33
+ title_abbr_element : 'Abbreviation Element',
34
+ title_cite_element : 'Citation Element',
35
+ remove : 'Remove',
36
+ not_set : '--not set--',
37
+ insert_date : 'Insert current date/time',
38
+ option_ltr : 'Left to right',
39
+ option_rtl : 'Right to left',
40
+ attribs_desc : 'Insert/Edit Attributes',
41
+ attribs_title : 'Insert/Edit Attributes'
42
+ });
js/tiny_mce/plugins/zoom/editor_plugin.js ADDED
@@ -0,0 +1 @@
 
1
+ var TinyMCE_ZoomPlugin={getInfo:function(){return{longname:'Zoom',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/zoom',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},getControlHTML:function(control_name){if(!tinyMCE.isMSIE||tinyMCE.isMSIE5_0||tinyMCE.isOpera)return"";switch(control_name){case"zoom":return'<select id="{$editor_id}_zoomSelect" name="{$editor_id}_zoomSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceZoom\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'+'<option value="100%">+ 100%</option>'+'<option value="150%">+ 150%</option>'+'<option value="200%">+ 200%</option>'+'<option value="250%">+ 250%</option>'+'</select>'}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceZoom":tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom=value;tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom=value;return true}return false}};tinyMCE.addPlugin("zoom",TinyMCE_ZoomPlugin);
js/tiny_mce/plugins/zoom/editor_plugin_src.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2007, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ var TinyMCE_ZoomPlugin = {
9
+ getInfo : function() {
10
+ return {
11
+ longname : 'Zoom',
12
+ author : 'Moxiecode Systems AB',
13
+ authorurl : 'http://tinymce.moxiecode.com',
14
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/zoom',
15
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
16
+ };
17
+ },
18
+
19
+ /**
20
+ * Returns the HTML contents of the zoom control.
21
+ */
22
+ getControlHTML : function(control_name) {
23
+ if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0 || tinyMCE.isOpera)
24
+ return "";
25
+
26
+ switch (control_name) {
27
+ case "zoom":
28
+ return '<select id="{$editor_id}_zoomSelect" name="{$editor_id}_zoomSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceZoom\',false,this.options[this.selectedIndex].value);" class="mceSelectList">' +
29
+ '<option value="100%">+ 100%</option>' +
30
+ '<option value="150%">+ 150%</option>' +
31
+ '<option value="200%">+ 200%</option>' +
32
+ '<option value="250%">+ 250%</option>' +
33
+ '</select>';
34
+ }
35
+
36
+ return "";
37
+ },
38
+
39
+ /**
40
+ * Executes the mceZoom command.
41
+ */
42
+ execCommand : function(editor_id, element, command, user_interface, value) {
43
+ // Handle commands
44
+ switch (command) {
45
+ case "mceZoom":
46
+ tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value;
47
+ tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value;
48
+ return true;
49
+ }
50
+
51
+ // Pass to next handler in chain
52
+ return false;
53
+ }
54
+ };
55
+
56
+ tinyMCE.addPlugin("zoom", TinyMCE_ZoomPlugin);
js/tiny_mce/plugins/zoom/readme.txt ADDED
@@ -0,0 +1 @@
 
1
+ Check the TinyMCE documentation for details on this plugin.
js/tiny_mce/themes/advanced/about.htm ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_about_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="jscripts/about.js"></script>
7
+ <base target="_self" />
8
+ </head>
9
+ <body id="about" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
10
+ <div class="tabs">
11
+ <ul>
12
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_about}</a></span></li>
13
+ <li id="help_tab"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{$lang_help}</a></span></li>
14
+ <li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{$lang_plugins}</a></span></li>
15
+ </ul>
16
+ </div>
17
+
18
+ <div class="panel_wrapper">
19
+ <div id="general_panel" class="panel current">
20
+ <h3>{$lang_about_title}</h3>
21
+ <p>Version: {$tinymce_version} ({$tinymce_releasedate})</p>
22
+ <p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
23
+ by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
24
+ <p>Copyright &copy; 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
25
+ <p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
26
+
27
+ <div id="buttoncontainer"></div>
28
+ </div>
29
+
30
+ <div id="plugins_panel" class="panel">
31
+ <div id="pluginscontainer">
32
+ <h3>{$lang_loaded_plugins}</h3>
33
+
34
+ <div id="plugintablecontainer">
35
+ </div>
36
+
37
+ <p>&nbsp;</p>
38
+ </div>
39
+ </div>
40
+
41
+ <div id="help_panel" class="panel noscroll" style="overflow: visible;">
42
+ <div id="iframecontainer"></div>
43
+ </div>
44
+ </div>
45
+
46
+ <div class="mceActionPanel">
47
+ <div style="float: right">
48
+ <input type="button" id="cancel" name="cancel" value="{$lang_close}" onclick="tinyMCEPopup.close();" />
49
+ </div>
50
+ </div>
51
+ </body>
52
+ </html>
js/tiny_mce/themes/advanced/anchor.htm ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_insert_anchor_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="jscripts/anchor.js"></script>
6
+ <base target="_self" />
7
+ </head>
8
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
9
+ <form onsubmit="insertAnchor();return false;" action="#">
10
+
11
+ <table border="0" cellpadding="4" cellspacing="0">
12
+ <tr>
13
+ <td colspan="2" class="title">{$lang_insert_anchor_title}</td>
14
+ </tr>
15
+ <tr>
16
+ <td nowrap="nowrap">{$lang_insert_anchor_name}:</td>
17
+ <td><input name="anchorName" type="text" id="anchorName" value="" style="width: 200px" /></td>
18
+ </tr>
19
+ </table>
20
+
21
+ <div class="mceActionPanel">
22
+ <div style="float: left">
23
+ <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertAnchor();" />
24
+ </div>
25
+
26
+ <div style="float: right">
27
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
28
+ </div>
29
+ </div>
30
+
31
+ </form>
32
+ </body>
33
+ </html>
js/tiny_mce/themes/advanced/charmap.htm ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_theme_charmap_title}</title>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
5
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script language="javascript" type="text/javascript" src="jscripts/charmap.js"></script>
7
+ <base target="_self" />
8
+ </head>
9
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
10
+ <table align="center" border="0" cellspacing="0" cellpadding="2">
11
+ <tr>
12
+ <td colspan="2" class="title">{$lang_theme_charmap_title}</td>
13
+ </tr>
14
+ <tr>
15
+ <td rowspan="2" align="left" valign="top">
16
+ <script language="javascript" type="text/javascript">renderCharMapHTML();</script>
17
+ </td>
18
+ <td width="100" align="center" valign="top">
19
+ <table border="0" cellpadding="0" cellspacing="0" width="100" style="height: 100px">
20
+ <tr>
21
+ <td class="charmapOver" style="font-size: 40px; height:80px;" id="codeV">&nbsp;</td>
22
+ </tr>
23
+ <tr>
24
+ <td style="font-size: 10px; font-family: Arial, Helvetica, sans-serif; text-align:center;" id="codeN">&nbsp;</td>
25
+ </tr>
26
+ </table>
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <td valign="bottom" style="padding-bottom: 3px;">
31
+ <table width="100" align="center" border="0" cellpadding="2" cellspacing="0">
32
+ <tr>
33
+ <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">HTML-Code</td>
34
+ </tr>
35
+ <tr>
36
+ <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center">&nbsp;</td>
37
+ </tr>
38
+ <tr>
39
+ <td style="font-size: 1px;">&nbsp;</td>
40
+ </tr>
41
+ <tr>
42
+ <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">NUM-Code</td>
43
+ </tr>
44
+ <tr>
45
+ <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center">&nbsp;</td>
46
+ </tr>
47
+ </table>
48
+ </td>
49
+ </tr>
50
+ </table>
51
+
52
+ </body>
53
+ </html>
js/tiny_mce/themes/advanced/color_picker.htm ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <title>{$lang_theme_colorpicker_title}</title>
4
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
6
+ <script language="javascript" type="text/javascript" src="jscripts/color_picker.js"></script>
7
+ <link href="css/colorpicker.css" rel="stylesheet" type="text/css" />
8
+ <base target="_self" />
9
+ </head>
10
+ <body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
11
+ <div class="tabs">
12
+ <ul>
13
+ <li id="picker_tab" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{$lang_color_picker_tab}</a></span></li>
14
+ <li id="rgb_tab"><span><a href="#" onclick="generateWebColors();mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{$lang_web_colors_tab}</a></span></li>
15
+ <li id="named_tab"><span><a href="#" onclick="generateNamedColors();javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{$lang_named_colors_tab}</a></span></li>
16
+ </ul>
17
+ </div>
18
+
19
+ <div class="panel_wrapper">
20
+ <div id="picker_panel" class="panel current">
21
+ <fieldset>
22
+ <legend>{$lang_color_picker}</legend>
23
+ <div id="picker">
24
+ <img id="colorpicker" src="images/colors.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" />
25
+
26
+ <div id="light">
27
+ <!-- Will be filled with divs -->
28
+ </div>
29
+
30
+ <br style="clear: both" />
31
+ </div>
32
+ </fieldset>
33
+ </div>
34
+
35
+ <div id="rgb_panel" class="panel">
36
+ <fieldset>
37
+ <legend>{$lang_web_colors}</legend>
38
+ <div id="webcolors">
39
+ <!-- Gets filled with web safe colors-->
40
+ </div>
41
+
42
+ <br style="clear: both" />
43
+ </fieldset>
44
+ </div>
45
+
46
+ <div id="named_panel" class="panel">
47
+ <fieldset>
48
+ <legend>{$lang_named_colors}</legend>
49
+ <div id="namedcolors">
50
+ <!-- Gets filled with named colors-->
51
+ </div>
52
+
53
+ <br style="clear: both" />
54
+
55
+ <div id="colornamecontainer">
56
+ {$lang_color_name} <span id="colorname"></span>
57
+ </div>
58
+ </fieldset>
59
+ </div>
60
+ </div>
61
+
62
+ <div class="mceActionPanel">
63
+ <div style="float: left">
64
+ <input type="button" id="insert" name="insert" value="{$lang_theme_colorpicker_apply}" onclick="insertAction();" />
65
+ </div>
66
+
67
+ <div id="preview"></div>
68
+
69
+ <div id="previewblock">
70
+ <label for="color">{$lang_color}</label> <input id="color" type="text" size="8" maxlength="8" class="text" />
71
+ </div>
72
+ </div>
73
+ </body>
74
+ </html>
js/tiny_mce/themes/advanced/css/colorpicker.css ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Colorpicker dialog specific CSS */
2
+
3
+ #preview {
4
+ float: right;
5
+ width: 50px;
6
+ height: 14px;
7
+ line-height: 1px;
8
+ border: 1px solid black;
9
+ margin-left: 5px;
10
+ }
11
+
12
+ #colorpicker {
13
+ float: left;
14
+ cursor: crosshair;
15
+ }
16
+
17
+ #light {
18
+ border: 1px solid gray;
19
+ margin-left: 5px;
20
+ float: left;
21
+ width: 15px;
22
+ cursor: crosshair;
23
+ }
24
+
25
+ #light div {
26
+ overflow: hidden;
27
+ }
28
+
29
+ #previewblock {
30
+ float: right;
31
+ padding-left: 10px;
32
+ height: 20px;
33
+ }
34
+
35
+ .panel_wrapper div.current {
36
+ height: 175px;
37
+ }
38
+
39
+ #namedcolors {
40
+ width: 150px;
41
+ }
42
+
43
+ #namedcolors a {
44
+ display: block;
45
+ float: left;
46
+ width: 10px; height: 10px;
47
+ margin: 1px 1px 0 0;
48
+ overflow: hidden;
49
+ }
50
+
51
+ #colornamecontainer {
52
+ margin-top: 5px;
53
+ }
js/tiny_mce/themes/advanced/css/editor_content.css ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* This file contains the CSS data for the editable area(iframe) of TinyMCE */
2
+ /* You can extend this CSS by adding your own CSS file with the the content_css option */
3
+
4
+ body, td, pre {
5
+ font-family: Verdana, Arial, Helvetica, sans-serif;
6
+ font-size: 10px;
7
+ }
8
+
9
+ body {
10
+ background-color: #FFFFFF;
11
+ }
12
+
13
+ .mceVisualAid {
14
+ border: 1px dashed #BBBBBB !important;
15
+ }
16
+
17
+ div.mceVisualAid {
18
+ background-image:url('../images/spacer.gif');
19
+ visibility: visible !important;
20
+ }
21
+
22
+ .mceItemAnchor {
23
+ width: 12px;
24
+ line-height: 6px;
25
+ overflow: hidden;
26
+ padding-left: 12px;
27
+ background-image: url('../images/anchor_symbol.gif');
28
+ background-position: bottom;
29
+ background-repeat: no-repeat;
30
+ }
31
+
32
+ /* Important is needed in Gecko browsers inorder to style links */
33
+ /*
34
+ a {
35
+ color: green !important;
36
+ }
37
+ */
38
+
39
+ /* Style selection range colors in Gecko browsers */
40
+ /*
41
+ ::-moz-selection {
42
+ background-color: red;
43
+ color: green;
44
+ }
45
+ */
46
+
47
+ /* MSIE specific */
48
+
49
+ * html body {
50
+ scrollbar-3dlight-color: #F0F0EE;
51
+ scrollbar-arrow-color: #676662;
52
+ scrollbar-base-color: #F0F0EE;
53
+ scrollbar-darkshadow-color: #DDDDDD;
54
+ scrollbar-face-color: #E0E0DD;
55
+ scrollbar-highlight-color: #F0F0EE;
56
+ scrollbar-shadow-color: #F0F0EE;
57
+ scrollbar-track-color: #F5F5F5;
58
+ }
js/tiny_mce/themes/advanced/css/editor_popup.css ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* This file contains the CSS data for all popups in TinyMCE */
2
+
3
+ body {
4
+ background-color: #F0F0EE;
5
+ font-family: Verdana, Arial, Helvetica, sans-serif;
6
+ font-size: 11px;
7
+ scrollbar-3dlight-color: #F0F0EE;
8
+ scrollbar-arrow-color: #676662;
9
+ scrollbar-base-color: #F0F0EE;
10
+ scrollbar-darkshadow-color: #DDDDDD;
11
+ scrollbar-face-color: #E0E0DD;
12
+ scrollbar-highlight-color: #F0F0EE;
13
+ scrollbar-shadow-color: #F0F0EE;
14
+ scrollbar-track-color: #F5F5F5;
15
+ margin: 8px;
16
+ }
17
+
18
+ td {
19
+ font-family: Verdana, Arial, Helvetica, sans-serif;
20
+ font-size: 11px;
21
+ }
22
+
23
+ input {
24
+ background: #FFFFFF;
25
+ border: 1px solid #cccccc;
26
+ }
27
+
28
+ td, input, select, textarea {
29
+ font-family: Verdana, Arial, Helvetica, sans-serif;
30
+ font-size: 10px;
31
+ }
32
+
33
+ input, select, textarea {
34
+ border: 1px solid #808080;
35
+ }
36
+
37
+ .input_noborder {
38
+ border: 0;
39
+ }
40
+
41
+ #insert, .updateButton {
42
+ font-weight: bold;
43
+ width: 90px;
44
+ height: 21px;
45
+ border: 0;
46
+ background-image: url('../images/insert_button_bg.gif');
47
+ cursor: pointer;
48
+ }
49
+
50
+ #cancel {
51
+ font-weight: bold;
52
+ width: 90px;
53
+ height: 21px;
54
+ border: 0;
55
+ background-image: url('../images/cancel_button_bg.gif');
56
+ cursor: pointer;
57
+ }
58
+
59
+ /* Mozilla only style */
60
+ html>body #insert, html>body #cancel {
61
+ padding-bottom: 2px;
62
+ }
63
+
64
+ .title {
65
+ font-size: 12px;
66
+ font-weight: bold;
67
+ color: #2B6FB6;
68
+ }
69
+
70
+ table.charmap {
71
+ border-style: solid;
72
+ border-width: 1px;
73
+ border-color: #AAAAAA;
74
+ }
75
+
76
+ td.charmap, td.charmapOver {
77
+ color: #000000;
78
+ border-color: #AAAAAA;
79
+ border-style: solid;
80
+ border-width: 1px;
81
+ text-align: center;
82
+ font-size: 12px;
83
+ }
84
+
85
+ td.charmapOver {
86
+ background-color: #CCCCCC;
87
+ cursor: default;
88
+ }
89
+
90
+ a.charmap {
91
+ color: #000000;
92
+ text-decoration: none
93
+ }
94
+
95
+ .wordWrapCode {
96
+ vertical-align: middle;
97
+ border: 1px none #000000;
98
+ background-color: transparent;
99
+ }
100
+
101
+ input.radio {
102
+ border: 1px none #000000;
103
+ background-color: transparent;
104
+ vertical-align: middle;
105
+ }
106
+
107
+ input.checkbox {
108
+ border: 1px none #000000;
109
+ background-color: transparent;
110
+ vertical-align: middle;
111
+ }
112
+
113
+ .mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
114
+ margin-left: 1px;
115
+ }
116
+
117
+ .mceButtonNormal {
118
+ border-top: 1px solid;
119
+ border-left: 1px solid;
120
+ border-bottom: 1px solid;
121
+ border-right: 1px solid;
122
+ border-color: #F0F0EE;
123
+ cursor: default;
124
+ }
125
+
126
+ .mceButtonOver {
127
+ border: 1px solid #0A246A;
128
+ cursor: default;
129
+ background-color: #B6BDD2;
130
+ }
131
+
132
+ .mceButtonDown {
133
+ cursor: default;
134
+ border: 1px solid #0A246A;
135
+ background-color: #8592B5;
136
+ }
137
+
138
+ .mceButtonDisabled {
139
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
140
+ -moz-opacity:0.3;
141
+ opacity: 0.3;
142
+ border-top: 1px solid;
143
+ border-left: 1px solid;
144
+ border-bottom: 1px solid;
145
+ border-right: 1px solid;
146
+ border-color: #F0F0EE;
147
+ cursor: default;
148
+ }
149
+
150
+ .mceActionPanel {
151
+ margin-top: 5px;
152
+ }
153
+
154
+ /* Tabs classes */
155
+
156
+ .tabs {
157
+ float: left;
158
+ width: 100%;
159
+ line-height: normal;
160
+ background-image: url("../images/xp/tabs_bg.gif");
161
+ }
162
+
163
+ .tabs ul {
164
+ margin: 0;
165
+ padding: 0 0 0;
166
+ list-style: none;
167
+ }
168
+
169
+ .tabs li {
170
+ float: left;
171
+ background: url("../images/xp/tab_bg.gif") no-repeat left top;
172
+ margin: 0;
173
+ margin-left: 0;
174
+ margin-right: 2px;
175
+ padding: 0 0 0 10px;
176
+ line-height: 18px;
177
+ }
178
+
179
+ .tabs li.current {
180
+ background: url("../images/xp/tab_sel_bg.gif") no-repeat left top;
181
+ margin-right: 2px;
182
+ }
183
+
184
+ .tabs span {
185
+ float: left;
186
+ display: block;
187
+ background: url("../images/xp/tab_end.gif") no-repeat right top;
188
+ padding: 0px 10px 0 0;
189
+ }
190
+
191
+ .tabs .current span {
192
+ background: url("../images/xp/tab_sel_end.gif") no-repeat right top;
193
+ }
194
+
195
+ .tabs a {
196
+ text-decoration: none;
197
+ font-family: Verdana, Arial;
198
+ font-size: 10px;
199
+ }
200
+
201
+ .tabs a:link, .tabs a:visited, .tabs a:hover {
202
+ color: black;
203
+ }
204
+
205
+ .tabs a:hover {
206
+ }
207
+
208
+ .tabs .current {
209
+ }
210
+
211
+ .tabs .current a, .tabs .current a:link, .tabs .current a:visited {
212
+ }
213
+
214
+ .panel_wrapper div.panel {
215
+ display: none;
216
+ }
217
+
218
+ .panel_wrapper div.current {
219
+ display: block;
220
+ width: 100%;
221
+ height: 300px;
222
+ overflow: visible; /* Should be auto but that breaks Safari */
223
+ }
224
+
225
+ .panel_wrapper {
226
+ border: 1px solid #919B9C;
227
+ border-top: 0px;
228
+ padding: 10px;
229
+ padding-top: 5px;
230
+ clear: both;
231
+ background-color: white;
232
+ }
233
+
234
+ fieldset {
235
+ border: 1px solid #919B9C;
236
+ font-family: Verdana, Arial;
237
+ font-size: 10px;
238
+ padding: 0;
239
+ margin: 0;
240
+ padding: 4px;
241
+ }
242
+
243
+ legend {
244
+ color: #2B6FB6;
245
+ font-weight: bold;
246
+ }
247
+
248
+ .properties {
249
+ width: 100%;
250
+ }
251
+
252
+ .properties .column1 {
253
+ }
254
+
255
+ .properties .column2 {
256
+ text-align: left;
257
+ }
258
+
259
+ a:link, a:visited {
260
+ color: black;
261
+ }
262
+
263
+ a:hover {
264
+ color: #2B6FB6;
265
+ }
266
+
267
+ #plugintable thead {
268
+ font-weight: bold;
269
+ background-color: #DDDDDD;
270
+ }
271
+
272
+ #plugintable, #about #plugintable td {
273
+ border: 1px solid #919B9C;
274
+ }
275
+
276
+ #plugintable {
277
+ width: 99%;
278
+ margin-top: 10px;
279
+ }
280
+
281
+ #pluginscontainer {
282
+ height: 290px;
283
+ overflow: auto;
284
+ }
285
+
286
+ /* MSIE Specific styles */
287
+
288
+ * html .panel_wrapper {
289
+ width: 100%;
290
+ }
291
+
292
+ .column {
293
+ float: left;
294
+ }
295
+
296
+ h1, h2, h3, h4 {
297
+ color: #2B6FB6;
298
+ margin: 0;
299
+ padding: 0;
300
+ padding-top: 5px;
301
+ }
302
+
303
+ h3 {
304
+ font-size: 14px;
305
+ }
306
+
307
+ #link .panel_wrapper, #link div.current {
308
+ height: 125px;
309
+ }
310
+
311
+ #image .panel_wrapper, #image div.current {
312
+ height: 190px;
313
+ }
314
+
315
+ label.msg { display: none; }
316
+ label.invalid { color: #EE0000; display: inline; }
317
+ input.invalid { border: 1px solid #EE0000; }
318
+
319
+ /* Disables the advanced tab in the table plugin. */
320
+ /*
321
+ #table #advanced_tab {
322
+ display: none;
323
+ }
324
+ */
325
+
326
+ /* Disables the border input field and label in the table plugin. */
327
+ /*
328
+ #table #border, #table #borderlabel {
329
+ display: none;
330
+ }
331
+ */
js/tiny_mce/themes/advanced/css/editor_ui.css ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* This file contains the CSS data for the editor UI of TinyMCE instances */
2
+
3
+ .mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {border: 0; margin: 0; padding: 0; background: transparent;}
4
+ .mceSeparatorLine {border: 0; padding: 0; margin-left: 4px; margin-right: 2px;}
5
+ .mceSelectList {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 7pt !important; font-weight: normal; margin-top: 3px; padding: 0; display: inline; vertical-align: top; background-color: #F0F0EE;}
6
+ .mceLabel, .mceLabelDisabled {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt;}
7
+ .mceLabel {color: #000000;}
8
+ .mceLabelDisabled {cursor: text; color: #999999;}
9
+ .mceEditor {background: #F0F0EE; border: 1px solid #cccccc; padding: 0; margin: 0;}
10
+ .mceEditorArea { font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; background: #FFFFFF; padding: 0; margin: 0; }
11
+ .mceToolbarTop, .mceToolbarBottom {background: #F0F0EE; line-height: 1px; font-size: 1px;}
12
+ .mceToolbarTop {border-bottom: 1px solid #cccccc; padding-bottom: 1px;}
13
+ .mceToolbarBottom {border-top: 1px solid #cccccc;}
14
+ .mceToolbarContainer {display: block; position: relative; left: 0; top: 0; width: 100%;}
15
+ .mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar {height: 20px;}
16
+ .mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; padding: 2px; line-height: 16px; overflow: visible;}
17
+ .mceStatusbarTop {border-bottom: 1px solid #cccccc;}
18
+ .mceStatusbarBottom {border-top: 1px solid #cccccc;}
19
+ .mceStatusbar {border-bottom: 1px solid #cccccc;}
20
+ .mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {text-decoration: none; font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; color: #000000;}
21
+ .mcePathItem:hover {text-decoration: underline;}
22
+ .mceStatusbarPathText {float: left;}
23
+ .mceStatusbarResize {float: right; background-image: url('../images/statusbar_resize.gif'); background-repeat: no-repeat; width: 11px; height: 20px; cursor: se-resize;}
24
+ .mceResizeBox {width: 10px; height: 10px; display: none; border: 1px dotted gray; margin: 0; padding: 0;}
25
+ .mceEditorIframe {border: 0;}
26
+
27
+ /* Button CSS rules */
28
+
29
+ a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px; cursor: default; margin-top: 1px; margin-left: 1px;}
30
+ a.mceButtonDisabled img {border: 0 !important;}
31
+ a.mceButtonNormal img, a.mceButtonSelected img {border: 1px solid #F0F0EE !important;}
32
+ a.mceButtonSelected img {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
33
+ a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default; background-color: #B6BDD2;}
34
+ a.mceButtonDisabled img {-moz-opacity:0.3; opacity: 0.3; border: 1px solid #F0F0EE !important; cursor: default;}
35
+ a.mceTiledButton img {background-image: url('../images/buttons.gif'); background-repeat: no-repeat;}
36
+
37
+ /* Menu button CSS rules */
38
+
39
+ span.mceMenuButton img, span.mceMenuButtonSelected img {border: 1px solid #F0F0EE; margin-left: 1px;}
40
+ span.mceMenuButtonSelected img {border: 1px solid #6779AA; background-color: #B6BDD2;}
41
+ span.mceMenuButtonSelected img.mceMenuButton {border: 1px solid #F0F0EE; background-color: transparent;}
42
+ span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {border-left: 0; margin-left: 0;}
43
+ span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
44
+ span.mceMenuButton:hover img.mceMenuButton, span.mceMenuButtonSelected:hover img.mceMenuButton {border-left: 0;}
45
+ span.mceMenuButtonFocus img {border: 1px solid gray; border-right: 0; margin-left: 1px; background-color: #F5F4F2;}
46
+ span.mceMenuButtonFocus img.mceMenuButton {border: 1px solid gray; border-left: 1px solid #F5F4F2; margin-left: 0;}
47
+ span.mceMenuHover img {border: 1px solid #0A246A; background-color: #B6BDD2;}
48
+ span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {border: 1px solid #0A246A; background-color: #B6BDD2; border-left: 0;}
49
+
50
+ /* Menu */
51
+
52
+ .mceMenu {position: absolute; left: 0; top: 0; display: none; z-index: 1000; background-color: white; border: 1px solid gray; font-weight: normal;}
53
+ .mceMenu a, .mceMenuTitle, .mceMenuDisabled {display: block; width: 100%; text-decoration: none; background-color: white; font-family: Tahoma, Verdana, Arial, Helvetica; font-size: 11px; line-height: 20px; color: black;}
54
+ .mceMenu a:hover {background-color: #B6BDD2; color: black; text-decoration: none !important;}
55
+ .mceMenu span {padding-left: 10px; padding-right: 10px; display: block; line-height: 20px;}
56
+ .mceMenuSeparator {border-bottom: 1px solid gray; background-color: gray; height: 1px;}
57
+ .mceMenuTitle span {padding-left: 5px;}
58
+ .mceMenuTitle {background-color: #DDDDDD; font-weight: bold;}
59
+ .mceMenuDisabled {color: gray;}
60
+ span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat; background-position: 5px 8px; padding-left: 20px;}
61
+ span.mceMenuCheckItem {padding-left: 20px;}
62
+ span.mceMenuLine {display: block; position: absolute; left: 0; top: -1px; background-color: #F5F4F2; width: 30px; height: 1px; overflow: hidden; padding-left: 0; padding-right: 0;}
63
+ .mceColors table, .mceColors td {margin: 0; padding: 2px;}
64
+ a.mceMoreColors {width: auto; padding: 0; margin: 0 3px 3px 3px; text-align: center; border: 1px solid white; text-decoration: none !important;}
65
+ .mceColorPreview {position: absolute; overflow:hidden; left: 0; top: 0; margin-left: 3px; margin-top: 15px; width: 16px; height: 4px; background-color: red;}
66
+ a.mceMoreColors:hover {border: 1px solid #0A246A;}
67
+ .mceColors td a {width: 9px; height: 9px; overflow: hidden; border: 1px solid #808080;}
68
+
69
+ /* MSIE 6 specific rules */
70
+
71
+ * html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
72
+ * html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
73
+ * html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;}
74
+ * html a.mceButtonNormal, * html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
75
+ * html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
76
+ * html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
77
+ * html .mceSelectList {margin-top: 2px;}
78
+ * html span.mceMenuButton, * html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
79
+ * html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {position: relative; top: 1px;}
80
+ * html a.mceMoreColors {width: auto;}
81
+ * html .mceColors td a {width: 10px; height: 10px;}
82
+ * html .mceColorPreview {margin-left: 2px; margin-top: 14px;}
83
+
84
+ /* MSIE 7 specific rules */
85
+
86
+ *:first-child+html a.mceButtonNormal img, *:first-child+html a.mceButtonSelected img, *:first-child+html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;}
87
+ *:first-child+html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;}
88
+ *:first-child+html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;}
89
+ *:first-child+html a.mceButtonNormal, *:first-child+html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;}
90
+ *:first-child+html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;}
91
+ *:first-child+html a.mceButtonNormal:hover, *:first-child+html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;}
92
+ *:first-child+html .mceSelectList {margin-top: 2px;}
93
+ *:first-child+html span.mceMenuButton, *:first-child+html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;}
94
+ *:first-child+html span.mceMenuButton img, *:first-child+html span.mceMenuButtonSelected img, *:first-child+html span.mceMenuButtonFocus img {position: relative; top: 1px;}
95
+ *:first-child+html a.mceMoreColors {width: 137px;}
96
+ *:first-child+html .mceColors td a {width: 10px; height: 10px;}
97
+ *:first-child+html .mceColorPreview {margin: 0; padding-left: 4px; margin-top: 14px; width: 14px;}
js/tiny_mce/themes/advanced/docs/en/about.htm ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <HEAD>
3
+ <TITLE>About TinyMCE</TITLE>
4
+ <link href="style.css" rel="stylesheet" type="text/css">
5
+ </HEAD>
6
+
7
+ <BODY>
8
+
9
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
10
+ <tr>
11
+ <td><span class="title">About TinyMCE</span></td>
12
+ <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
13
+ </tr>
14
+ </table>
15
+ <hr noshade>
16
+ <br>
17
+ TinyMCE is a small WYSIWYG editor control for web browsers such as MSIE or Mozilla
18
+ that enables you to edit HTML contents in a more user friendly way. It has common
19
+ features that are found in most word processors and should not be difficult to
20
+ use.<br>
21
+ <br>
22
+ <hr noshade>
23
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
24
+ <tr>
25
+ <td>Go to: <a href="index.htm">Table of contents</a></td>
26
+ <td align="right"><a href="#">Top</a></td>
27
+ </tr>
28
+ </table>
29
+ <br>
30
+ </BODY>
31
+ </HTML>
js/tiny_mce/themes/advanced/docs/en/common_buttons.htm ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <HEAD>
3
+ <TITLE>Common buttons</TITLE>
4
+ <link href="style.css" rel="stylesheet" type="text/css">
5
+ </HEAD>
6
+
7
+ <BODY>
8
+
9
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
10
+ <tr>
11
+ <td><span class="title">Common buttons</span></td>
12
+ <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
13
+ </tr>
14
+ </table>
15
+ <hr noshade>
16
+ <br>
17
+ Below is a short description about each button.
18
+ <br>
19
+ <br>
20
+ <table border="1" cellpadding="3" cellspacing="0">
21
+ <tr>
22
+ <td><img src="../../images/bold.gif" width="20" height="20" alt="Bold text icon" /></td>
23
+ <td>Bold text style (Ctrl+B).</td>
24
+ </tr>
25
+ <tr>
26
+ <td><img src="../../images/italic.gif" width="20" height="20" alt="Italic text icon" /></td>
27
+ <td>Italic text style (Ctrl+I).</td>
28
+ </tr>
29
+ <tr>
30
+ <td><img src="../../images/underline.gif" width="20" height="20" alt="Underline text icon." /></td>
31
+ <td>Underline text style (Ctrl+U).</td>
32
+ </tr>
33
+ <tr>
34
+ <td><img src="../../images/strikethrough.gif" width="20" height="20" alt="Strikethrough text icon." /></td>
35
+ <td>Strikethrough text style.</td>
36
+ </tr>
37
+ <tr>
38
+ <td><img src="../../images/justifyleft.gif" width="20" height="20" alt="Align left icon." /></td>
39
+ <td>Align left.</td>
40
+ </tr>
41
+ <tr>
42
+ <td><img src="../../images/justifycenter.gif" width="20" height="20" alt="Align center icon." /></td>
43
+ <td>Align center.</td>
44
+ </tr>
45
+ <tr>
46
+ <td><img src="../../images/justifyright.gif" width="20" height="20" alt="Align right icon." /></td>
47
+ <td>Align right.</td>
48
+ </tr>
49
+ <tr>
50
+ <td><img src="../../images/justifyfull.gif" width="20" height="20" alt="Align full icon." /></td>
51
+ <td>Align full.</td>
52
+ </tr>
53
+ <tr>
54
+ <td><img src="../../images/bullist.gif" width="20" height="20" alt="Unordered list/bullet list icon." /></td>
55
+ <td>Unordered list/bullet list.</td>
56
+ </tr>
57
+ <tr>
58
+ <td><img src="../../images/numlist.gif" width="20" height="20" alt="Ordered list/numbered list icon." /></td>
59
+ <td>Ordered list/numbered list</td>
60
+ </tr>
61
+ <tr>
62
+ <td><img src="../../images/outdent.gif" width="20" height="20" alt="Outdent/decrease indentation icon." /></td>
63
+ <td>Outdent/decrease indentation.</td>
64
+ </tr>
65
+ <tr>
66
+ <td><img src="../../images/indent.gif" width="20" height="20" alt="Indent/increase indentation icon." /></td>
67
+ <td>Indent/increase indentation.</td>
68
+ </tr>
69
+ <tr>
70
+ <td><img src="../../images/undo.gif" width="20" height="20" alt="Undo the last operation." /></td>
71
+ <td>Undo the last operation (Ctrl+Z).</td>
72
+ </tr>
73
+ <tr>
74
+ <td><img src="../../images/redo.gif" width="20" height="20" alt="Redo the last operation icon." /></td>
75
+ <td>Redo the last operation (Ctrl+Y).</td>
76
+ </tr>
77
+ <tr>
78
+ <td><img src="../../images/link.gif" width="20" height="20" alt="Insert a new link icon." /></td>
79
+ <td>Insert a new link, read more about this function in the <a href="insert_link_button.htm">Insert
80
+ link section</a>.</td>
81
+ </tr>
82
+ <tr>
83
+ <td><img src="../../images/unlink.gif" width="20" height="20" alt="Unlinks the current selection icon." /></td>
84
+ <td>Unlinks the current selection/removes all selected links.</td>
85
+ </tr>
86
+ <tr>
87
+ <td><img src="../../images/anchor.gif" width="20" height="20" alt="Insert a new anchor icon." /></td>
88
+ <td>Insert a new anchor, read more about this function in the <a href="insert_anchor_button.htm">Insert anchor section.</a></td>
89
+ </tr>
90
+ <tr>
91
+ <td><img src="../../images/image.gif" width="20" height="20" alt="Insert a new image icon." /></td>
92
+ <td>Insert a new image, read more about this function in the <a href="insert_image_button.htm">Insert
93
+ image section</a>.</td>
94
+ </tr>
95
+ <tr>
96
+ <td><img src="../../images/cleanup.gif" width="20" height="20" alt="Cleanup code icon." /></td>
97
+ <td>Cleanup code/Removes unwanted formating. This function is useful when
98
+ you copy contents from for example a office product.</td>
99
+ </tr>
100
+ <tr>
101
+ <td><img src="../../images/help.gif" width="20" height="20" alt="Show help icon." /></td>
102
+ <td>Shows this help window.</td>
103
+ </tr>
104
+ <tr>
105
+ <td><img src="../../images/code.gif" width="20" height="20" alt="Source code editor icon." /></td>
106
+ <td>Opens HTML source code editor. </td>
107
+ </tr>
108
+ <tr>
109
+ <td><img src="../../../../plugins/table/images/table.gif" width="20" height="20" alt="Insert table icon." /></td>
110
+ <td>Inserts a new table at the current location. </td>
111
+ </tr>
112
+ <tr>
113
+ <td><img src="../../../../plugins/table/images/table_insert_row_before.gif" width="20" height="20" alt="Adds a row above icon." /></td>
114
+ <td>Adds a row above the current one. </td>
115
+ </tr>
116
+ <tr>
117
+ <td><img src="../../../../plugins/table/images/table_insert_row_after.gif" width="20" height="20" alt="Adds a row under icon." /></td>
118
+ <td>Adds a row under the current one. </td>
119
+ </tr>
120
+ <tr>
121
+ <td><img src="../../../../plugins/table/images/table_delete_row.gif" width="20" height="20" alt="Remove row icon." /></td>
122
+ <td>Removes the row. </td>
123
+ </tr>
124
+ <tr>
125
+ <td><img src="../../../../plugins/table/images/table_insert_col_before.gif" width="20" height="20" alt="Add column before icon." /></td>
126
+ <td>Adds a column before the current one.</td>
127
+ </tr>
128
+ <tr>
129
+ <td><img src="../../../../plugins/table/images/table_insert_col_after.gif" width="20" height="20" alt="Add column after icon." /></td>
130
+ <td>Adds a column after the current one.</td>
131
+ </tr>
132
+ <tr>
133
+ <td><img src="../../../../plugins/table/images/table_delete_col.gif" width="20" height="20" alt="Remove column icon." /></td>
134
+ <td>Removes the current column.</td>
135
+ </tr>
136
+ <tr>
137
+ <td><img src="../../images/hr.gif" width="20" height="20" alt="Insert horizontal ruler icon." /></td>
138
+ <td>Inserts a new horizontal ruler </td>
139
+ </tr>
140
+ <tr>
141
+ <td><img src="../../images/removeformat.gif" width="20" height="20" alt="Remove formatting icon." /></td>
142
+ <td>Removes formatting from the selection. </td>
143
+ </tr>
144
+ <tr>
145
+ <td><img src="../../images/sub.gif" width="20" height="20" alt="Subscript icon." /></td>
146
+ <td>Makes the selection to be subscript. </td>
147
+ </tr>
148
+ <tr>
149
+ <td><img src="../../images/sup.gif" width="20" height="20" alt="Superscript icon." /></td>
150
+ <td>Makes the selection to be superscripted. </td>
151
+ </tr>
152
+ </table>
153
+ <br>
154
+ <hr noshade="noshade" />
155
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
156
+ <tr>
157
+ <td>Go to: <a href="index.htm">Table of contents</a></td>
158
+ <td align="right"><a href="#">Top</a></td>
159
+ </tr>
160
+ </table>
161
+ </BODY>
162
+ </HTML>
js/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <HEAD>
3
+ <TITLE>Insert table button</TITLE>
4
+ <link href="style.css" rel="stylesheet" type="text/css">
5
+ </HEAD>
6
+
7
+ <BODY>
8
+
9
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
10
+ <tr>
11
+ <td><span class="title">Create accessible content</span></td>
12
+ <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
13
+ </tr>
14
+ </table>
15
+ <hr noshade>
16
+ <p>TinyMCE can create HTML content that will be accessible to all users, including those with disabilities using assistive technologies, as well as those using text-based browsers, or those browsing the Web with images turned off. </p>
17
+
18
+ <p><strong>Things you can do to make your content accessible:</strong></p>
19
+ <ol>
20
+ <li><strong>Include an Image Description:</strong> Blind users, or others who are unable to view images, will rely on the Image Description (or Alt text) to take the place of the image. If an image contains no meaning, such as a decoration or a spacer image, leave the Image Description empty. TinyMCE will then insert an empty Alt text attribute that will force assistive technologies to ignore the image. <br /><br /></li>
21
+
22
+ <li> <strong>Add Scope to data table header cells:</strong> In the table cell editor dialog window, choose a Scope when creating Header cells so the column or row label in that cell becomes explicitely associated with its data cells. Table cell headers will then be announced with each data cell, making it easier for blind users using a screen reader to understand what the content of each cell represents. <br /><br /></li>
23
+
24
+ <li><strong> Structure content with properly nested headings:</strong> In the format selection menu choose Heading 1 to Heading 6 to represent headings in your content, rather than using other font formating options. Blind users using a screen reader can then extract the headings from the page to generate a summary of the content it contains, and use those headings to navigate quickly to subsections within the page.<br /><br /></li>
25
+
26
+ <li><strong> Include alternate content:</strong> Create an alternate page for non-HTML content such as Flash, Java applets, or embedded movies. This might be a static image, with a description of the image, and a description of the content that would have appeared in its place. An alternate HTML page could also be created, and a link to it included next to the non-HTML object. This will ensure that the content will be accessible to users of assistive technologies that can not view or play the content, and ensure the content will be available to those who do not have the appropriate plugin or helper application installed.<br /><br /></li>
27
+
28
+ <li><strong> Check accessbility: </strong> When the AChecker plugin is installed with TinyMCE, click on the Check Accessibility button to generate a report of potential accessibility problems.<br /><br /></li>
29
+
30
+ </ol>
31
+
32
+ <p>See the <a href="http://checker.atrc.utoronto.ca" target="_new">AChecker Web Site</a> for further details about creating content that will be accessible to all users.<br />
33
+ </p>
34
+
35
+ <hr noshade>
36
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
37
+ <tr>
38
+ <td>Go to: <a href="index.htm">Table of contents</a></td>
39
+ <td align="right"><a href="#">Top</a></td>
40
+ </tr>
41
+ </table>
42
+
43
+ <br>
44
+ </BODY>
45
+ </HTML>
js/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif ADDED
Binary file
js/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif ADDED
Binary file
js/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif ADDED
Binary file
js/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif ADDED
Binary file
js/tiny_mce/themes/advanced/docs/en/index.htm ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <HEAD>
3
+ <TITLE>Help Index</TITLE>
4
+ <link href="style.css" rel="stylesheet" type="text/css">
5
+ </HEAD>
6
+ <BODY onload="window.focus();">
7
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
8
+ <tr>
9
+ <td><span class="title">Table of contents</span></td>
10
+ <td align="right">&nbsp;</td>
11
+ </tr>
12
+ </table>
13
+ <hr noshade>
14
+ <br>
15
+ Click the links below to go to the different help sections.
16
+ <ul class="toc_ul">
17
+ <li class="toc_li"><a href="about.htm">About TinyMCE</a></li>
18
+ <li class="toc_li"><a href="common_buttons.htm">Common buttons</a></li>
19
+ <li class="toc_li"><a href="insert_image_button.htm">Insert image button</a></li>
20
+ <li class="toc_li"><a href="insert_link_button.htm">Insert link button</a></li>
21
+ <li class="toc_li"><a href="insert_anchor_button.htm">Insert anchor button</a></li>
22
+ <li class="toc_li"><a href="insert_table_button.htm">Insert table button</a></li>
23
+ <li class="toc_li"><a href="create_accessible_content.htm">Create accessible content</a></li>
24
+ </ul>
25
+ <hr noshade>
26
+ </BODY>
27
+ </HTML>
js/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <HEAD>
3
+ <TITLE>Insert anchor button</TITLE>
4
+ <link href="style.css" rel="stylesheet" type="text/css">
5
+ </HEAD>
6
+
7
+ <BODY>
8
+
9
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
10
+ <tr>
11
+ <td><span class="title">Insert anchor button</span></td>
12
+ <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
13
+ </tr>
14
+ </table>
15
+ <hr noshade>
16
+ <br>
17
+ This button opens a new window with the insert/edit anchor function.<br>
18
+ <br>
19
+ <img src="images/insert_anchor_window.gif" width="330" height="139" alt="Anchor dialog/window" /><br>
20
+ <br>
21
+ There are one field in this window, this is where you enter the name of you anchor point. Remember the anchor name needs to be unique. <br>
22
+ <br>
23
+ <hr noshade>
24
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
25
+ <tr>
26
+ <td>Go to: <a href="index.htm">Table of contents</a></td>
27
+ <td align="right"><a href="#">Top</a></td>
28
+ </tr>
29
+ </table>
30
+ <br>
31
+ </BODY>
32
+ </HTML>
js/tiny_mce/themes/advanced/docs/en/insert_image_button.htm ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <HEAD>
3
+ <TITLE>Insert image button</TITLE>
4
+ <link href="style.css" rel="stylesheet" type="text/css">
5
+ </HEAD>
6
+
7
+ <BODY>
8
+
9
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
10
+ <tr>
11
+ <td><span class="title">Insert image button</span></td>
12
+ <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
13
+ </tr>
14
+ </table>
15
+ <hr noshade>
16
+ <br>
17
+ The insert image button opens the window shown below.<br>
18
+ <br>
19
+ <img src="images/insert_image_window.gif" alt="Insert image dialog/window" /><br>
20
+ <br>
21
+ You simply enter a URL to the image you want to link to and enter a image description,
22
+ this is then displayed as an alternative text descripton of the image on the page.<br>
23
+ <br>
24
+ <strong>Field descriptions:</strong><br>
25
+ <table border="1" cellspacing="0">
26
+ <tr>
27
+ <td width="150"><strong>Image URL </strong></td>
28
+ <td>URL/path to the image.</td>
29
+ </tr>
30
+ <tr>
31
+ <td width="150"><strong>Image description </strong></td>
32
+ <td>Alternative description of image contents.</td>
33
+ </tr>
34
+ <tr>
35
+ <td><strong>Dimentions</strong></td>
36
+ <td>Image width/height. </td>
37
+ </tr>
38
+ <tr>
39
+ <td><strong>Alignment</strong></td>
40
+ <td>Image alignment, useful when wrapping text around images.</td>
41
+ </tr>
42
+ <tr>
43
+ <td><strong>Border</strong></td>
44
+ <td>Border thickness. </td>
45
+ </tr>
46
+ <tr>
47
+ <td><strong>VSpace</strong></td>
48
+ <td>Vertical space, useful when wrapping text around images.</td>
49
+ </tr>
50
+ <tr>
51
+ <td><strong>HSpace</strong></td>
52
+ <td>Horizontal space, useful when wrapping text around images.</td>
53
+ </tr>
54
+ </table>
55
+ <br>
56
+ <hr noshade>
57
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
58
+ <tr>
59
+ <td>Go to: <a href="index.htm">Table of contents</a></td>
60
+ <td align="right"><a href="#">Top</a></td>
61
+ </tr>
62
+ </table>
63
+ <br>
64
+ </BODY>
65
+ </HTML>
js/tiny_mce/themes/advanced/docs/en/insert_link_button.htm ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <HEAD>
3
+ <TITLE>Insert link button</TITLE>
4
+ <link href="style.css" rel="stylesheet" type="text/css">
5
+ </HEAD>
6
+
7
+ <BODY>
8
+
9
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
10
+ <tr>
11
+ <td><span class="title">Insert link button</span></td>
12
+ <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
13
+ </tr>
14
+ </table>
15
+ <hr noshade>
16
+ <br>
17
+ This button opens a new window with the insert/edit link function.<br>
18
+ <br>
19
+ <img src="images/insert_link_window.gif" width="330" height="159" alt="Insert link dialog/window" /><br>
20
+ <br>
21
+ There are two fields in this window the first one &quot;Link URL&quot; is the
22
+ URL of the link. The target enables you to select how the link is to be opened.<br>
23
+ <br>
24
+ <hr noshade>
25
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
26
+ <tr>
27
+ <td>Go to: <a href="index.htm">Table of contents</a></td>
28
+ <td align="right"><a href="#">Top</a></td>
29
+ </tr>
30
+ </table>
31
+ <br>
32
+ </BODY>
33
+ </HTML>
js/tiny_mce/themes/advanced/docs/en/insert_table_button.htm ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <HEAD>
3
+ <TITLE>Insert table button</TITLE>
4
+ <link href="style.css" rel="stylesheet" type="text/css">
5
+ </HEAD>
6
+
7
+ <BODY>
8
+
9
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
10
+ <tr>
11
+ <td><span class="title">Insert table button</span></td>
12
+ <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
13
+ </tr>
14
+ </table>
15
+ <hr noshade>
16
+ <br>
17
+ The insert table button opens the window shown below. This action enables you to create tables. <br>
18
+ <br>
19
+ <img src="images/insert_table_window.gif" width="340" height="229" alt="Image of table window" /><br>
20
+ <br>
21
+ <strong>Field descriptions:</strong><br>
22
+ <table border="1" cellspacing="0">
23
+ <tr>
24
+ <td width="150"><strong>Columns</strong></td>
25
+ <td>Number of columns in the table. </td>
26
+ </tr>
27
+ <tr>
28
+ <td width="150"><strong>Rows</strong></td>
29
+ <td>Number of rows in the new table.</td>
30
+ </tr>
31
+ <tr>
32
+ <td><strong>Cellpadding</strong></td>
33
+ <td>Cellpadding of the table . </td>
34
+ </tr>
35
+ <tr>
36
+ <td><strong>Cellspacing</strong></td>
37
+ <td>Cellspacing of the table .</td>
38
+ </tr>
39
+ <tr>
40
+ <td><strong>Alignment</strong></td>
41
+ <td>Table alignment . </td>
42
+ </tr>
43
+ <tr>
44
+ <td><strong>Border</strong></td>
45
+ <td>Border thinkness of table.</td>
46
+ </tr>
47
+ <tr>
48
+ <td><strong>Width</strong></td>
49
+ <td>Width in pixels of table .</td>
50
+ </tr>
51
+ <tr>
52
+ <td><strong>Height</strong></td>
53
+ <td>Height in pixels of table.</td>
54
+ </tr>
55
+ <tr>
56
+ <td><strong>Class</strong></td>
57
+ <td>Style or CSS class of table.</td>
58
+ </tr>
59
+ </table>
60
+ <br>
61
+ <br>
62
+ <hr noshade>
63
+ <table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
64
+ <tr>
65
+ <td>Go to: <a href="index.htm">Table of contents</a></td>
66
+ <td align="right"><a href="#">Top</a></td>
67
+ </tr>
68
+ </table>
69
+ <br>
70
+ </BODY>
71
+ </HTML>
js/tiny_mce/themes/advanced/docs/en/style.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body { background-color: #FFFFFF; }
2
+ body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 12px; }
3
+ .title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; }
4
+ .subtitle { font-size: 12px; font-weight: bold; }
5
+
6
+ .toc_ul, .toc_li { margin-left: 8px; line-height: 16px; }
7
+ .step_ol, .step_li { margin-left: 11px; line-height: 16px; }
8
+ img { border: #000000 solid 1px; }
9
+
10
+ a:visited { color: #666666; text-decoration: underline; }
11
+ a:active { color: #666666; text-decoration: underline; }
12
+ a:hover { color: #666666; text-decoration: underline; }
13
+ a { color: #666666; text-decoration: underline; }
14
+
15
+ .pageheader { border: #E0E0E0 solid 1px; }
16
+ .pagefooter { border: #E0E0E0 solid 1px; }
17
+ .sample { background-color: #FFFFFF; border: #000000 solid 1px; }
18
+ .samplecontent { font-size: 10px; }
19
+
20
+ .code { background-color: #FFFFFF; border: #000000 solid 1px; }
21
+ .codecontent { font-size: 10px; }
22
+ .codecontent a:visited { color: #666666; text-decoration: none; font-weight: bold }
23
+ .codecontent a:active { color: #666666; text-decoration: none; font-weight: bold }
24
+ .codecontent a:hover { color: #666666; text-decoration: none; font-weight: bold }
25
+ .codecontent a { color: #666666; text-decoration: none; font-weight: bold }
26
+
27
+ hr { height: 1px; }
28
+
js/tiny_mce/themes/advanced/editor_template.js ADDED
@@ -0,0 +1 @@
 
1
+ tinyMCE.importThemeLanguagePack('advanced');var TinyMCE_AdvancedTheme={_defColors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",_autoImportCSSClasses:true,_resizer:{},_buttons:[['bold','{$lang_bold_img}','lang_bold_desc','Bold'],['italic','{$lang_italic_img}','lang_italic_desc','Italic'],['underline','{$lang_underline_img}','lang_underline_desc','Underline'],['strikethrough','strikethrough.gif','lang_striketrough_desc','Strikethrough'],['justifyleft','justifyleft.gif','lang_justifyleft_desc','JustifyLeft'],['justifycenter','justifycenter.gif','lang_justifycenter_desc','JustifyCenter'],['justifyright','justifyright.gif','lang_justifyright_desc','JustifyRight'],['justifyfull','justifyfull.gif','lang_justifyfull_desc','JustifyFull'],['bullist','bullist.gif','lang_bullist_desc','InsertUnorderedList'],['numlist','numlist.gif','lang_numlist_desc','InsertOrderedList'],['outdent','outdent.gif','lang_outdent_desc','Outdent'],['indent','indent.gif','lang_indent_desc','Indent'],['cut','cut.gif','lang_cut_desc','Cut'],['copy','copy.gif','lang_copy_desc','Copy'],['paste','paste.gif','lang_paste_desc','Paste'],['undo','undo.gif','lang_undo_desc','Undo'],['redo','redo.gif','lang_redo_desc','Redo'],['link','link.gif','lang_link_desc','mceLink',true],['unlink','unlink.gif','lang_unlink_desc','unlink'],['image','image.gif','lang_image_desc','mceImage',true],['cleanup','cleanup.gif','lang_cleanup_desc','mceCleanup'],['help','help.gif','lang_help_desc','mceHelp'],['code','code.gif','lang_theme_code_desc','mceCodeEditor'],['hr','hr.gif','lang_theme_hr_desc','inserthorizontalrule'],['removeformat','removeformat.gif','lang_theme_removeformat_desc','removeformat'],['sub','sub.gif','lang_theme_sub_desc','subscript'],['sup','sup.gif','lang_theme_sup_desc','superscript'],['forecolor','forecolor.gif','lang_theme_forecolor_desc','forecolor',true],['forecolorpicker','forecolor.gif','lang_theme_forecolor_desc','forecolorpicker',true],['backcolor','backcolor.gif','lang_theme_backcolor_desc','HiliteColor',true],['backcolorpicker','backcolor.gif','lang_theme_backcolor_desc','backcolorpicker',true],['charmap','charmap.gif','lang_theme_charmap_desc','mceCharMap'],['visualaid','visualaid.gif','lang_theme_visualaid_desc','mceToggleVisualAid'],['anchor','anchor.gif','lang_theme_anchor_desc','mceInsertAnchor'],['newdocument','newdocument.gif','lang_newdocument_desc','mceNewDocument']],_buttonMap:'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells,delete_table',getControlHTML:function(button_name){var i,x,but;for(i=0;i<TinyMCE_AdvancedTheme._buttons.length;i++){but=TinyMCE_AdvancedTheme._buttons[i];if(but[0]==button_name&&(button_name=="forecolor"||button_name=="backcolor"))return tinyMCE.getMenuButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3]+"Menu",but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null));if(but[0]==button_name)return tinyMCE.getButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null))}switch(button_name){case"formatselect":var html='<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';var formats=tinyMCE.getParam("theme_advanced_blockformats","p,address,pre,h1,h2,h3,h4,h5,h6",true).split(',');var lookup=[['p','{$lang_theme_paragraph}'],['address','{$lang_theme_address}'],['pre','{$lang_theme_pre}'],['h1','{$lang_theme_h1}'],['h2','{$lang_theme_h2}'],['h3','{$lang_theme_h3}'],['h4','{$lang_theme_h4}'],['h5','{$lang_theme_h5}'],['h6','{$lang_theme_h6}'],['div','{$lang_theme_div}'],['blockquote','{$lang_theme_blockquote}'],['code','{$lang_theme_code}'],['dt','{$lang_theme_dt}'],['dd','{$lang_theme_dd}'],['samp','{$lang_theme_samp}']];html+='<option value="">{$lang_theme_block}</option>';for(var i=0;i<formats.length;i++){for(var x=0;x<lookup.length;x++){if(formats[i]==lookup[x][0])html+='<option value="&lt;'+lookup[x][0]+'&gt;">'+lookup[x][1]+'</option>'}}html+='</select>';return html;case"styleselect":return'<select id="{$editor_id}_styleSelect" onmousedown="tinyMCE.themes.advanced._setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event,this,window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';case"fontselect":var fontHTML='<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>';var iFonts='Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';var nFonts='Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sand;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats';var fonts=tinyMCE.getParam("theme_advanced_fonts",nFonts).split(';');for(i=0;i<fonts.length;i++){if(fonts[i]!=''){var parts=fonts[i].split('=');fontHTML+='<option value="'+parts[1]+'">'+parts[0]+'</option>'}}fontHTML+='</select>';return fontHTML;case"fontsizeselect":return'<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'+'<option value="0">{$lang_theme_font_size}</option>'+'<option value="1">1 (8 pt)</option>'+'<option value="2">2 (10 pt)</option>'+'<option value="3">3 (12 pt)</option>'+'<option value="4">4 (14 pt)</option>'+'<option value="5">5 (18 pt)</option>'+'<option value="6">6 (24 pt)</option>'+'<option value="7">7 (36 pt)</option>'+'</select>';case"|":case"separator":return'<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" alt="" />';case"spacer":return'<img src="{$themeurl}/images/separator.gif" width="2" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" alt="" />';case"rowseparator":return'<br />'}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case'mceHelp':tinyMCE.openWindow({file:'about.htm',width:480,height:380},{tinymce_version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion,tinymce_releasedate:tinyMCE.releaseDate,inline:"yes"});return true;case"mceLink":var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text}else selectedText=inst.getSel().toString();if(!tinyMCE.linkElement){if((tinyMCE.selectedElement.nodeName.toLowerCase()!="img")&&(selectedText.length<=0))return true}var href="",target="",title="",onclick="",action="insert",style_class="";if(tinyMCE.selectedElement.nodeName.toLowerCase()=="a")tinyMCE.linkElement=tinyMCE.selectedElement;if(tinyMCE.linkElement!=null&&tinyMCE.getAttrib(tinyMCE.linkElement,'href')=="")tinyMCE.linkElement=null;if(tinyMCE.linkElement){href=tinyMCE.getAttrib(tinyMCE.linkElement,'href');target=tinyMCE.getAttrib(tinyMCE.linkElement,'target');title=tinyMCE.getAttrib(tinyMCE.linkElement,'title');onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');style_class=tinyMCE.getAttrib(tinyMCE.linkElement,'class');if(onclick=="")onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');onclick=tinyMCE.cleanupEventStr(onclick);href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");mceRealHref=tinyMCE.getAttrib(tinyMCE.linkElement,'mce_href');if(mceRealHref!=""){href=mceRealHref;if(tinyMCE.getParam('convert_urls'))href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);")}action="update"}var template=new Array();template['file']='link.htm';template['width']=310;template['height']=200;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);if(inst.settings['insertlink_callback']){var returnVal=eval(inst.settings['insertlink_callback']+"(href, target, title, onclick, action, style_class);");if(returnVal&&returnVal['href'])TinyMCE_AdvancedTheme._insertLink(returnVal['href'],returnVal['target'],returnVal['title'],returnVal['onclick'],returnVal['style_class'])}else{tinyMCE.openWindow(template,{href:href,target:target,title:title,onclick:onclick,action:action,className:style_class,inline:"yes"})}return true;case"mceImage":var src="",alt="",border="",hspace="",vspace="",width="",height="",align="";var title="",onmouseover="",onmouseout="",action="insert";var img=tinyMCE.imgElement;var inst=tinyMCE.getInstanceById(editor_id);if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){img=tinyMCE.selectedElement;tinyMCE.imgElement=img}if(img){if(tinyMCE.getAttrib(img,'name').indexOf('mce_')==0)return true;src=tinyMCE.getAttrib(img,'src');alt=tinyMCE.getAttrib(img,'alt');if(alt=="")alt=tinyMCE.getAttrib(img,'title');if(tinyMCE.isGecko){var w=img.style.width;if(w!=null&&w!="")img.setAttribute("width",w);var h=img.style.height;if(h!=null&&h!="")img.setAttribute("height",h)}border=tinyMCE.getAttrib(img,'border');hspace=tinyMCE.getAttrib(img,'hspace');vspace=tinyMCE.getAttrib(img,'vspace');width=tinyMCE.getAttrib(img,'width');height=tinyMCE.getAttrib(img,'height');align=tinyMCE.getAttrib(img,'align');onmouseover=tinyMCE.getAttrib(img,'onmouseover');onmouseout=tinyMCE.getAttrib(img,'onmouseout');title=tinyMCE.getAttrib(img,'title');if(tinyMCE.isMSIE){width=img.attributes['width'].specified?width:"";height=img.attributes['height'].specified?height:""}src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");mceRealSrc=tinyMCE.getAttrib(img,'mce_src');if(mceRealSrc!=""){src=mceRealSrc;if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);")}action="update"}var template=new Array();template['file']='image.htm?src={$src}';template['width']=355;template['height']=265+(tinyMCE.isMSIE?25:0);template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);if(inst.settings['insertimage_callback']){var returnVal=eval(inst.settings['insertimage_callback']+"(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");if(returnVal&&returnVal['src'])TinyMCE_AdvancedTheme._insertImage(returnVal['src'],returnVal['alt'],returnVal['border'],returnVal['hspace'],returnVal['vspace'],returnVal['width'],returnVal['height'],returnVal['align'],returnVal['title'],returnVal['onmouseover'],returnVal['onmouseout'])}else tinyMCE.openWindow(template,{src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout,action:action,inline:"yes"});return true;case"forecolor":var fcp=new TinyMCE_Layer(editor_id+'_fcPreview',false),p,img,elm;TinyMCE_AdvancedTheme._hideMenus(editor_id);if(!fcp.exists()){fcp.create('div','mceColorPreview',document.getElementById(editor_id+'_toolbar'));elm=fcp.getElement();elm._editor_id=editor_id;elm._command="forecolor";elm._switchId=editor_id+"_forecolor";tinyMCE.addEvent(elm,'click',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseover',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseout',TinyMCE_AdvancedTheme._handleMenuEvent)}img=tinyMCE.selectNodes(document.getElementById(editor_id+"_forecolor"),function(n){return n.nodeName=="IMG"})[0];p=tinyMCE.getAbsPosition(img,document.getElementById(editor_id+'_toolbar'));fcp.moveTo(p.absLeft,p.absTop);fcp.getElement().style.backgroundColor=value!=null?value:tinyMCE.getInstanceById(editor_id).foreColor;fcp.show();return false;case"forecolorpicker":this._pickColor(editor_id,'forecolor');return true;case"forecolorMenu":TinyMCE_AdvancedTheme._hideMenus(editor_id);var ml=new TinyMCE_Layer(editor_id+'_fcMenu');if(!ml.exists())ml.create('div','mceMenu',document.body,TinyMCE_AdvancedTheme._getColorHTML(editor_id,'theme_advanced_text_colors','forecolor'));tinyMCE.switchClass(editor_id+'_forecolor','mceMenuButtonFocus');ml.moveRelativeTo(document.getElementById(editor_id+"_forecolor"),'bl');ml.moveBy(tinyMCE.isMSIE&&!tinyMCE.isOpera?-1:1,-1);if(tinyMCE.isOpera)ml.moveBy(0,-2);ml.show();return true;case"HiliteColor":var bcp=new TinyMCE_Layer(editor_id+'_bcPreview',false),p,img;TinyMCE_AdvancedTheme._hideMenus(editor_id);if(!bcp.exists()){bcp.create('div','mceColorPreview',document.getElementById(editor_id+'_toolbar'));elm=bcp.getElement();elm._editor_id=editor_id;elm._command="HiliteColor";elm._switchId=editor_id+"_backcolor";tinyMCE.addEvent(elm,'click',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseover',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseout',TinyMCE_AdvancedTheme._handleMenuEvent)}img=tinyMCE.selectNodes(document.getElementById(editor_id+"_backcolor"),function(n){return n.nodeName=="IMG"})[0];p=tinyMCE.getAbsPosition(img,document.getElementById(editor_id+'_toolbar'));bcp.moveTo(p.absLeft,p.absTop);bcp.getElement().style.backgroundColor=value!=null?value:tinyMCE.getInstanceById(editor_id).backColor;bcp.show();return false;case"HiliteColorMenu":TinyMCE_AdvancedTheme._hideMenus(editor_id);var ml=new TinyMCE_Layer(editor_id+'_bcMenu');if(!ml.exists())ml.create('div','mceMenu',document.body,TinyMCE_AdvancedTheme._getColorHTML(editor_id,'theme_advanced_background_colors','HiliteColor'));tinyMCE.switchClass(editor_id+'_backcolor','mceMenuButtonFocus');ml.moveRelativeTo(document.getElementById(editor_id+"_backcolor"),'bl');ml.moveBy(tinyMCE.isMSIE&&!tinyMCE.isOpera?-1:1,-1);if(tinyMCE.isOpera)ml.moveBy(0,-2);ml.show();return true;case"backcolorpicker":this._pickColor(editor_id,'HiliteColor');return true;case"mceColorPicker":if(user_interface){var template=[];if(!value['callback']&&!value['color'])value['color']=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=380;template['height']=250;template['close_previous']="no";template['width']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height',0);if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:value['color']})}else{var savedVal=tinyMCE.lastColorPickerValue,elm;if(savedVal['callback']){savedVal['callback'](value);return true}elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;if(elm.onchange!=null&&elm.onchange!='')eval('elm.onchange();')}return true;case"mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_width",720));template['height']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_height",580));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case"mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550+(tinyMCE.isOpera?40:0);template['height']=250;template['width']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=90+(tinyMCE.isNS7?30:0);template['width']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceNewDocument":if(confirm(tinyMCE.getLang('lang_newdocument')))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,' ');return true}return false},getEditorTemplate:function(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array(),skip;for(var i=0;i<in_array.length;i++){skip=false;for(var j=0;j<remove_array.length;j++){if(in_array[i]==remove_array[j]){skip=true}}if(!skip){outArray[outArray.length]=in_array[i]}}return outArray}function addToArray(in_array,add_array){for(var i=0;i<add_array.length;i++){in_array[in_array.length]=add_array[i]}return in_array}var template=new Array();var deltaHeight=0;var resizing=tinyMCE.getParam("theme_advanced_resizing",false);var path=tinyMCE.getParam("theme_advanced_path",true);var statusbarHTML='<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: '+(path?"block":"none")+'">&#160;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: '+(resizing?"block":"none")+'" onmousedown="tinyMCE.themes.advanced._setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='<option value="">{$lang_theme_style_select}</option>';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i<stylesAr.length;i++){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectHTML+='<option value="'+value+'">'+key+'</option>'}TinyMCE_AdvancedTheme._autoImportCSSClasses=false}switch(layoutManager){case"SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};toolbarHTML+='<a href="#" accesskey="q" title="'+tinyMCE.getLang("lang_toolbar_focus")+'"';if(!tinyMCE.getParam("accessibility_focus"))toolbarHTML+=' onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"';toolbarHTML+='></a>';for(var i=1;i<100;i++){var def=defVals["theme_advanced_buttons"+i];var buttons=tinyMCE.getParam("theme_advanced_buttons"+i,def==null?'':def,true,',');if(buttons.length==0)break;buttons=removeFromArray(buttons,tinyMCE.getParam("theme_advanced_disable","",true,','));buttons=addToArray(buttons,tinyMCE.getParam("theme_advanced_buttons"+i+"_add","",true,','));buttons=addToArray(tinyMCE.getParam("theme_advanced_buttons"+i+"_add_before","",true,','),buttons);for(var b=0;b<buttons.length;b++)toolbarHTML+=tinyMCE.getControlHTML(buttons[b]);if(buttons.length>0){toolbarHTML+="<br />";deltaHeight-=23}}toolbarHTML+='<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"></a>';template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width_style};height:{$height_style}"><tbody>';if(toolbarLocation=="top")template['html']+='<tr><td dir="ltr" class="mceToolbarTop" align="'+toolbarAlign+'" height="1" nowrap="nowrap"><span id="'+editorId+'_toolbar" class="mceToolbarContainer">'+toolbarHTML+'</span></td></tr>';if(statusbarLocation=="top"){template['html']+='<tr><td class="mceStatusbarTop" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23}template['html']+='<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';if(toolbarLocation=="bottom")template['html']+='<tr><td dir="ltr" class="mceToolbarBottom" align="'+toolbarAlign+'" height="1"><span id="'+editorId+'_toolbar" class="mceToolbarContainer">'+toolbarHTML+'</span></td></tr>';if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.applyTemplate(toolbarHTML,{editor_id:editorId});elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null}if(statusbarLocation=="bottom"){template['html']+='<tr><td class="mceStatusbarBottom" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23}template['html']+='</tbody></table>';break;case"RowLayout":template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i<containers.length;i++){if(containers[i]=="mceEditor")template['html']+='<tr><td align="center" class="mceEditor_border"><span id="{$editor_id}"></span></td></tr>';else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom"}else if(i==0){pathClass="mceStatusbar"}else{deltaHeight-=2}template['html']+='<tr><td class="'+pathClass+'" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=22}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);curContainer=removeFromArray(curContainer,tinyMCE.getParam("theme_advanced_disable","",true,','));for(var j=0;j<curContainer.length;j++)curContainerHTML+=tinyMCE.getControlHTML(curContainer[j]);if(curContainer.length>0){curContainerHTML+="<br />";deltaHeight-=23}template['html']+='<tr><td class="'+curCSS+'" align="'+curAlign+'" height="1">'+curContainerHTML+'</td></tr>'}}template['html']+='</tbody></table>';break;case"CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);")}break}if(resizing)template['html']+='<span id="{$editor_id}_resize_box" class="mceResizeBox"></span>';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);if(!template['delta_width'])template['delta_width']=0;if(!template['delta_height'])template['delta_height']=deltaHeight;return template},initInstance:function(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var w=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_AdvancedTheme._resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true))}}inst.addShortcut('ctrl','k','lang_link_desc','mceLink')},removeInstance:function(inst){new TinyMCE_Layer(inst.editorId+'_fcMenu').remove();new TinyMCE_Layer(inst.editorId+'_bcMenu').remove()},hideInstance:function(inst){TinyMCE_AdvancedTheme._hideMenus(inst.editorId)},_handleMenuEvent:function(e){var te=tinyMCE.isMSIE?window.event.srcElement:e.target;tinyMCE._menuButtonEvent(e.type=="mouseover"?"over":"out",document.getElementById(te._switchId));if(e.type=="click")tinyMCE.execInstanceCommand(te._editor_id,te._command)},_hideMenus:function(id){var fcml=new TinyMCE_Layer(id+'_fcMenu'),bcml=new TinyMCE_Layer(id+'_bcMenu');if(fcml.exists()&&fcml.isVisible()){tinyMCE.switchClass(id+'_forecolor','mceMenuButton');fcml.hide()}if(bcml.exists()&&bcml.isVisible()){tinyMCE.switchClass(id+'_backcolor','mceMenuButton');bcml.hide()}},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection,setup_content){var alignNode,breakOut,classNode;function selectByValue(select_elm,value,first_index){first_index=typeof(first_index)=="undefined"?false:true;if(select_elm){for(var i=0;i<select_elm.options.length;i++){var ov=""+select_elm.options[i].value;if(first_index&&ov.toLowerCase().indexOf(value.toLowerCase())==0){select_elm.selectedIndex=i;return true}if(ov==value){select_elm.selectedIndex=i;return true}}}return false};if(node==null)return;var pathElm=document.getElementById(editor_id+"_path");var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();TinyMCE_AdvancedTheme._hideMenus(editor_id);if(pathElm){var parentNode=node;var path=new Array();while(parentNode!=null){if(parentNode.nodeName.toUpperCase()=="BODY"){break}if(parentNode.nodeType==1&&tinyMCE.getAttrib(parentNode,"class").indexOf('mceItemHidden')==-1){path[path.length]=parentNode}parentNode=parentNode.parentNode}var html="";for(var i=path.length-1;i>=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName.indexOf("html:")==0)nodeName=nodeName.substring(5);if(nodeName=="b"){nodeName="strong"}if(nodeName=="i"){nodeName="em"}if(nodeName=="span"){var cn=tinyMCE.getAttrib(path[i],"class");if(cn!=""&&cn.indexOf('mceItem')==-1)nodeData+="class: "+cn+" ";var st=tinyMCE.getAttrib(path[i],"style");if(st!=""){st=tinyMCE.serializeStyle(tinyMCE.parseStyle(st));nodeData+="style: "+tinyMCE.xmlEncode(st)+" "}}if(nodeName=="font"){if(tinyMCE.getParam("convert_fonts_to_spans"))nodeName="span";var face=tinyMCE.getAttrib(path[i],"face");if(face!="")nodeData+="font: "+tinyMCE.xmlEncode(face)+" ";var size=tinyMCE.getAttrib(path[i],"size");if(size!="")nodeData+="size: "+tinyMCE.xmlEncode(size)+" ";var color=tinyMCE.getAttrib(path[i],"color");if(color!="")nodeData+="color: "+tinyMCE.xmlEncode(color)+" "}if(tinyMCE.getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" "}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(tinyMCE.getAttrib(path[i],'src')!=""){var src=tinyMCE.getAttrib(path[i],"mce_src");if(src=="")src=tinyMCE.getAttrib(path[i],"src");nodeData+="src: "+tinyMCE.xmlEncode(src)+" "}if(path[i].nodeName=='A'&&tinyMCE.getAttrib(path[i],'href')!=""){var href=tinyMCE.getAttrib(path[i],"mce_href");if(href=="")href=tinyMCE.getAttrib(path[i],"href");nodeData+="href: "+tinyMCE.xmlEncode(href)+" "}className=tinyMCE.getAttrib(path[i],"class");if((nodeName=="img"||nodeName=="span")&&className.indexOf('mceItem')!=-1){nodeName=className.replace(/mceItem([a-z]+)/gi,'$1').toLowerCase();nodeData=path[i].getAttribute('title')}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+tinyMCE.xmlEncode(anchor);nodeData=""}if(tinyMCE.getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className}}var cmd='tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');';html+='<a title="'+nodeData+'" href="javascript:'+cmd+'" onclick="'+cmd+'return false;" onmousedown="return false;" target="_self" class="mcePathItem">'+nodeName+'</a>';if(i>0){html+=" &raquo; "}}pathElm.innerHTML='<a href="#" accesskey="x"></a>'+tinyMCE.getLang('lang_theme_path')+": "+html+'&#160;'}tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClass(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClass(editor_id+'_link','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_unlink','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_outdent','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_image','mceButtonNormal');tinyMCE.switchClass(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClass(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClass(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal');tinyMCE.switchClass(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal')}tinyMCE.switchClass(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal');if(undo_levels!=-1){tinyMCE.switchClass(editor_id+'_undo','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_redo','mceButtonDisabled')}if(tinyMCE.getParentElement(node,"li,blockquote"))tinyMCE.switchClass(editor_id+'_outdent','mceButtonNormal');if(undo_index!=-1&&(undo_index<undo_levels-1&&undo_levels>0))tinyMCE.switchClass(editor_id+'_redo','mceButtonNormal');if(undo_index!=-1&&(undo_index>0&&undo_levels>0))tinyMCE.switchClass(editor_id+'_undo','mceButtonNormal');var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_AdvancedTheme._setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i<selectElm.options.length;i++){if(selectElm.options[i].value==classNode.className){index=i;breakOut=true;break}}}}while(!breakOut&&classNode!=null&&(classNode=classNode.parentNode)!=null);selectElm.selectedIndex=index}var selectElm=document.getElementById(editor_id+"_formatSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm)selectByValue(selectElm,"<"+elm.nodeName.toLowerCase()+">");else selectByValue(selectElm,"")}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){if(!tinyMCE.isSafari&&!(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var face=inst.queryCommandValue('FontName');face=face==null||face==""?"":face;selectByValue(selectElm,face,face!="")}else{var elm=tinyMCE.getParentElement(node,"font","face");if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family,family!=""))selectByValue(selectElm,"")}else selectByValue(selectElm,"")}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){if(!tinyMCE.isSafari&&!tinyMCE.isOpera){var size=inst.queryCommandValue('FontSize');selectByValue(selectElm,size==null||size==""?"0":size)}else{var elm=tinyMCE.getParentElement(node,"font","size");if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i<sizes.length;i++){if((''+sizes[i])==size){size=i;break}}}if(!selectByValue(selectElm,size))selectByValue(selectElm,"")}else selectByValue(selectElm,"0")}}alignNode=node;breakOut=false;do{if(!alignNode.getAttribute||!alignNode.getAttribute('align'))continue;switch(alignNode.getAttribute('align').toLowerCase()){case"left":tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonSelected');breakOut=true;break;case"right":tinyMCE.switchClass(editor_id+'_justifyright','mceButtonSelected');breakOut=true;break;case"middle":case"center":tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonSelected');breakOut=true;break;case"justify":tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonSelected');breakOut=true;break}}while(!breakOut&&(alignNode=alignNode.parentNode)!=null);var div=tinyMCE.getParentElement(node,"div");if(div&&div.style.textAlign=="center")tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonSelected');if(!setup_content){var ar=new Array("Bold","_bold","Italic","_italic","Strikethrough","_strikethrough","superscript","_sup","subscript","_sub");for(var i=0;i<ar.length;i+=2){if(inst.queryCommandState(ar[i]))tinyMCE.switchClass(editor_id+ar[i+1],'mceButtonSelected')}if(inst.queryCommandState("Underline")&&(node.parentNode==null||node.parentNode.nodeName!="A"))tinyMCE.switchClass(editor_id+'_underline','mceButtonSelected')}do{switch(node.nodeName){case"UL":tinyMCE.switchClass(editor_id+'_bullist','mceButtonSelected');break;case"OL":tinyMCE.switchClass(editor_id+'_numlist','mceButtonSelected');break;case"HR":tinyMCE.switchClass(editor_id+'_hr','mceButtonSelected');break;case"IMG":if(tinyMCE.getAttrib(node,'name').indexOf('mce_')!=0&&tinyMCE.getAttrib(node,'class').indexOf('mceItem')==-1){tinyMCE.switchClass(editor_id+'_image','mceButtonSelected')}break}}while((node=node.parentNode)!=null)},_setupCSSClasses:function(editor_id){var i,selectElm;if(!TinyMCE_AdvancedTheme._autoImportCSSClasses)return;selectElm=document.getElementById(editor_id+'_styleSelect');if(selectElm&&selectElm.getAttribute('cssImported')!='true'){var csses=tinyMCE.getCSSClasses(editor_id);if(csses&&selectElm){for(i=0;i<csses.length;i++)selectElm.options[selectElm.options.length]=new Option(csses[i],csses[i])}if(csses!=null&&csses.length>0)selectElm.setAttribute('cssImported','true')}},_setCookie:function(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie},_getCookie:function(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end))},_resizeTo:function(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;w=w<1?30:w;h=h<1?30:h;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;iw=iw<1?30:iw;ih=ih<1?30:ih;if(tinyMCE.isGecko){iw-=2;ih-=2}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth<minIframeWidth){dx=minIframeWidth-inst.iframeElement.clientWidth;inst.iframeElement.style.width=(iw+dx)+"px"}}inst.useCSS=false},_resizeEventHandler:function(e){var resizer=TinyMCE_AdvancedTheme._resizer;if(!resizer.resizing)return;e=typeof(e)=="undefined"?window.event:e;var dx=e.screenX-resizer.downX;var dy=e.screenY-resizer.downY;var resizeBox=resizer.resizeBox;var editorId=resizer.editorId;switch(e.type){case"mousemove":var w,h;w=resizer.width+dx;h=resizer.height+dy;w=w<1?1:w;h=h<1?1:h;if(resizer.horizontal)resizeBox.style.width=w+"px";resizeBox.style.height=h+"px";break;case"mouseup":TinyMCE_AdvancedTheme._setResizing(e,editorId,false);TinyMCE_AdvancedTheme._resizeTo(tinyMCE.getInstanceById(editorId),resizer.width+dx,resizer.height+dy,resizer.horizontal);if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var expires=new Date();expires.setTime(expires.getTime()+3600000*24*30);TinyMCE_AdvancedTheme._setCookie("TinyMCE_"+editorId+"_width",""+(resizer.horizontal?resizer.width+dx:""),expires);TinyMCE_AdvancedTheme._setCookie("TinyMCE_"+editorId+"_height",""+(resizer.height+dy),expires)}break}},_setResizing:function(e,editor_id,state){e=typeof(e)=="undefined"?window.event:e;var resizer=TinyMCE_AdvancedTheme._resizer;var editorContainer=document.getElementById(editor_id+'_parent');var editorArea=document.getElementById(editor_id+'_parent').firstChild;var resizeBox=document.getElementById(editor_id+'_resize_box');var inst=tinyMCE.getInstanceById(editor_id);if(state){var width=editorArea.clientWidth;var height=editorArea.clientHeight;resizeBox.style.width=width+"px";resizeBox.style.height=height+"px";resizer.iframeWidth=inst.iframeElement.clientWidth;resizer.iframeHeight=inst.iframeElement.clientHeight;editorArea.style.display="none";resizeBox.style.display="block";if(!resizer.eventHandlers){if(tinyMCE.isMSIE)tinyMCE.addEvent(document,"mousemove",TinyMCE_AdvancedTheme._resizeEventHandler);else tinyMCE.addEvent(window,"mousemove",TinyMCE_AdvancedTheme._resizeEventHandler);tinyMCE.addEvent(document,"mouseup",TinyMCE_AdvancedTheme._resizeEventHandler);resizer.eventHandlers=true}resizer.resizing=true;resizer.downX=e.screenX;resizer.downY=e.screenY;resizer.width=parseInt(resizeBox.style.width);resizer.height=parseInt(resizeBox.style.height);resizer.editorId=editor_id;resizer.resizeBox=resizeBox;resizer.horizontal=tinyMCE.getParam("theme_advanced_resize_horizontal",true)}else{resizer.resizing=false;resizeBox.style.display="none";editorArea.style.display=tinyMCE.isMSIE&&!tinyMCE.isOpera?"block":"table";tinyMCE.execCommand('mceResetDesignMode')}},_getColorHTML:function(id,n,cm){var i,h,cl;h='<span class="mceMenuLine"></span>';cl=tinyMCE.getParam(n,TinyMCE_AdvancedTheme._defColors).split(',');h+='<table class="mceColors"><tr>';for(i=0;i<cl.length;i++){c='tinyMCE.execInstanceCommand(\''+id+'\', \''+cm+'\', false, \'#'+cl[i]+'\');';h+='<td><a href="javascript:'+c+'" style="background-color: #'+cl[i]+'" onclick="'+c+';return false;"></a></td>';if((i+1)%8==0)h+='</tr><tr>'}h+='</tr></table>';if(tinyMCE.getParam("theme_advanced_more_colors",true))h+='<a href="javascript:void(0);"