compass-jquery-plugin 0.3.2.6 → 0.3.2.7.nil

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. data/README.md +2 -1
  2. data/VERSION.yml +2 -2
  3. data/lib/handle_js_files.rb +21 -2
  4. data/templates/dynatree/jquery.dynatree.js +23 -20
  5. data/templates/dynatree/jquery.dynatree.min.js +38 -38
  6. data/templates/dynatree/jquery/dynatree/aero.scss +1 -1
  7. data/templates/dynatree/jquery/dynatree/aqua.scss +1 -1
  8. data/templates/dynatree/jquery/dynatree/crystal.scss +1 -1
  9. data/templates/dynatree/jquery/dynatree/xp.scss +2 -2
  10. data/templates/ical/jquery/ical.scss +10 -10
  11. data/templates/jqgrid/i18n/jqgrid/locale-lt.js +134 -0
  12. data/templates/jqgrid/i18n/jqgrid/locale-lt.min.js +7 -0
  13. data/templates/jqgrid/jquery.jqGrid.js +155 -65
  14. data/templates/jqgrid/jquery.jqGrid.min.js +396 -393
  15. data/templates/jqgrid/manifest.rb +2 -0
  16. data/templates/jqtouch/jquery.jqtouch.js +166 -195
  17. data/templates/jqtouch/jquery.jqtouch.min.js +1 -1
  18. data/templates/jqtouch/jquery/touch/apple.scss +5 -5
  19. data/templates/jqtouch/jquery/touch/default.scss +5 -5
  20. data/templates/jqtouch/jquery/touch/jqt.scss +12 -7
  21. data/templates/jqtouch/jquery/touch/jqtouch.scss +11 -13
  22. data/templates/jquery/history.adapter.jquery.js +54 -67
  23. data/templates/jquery/history.adapter.jquery.min.js +2 -2
  24. data/templates/jquery/history.html4.js +587 -680
  25. data/templates/jquery/history.html4.min.js +8 -18
  26. data/templates/jquery/history.js +1670 -1289
  27. data/templates/jquery/history.min.js +25 -21
  28. data/templates/jquery/i18n/jquery.ui/datepicker-ar.js +1 -1
  29. data/templates/jquery/i18n/jquery.ui/datepicker-ar.min.js +1 -1
  30. data/templates/jquery/i18n/jquery.ui/datepicker-tj.js +23 -0
  31. data/templates/jquery/i18n/jquery.ui/datepicker-tj.min.js +2 -0
  32. data/templates/jquery/jquery-ui.js +97 -61
  33. data/templates/jquery/jquery-ui.min.js +175 -175
  34. data/templates/jquery/jquery.dst.js +86 -151
  35. data/templates/jquery/jquery/ui/_theme.scss +13 -13
  36. data/templates/jquery/json2.js +214 -214
  37. data/templates/jquery/manifest.rb +2 -0
  38. data/templates/mobile/jquery.mobile.js +324 -225
  39. data/templates/mobile/jquery.mobile.min.js +4 -4
  40. data/templates/mobile/jquery/mobile/_base.scss +60 -48
  41. data/templates/mobile/jquery/mobile/default.scss +57 -80
  42. data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
  43. data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
  44. data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
  45. data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
  46. data/templates/mobile/jquery/mobile/valencia.scss +61 -73
  47. data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
  48. data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
  49. data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
  50. data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
  51. data/templates/mobile/manifest.rb +0 -8
  52. data/templates/ribbon/jquery/ribbon/office.scss +12 -12
  53. data/templates/ribbon/jquery/ribbon/windows7.scss +12 -12
  54. data/templates/tiny_mce/manifest.rb +16 -0
  55. data/templates/tiny_mce/tiny_mce/jquery.tinymce.js +1 -1
  56. data/templates/tiny_mce/tiny_mce/langs/de.js +1 -0
  57. data/templates/tiny_mce/tiny_mce/langs/en.js +1 -222
  58. data/templates/tiny_mce/tiny_mce/plugins/advhr/css/advhr.css +1 -5
  59. data/templates/tiny_mce/tiny_mce/plugins/advhr/editor_plugin.js +1 -1
  60. data/templates/tiny_mce/tiny_mce/plugins/advhr/editor_plugin_src.js +1 -57
  61. data/templates/tiny_mce/tiny_mce/plugins/advhr/js/rule.js +1 -43
  62. data/templates/tiny_mce/tiny_mce/plugins/advhr/langs/de_dlg.js +1 -0
  63. data/templates/tiny_mce/tiny_mce/plugins/advhr/langs/en_dlg.js +1 -7
  64. data/templates/tiny_mce/tiny_mce/plugins/advhr/rule.htm +1 -58
  65. data/templates/tiny_mce/tiny_mce/plugins/advimage/css/advimage.css +1 -13
  66. data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin.js +1 -1
  67. data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin_src.js +1 -50
  68. data/templates/tiny_mce/tiny_mce/plugins/advimage/image.htm +1 -235
  69. data/templates/tiny_mce/tiny_mce/plugins/advimage/js/image.js +1 -445
  70. data/templates/tiny_mce/tiny_mce/plugins/advimage/langs/de_dlg.js +1 -0
  71. data/templates/tiny_mce/tiny_mce/plugins/advimage/langs/en_dlg.js +1 -45
  72. data/templates/tiny_mce/tiny_mce/plugins/advlink/css/advlink.css +1 -8
  73. data/templates/tiny_mce/tiny_mce/plugins/advlink/editor_plugin.js +1 -1
  74. data/templates/tiny_mce/tiny_mce/plugins/advlink/editor_plugin_src.js +1 -61
  75. data/templates/tiny_mce/tiny_mce/plugins/advlink/js/advlink.js +1 -525
  76. data/templates/tiny_mce/tiny_mce/plugins/advlink/langs/de_dlg.js +1 -0
  77. data/templates/tiny_mce/tiny_mce/plugins/advlink/langs/en_dlg.js +1 -54
  78. data/templates/tiny_mce/tiny_mce/plugins/advlink/link.htm +1 -338
  79. data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin.js +1 -1
  80. data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin_src.js +1 -154
  81. data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin.js +1 -1
  82. data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin_src.js +1 -119
  83. data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin.js +1 -1
  84. data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin_src.js +1 -431
  85. data/templates/tiny_mce/tiny_mce/plugins/autosave/langs/en.js +1 -4
  86. data/templates/tiny_mce/tiny_mce/plugins/bbcode/editor_plugin.js +1 -1
  87. data/templates/tiny_mce/tiny_mce/plugins/bbcode/editor_plugin_src.js +1 -120
  88. data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -1
  89. data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin_src.js +1 -154
  90. data/templates/tiny_mce/tiny_mce/plugins/directionality/editor_plugin.js +1 -1
  91. data/templates/tiny_mce/tiny_mce/plugins/directionality/editor_plugin_src.js +1 -82
  92. data/templates/tiny_mce/tiny_mce/plugins/emotions/editor_plugin.js +1 -1
  93. data/templates/tiny_mce/tiny_mce/plugins/emotions/editor_plugin_src.js +1 -43
  94. data/templates/tiny_mce/tiny_mce/plugins/emotions/emotions.htm +1 -41
  95. data/templates/tiny_mce/tiny_mce/plugins/emotions/js/emotions.js +1 -22
  96. data/templates/tiny_mce/tiny_mce/plugins/emotions/langs/de_dlg.js +1 -0
  97. data/templates/tiny_mce/tiny_mce/plugins/emotions/langs/en_dlg.js +1 -20
  98. data/templates/tiny_mce/tiny_mce/plugins/example/dialog.htm +1 -22
  99. data/templates/tiny_mce/tiny_mce/plugins/example/editor_plugin.js +1 -1
  100. data/templates/tiny_mce/tiny_mce/plugins/example/editor_plugin_src.js +1 -84
  101. data/templates/tiny_mce/tiny_mce/plugins/example/js/dialog.js +1 -19
  102. data/templates/tiny_mce/tiny_mce/plugins/example/langs/en.js +1 -3
  103. data/templates/tiny_mce/tiny_mce/plugins/example/langs/en_dlg.js +1 -3
  104. data/templates/tiny_mce/tiny_mce/plugins/fullpage/css/fullpage.css +1 -182
  105. data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin.js +1 -1
  106. data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin_src.js +1 -166
  107. data/templates/tiny_mce/tiny_mce/plugins/fullpage/fullpage.htm +1 -571
  108. data/templates/tiny_mce/tiny_mce/plugins/fullpage/js/fullpage.js +1 -492
  109. data/templates/tiny_mce/tiny_mce/plugins/fullpage/langs/de_dlg.js +1 -0
  110. data/templates/tiny_mce/tiny_mce/plugins/fullpage/langs/en_dlg.js +1 -85
  111. data/templates/tiny_mce/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -1
  112. data/templates/tiny_mce/tiny_mce/plugins/fullscreen/editor_plugin_src.js +1 -159
  113. data/templates/tiny_mce/tiny_mce/plugins/fullscreen/fullscreen.htm +1 -109
  114. data/templates/tiny_mce/tiny_mce/plugins/iespell/editor_plugin.js +1 -1
  115. data/templates/tiny_mce/tiny_mce/plugins/iespell/editor_plugin_src.js +1 -54
  116. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -1
  117. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +1 -696
  118. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +1 -90
  119. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/template.htm +1 -387
  120. data/templates/tiny_mce/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -1
  121. data/templates/tiny_mce/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +1 -83
  122. data/templates/tiny_mce/tiny_mce/plugins/layer/editor_plugin.js +1 -1
  123. data/templates/tiny_mce/tiny_mce/plugins/layer/editor_plugin_src.js +1 -214
  124. data/templates/tiny_mce/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -1
  125. data/templates/tiny_mce/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +1 -139
  126. data/templates/tiny_mce/tiny_mce/plugins/media/css/media.css +1 -17
  127. data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin.js +1 -1
  128. data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin_src.js +1 -770
  129. data/templates/tiny_mce/tiny_mce/plugins/media/js/embed.js +1 -73
  130. data/templates/tiny_mce/tiny_mce/plugins/media/js/media.js +1 -340
  131. data/templates/tiny_mce/tiny_mce/plugins/media/langs/de_dlg.js +1 -0
  132. data/templates/tiny_mce/tiny_mce/plugins/media/langs/en_dlg.js +1 -109
  133. data/templates/tiny_mce/tiny_mce/plugins/media/media.htm +1 -812
  134. data/templates/tiny_mce/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -1
  135. data/templates/tiny_mce/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +1 -53
  136. data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin.js +1 -1
  137. data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin_src.js +1 -90
  138. data/templates/tiny_mce/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -1
  139. data/templates/tiny_mce/tiny_mce/plugins/pagebreak/editor_plugin_src.js +1 -74
  140. data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin.js +1 -1
  141. data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin_src.js +1 -899
  142. data/templates/tiny_mce/tiny_mce/plugins/paste/js/pastetext.js +1 -36
  143. data/templates/tiny_mce/tiny_mce/plugins/paste/js/pasteword.js +1 -51
  144. data/templates/tiny_mce/tiny_mce/plugins/paste/langs/de_dlg.js +1 -0
  145. data/templates/tiny_mce/tiny_mce/plugins/paste/langs/en_dlg.js +1 -5
  146. data/templates/tiny_mce/tiny_mce/plugins/paste/pastetext.htm +1 -27
  147. data/templates/tiny_mce/tiny_mce/plugins/paste/pasteword.htm +1 -21
  148. data/templates/tiny_mce/tiny_mce/plugins/preview/editor_plugin.js +1 -1
  149. data/templates/tiny_mce/tiny_mce/plugins/preview/editor_plugin_src.js +1 -53
  150. data/templates/tiny_mce/tiny_mce/plugins/preview/example.html +17 -16
  151. data/templates/tiny_mce/tiny_mce/plugins/preview/jscripts/embed.js +1 -73
  152. data/templates/tiny_mce/tiny_mce/plugins/preview/preview.html +10 -9
  153. data/templates/tiny_mce/tiny_mce/plugins/print/editor_plugin.js +1 -1
  154. data/templates/tiny_mce/tiny_mce/plugins/print/editor_plugin_src.js +1 -34
  155. data/templates/tiny_mce/tiny_mce/plugins/save/editor_plugin.js +1 -1
  156. data/templates/tiny_mce/tiny_mce/plugins/save/editor_plugin_src.js +1 -101
  157. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/css/searchreplace.css +1 -6
  158. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -1
  159. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/editor_plugin_src.js +1 -61
  160. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/js/searchreplace.js +1 -140
  161. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/langs/de_dlg.js +1 -0
  162. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/langs/en_dlg.js +1 -16
  163. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/searchreplace.htm +1 -100
  164. data/templates/tiny_mce/tiny_mce/plugins/spellchecker/css/content.css +1 -1
  165. data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -1
  166. data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin_src.js +1 -415
  167. data/templates/tiny_mce/tiny_mce/plugins/style/css/props.css +1 -13
  168. data/templates/tiny_mce/tiny_mce/plugins/style/editor_plugin.js +1 -1
  169. data/templates/tiny_mce/tiny_mce/plugins/style/editor_plugin_src.js +1 -55
  170. data/templates/tiny_mce/tiny_mce/plugins/style/js/props.js +1 -635
  171. data/templates/tiny_mce/tiny_mce/plugins/style/langs/de_dlg.js +1 -0
  172. data/templates/tiny_mce/tiny_mce/plugins/style/langs/en_dlg.js +1 -70
  173. data/templates/tiny_mce/tiny_mce/plugins/style/props.htm +1 -838
  174. data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -1
  175. data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin_src.js +1 -114
  176. data/templates/tiny_mce/tiny_mce/plugins/table/cell.htm +1 -178
  177. data/templates/tiny_mce/tiny_mce/plugins/table/css/cell.css +1 -17
  178. data/templates/tiny_mce/tiny_mce/plugins/table/css/row.css +1 -25
  179. data/templates/tiny_mce/tiny_mce/plugins/table/css/table.css +1 -13
  180. data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin.js +1 -1
  181. data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin_src.js +1 -1183
  182. data/templates/tiny_mce/tiny_mce/plugins/table/js/cell.js +1 -284
  183. data/templates/tiny_mce/tiny_mce/plugins/table/js/merge_cells.js +1 -27
  184. data/templates/tiny_mce/tiny_mce/plugins/table/js/row.js +1 -232
  185. data/templates/tiny_mce/tiny_mce/plugins/table/js/table.js +1 -450
  186. data/templates/tiny_mce/tiny_mce/plugins/table/langs/de_dlg.js +1 -0
  187. data/templates/tiny_mce/tiny_mce/plugins/table/langs/en_dlg.js +1 -74
  188. data/templates/tiny_mce/tiny_mce/plugins/table/merge_cells.htm +1 -32
  189. data/templates/tiny_mce/tiny_mce/plugins/table/row.htm +1 -157
  190. data/templates/tiny_mce/tiny_mce/plugins/table/table.htm +1 -188
  191. data/templates/tiny_mce/tiny_mce/plugins/template/blank.htm +1 -12
  192. data/templates/tiny_mce/tiny_mce/plugins/template/css/template.css +1 -23
  193. data/templates/tiny_mce/tiny_mce/plugins/template/editor_plugin.js +1 -1
  194. data/templates/tiny_mce/tiny_mce/plugins/template/editor_plugin_src.js +1 -159
  195. data/templates/tiny_mce/tiny_mce/plugins/template/js/template.js +1 -106
  196. data/templates/tiny_mce/tiny_mce/plugins/template/langs/de_dlg.js +1 -0
  197. data/templates/tiny_mce/tiny_mce/plugins/template/langs/en_dlg.js +1 -15
  198. data/templates/tiny_mce/tiny_mce/plugins/template/template.htm +1 -31
  199. data/templates/tiny_mce/tiny_mce/plugins/visualchars/editor_plugin.js +1 -1
  200. data/templates/tiny_mce/tiny_mce/plugins/visualchars/editor_plugin_src.js +1 -83
  201. data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin.js +1 -1
  202. data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin_src.js +1 -114
  203. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/abbr.htm +1 -142
  204. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/acronym.htm +1 -142
  205. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/attributes.htm +1 -149
  206. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/cite.htm +1 -142
  207. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/css/attributes.css +1 -11
  208. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/css/popup.css +1 -9
  209. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/del.htm +1 -162
  210. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -1
  211. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +1 -132
  212. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/ins.htm +1 -162
  213. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/abbr.js +1 -28
  214. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/acronym.js +1 -28
  215. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/attributes.js +1 -125
  216. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/cite.js +1 -28
  217. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/del.js +1 -53
  218. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/element_common.js +1 -229
  219. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/js/ins.js +1 -53
  220. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/langs/de_dlg.js +1 -0
  221. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +1 -32
  222. data/templates/tiny_mce/tiny_mce/themes/advanced/about.htm +1 -52
  223. data/templates/tiny_mce/tiny_mce/themes/advanced/anchor.htm +1 -26
  224. data/templates/tiny_mce/tiny_mce/themes/advanced/charmap.htm +1 -51
  225. data/templates/tiny_mce/tiny_mce/themes/advanced/color_picker.htm +1 -74
  226. data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template.js +1 -1
  227. data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template_src.js +1 -1328
  228. data/templates/tiny_mce/tiny_mce/themes/advanced/image.htm +1 -80
  229. data/templates/tiny_mce/tiny_mce/themes/advanced/js/about.js +1 -73
  230. data/templates/tiny_mce/tiny_mce/themes/advanced/js/anchor.js +1 -42
  231. data/templates/tiny_mce/tiny_mce/themes/advanced/js/charmap.js +1 -354
  232. data/templates/tiny_mce/tiny_mce/themes/advanced/js/color_picker.js +1 -329
  233. data/templates/tiny_mce/tiny_mce/themes/advanced/js/image.js +1 -247
  234. data/templates/tiny_mce/tiny_mce/themes/advanced/js/link.js +1 -153
  235. data/templates/tiny_mce/tiny_mce/themes/advanced/js/source_editor.js +1 -56
  236. data/templates/tiny_mce/tiny_mce/themes/advanced/langs/de.js +1 -0
  237. data/templates/tiny_mce/tiny_mce/themes/advanced/langs/de_dlg.js +1 -0
  238. data/templates/tiny_mce/tiny_mce/themes/advanced/langs/en.js +1 -68
  239. data/templates/tiny_mce/tiny_mce/themes/advanced/langs/en_dlg.js +1 -54
  240. data/templates/tiny_mce/tiny_mce/themes/advanced/link.htm +1 -57
  241. data/templates/tiny_mce/tiny_mce/themes/advanced/shortcuts.htm +1 -47
  242. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/content.css +1 -47
  243. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/dialog.css +1 -117
  244. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/ui.css +1 -213
  245. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/content.css +1 -23
  246. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +1 -105
  247. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/ui.css +1 -101
  248. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/content.css +1 -46
  249. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/dialog.css +1 -116
  250. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui.css +1 -215
  251. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +1 -8
  252. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +1 -5
  253. data/templates/tiny_mce/tiny_mce/themes/advanced/source_editor.htm +1 -25
  254. data/templates/tiny_mce/tiny_mce/themes/simple/editor_template.js +1 -1
  255. data/templates/tiny_mce/tiny_mce/themes/simple/editor_template_src.js +1 -84
  256. data/templates/tiny_mce/tiny_mce/themes/simple/langs/de.js +1 -0
  257. data/templates/tiny_mce/tiny_mce/themes/simple/langs/en.js +1 -11
  258. data/templates/tiny_mce/tiny_mce/themes/simple/skins/default/content.css +1 -25
  259. data/templates/tiny_mce/tiny_mce/themes/simple/skins/default/ui.css +1 -32
  260. data/templates/tiny_mce/tiny_mce/themes/simple/skins/o2k7/content.css +1 -17
  261. data/templates/tiny_mce/tiny_mce/themes/simple/skins/o2k7/ui.css +1 -35
  262. data/templates/tiny_mce/tiny_mce/tiny_mce.js +1 -1
  263. data/templates/tiny_mce/tiny_mce/tiny_mce_popup.js +1 -5
  264. data/templates/tiny_mce/tiny_mce/utils/editable_selects.js +1 -70
  265. data/templates/tiny_mce/tiny_mce/utils/form_utils.js +1 -207
  266. data/templates/tiny_mce/tiny_mce/utils/mctabs.js +1 -162
  267. data/templates/tiny_mce/tiny_mce/utils/validate.js +1 -252
  268. metadata +32 -17
  269. data/templates/mobile/jquery/mobile/default/form-check-off.png +0 -0
  270. data/templates/mobile/jquery/mobile/default/form-check-on.png +0 -0
  271. data/templates/mobile/jquery/mobile/default/form-radio-off.png +0 -0
  272. data/templates/mobile/jquery/mobile/default/form-radio-on.png +0 -0
  273. data/templates/mobile/jquery/mobile/valencia/form-check-off.png +0 -0
  274. data/templates/mobile/jquery/mobile/valencia/form-check-on.png +0 -0
  275. data/templates/mobile/jquery/mobile/valencia/form-radio-off.png +0 -0
  276. data/templates/mobile/jquery/mobile/valencia/form-radio-on.png +0 -0
@@ -1,53 +1 @@
1
- /**
2
- * ins.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- function init() {
12
- SXE.initElementDialog('ins');
13
- if (SXE.currentAction == "update") {
14
- setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
15
- setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
16
- SXE.showRemoveButton();
17
- }
18
- }
19
-
20
- function setElementAttribs(elm) {
21
- setAllCommonAttribs(elm);
22
- setAttrib(elm, 'datetime');
23
- setAttrib(elm, 'cite');
24
- elm.removeAttribute('data-mce-new');
25
- }
26
-
27
- function insertIns() {
28
- var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS');
29
-
30
- if (elm == null) {
31
- var s = SXE.inst.selection.getContent();
32
- if(s.length > 0) {
33
- insertInlineElement('ins');
34
- var elementArray = SXE.inst.dom.select('ins[data-mce-new]');
35
- for (var i=0; i<elementArray.length; i++) {
36
- var elm = elementArray[i];
37
- setElementAttribs(elm);
38
- }
39
- }
40
- } else {
41
- setElementAttribs(elm);
42
- }
43
- tinyMCEPopup.editor.nodeChanged();
44
- tinyMCEPopup.execCommand('mceEndUndoLevel');
45
- tinyMCEPopup.close();
46
- }
47
-
48
- function removeIns() {
49
- SXE.removeElement('ins');
50
- tinyMCEPopup.close();
51
- }
52
-
53
- tinyMCEPopup.onInit.add(init);
1
+ function init(){SXE.initElementDialog("ins");if(SXE.currentAction=="update"){setFormValue("datetime",tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement,"datetime"));setFormValue("cite",tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement,"cite"));SXE.showRemoveButton()}}function setElementAttribs(a){setAllCommonAttribs(a);setAttrib(a,"datetime");setAttrib(a,"cite");a.removeAttribute("data-mce-new")}function insertIns(){var d=tinyMCEPopup.editor.dom.getParent(SXE.focusElement,"INS");if(d==null){var c=SXE.inst.selection.getContent();if(c.length>0){insertInlineElement("ins");var a=SXE.inst.dom.select("ins[data-mce-new]");for(var b=0;b<a.length;b++){var d=a[b];setElementAttribs(d)}}}else{setElementAttribs(d)}tinyMCEPopup.editor.nodeChanged();tinyMCEPopup.execCommand("mceEndUndoLevel");tinyMCEPopup.close()}function removeIns(){SXE.removeElement("ins");tinyMCEPopup.close()}tinyMCEPopup.onInit.add(init);
@@ -0,0 +1 @@
1
+ tinyMCE.addI18n("de.xhtmlxtras_dlg",{attribs_title:"Attribute einf\u00fcgen/bearbeiten",option_rtl:"Rechts nach links",option_ltr:"Links nach rechts",insert_date:"Aktuelle Zeit/Datum einf\u00fcgen",remove:"Entfernen",title_cite_element:"Quellenangabe",title_abbr_element:"Abk\u00fcrzung",title_acronym_element:"Akronym",title_del_element:"Entfernter Text",title_ins_element:"Eingef\u00fcgter Text",fieldset_events_tab:"Ereignisse",fieldset_attrib_tab:"Attribute",fieldset_general_tab:"Allgemeine Einstellungen",events_tab:"Ereignisse",attrib_tab:"Attribute",general_tab:"Allgemein",attribute_attrib_tab:"Attribute",attribute_events_tab:"Ereignisse",attribute_label_accesskey:"Tastenk\u00fcrzel",attribute_label_tabindex:"Tabindex",attribute_label_langcode:"Sprache",attribute_option_rtl:"Rechts nach links",attribute_option_ltr:"Links nach rechts",attribute_label_langdir:"Schriftrichtung",attribute_label_datetime:"Zeit/Datum",attribute_label_cite:"Quellenangabe",attribute_label_style:"Format",attribute_label_class:"Klasse",attribute_label_id:"ID",attribute_label_title:"Titel"});
@@ -1,32 +1 @@
1
- tinyMCE.addI18n('en.xhtmlxtras_dlg',{
2
- attribute_label_title:"Title",
3
- attribute_label_id:"ID",
4
- attribute_label_class:"Class",
5
- attribute_label_style:"Style",
6
- attribute_label_cite:"Cite",
7
- attribute_label_datetime:"Date/Time",
8
- attribute_label_langdir:"Text Direction",
9
- attribute_option_ltr:"Left to right",
10
- attribute_option_rtl:"Right to left",
11
- attribute_label_langcode:"Language",
12
- attribute_label_tabindex:"TabIndex",
13
- attribute_label_accesskey:"AccessKey",
14
- attribute_events_tab:"Events",
15
- attribute_attrib_tab:"Attributes",
16
- general_tab:"General",
17
- attrib_tab:"Attributes",
18
- events_tab:"Events",
19
- fieldset_general_tab:"General Settings",
20
- fieldset_attrib_tab:"Element Attributes",
21
- fieldset_events_tab:"Element Events",
22
- title_ins_element:"Insertion Element",
23
- title_del_element:"Deletion Element",
24
- title_acronym_element:"Acronym Element",
25
- title_abbr_element:"Abbreviation Element",
26
- title_cite_element:"Citation Element",
27
- remove:"Remove",
28
- insert_date:"Insert current date/time",
29
- option_ltr:"Left to right",
30
- option_rtl:"Right to left",
31
- attribs_title:"Insert/Edit Attributes"
32
- });
1
+ tinyMCE.addI18n("en.xhtmlxtras_dlg",{attribute_label_title:"Title",attribute_label_id:"ID",attribute_label_class:"Class",attribute_label_style:"Style",attribute_label_cite:"Cite",attribute_label_datetime:"Date/Time",attribute_label_langdir:"Text Direction",attribute_option_ltr:"Left to right",attribute_option_rtl:"Right to left",attribute_label_langcode:"Language",attribute_label_tabindex:"TabIndex",attribute_label_accesskey:"AccessKey",attribute_events_tab:"Events",attribute_attrib_tab:"Attributes",general_tab:"General",attrib_tab:"Attributes",events_tab:"Events",fieldset_general_tab:"General Settings",fieldset_attrib_tab:"Element Attributes",fieldset_events_tab:"Element Events",title_ins_element:"Insertion Element",title_del_element:"Deletion Element",title_acronym_element:"Acronym Element",title_abbr_element:"Abbreviation Element",title_cite_element:"Citation Element",remove:"Remove",insert_date:"Insert current date/time",option_ltr:"Left to right",option_rtl:"Right to left",attribs_title:"Insert/Edit Attributes"});
@@ -1,52 +1 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advanced_dlg.about_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
- <script type="text/javascript" src="js/about.js"></script>
8
- </head>
9
- <body id="about" style="display: none">
10
- <div class="tabs">
11
- <ul>
12
- <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
13
- <li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
14
- <li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
15
- </ul>
16
- </div>
17
-
18
- <div class="panel_wrapper">
19
- <div id="general_panel" class="panel current">
20
- <h3>{#advanced_dlg.about_title}</h3>
21
- <p>Version: <span id="version"></span> (<span id="date"></span>)</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-2008, <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">
28
- <a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
29
- </div>
30
- </div>
31
-
32
- <div id="plugins_panel" class="panel">
33
- <div id="pluginscontainer">
34
- <h3>{#advanced_dlg.about_loaded}</h3>
35
-
36
- <div id="plugintablecontainer">
37
- </div>
38
-
39
- <p>&nbsp;</p>
40
- </div>
41
- </div>
42
-
43
- <div id="help_panel" class="panel noscroll" style="overflow: visible;">
44
- <div id="iframecontainer"></div>
45
- </div>
46
- </div>
47
-
48
- <div class="mceActionPanel">
49
- <input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
50
- </div>
51
- </body>
52
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>{#advanced_dlg.about_title}</title><script type="text/javascript" src="../../tiny_mce_popup.js"></script><script type="text/javascript" src="../../utils/mctabs.js"></script><script type="text/javascript" src="js/about.js"></script></head><body id="about" style="display: none"><div class="tabs"><ul><li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li><li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li><li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li></ul></div><div class="panel_wrapper"><div id="general_panel" class="panel current"><h3>{#advanced_dlg.about_title}</h3><p>Version:<span id="version"></span>(<span id="date"></span>)</p><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>by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p><p>Copyright &copy;2003-2008,<a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>,All rights reserved.</p><p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p><div id="buttoncontainer"><a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0"/></a></div></div><div id="plugins_panel" class="panel"><div id="pluginscontainer"><h3>{#advanced_dlg.about_loaded}</h3><div id="plugintablecontainer"></div><p>&nbsp;</p></div></div><div id="help_panel" class="panel noscroll" style="overflow: visible;"><div id="iframecontainer"></div></div></div><div class="mceActionPanel"><input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();"/></div></body></html>
@@ -1,26 +1 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advanced_dlg.anchor_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="js/anchor.js"></script>
7
- </head>
8
- <body style="display: none" role="application" aria-labelledby="app_title">
9
- <form onsubmit="AnchorDialog.update();return false;" action="#">
10
- <table border="0" cellpadding="4" cellspacing="0" role="presentation">
11
- <tr>
12
- <td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
13
- </tr>
14
- <tr>
15
- <td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
16
- <td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" /></td>
17
- </tr>
18
- </table>
19
-
20
- <div class="mceActionPanel">
21
- <input type="submit" id="insert" name="insert" value="{#update}" />
22
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
23
- </div>
24
- </form>
25
- </body>
26
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>{#advanced_dlg.anchor_title}</title><script type="text/javascript" src="../../tiny_mce_popup.js"></script><script type="text/javascript" src="js/anchor.js"></script></head><body style="display: none" role="application" aria-labelledby="app_title"><form onsubmit="AnchorDialog.update();return false;" action="#"><table border="0" cellpadding="4" cellspacing="0" role="presentation"><tr><td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td></tr><tr><td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td><td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true"/></td></tr></table><div class="mceActionPanel"><input type="submit" id="insert" name="insert" value="{#update}"/><input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();"/></div></form></body></html>
@@ -1,51 +1 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advanced_dlg.charmap_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="js/charmap.js"></script>
7
- </head>
8
- <body id="charmap" style="display:none">
9
- <table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
10
- <tr>
11
- <td colspan="2" class="title" ><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
12
- </tr>
13
- <tr>
14
- <td id="charmapView" rowspan="2" align="left" valign="top">
15
- <!-- Chars will be rendered here -->
16
- </td>
17
- <td width="100" align="center" valign="top">
18
- <table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
19
- <tr>
20
- <td id="codeV">&nbsp;</td>
21
- </tr>
22
- <tr>
23
- <td id="codeN">&nbsp;</td>
24
- </tr>
25
- </table>
26
- </td>
27
- </tr>
28
- <tr>
29
- <td valign="bottom" style="padding-bottom: 3px;">
30
- <table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
31
- <tr>
32
- <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td>
33
- </tr>
34
- <tr>
35
- <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>
36
- </tr>
37
- <tr>
38
- <td style="font-size: 1px;">&nbsp;</td>
39
- </tr>
40
- <tr>
41
- <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td>
42
- </tr>
43
- <tr>
44
- <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>
45
- </tr>
46
- </table>
47
- </td>
48
- </tr>
49
- </table>
50
- </body>
51
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>{#advanced_dlg.charmap_title}</title><script type="text/javascript" src="../../tiny_mce_popup.js"></script><script type="text/javascript" src="js/charmap.js"></script></head><body id="charmap" style="display:none"><table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation"><tr><td colspan="2" class="title"><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td></tr><tr><td id="charmapView" rowspan="2" align="left" valign="top"><!-- Chars will be rendered here --></td><td width="100" align="center" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation"><tr><td id="codeV">&nbsp;</td></tr><tr><td id="codeN">&nbsp;</td></tr></table></td></tr><tr><td valign="bottom" style="padding-bottom: 3px;"><table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation"><tr><td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td></tr><tr><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></tr><tr><td style="font-size: 1px;">&nbsp;</td></tr><tr><td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td></tr><tr><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></tr></table></td></tr></table></body></html>
@@ -1,74 +1 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#advanced_dlg.colorpicker_title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
- <script type="text/javascript" src="js/color_picker.js"></script>
8
- </head>
9
- <body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
10
- <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
11
- <form onsubmit="insertAction();return false" action="#">
12
- <div class="tabs">
13
- <ul>
14
- <li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
15
- <li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
16
- <li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
17
- </ul>
18
- </div>
19
-
20
- <div class="panel_wrapper">
21
- <div id="picker_panel" class="panel current">
22
- <fieldset>
23
- <legend>{#advanced_dlg.colorpicker_picker_title}</legend>
24
- <div id="picker">
25
- <img id="colors" src="img/colorpicker.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;" alt="" />
26
-
27
- <div id="light">
28
- <!-- Will be filled with divs -->
29
- </div>
30
-
31
- <br style="clear: both" />
32
- </div>
33
- </fieldset>
34
- </div>
35
-
36
- <div id="rgb_panel" class="panel">
37
- <fieldset>
38
- <legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
39
- <div id="webcolors">
40
- <!-- Gets filled with web safe colors-->
41
- </div>
42
-
43
- <br style="clear: both" />
44
- </fieldset>
45
- </div>
46
-
47
- <div id="named_panel" class="panel">
48
- <fieldset id="named_picker_label">
49
- <legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
50
- <div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
51
- <!-- Gets filled with named colors-->
52
- </div>
53
-
54
- <br style="clear: both" />
55
-
56
- <div id="colornamecontainer">
57
- {#advanced_dlg.colorpicker_name} <span id="colorname"></span>
58
- </div>
59
- </fieldset>
60
- </div>
61
- </div>
62
-
63
- <div class="mceActionPanel">
64
- <input type="submit" id="insert" name="insert" value="{#apply}" />
65
-
66
- <div id="preview"></div>
67
-
68
- <div id="previewblock">
69
- <label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" />
70
- </div>
71
- </div>
72
- </form>
73
- </body>
74
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>{#advanced_dlg.colorpicker_title}</title><script type="text/javascript" src="../../tiny_mce_popup.js"></script><script type="text/javascript" src="../../utils/mctabs.js"></script><script type="text/javascript" src="js/color_picker.js"></script></head><body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label"><span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span><form onsubmit="insertAction();return false" action="#"><div class="tabs"><ul><li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li><li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li><li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li></ul></div><div class="panel_wrapper"><div id="picker_panel" class="panel current"><fieldset><legend>{#advanced_dlg.colorpicker_picker_title}</legend><div id="picker"><img id="colors" src="img/colorpicker.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;" alt=""/><div id="light"><!-- Will be filled with divs --></div><br style="clear: both"/></div></fieldset></div><div id="rgb_panel" class="panel"><fieldset><legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend><div id="webcolors"><!-- Gets filled with web safe colors--></div><br style="clear: both"/></fieldset></div><div id="named_panel" class="panel"><fieldset id="named_picker_label"><legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend><div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label"><!-- Gets filled with named colors--></div><br style="clear: both"/><div id="colornamecontainer">{#advanced_dlg.colorpicker_name}<span id="colorname"></span></div></fieldset></div></div><div class="mceActionPanel"><input type="submit" id="insert" name="insert" value="{#apply}"/><div id="preview"></div><div id="previewblock"><label for="color">{#advanced_dlg.colorpicker_color}</label><input id="color" type="text" size="8" class="text mceFocus" aria-required="true"/></div></div></form></body></html>
@@ -1 +1 @@
1
- (function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?"highcontrast":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"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,sans-serif;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",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),"dragend",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});i=(d.getStyle(j,"background-color",true)+"").toLowerCase().replace(/ /g,"");d.remove(j);return i!="rgb(171,239,86)"&&i!="#abef56"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang("advanced.help_shortcut")}m=j=d.create("span",{role:"application","aria-labelledby":r.id+"_voice",id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});d.add(m,"span",{"class":"mceVoiceLabel",style:"display:none;",id:r.id+"_voice"},w.aria_label);if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{role:"presentation",id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+"_path_row").focus();return b.cancel(n)}}}});r.addShortcut("alt+0","","mceShortcuts",v);return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_ifr");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i<n.clientWidth){i=n.clientWidth;d.setStyle(o,"width",n.clientWidth)}}if(k&&l.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+j.id+"_size",{cw:i,ch:m})}},destroy:function(){var i=this.editor.id;b.clear(i+"_resize");b.clear(i+"_path_row");b.clear(i+"_external_close")},_simpleLayout:function(y,r,k,i){var x=this,u=x.editor,v=y.theme_advanced_toolbar_location,m=y.theme_advanced_statusbar_location,l,j,q,w;if(y.readonly){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});return j}if(v=="top"){x._addToolbars(r,k)}if(v=="external"){l=w=d.create("div",{style:"position:relative"});l=d.add(l,"div",{id:u.id+"_external","class":"mceExternalToolbar"});d.add(l,"a",{id:u.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});l=d.add(l,"table",{id:u.id+"_tblext",cellSpacing:0,cellPadding:0});q=d.add(l,"tbody");if(i.firstChild.className=="mceOldBoxModel"){i.firstChild.appendChild(w)}else{i.insertBefore(w,i.firstChild)}x._addToolbars(q,k);u.onMouseUp.add(function(){var o=d.get(u.id+"_external");d.show(o);d.hide(g);var n=b.add(u.id+"_external_close","click",function(){d.hide(u.id+"_external");b.remove(u.id+"_external_close","click",n)});d.show(o);d.setStyle(o,"top",0-d.getRect(u.id+"_tblext").h-1);d.hide(o);d.show(o);o.style.filter="";g=u.id+"_external";o=null})}if(m=="top"){x._addStatusBar(r,k)}if(!y.theme_advanced_toolbar_container){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"})}if(v=="bottom"){x._addToolbars(r,k)}if(m=="bottom"){x._addStatusBar(r,k)}return j},_rowLayout:function(w,m,k){var v=this,p=v.editor,u,x,i=p.controlManager,l,j,r,q;u=w.theme_advanced_containers_default_class||"";x=w.theme_advanced_containers_default_align||"center";f(c(w.theme_advanced_containers||""),function(s,o){var n=w["theme_advanced_container_"+s]||"";switch(n.toLowerCase()){case"mceeditor":l=d.add(m,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":v._addStatusBar(m,k);break;default:q=(w["theme_advanced_container_"+s+"_align"]||x).toLowerCase();q="mce"+v._ufirst(q);l=d.add(d.add(m,"tr"),"td",{"class":"mceToolbar "+(w["theme_advanced_container_"+s+"_class"]||u)+" "+q||x});r=i.createToolbar("toolbar"+o);v._addControls(n,r);d.setHTML(l,r.renderHTML());k.deltaHeight-=w.theme_advanced_row_height}});return j},_addControls:function(j,i){var k=this,l=k.settings,m,n=k.editor.controlManager;if(l.theme_advanced_disable&&!k._disabled){m={};f(c(l.theme_advanced_disable),function(o){m[o]=1});k._disabled=m}else{m=k._disabled}f(c(j),function(p){var o;if(m&&m[p]){return}if(p=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(q){q=k.createControl(q,n);if(q){i.add(q)}});return}o=k.createControl(p,n);if(o){i.add(o)}})},_addToolbars:function(x,k){var A=this,p,m,r=A.editor,B=A.settings,z,j=r.controlManager,u,l,q=[],y,w;w=j.createToolbarGroup("toolbargroup",{name:r.getLang("advanced.toolbar"),tab_focus_toolbar:r.getParam("theme_advanced_tab_focus_toolbar")});A.toolbarGroup=w;y=B.theme_advanced_toolbar_align.toLowerCase();y="mce"+A._ufirst(y);l=d.add(d.add(x,"tr",{role:"presentation"}),"td",{"class":"mceToolbar "+y,role:"presentation"});for(p=1;(z=B["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(B["theme_advanced_buttons"+p+"_add"]){z+=","+B["theme_advanced_buttons"+p+"_add"]}if(B["theme_advanced_buttons"+p+"_add_before"]){z=B["theme_advanced_buttons"+p+"_add_before"]+","+z}A._addControls(z,m);w.add(m);k.deltaHeight-=B.theme_advanced_row_height}q.push(w.renderHTML());q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},"<!-- IE -->"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row",role:"group","aria-labelledby":p.id+"_path_voice"});if(w.theme_advanced_path){d.add(k,"span",{id:p.id+"_path_voice"},p.translate("advanced.path"));d.add(k,"span",{},": ")}else{d.add(k,"span",{},"&#160;")}if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager;i.setDisabled("undo",!j.undoManager.hasUndo()&&!j.typing);i.setDisabled("redo",!j.undoManager.hasRedo())},_nodeChanged:function(l,q,B,m,C){var x=this,A,D=0,w,E,y=x.settings,u,k,r,j,i;e.each(x.stateControls,function(n){q.setActive(n,l.queryCommandState(x.controls[n][1]))});function o(p){var s,n=C.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}q.setActive("visualaid",l.hasVisual);q.setDisabled("undo",!l.undoManager.hasUndo()&&!l.typing);q.setDisabled("redo",!l.undoManager.hasRedo());q.setDisabled("outdent",!l.queryCommandState("Outdent"));A=o("A");if(E=q.get("link")){if(!A||!A.name){E.setDisabled(!A&&m);E.setActive(!!A)}}if(E=q.get("unlink")){E.setDisabled(!A&&m);E.setActive(!!A&&!A.name)}if(E=q.get("anchor")){E.setActive(!m&&!!A&&A.name)}A=o("IMG");if(E=q.get("image")){E.setActive(!m&&!!A&&B.className.indexOf("mceItem")==-1)}if(E=q.get("styleselect")){x._importClasses();j=[];f(E.items,function(n){j.push(n.value)});i=l.formatter.matchAll(j);E.select(i[0])}if(E=q.get("formatselect")){A=o(d.isBlock);if(A){E.select(A.nodeName.toLowerCase())}}o(function(p){if(p.nodeName==="SPAN"){if(!u&&p.className){u=p.className}}if(l.dom.is(p,y.theme_advanced_font_selector)){if(!k&&p.style.fontSize){k=p.style.fontSize}if(!r&&p.style.fontFamily){r=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}}return false});if(E=q.get("fontselect")){E.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==r})}if(E=q.get("fontsizeselect")){if(y.theme_advanced_runtime_fontsize&&!k&&!u){k=l.dom.getStyle(B,"fontSize",true)}E.select(function(n){if(n.fontSize&&n.fontSize===k){return true}if(n["class"]&&n["class"]===u){return true}})}if(y.theme_advanced_show_current_color){function z(p,n){if(E=q.get(p)){if(!n){n=E.settings.default_color}if(n!==E.value){E.displayColor(n)}}}z("forecolor",fc);z("backcolor",bc)}if(y.theme_advanced_path&&y.theme_advanced_statusbar_location){A=d.get(l.id+"_path")||d.add(l.id+"_path_row","span",{id:l.id+"_path"});if(x.statusKeyboardNavigation){x.statusKeyboardNavigation.destroy();x.statusKeyboardNavigation=null}d.setHTML(A,"");o(function(F){var p=F.nodeName.toLowerCase(),s,v,t="";if(F.getAttribute("data-mce-bogus")){return}if(F.nodeType!=1||F.nodeName==="BR"||(d.hasClass(F,"mceItemHidden")||d.hasClass(F,"mceItemRemoved"))){return}if(e.isIE&&F.scopeName!=="HTML"){p=F.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(w=d.getAttrib(F,"src")){t+="src: "+w+" "}break;case"a":if(w=d.getAttrib(F,"name")){t+="name: "+w+" ";p+="#"+w}if(w=d.getAttrib(F,"href")){t+="href: "+w+" "}break;case"font":if(w=d.getAttrib(F,"face")){t+="font: "+w+" "}if(w=d.getAttrib(F,"size")){t+="size: "+w+" "}if(w=d.getAttrib(F,"color")){t+="color: "+w+" "}break;case"span":if(w=d.getAttrib(F,"style")){t+="style: "+w+" "}break}if(w=d.getAttrib(F,"id")){t+="id: "+w+" "}if(w=F.className){w=w.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(w){t+="class: "+w+" ";if(d.isBlock(F)||p=="img"||p=="span"){p+="."+w}}}p=p.replace(/(html:)/g,"");p={name:p,node:F,title:t};x.onResolveName.dispatch(x,p);t=p.title;p=p.name;v=d.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(D++)},p);if(A.hasChildNodes()){A.insertBefore(d.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),A.firstChild);A.insertBefore(v,A.firstChild)}else{A.appendChild(v)}},l.getBody());if(d.select("a",A).length>0){x.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:l.id+"_path_row",items:d.select("a",A),excludeFromTabOrder:true,onCancel:function(){l.focus()}},d)}}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce));
1
+ (function(n){var o=n.DOM,i=n.dom.Event,k=n.extend,m=n.each,j=n.util.Cookie,l,p=n.explode;n.ThemeManager.requireLangPack("advanced");n.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(d,c){var b=this,a,e,f;b.editor=d;b.url=c;b.onResolveName=new n.util.Dispatcher(this);d.forcedHighContrastMode=d.settings.detect_highcontrast&&b._isHighContrast();d.settings.skin=d.forcedHighContrastMode?"highcontrast":d.settings.skin;b.settings=a=k({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"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,sans-serif;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",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",readonly:d.settings.readonly},d.settings);if(!a.font_size_style_values){a.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(n.is(a.theme_advanced_font_sizes,"string")){a.font_size_style_values=n.explode(a.font_size_style_values);a.font_size_classes=n.explode(a.font_size_classes||"");f={};d.settings.theme_advanced_font_sizes=a.theme_advanced_font_sizes;m(d.getParam("theme_advanced_font_sizes","","hash"),function(g,h){var r;if(h==g&&g>=1&&g<=7){h=g+" ("+b.sizes[g-1]+"pt)";r=a.font_size_classes[g-1];g=a.font_size_style_values[g-1]||(b.sizes[g-1]+"pt")}if(/^\s*\./.test(g)){r=g.replace(/\./g,"")}f[h]=r?{"class":r}:{fontSize:g}});a.theme_advanced_font_sizes=f}if((e=a.theme_advanced_path_location)&&e!="none"){a.theme_advanced_statusbar_location=a.theme_advanced_path_location}if(a.theme_advanced_statusbar_location=="none"){a.theme_advanced_statusbar_location=0}if(d.settings.content_css!==false){d.contentCSS.push(d.baseURI.toAbsolute(c+"/skins/"+d.settings.skin+"/content.css"))}d.onInit.add(function(){if(!d.settings.readonly){d.onNodeChange.add(b._nodeChanged,b);d.onKeyUp.add(b._updateUndoStatus,b);d.onMouseUp.add(b._updateUndoStatus,b);d.dom.bind(d.dom.getRoot(),"dragend",function(){b._updateUndoStatus(d)})}});d.onSetProgressState.add(function(v,x,u){var h,g=v.id,w;if(x){b.progressTimer=setTimeout(function(){h=v.getContainer();h=h.insertBefore(o.create("DIV",{style:"position:relative"}),h.firstChild);w=o.get(v.id+"_tbl");o.add(h,"div",{id:g+"_blocker","class":"mceBlocker",style:{width:w.clientWidth+2,height:w.clientHeight+2}});o.add(h,"div",{id:g+"_progress","class":"mceProgress",style:{left:w.clientWidth/2,top:w.clientHeight/2}})},u||0)}else{o.remove(g+"_blocker");o.remove(g+"_progress");clearTimeout(b.progressTimer)}});o.loadCSS(a.editor_css?d.documentBaseURI.toAbsolute(a.editor_css):c+"/skins/"+d.settings.skin+"/ui.css");if(a.skin_variant){o.loadCSS(c+"/skins/"+d.settings.skin+"/ui_"+a.skin_variant+".css")}},_isHighContrast:function(){var b,a=o.add(o.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});b=(o.getStyle(a,"background-color",true)+"").toLowerCase().replace(/ /g,"");o.remove(a);return b!="rgb(171,239,86)"&&b!="#abef56"},createControl:function(a,d){var c,b;if(b=d.createControl(a)){return b}switch(a){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((c=this.controls[a])){return d.createButton(a,{title:"advanced."+c[0],cmd:c[1],ui:c[2],value:c[3]})}},execCommand:function(b,c,a){var d=this["_"+b];if(d){d.call(this,c,a);return true}return false},_importClasses:function(a){var c=this.editor,b=c.controlManager.get("styleselect");if(b.getLength()==0){m(c.dom.getClasses(),function(f,e){var d="style_"+e;c.formatter.register(d,{inline:"span",attributes:{"class":f["class"]},selector:"*"});b.add(f["class"],d)})}},_createStyleSelect:function(a){var c=this,e=c.editor,d=e.controlManager,b;b=d.createListBox("styleselect",{title:"advanced.style_select",onselect:function(g){var f,h=[];m(b.items,function(r){h.push(r.value)});e.focus();e.undoManager.add();f=e.formatter.matchAll(h);if(!g||f[0]==g){if(f[0]){e.formatter.remove(f[0])}}else{e.formatter.apply(g)}e.undoManager.add();e.nodeChanged();return false}});e.onInit.add(function(){var f=0,g=e.getParam("style_formats");if(g){m(g,function(t){var s,h=0;m(t,function(){h++});if(h>1){s=t.name=t.name||"style_"+(f++);e.formatter.register(s,t);b.add(t.title,s)}else{b.add(t.title)}})}else{m(e.getParam("theme_advanced_styles","","hash"),function(h,s){var t;if(h){t="style_"+(f++);e.formatter.register(t,{inline:"span",classes:h,selector:"*"});b.add(c.editor.translate(s),t)}})}});if(b.getLength()==0){b.onPostRender.add(function(g,f){if(!b.NativeListBox){i.add(f.id+"_text","focus",c._importClasses,c);i.add(f.id+"_text","mousedown",c._importClasses,c);i.add(f.id+"_open","focus",c._importClasses,c);i.add(f.id+"_open","mousedown",c._importClasses,c)}else{i.add(f.id,"focus",c._importClasses,c)}})}return b},_createFontSelect:function(){var a,b=this,c=b.editor;a=c.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(e){var d=a.items[a.selectedIndex];if(!e&&d){c.execCommand("FontName",false,d.value);return}c.execCommand("FontName",false,e);a.select(function(f){return e==f});return false}});if(a){m(c.getParam("theme_advanced_fonts",b.settings.theme_advanced_fonts,"hash"),function(d,e){a.add(c.translate(e),d,{style:d.indexOf("dings")==-1?"font-family:"+d:""})})}return a},_createFontSizeSelect:function(){var a=this,c=a.editor,e,b=0,d=[];e=c.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(f){var g=e.items[e.selectedIndex];if(!f&&g){g=g.value;if(g["class"]){c.formatter.toggle("fontsize_class",{value:g["class"]});c.undoManager.add();c.nodeChanged()}else{c.execCommand("FontSize",false,g.fontSize)}return}if(f["class"]){c.focus();c.undoManager.add();c.formatter.toggle("fontsize_class",{value:f["class"]});c.undoManager.add();c.nodeChanged()}else{c.execCommand("FontSize",false,f.fontSize)}e.select(function(h){return f==h});return false}});if(e){m(a.settings.theme_advanced_font_sizes,function(h,f){var g=h.fontSize;if(g>=1&&g<=7){g=a.sizes[parseInt(g)-1]+"pt"}e.add(f,h,{style:"font-size:"+g,"class":"mceFontSize"+(b++)+(" "+(h["class"]||""))})})}return e},_createBlockFormats:function(){var a,c={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},b=this;a=b.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(a){m(b.editor.getParam("theme_advanced_blockformats",b.settings.theme_advanced_blockformats,"hash"),function(d,e){a.add(b.editor.translate(e!=d?e:c[d]),d,{"class":"mce_formatPreview mce_"+d})})}return a},_createForeColorMenu:function(){var a,d=this,c=d.settings,b={},e;if(c.theme_advanced_more_colors){b.more_colors_func=function(){d._mceColorPicker(0,{color:a.value,func:function(f){a.setColor(f)}})}}if(e=c.theme_advanced_text_colors){b.colors=e}if(c.theme_advanced_default_foreground_color){b.default_color=c.theme_advanced_default_foreground_color}b.title="advanced.forecolor_desc";b.cmd="ForeColor";b.scope=this;a=d.editor.controlManager.createColorSplitButton("forecolor",b);return a},_createBackColorMenu:function(){var a,d=this,c=d.settings,b={},e;if(c.theme_advanced_more_colors){b.more_colors_func=function(){d._mceColorPicker(0,{color:a.value,func:function(f){a.setColor(f)}})}}if(e=c.theme_advanced_background_colors){b.colors=e}if(c.theme_advanced_default_background_color){b.default_color=c.theme_advanced_default_background_color}b.title="advanced.backcolor_desc";b.cmd="HiliteColor";b.scope=this;a=d.editor.controlManager.createColorSplitButton("backcolor",b);return a},renderUI:function(e){var c,d,b,s=this,a=s.editor,h=s.settings,t,f,g;if(a.settings){a.settings.aria_label=h.aria_label+a.getLang("advanced.help_shortcut")}c=f=o.create("span",{role:"application","aria-labelledby":a.id+"_voice",id:a.id+"_parent","class":"mceEditor "+a.settings.skin+"Skin"+(h.skin_variant?" "+a.settings.skin+"Skin"+s._ufirst(h.skin_variant):"")});o.add(c,"span",{"class":"mceVoiceLabel",style:"display:none;",id:a.id+"_voice"},h.aria_label);if(!o.boxModel){c=o.add(c,"div",{"class":"mceOldBoxModel"})}c=t=o.add(c,"table",{role:"presentation",id:a.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});c=b=o.add(c,"tbody");switch((h.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":d=s._rowLayout(h,b,e);break;case"customlayout":d=a.execCallback("theme_advanced_custom_layout",h,b,e,f);break;default:d=s._simpleLayout(h,b,e,f)}c=e.targetNode;g=t.rows;o.addClass(g[0],"mceFirst");o.addClass(g[g.length-1],"mceLast");m(o.select("tr",b),function(q){o.addClass(q.firstChild,"mceFirst");o.addClass(q.childNodes[q.childNodes.length-1],"mceLast")});if(o.get(h.theme_advanced_toolbar_container)){o.get(h.theme_advanced_toolbar_container).appendChild(f)}else{o.insertAfter(f,c)}i.add(a.id+"_path_row","click",function(q){q=q.target;if(q.nodeName=="A"){s._sel(q.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return i.cancel(q)}});if(!a.getParam("accessibility_focus")){i.add(o.add(f,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(a.id).focus()})}if(h.theme_advanced_toolbar_location=="external"){e.deltaHeight=0}s.deltaHeight=e.deltaHeight;e.targetNode=null;a.onKeyDown.add(function(r,v){var q=121,u=122;if(v.altKey){if(v.keyCode===q){s.toolbarGroup.focus();return i.cancel(v)}else{if(v.keyCode===u){o.get(r.id+"_path_row").focus();return i.cancel(v)}}}});a.addShortcut("alt+0","","mceShortcuts",s);return{iframeContainer:d,editorContainer:a.id+"_parent",sizeContainer:t,deltaHeight:e.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:n.majorVersion+"."+n.minorVersion}},resizeBy:function(c,b){var a=o.get(this.editor.id+"_ifr");this.resizeTo(a.clientWidth+c,a.clientHeight+b)},resizeTo:function(e,a,c){var d=this.editor,b=this.settings,g=o.get(d.id+"_tbl"),f=o.get(d.id+"_ifr");e=Math.max(b.theme_advanced_resizing_min_width||100,e);a=Math.max(b.theme_advanced_resizing_min_height||100,a);e=Math.min(b.theme_advanced_resizing_max_width||65535,e);a=Math.min(b.theme_advanced_resizing_max_height||65535,a);o.setStyle(g,"height","");o.setStyle(f,"height",a);if(b.theme_advanced_resize_horizontal){o.setStyle(g,"width","");o.setStyle(f,"width",e);if(e<g.clientWidth){e=g.clientWidth;o.setStyle(f,"width",g.clientWidth)}}if(c&&b.theme_advanced_resizing_use_cookie){j.setHash("TinyMCE_"+d.id+"_size",{cw:e,ch:a})}},destroy:function(){var a=this.editor.id;i.clear(a+"_resize");i.clear(a+"_path_row");i.clear(a+"_external_close")},_simpleLayout:function(h,a,e,g){var s=this,A=s.editor,z=h.theme_advanced_toolbar_location,c=h.theme_advanced_statusbar_location,d,f,b,t;if(h.readonly){d=o.add(a,"tr");d=f=o.add(d,"td",{"class":"mceIframeContainer"});return f}if(z=="top"){s._addToolbars(a,e)}if(z=="external"){d=t=o.create("div",{style:"position:relative"});d=o.add(d,"div",{id:A.id+"_external","class":"mceExternalToolbar"});o.add(d,"a",{id:A.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});d=o.add(d,"table",{id:A.id+"_tblext",cellSpacing:0,cellPadding:0});b=o.add(d,"tbody");if(g.firstChild.className=="mceOldBoxModel"){g.firstChild.appendChild(t)}else{g.insertBefore(t,g.firstChild)}s._addToolbars(b,e);A.onMouseUp.add(function(){var q=o.get(A.id+"_external");o.show(q);o.hide(l);var r=i.add(A.id+"_external_close","click",function(){o.hide(A.id+"_external");i.remove(A.id+"_external_close","click",r)});o.show(q);o.setStyle(q,"top",0-o.getRect(A.id+"_tblext").h-1);o.hide(q);o.show(q);q.style.filter="";l=A.id+"_external";q=null})}if(c=="top"){s._addStatusBar(a,e)}if(!h.theme_advanced_toolbar_container){d=o.add(a,"tr");d=f=o.add(d,"td",{"class":"mceIframeContainer"})}if(z=="bottom"){s._addToolbars(a,e)}if(c=="bottom"){s._addStatusBar(a,e)}return f},_rowLayout:function(t,d,f){var y=this,c=y.editor,z,s,h=c.controlManager,e,g,a,b;z=t.theme_advanced_containers_default_class||"";s=t.theme_advanced_containers_default_align||"center";m(p(t.theme_advanced_containers||""),function(q,r){var u=t["theme_advanced_container_"+q]||"";switch(u.toLowerCase()){case"mceeditor":e=o.add(d,"tr");e=g=o.add(e,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":y._addStatusBar(d,f);break;default:b=(t["theme_advanced_container_"+q+"_align"]||s).toLowerCase();b="mce"+y._ufirst(b);e=o.add(o.add(d,"tr"),"td",{"class":"mceToolbar "+(t["theme_advanced_container_"+q+"_class"]||z)+" "+b||s});a=h.createToolbar("toolbar"+r);y._addControls(u,a);o.setHTML(e,a.renderHTML());f.deltaHeight-=t.theme_advanced_row_height}});return g},_addControls:function(d,e){var c=this,b=c.settings,a,f=c.editor.controlManager;if(b.theme_advanced_disable&&!c._disabled){a={};m(p(b.theme_advanced_disable),function(g){a[g]=1});c._disabled=a}else{a=c._disabled}m(p(d),function(g){var h;if(a&&a[g]){return}if(g=="tablecontrols"){m(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(r){r=c.createControl(r,f);if(r){e.add(r)}});return}h=c.createControl(g,f);if(h){e.add(h)}})},_addToolbars:function(C,h){var e=this,d,f,a=e.editor,c=e.settings,t,s=a.controlManager,E,g,b=[],v,D;D=s.createToolbarGroup("toolbargroup",{name:a.getLang("advanced.toolbar"),tab_focus_toolbar:a.getParam("theme_advanced_tab_focus_toolbar")});e.toolbarGroup=D;v=c.theme_advanced_toolbar_align.toLowerCase();v="mce"+e._ufirst(v);g=o.add(o.add(C,"tr",{role:"presentation"}),"td",{"class":"mceToolbar "+v,role:"presentation"});for(d=1;(t=c["theme_advanced_buttons"+d]);d++){f=s.createToolbar("toolbar"+d,{"class":"mceToolbarRow"+d});if(c["theme_advanced_buttons"+d+"_add"]){t+=","+c["theme_advanced_buttons"+d+"_add"]}if(c["theme_advanced_buttons"+d+"_add_before"]){t=c["theme_advanced_buttons"+d+"_add_before"]+","+t}e._addControls(t,f);D.add(f);h.deltaHeight-=c.theme_advanced_row_height}b.push(D.renderHTML());b.push(o.createHTML("a",{href:"#",accesskey:"z",title:a.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+a.id+"').focus();"},"<!-- IE -->"));o.setHTML(g,b.join(""))},_addStatusBar:function(c,f){var e,r=this,b=r.editor,h=r.settings,g,a,s,d;e=o.add(c,"tr");e=d=o.add(e,"td",{"class":"mceStatusbar"});e=o.add(e,"div",{id:b.id+"_path_row",role:"group","aria-labelledby":b.id+"_path_voice"});if(h.theme_advanced_path){o.add(e,"span",{id:b.id+"_path_voice"},b.translate("advanced.path"));o.add(e,"span",{},": ")}else{o.add(e,"span",{},"&#160;")}if(h.theme_advanced_resizing){o.add(d,"a",{id:b.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(h.theme_advanced_resizing_use_cookie){b.onPostRender.add(function(){var t=j.getHash("TinyMCE_"+b.id+"_size"),q=o.get(b.id+"_tbl");if(!t){return}r.resizeTo(t.cw,t.ch)})}b.onPostRender.add(function(){i.add(b.id+"_resize","click",function(q){q.preventDefault()});i.add(b.id+"_resize","mousedown",function(q){var N,u,P,G,v,J,H,M,I,O,L;function K(t){t.preventDefault();I=H+(t.screenX-v);O=M+(t.screenY-J);r.resizeTo(I,O)}function w(t){i.remove(o.doc,"mousemove",N);i.remove(b.getDoc(),"mousemove",u);i.remove(o.doc,"mouseup",P);i.remove(b.getDoc(),"mouseup",G);I=H+(t.screenX-v);O=M+(t.screenY-J);r.resizeTo(I,O,true)}q.preventDefault();v=q.screenX;J=q.screenY;L=o.get(r.editor.id+"_ifr");H=I=L.clientWidth;M=O=L.clientHeight;N=i.add(o.doc,"mousemove",K);u=i.add(b.getDoc(),"mousemove",K);P=i.add(o.doc,"mouseup",w);G=i.add(b.getDoc(),"mouseup",w)})})}f.deltaHeight-=21;e=c=null},_updateUndoStatus:function(a){var b=a.controlManager;b.setDisabled("undo",!a.undoManager.hasUndo()&&!a.typing);b.setDisabled("redo",!a.undoManager.hasRedo())},_nodeChanged:function(I,v,t,H,h){var c=this,F,g=0,d,f,b=c.settings,e,J,s,K,L;n.each(c.stateControls,function(q){v.setActive(q,I.queryCommandState(c.controls[q][1]))});function G(u){var r,w=h.parents,q=u;if(typeof(u)=="string"){q=function(x){return x.nodeName==u}}for(r=0;r<w.length;r++){if(q(w[r])){return w[r]}}}v.setActive("visualaid",I.hasVisual);v.setDisabled("undo",!I.undoManager.hasUndo()&&!I.typing);v.setDisabled("redo",!I.undoManager.hasRedo());v.setDisabled("outdent",!I.queryCommandState("Outdent"));F=G("A");if(f=v.get("link")){if(!F||!F.name){f.setDisabled(!F&&H);f.setActive(!!F)}}if(f=v.get("unlink")){f.setDisabled(!F&&H);f.setActive(!!F&&!F.name)}if(f=v.get("anchor")){f.setActive(!H&&!!F&&F.name)}F=G("IMG");if(f=v.get("image")){f.setActive(!H&&!!F&&t.className.indexOf("mceItem")==-1)}if(f=v.get("styleselect")){c._importClasses();K=[];m(f.items,function(q){K.push(q.value)});L=I.formatter.matchAll(K);f.select(L[0])}if(f=v.get("formatselect")){F=G(o.isBlock);if(F){f.select(F.nodeName.toLowerCase())}}G(function(q){if(q.nodeName==="SPAN"){if(!e&&q.className){e=q.className}}if(I.dom.is(q,b.theme_advanced_font_selector)){if(!J&&q.style.fontSize){J=q.style.fontSize}if(!s&&q.style.fontFamily){s=q.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}}return false});if(f=v.get("fontselect")){f.select(function(q){return q.replace(/^([^,]+).*/,"$1").toLowerCase()==s})}if(f=v.get("fontsizeselect")){if(b.theme_advanced_runtime_fontsize&&!J&&!e){J=I.dom.getStyle(t,"fontSize",true)}f.select(function(q){if(q.fontSize&&q.fontSize===J){return true}if(q["class"]&&q["class"]===e){return true}})}if(b.theme_advanced_show_current_color){function a(q,r){if(f=v.get(q)){if(!r){r=f.settings.default_color}if(r!==f.value){f.displayColor(r)}}}a("forecolor",fc);a("backcolor",bc)}if(b.theme_advanced_path&&b.theme_advanced_statusbar_location){F=o.get(I.id+"_path")||o.add(I.id+"_path_row","span",{id:I.id+"_path"});if(c.statusKeyboardNavigation){c.statusKeyboardNavigation.destroy();c.statusKeyboardNavigation=null}o.setHTML(F,"");G(function(w){var x=w.nodeName.toLowerCase(),u,q,r="";if(w.getAttribute("data-mce-bogus")){return}if(w.nodeType!=1||w.nodeName==="BR"||(o.hasClass(w,"mceItemHidden")||o.hasClass(w,"mceItemRemoved"))){return}if(n.isIE&&w.scopeName!=="HTML"){x=w.scopeName+":"+x}x=x.replace(/mce\:/g,"");switch(x){case"b":x="strong";break;case"i":x="em";break;case"img":if(d=o.getAttrib(w,"src")){r+="src: "+d+" "}break;case"a":if(d=o.getAttrib(w,"name")){r+="name: "+d+" ";x+="#"+d}if(d=o.getAttrib(w,"href")){r+="href: "+d+" "}break;case"font":if(d=o.getAttrib(w,"face")){r+="font: "+d+" "}if(d=o.getAttrib(w,"size")){r+="size: "+d+" "}if(d=o.getAttrib(w,"color")){r+="color: "+d+" "}break;case"span":if(d=o.getAttrib(w,"style")){r+="style: "+d+" "}break}if(d=o.getAttrib(w,"id")){r+="id: "+d+" "}if(d=w.className){d=d.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(d){r+="class: "+d+" ";if(o.isBlock(w)||x=="img"||x=="span"){x+="."+d}}}x=x.replace(/(html:)/g,"");x={name:x,node:w,title:r};c.onResolveName.dispatch(c,x);r=x.title;x=x.name;q=o.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:r,"class":"mcePath_"+(g++)},x);if(F.hasChildNodes()){F.insertBefore(o.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),F.firstChild);F.insertBefore(q,F.firstChild)}else{F.appendChild(q)}},I.getBody());if(o.select("a",F).length>0){c.statusKeyboardNavigation=new n.ui.KeyboardNavigation({root:I.id+"_path_row",items:o.select("a",F),excludeFromTabOrder:true,onCancel:function(){I.focus()}},o)}}},_sel:function(a){this.editor.execCommand("mceSelectNodeDepth",false,a)},_mceInsertAnchor:function(a,b){var c=this.editor;c.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(c.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(c.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var a=this.editor;a.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(a.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(a.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var a=this.editor;a.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var a=this.editor;a.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(a,b){var c=this.editor;b=b||{};c.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(c.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(c.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:b.color,func:b.func,theme_url:this.url})},_mceCodeEditor:function(b,a){var c=this.editor;c.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(c.getParam("theme_advanced_source_editor_width",720)),height:parseInt(c.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(b,a){var c=this.editor;if(c.dom.getAttrib(c.selection.getNode(),"class").indexOf("mceItem")!=-1){return}c.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(c.getLang("advanced.image_delta_width",0)),height:275+parseInt(c.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(b,a){var c=this.editor;c.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(c.getLang("advanced.link_delta_width",0)),height:200+parseInt(c.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var a=this.editor;a.windowManager.confirm("advanced.newdocument",function(b){if(b){a.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var a=this;this._mceColorPicker(0,{color:a.fgColor,func:function(b){a.fgColor=b;a.editor.execCommand("ForeColor",false,b)}})},_mceBackColor:function(){var a=this;this._mceColorPicker(0,{color:a.bgColor,func:function(b){a.bgColor=b;a.editor.execCommand("HiliteColor",false,b)}})},_ufirst:function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}});n.ThemeManager.add("advanced",n.themes.AdvancedTheme)}(tinymce));
@@ -1,1328 +1 @@
1
- /**
2
- * editor_template_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function(tinymce) {
12
- var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
13
-
14
- // Tell it to load theme specific language pack(s)
15
- tinymce.ThemeManager.requireLangPack('advanced');
16
-
17
- tinymce.create('tinymce.themes.AdvancedTheme', {
18
- sizes : [8, 10, 12, 14, 18, 24, 36],
19
-
20
- // Control name lookup, format: title, command
21
- controls : {
22
- bold : ['bold_desc', 'Bold'],
23
- italic : ['italic_desc', 'Italic'],
24
- underline : ['underline_desc', 'Underline'],
25
- strikethrough : ['striketrough_desc', 'Strikethrough'],
26
- justifyleft : ['justifyleft_desc', 'JustifyLeft'],
27
- justifycenter : ['justifycenter_desc', 'JustifyCenter'],
28
- justifyright : ['justifyright_desc', 'JustifyRight'],
29
- justifyfull : ['justifyfull_desc', 'JustifyFull'],
30
- bullist : ['bullist_desc', 'InsertUnorderedList'],
31
- numlist : ['numlist_desc', 'InsertOrderedList'],
32
- outdent : ['outdent_desc', 'Outdent'],
33
- indent : ['indent_desc', 'Indent'],
34
- cut : ['cut_desc', 'Cut'],
35
- copy : ['copy_desc', 'Copy'],
36
- paste : ['paste_desc', 'Paste'],
37
- undo : ['undo_desc', 'Undo'],
38
- redo : ['redo_desc', 'Redo'],
39
- link : ['link_desc', 'mceLink'],
40
- unlink : ['unlink_desc', 'unlink'],
41
- image : ['image_desc', 'mceImage'],
42
- cleanup : ['cleanup_desc', 'mceCleanup'],
43
- help : ['help_desc', 'mceHelp'],
44
- code : ['code_desc', 'mceCodeEditor'],
45
- hr : ['hr_desc', 'InsertHorizontalRule'],
46
- removeformat : ['removeformat_desc', 'RemoveFormat'],
47
- sub : ['sub_desc', 'subscript'],
48
- sup : ['sup_desc', 'superscript'],
49
- forecolor : ['forecolor_desc', 'ForeColor'],
50
- forecolorpicker : ['forecolor_desc', 'mceForeColor'],
51
- backcolor : ['backcolor_desc', 'HiliteColor'],
52
- backcolorpicker : ['backcolor_desc', 'mceBackColor'],
53
- charmap : ['charmap_desc', 'mceCharMap'],
54
- visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
55
- anchor : ['anchor_desc', 'mceInsertAnchor'],
56
- newdocument : ['newdocument_desc', 'mceNewDocument'],
57
- blockquote : ['blockquote_desc', 'mceBlockQuote']
58
- },
59
-
60
- stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
61
-
62
- init : function(ed, url) {
63
- var t = this, s, v, o;
64
-
65
- t.editor = ed;
66
- t.url = url;
67
- t.onResolveName = new tinymce.util.Dispatcher(this);
68
-
69
- ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast();
70
- ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;
71
-
72
- // Default settings
73
- t.settings = s = extend({
74
- theme_advanced_path : true,
75
- theme_advanced_toolbar_location : 'bottom',
76
- theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
77
- theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
78
- theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap",
79
- theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
80
- theme_advanced_toolbar_align : "center",
81
- theme_advanced_fonts : "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,sans-serif;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",
82
- theme_advanced_more_colors : 1,
83
- theme_advanced_row_height : 23,
84
- theme_advanced_resize_horizontal : 1,
85
- theme_advanced_resizing_use_cookie : 1,
86
- theme_advanced_font_sizes : "1,2,3,4,5,6,7",
87
- theme_advanced_font_selector : "span",
88
- readonly : ed.settings.readonly
89
- }, ed.settings);
90
-
91
- // Setup default font_size_style_values
92
- if (!s.font_size_style_values)
93
- s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
94
-
95
- if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
96
- s.font_size_style_values = tinymce.explode(s.font_size_style_values);
97
- s.font_size_classes = tinymce.explode(s.font_size_classes || '');
98
-
99
- // Parse string value
100
- o = {};
101
- ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
102
- each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
103
- var cl;
104
-
105
- if (k == v && v >= 1 && v <= 7) {
106
- k = v + ' (' + t.sizes[v - 1] + 'pt)';
107
- cl = s.font_size_classes[v - 1];
108
- v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
109
- }
110
-
111
- if (/^\s*\./.test(v))
112
- cl = v.replace(/\./g, '');
113
-
114
- o[k] = cl ? {'class' : cl} : {fontSize : v};
115
- });
116
-
117
- s.theme_advanced_font_sizes = o;
118
- }
119
-
120
- if ((v = s.theme_advanced_path_location) && v != 'none')
121
- s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
122
-
123
- if (s.theme_advanced_statusbar_location == 'none')
124
- s.theme_advanced_statusbar_location = 0;
125
-
126
- if (ed.settings.content_css !== false)
127
- ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css"));
128
-
129
- // Init editor
130
- ed.onInit.add(function() {
131
- if (!ed.settings.readonly) {
132
- ed.onNodeChange.add(t._nodeChanged, t);
133
- ed.onKeyUp.add(t._updateUndoStatus, t);
134
- ed.onMouseUp.add(t._updateUndoStatus, t);
135
- ed.dom.bind(ed.dom.getRoot(), 'dragend', function() {
136
- t._updateUndoStatus(ed);
137
- });
138
- }
139
- });
140
-
141
- ed.onSetProgressState.add(function(ed, b, ti) {
142
- var co, id = ed.id, tb;
143
-
144
- if (b) {
145
- t.progressTimer = setTimeout(function() {
146
- co = ed.getContainer();
147
- co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
148
- tb = DOM.get(ed.id + '_tbl');
149
-
150
- DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
151
- DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
152
- }, ti || 0);
153
- } else {
154
- DOM.remove(id + '_blocker');
155
- DOM.remove(id + '_progress');
156
- clearTimeout(t.progressTimer);
157
- }
158
- });
159
-
160
- DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css");
161
-
162
- if (s.skin_variant)
163
- DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
164
- },
165
-
166
- _isHighContrast : function() {
167
- var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'});
168
-
169
- actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, '');
170
- DOM.remove(div);
171
-
172
- return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56';
173
- },
174
-
175
- createControl : function(n, cf) {
176
- var cd, c;
177
-
178
- if (c = cf.createControl(n))
179
- return c;
180
-
181
- switch (n) {
182
- case "styleselect":
183
- return this._createStyleSelect();
184
-
185
- case "formatselect":
186
- return this._createBlockFormats();
187
-
188
- case "fontselect":
189
- return this._createFontSelect();
190
-
191
- case "fontsizeselect":
192
- return this._createFontSizeSelect();
193
-
194
- case "forecolor":
195
- return this._createForeColorMenu();
196
-
197
- case "backcolor":
198
- return this._createBackColorMenu();
199
- }
200
-
201
- if ((cd = this.controls[n]))
202
- return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
203
- },
204
-
205
- execCommand : function(cmd, ui, val) {
206
- var f = this['_' + cmd];
207
-
208
- if (f) {
209
- f.call(this, ui, val);
210
- return true;
211
- }
212
-
213
- return false;
214
- },
215
-
216
- _importClasses : function(e) {
217
- var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
218
-
219
- if (ctrl.getLength() == 0) {
220
- each(ed.dom.getClasses(), function(o, idx) {
221
- var name = 'style_' + idx;
222
-
223
- ed.formatter.register(name, {
224
- inline : 'span',
225
- attributes : {'class' : o['class']},
226
- selector : '*'
227
- });
228
-
229
- ctrl.add(o['class'], name);
230
- });
231
- }
232
- },
233
-
234
- _createStyleSelect : function(n) {
235
- var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
236
-
237
- // Setup style select box
238
- ctrl = ctrlMan.createListBox('styleselect', {
239
- title : 'advanced.style_select',
240
- onselect : function(name) {
241
- var matches, formatNames = [];
242
-
243
- each(ctrl.items, function(item) {
244
- formatNames.push(item.value);
245
- });
246
-
247
- ed.focus();
248
- ed.undoManager.add();
249
-
250
- // Toggle off the current format
251
- matches = ed.formatter.matchAll(formatNames);
252
- if (!name || matches[0] == name) {
253
- if (matches[0])
254
- ed.formatter.remove(matches[0]);
255
- } else
256
- ed.formatter.apply(name);
257
-
258
- ed.undoManager.add();
259
- ed.nodeChanged();
260
-
261
- return false; // No auto select
262
- }
263
- });
264
-
265
- // Handle specified format
266
- ed.onInit.add(function() {
267
- var counter = 0, formats = ed.getParam('style_formats');
268
-
269
- if (formats) {
270
- each(formats, function(fmt) {
271
- var name, keys = 0;
272
-
273
- each(fmt, function() {keys++;});
274
-
275
- if (keys > 1) {
276
- name = fmt.name = fmt.name || 'style_' + (counter++);
277
- ed.formatter.register(name, fmt);
278
- ctrl.add(fmt.title, name);
279
- } else
280
- ctrl.add(fmt.title);
281
- });
282
- } else {
283
- each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
284
- var name;
285
-
286
- if (val) {
287
- name = 'style_' + (counter++);
288
-
289
- ed.formatter.register(name, {
290
- inline : 'span',
291
- classes : val,
292
- selector : '*'
293
- });
294
-
295
- ctrl.add(t.editor.translate(key), name);
296
- }
297
- });
298
- }
299
- });
300
-
301
- // Auto import classes if the ctrl box is empty
302
- if (ctrl.getLength() == 0) {
303
- ctrl.onPostRender.add(function(ed, n) {
304
- if (!ctrl.NativeListBox) {
305
- Event.add(n.id + '_text', 'focus', t._importClasses, t);
306
- Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
307
- Event.add(n.id + '_open', 'focus', t._importClasses, t);
308
- Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
309
- } else
310
- Event.add(n.id, 'focus', t._importClasses, t);
311
- });
312
- }
313
-
314
- return ctrl;
315
- },
316
-
317
- _createFontSelect : function() {
318
- var c, t = this, ed = t.editor;
319
-
320
- c = ed.controlManager.createListBox('fontselect', {
321
- title : 'advanced.fontdefault',
322
- onselect : function(v) {
323
- var cur = c.items[c.selectedIndex];
324
-
325
- if (!v && cur) {
326
- ed.execCommand('FontName', false, cur.value);
327
- return;
328
- }
329
-
330
- ed.execCommand('FontName', false, v);
331
-
332
- // Fake selection, execCommand will fire a nodeChange and update the selection
333
- c.select(function(sv) {
334
- return v == sv;
335
- });
336
-
337
- return false; // No auto select
338
- }
339
- });
340
-
341
- if (c) {
342
- each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
343
- c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
344
- });
345
- }
346
-
347
- return c;
348
- },
349
-
350
- _createFontSizeSelect : function() {
351
- var t = this, ed = t.editor, c, i = 0, cl = [];
352
-
353
- c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
354
- var cur = c.items[c.selectedIndex];
355
-
356
- if (!v && cur) {
357
- cur = cur.value;
358
-
359
- if (cur['class']) {
360
- ed.formatter.toggle('fontsize_class', {value : cur['class']});
361
- ed.undoManager.add();
362
- ed.nodeChanged();
363
- } else {
364
- ed.execCommand('FontSize', false, cur.fontSize);
365
- }
366
-
367
- return;
368
- }
369
-
370
- if (v['class']) {
371
- ed.focus();
372
- ed.undoManager.add();
373
- ed.formatter.toggle('fontsize_class', {value : v['class']});
374
- ed.undoManager.add();
375
- ed.nodeChanged();
376
- } else
377
- ed.execCommand('FontSize', false, v.fontSize);
378
-
379
- // Fake selection, execCommand will fire a nodeChange and update the selection
380
- c.select(function(sv) {
381
- return v == sv;
382
- });
383
-
384
- return false; // No auto select
385
- }});
386
-
387
- if (c) {
388
- each(t.settings.theme_advanced_font_sizes, function(v, k) {
389
- var fz = v.fontSize;
390
-
391
- if (fz >= 1 && fz <= 7)
392
- fz = t.sizes[parseInt(fz) - 1] + 'pt';
393
-
394
- c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
395
- });
396
- }
397
-
398
- return c;
399
- },
400
-
401
- _createBlockFormats : function() {
402
- var c, fmts = {
403
- p : 'advanced.paragraph',
404
- address : 'advanced.address',
405
- pre : 'advanced.pre',
406
- h1 : 'advanced.h1',
407
- h2 : 'advanced.h2',
408
- h3 : 'advanced.h3',
409
- h4 : 'advanced.h4',
410
- h5 : 'advanced.h5',
411
- h6 : 'advanced.h6',
412
- div : 'advanced.div',
413
- blockquote : 'advanced.blockquote',
414
- code : 'advanced.code',
415
- dt : 'advanced.dt',
416
- dd : 'advanced.dd',
417
- samp : 'advanced.samp'
418
- }, t = this;
419
-
420
- c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', cmd : 'FormatBlock'});
421
- if (c) {
422
- each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
423
- c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v});
424
- });
425
- }
426
-
427
- return c;
428
- },
429
-
430
- _createForeColorMenu : function() {
431
- var c, t = this, s = t.settings, o = {}, v;
432
-
433
- if (s.theme_advanced_more_colors) {
434
- o.more_colors_func = function() {
435
- t._mceColorPicker(0, {
436
- color : c.value,
437
- func : function(co) {
438
- c.setColor(co);
439
- }
440
- });
441
- };
442
- }
443
-
444
- if (v = s.theme_advanced_text_colors)
445
- o.colors = v;
446
-
447
- if (s.theme_advanced_default_foreground_color)
448
- o.default_color = s.theme_advanced_default_foreground_color;
449
-
450
- o.title = 'advanced.forecolor_desc';
451
- o.cmd = 'ForeColor';
452
- o.scope = this;
453
-
454
- c = t.editor.controlManager.createColorSplitButton('forecolor', o);
455
-
456
- return c;
457
- },
458
-
459
- _createBackColorMenu : function() {
460
- var c, t = this, s = t.settings, o = {}, v;
461
-
462
- if (s.theme_advanced_more_colors) {
463
- o.more_colors_func = function() {
464
- t._mceColorPicker(0, {
465
- color : c.value,
466
- func : function(co) {
467
- c.setColor(co);
468
- }
469
- });
470
- };
471
- }
472
-
473
- if (v = s.theme_advanced_background_colors)
474
- o.colors = v;
475
-
476
- if (s.theme_advanced_default_background_color)
477
- o.default_color = s.theme_advanced_default_background_color;
478
-
479
- o.title = 'advanced.backcolor_desc';
480
- o.cmd = 'HiliteColor';
481
- o.scope = this;
482
-
483
- c = t.editor.controlManager.createColorSplitButton('backcolor', o);
484
-
485
- return c;
486
- },
487
-
488
- renderUI : function(o) {
489
- var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
490
-
491
- if (ed.settings) {
492
- ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');
493
- }
494
-
495
- // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for.
496
- // Maybe actually inherit it from the original textara?
497
- n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')});
498
- DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label);
499
-
500
- if (!DOM.boxModel)
501
- n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
502
-
503
- n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
504
- n = tb = DOM.add(n, 'tbody');
505
-
506
- switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
507
- case "rowlayout":
508
- ic = t._rowLayout(s, tb, o);
509
- break;
510
-
511
- case "customlayout":
512
- ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
513
- break;
514
-
515
- default:
516
- ic = t._simpleLayout(s, tb, o, p);
517
- }
518
-
519
- n = o.targetNode;
520
-
521
- // Add classes to first and last TRs
522
- nl = sc.rows;
523
- DOM.addClass(nl[0], 'mceFirst');
524
- DOM.addClass(nl[nl.length - 1], 'mceLast');
525
-
526
- // Add classes to first and last TDs
527
- each(DOM.select('tr', tb), function(n) {
528
- DOM.addClass(n.firstChild, 'mceFirst');
529
- DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
530
- });
531
-
532
- if (DOM.get(s.theme_advanced_toolbar_container))
533
- DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
534
- else
535
- DOM.insertAfter(p, n);
536
-
537
- Event.add(ed.id + '_path_row', 'click', function(e) {
538
- e = e.target;
539
-
540
- if (e.nodeName == 'A') {
541
- t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
542
-
543
- return Event.cancel(e);
544
- }
545
- });
546
- /*
547
- if (DOM.get(ed.id + '_path_row')) {
548
- Event.add(ed.id + '_tbl', 'mouseover', function(e) {
549
- var re;
550
-
551
- e = e.target;
552
-
553
- if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
554
- re = DOM.get(ed.id + '_path_row');
555
- t.lastPath = re.innerHTML;
556
- DOM.setHTML(re, e.parentNode.title);
557
- }
558
- });
559
-
560
- Event.add(ed.id + '_tbl', 'mouseout', function(e) {
561
- if (t.lastPath) {
562
- DOM.setHTML(ed.id + '_path_row', t.lastPath);
563
- t.lastPath = 0;
564
- }
565
- });
566
- }
567
- */
568
-
569
- if (!ed.getParam('accessibility_focus'))
570
- Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
571
-
572
- if (s.theme_advanced_toolbar_location == 'external')
573
- o.deltaHeight = 0;
574
-
575
- t.deltaHeight = o.deltaHeight;
576
- o.targetNode = null;
577
-
578
- ed.onKeyDown.add(function(ed, evt) {
579
- var DOM_VK_F10 = 121, DOM_VK_F11 = 122;
580
-
581
- if (evt.altKey) {
582
- if (evt.keyCode === DOM_VK_F10) {
583
- t.toolbarGroup.focus();
584
- return Event.cancel(evt);
585
- } else if (evt.keyCode === DOM_VK_F11) {
586
- DOM.get(ed.id + '_path_row').focus();
587
- return Event.cancel(evt);
588
- }
589
- }
590
- });
591
-
592
- // alt+0 is the UK recommended shortcut for accessing the list of access controls.
593
- ed.addShortcut('alt+0', '', 'mceShortcuts', t);
594
-
595
- return {
596
- iframeContainer : ic,
597
- editorContainer : ed.id + '_parent',
598
- sizeContainer : sc,
599
- deltaHeight : o.deltaHeight
600
- };
601
- },
602
-
603
- getInfo : function() {
604
- return {
605
- longname : 'Advanced theme',
606
- author : 'Moxiecode Systems AB',
607
- authorurl : 'http://tinymce.moxiecode.com',
608
- version : tinymce.majorVersion + "." + tinymce.minorVersion
609
- }
610
- },
611
-
612
- resizeBy : function(dw, dh) {
613
- var e = DOM.get(this.editor.id + '_ifr');
614
-
615
- this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
616
- },
617
-
618
- resizeTo : function(w, h, store) {
619
- var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
620
-
621
- // Boundery fix box
622
- w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
623
- h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
624
- w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
625
- h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
626
-
627
- // Resize iframe and container
628
- DOM.setStyle(e, 'height', '');
629
- DOM.setStyle(ifr, 'height', h);
630
-
631
- if (s.theme_advanced_resize_horizontal) {
632
- DOM.setStyle(e, 'width', '');
633
- DOM.setStyle(ifr, 'width', w);
634
-
635
- // Make sure that the size is never smaller than the over all ui
636
- if (w < e.clientWidth) {
637
- w = e.clientWidth;
638
- DOM.setStyle(ifr, 'width', e.clientWidth);
639
- }
640
- }
641
-
642
- // Store away the size
643
- if (store && s.theme_advanced_resizing_use_cookie) {
644
- Cookie.setHash("TinyMCE_" + ed.id + "_size", {
645
- cw : w,
646
- ch : h
647
- });
648
- }
649
- },
650
-
651
- destroy : function() {
652
- var id = this.editor.id;
653
-
654
- Event.clear(id + '_resize');
655
- Event.clear(id + '_path_row');
656
- Event.clear(id + '_external_close');
657
- },
658
-
659
- // Internal functions
660
-
661
- _simpleLayout : function(s, tb, o, p) {
662
- var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
663
-
664
- if (s.readonly) {
665
- n = DOM.add(tb, 'tr');
666
- n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
667
- return ic;
668
- }
669
-
670
- // Create toolbar container at top
671
- if (lo == 'top')
672
- t._addToolbars(tb, o);
673
-
674
- // Create external toolbar
675
- if (lo == 'external') {
676
- n = c = DOM.create('div', {style : 'position:relative'});
677
- n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
678
- DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
679
- n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
680
- etb = DOM.add(n, 'tbody');
681
-
682
- if (p.firstChild.className == 'mceOldBoxModel')
683
- p.firstChild.appendChild(c);
684
- else
685
- p.insertBefore(c, p.firstChild);
686
-
687
- t._addToolbars(etb, o);
688
-
689
- ed.onMouseUp.add(function() {
690
- var e = DOM.get(ed.id + '_external');
691
- DOM.show(e);
692
-
693
- DOM.hide(lastExtID);
694
-
695
- var f = Event.add(ed.id + '_external_close', 'click', function() {
696
- DOM.hide(ed.id + '_external');
697
- Event.remove(ed.id + '_external_close', 'click', f);
698
- });
699
-
700
- DOM.show(e);
701
- DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
702
-
703
- // Fixes IE rendering bug
704
- DOM.hide(e);
705
- DOM.show(e);
706
- e.style.filter = '';
707
-
708
- lastExtID = ed.id + '_external';
709
-
710
- e = null;
711
- });
712
- }
713
-
714
- if (sl == 'top')
715
- t._addStatusBar(tb, o);
716
-
717
- // Create iframe container
718
- if (!s.theme_advanced_toolbar_container) {
719
- n = DOM.add(tb, 'tr');
720
- n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
721
- }
722
-
723
- // Create toolbar container at bottom
724
- if (lo == 'bottom')
725
- t._addToolbars(tb, o);
726
-
727
- if (sl == 'bottom')
728
- t._addStatusBar(tb, o);
729
-
730
- return ic;
731
- },
732
-
733
- _rowLayout : function(s, tb, o) {
734
- var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
735
-
736
- dc = s.theme_advanced_containers_default_class || '';
737
- da = s.theme_advanced_containers_default_align || 'center';
738
-
739
- each(explode(s.theme_advanced_containers || ''), function(c, i) {
740
- var v = s['theme_advanced_container_' + c] || '';
741
-
742
- switch (v.toLowerCase()) {
743
- case 'mceeditor':
744
- n = DOM.add(tb, 'tr');
745
- n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
746
- break;
747
-
748
- case 'mceelementpath':
749
- t._addStatusBar(tb, o);
750
- break;
751
-
752
- default:
753
- a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
754
- a = 'mce' + t._ufirst(a);
755
-
756
- n = DOM.add(DOM.add(tb, 'tr'), 'td', {
757
- 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
758
- });
759
-
760
- to = cf.createToolbar("toolbar" + i);
761
- t._addControls(v, to);
762
- DOM.setHTML(n, to.renderHTML());
763
- o.deltaHeight -= s.theme_advanced_row_height;
764
- }
765
- });
766
-
767
- return ic;
768
- },
769
-
770
- _addControls : function(v, tb) {
771
- var t = this, s = t.settings, di, cf = t.editor.controlManager;
772
-
773
- if (s.theme_advanced_disable && !t._disabled) {
774
- di = {};
775
-
776
- each(explode(s.theme_advanced_disable), function(v) {
777
- di[v] = 1;
778
- });
779
-
780
- t._disabled = di;
781
- } else
782
- di = t._disabled;
783
-
784
- each(explode(v), function(n) {
785
- var c;
786
-
787
- if (di && di[n])
788
- return;
789
-
790
- // Compatiblity with 2.x
791
- if (n == 'tablecontrols') {
792
- each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
793
- n = t.createControl(n, cf);
794
-
795
- if (n)
796
- tb.add(n);
797
- });
798
-
799
- return;
800
- }
801
-
802
- c = t.createControl(n, cf);
803
-
804
- if (c)
805
- tb.add(c);
806
- });
807
- },
808
-
809
- _addToolbars : function(c, o) {
810
- var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup;
811
-
812
- toolbarGroup = cf.createToolbarGroup('toolbargroup', {
813
- 'name': ed.getLang('advanced.toolbar'),
814
- 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar')
815
- });
816
-
817
- t.toolbarGroup = toolbarGroup;
818
-
819
- a = s.theme_advanced_toolbar_align.toLowerCase();
820
- a = 'mce' + t._ufirst(a);
821
-
822
- n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"});
823
-
824
- // Create toolbar and add the controls
825
- for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
826
- tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i});
827
-
828
- if (s['theme_advanced_buttons' + i + '_add'])
829
- v += ',' + s['theme_advanced_buttons' + i + '_add'];
830
-
831
- if (s['theme_advanced_buttons' + i + '_add_before'])
832
- v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
833
-
834
- t._addControls(v, tb);
835
- toolbarGroup.add(tb);
836
-
837
- o.deltaHeight -= s.theme_advanced_row_height;
838
- }
839
- h.push(toolbarGroup.renderHTML());
840
- h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
841
- DOM.setHTML(n, h.join(''));
842
- },
843
-
844
- _addStatusBar : function(tb, o) {
845
- var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
846
-
847
- n = DOM.add(tb, 'tr');
848
- n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
849
- n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
850
- if (s.theme_advanced_path) {
851
- DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
852
- DOM.add(n, 'span', {}, ': ');
853
- } else {
854
- DOM.add(n, 'span', {}, '&#160;');
855
- }
856
-
857
-
858
- if (s.theme_advanced_resizing) {
859
- DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'});
860
-
861
- if (s.theme_advanced_resizing_use_cookie) {
862
- ed.onPostRender.add(function() {
863
- var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
864
-
865
- if (!o)
866
- return;
867
-
868
- t.resizeTo(o.cw, o.ch);
869
- });
870
- }
871
-
872
- ed.onPostRender.add(function() {
873
- Event.add(ed.id + '_resize', 'click', function(e) {
874
- e.preventDefault();
875
- });
876
-
877
- Event.add(ed.id + '_resize', 'mousedown', function(e) {
878
- var mouseMoveHandler1, mouseMoveHandler2,
879
- mouseUpHandler1, mouseUpHandler2,
880
- startX, startY, startWidth, startHeight, width, height, ifrElm;
881
-
882
- function resizeOnMove(e) {
883
- e.preventDefault();
884
-
885
- width = startWidth + (e.screenX - startX);
886
- height = startHeight + (e.screenY - startY);
887
-
888
- t.resizeTo(width, height);
889
- };
890
-
891
- function endResize(e) {
892
- // Stop listening
893
- Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
894
- Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
895
- Event.remove(DOM.doc, 'mouseup', mouseUpHandler1);
896
- Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);
897
-
898
- width = startWidth + (e.screenX - startX);
899
- height = startHeight + (e.screenY - startY);
900
- t.resizeTo(width, height, true);
901
- };
902
-
903
- e.preventDefault();
904
-
905
- // Get the current rect size
906
- startX = e.screenX;
907
- startY = e.screenY;
908
- ifrElm = DOM.get(t.editor.id + '_ifr');
909
- startWidth = width = ifrElm.clientWidth;
910
- startHeight = height = ifrElm.clientHeight;
911
-
912
- // Register envent handlers
913
- mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
914
- mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
915
- mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);
916
- mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);
917
- });
918
- });
919
- }
920
-
921
- o.deltaHeight -= 21;
922
- n = tb = null;
923
- },
924
-
925
- _updateUndoStatus : function(ed) {
926
- var cm = ed.controlManager;
927
-
928
- cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing);
929
- cm.setDisabled('redo', !ed.undoManager.hasRedo());
930
- },
931
-
932
- _nodeChanged : function(ed, cm, n, co, ob) {
933
- var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, formatNames, matches;
934
-
935
- tinymce.each(t.stateControls, function(c) {
936
- cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
937
- });
938
-
939
- function getParent(name) {
940
- var i, parents = ob.parents, func = name;
941
-
942
- if (typeof(name) == 'string') {
943
- func = function(node) {
944
- return node.nodeName == name;
945
- };
946
- }
947
-
948
- for (i = 0; i < parents.length; i++) {
949
- if (func(parents[i]))
950
- return parents[i];
951
- }
952
- };
953
-
954
- cm.setActive('visualaid', ed.hasVisual);
955
- cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing);
956
- cm.setDisabled('redo', !ed.undoManager.hasRedo());
957
- cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
958
-
959
- p = getParent('A');
960
- if (c = cm.get('link')) {
961
- if (!p || !p.name) {
962
- c.setDisabled(!p && co);
963
- c.setActive(!!p);
964
- }
965
- }
966
-
967
- if (c = cm.get('unlink')) {
968
- c.setDisabled(!p && co);
969
- c.setActive(!!p && !p.name);
970
- }
971
-
972
- if (c = cm.get('anchor')) {
973
- c.setActive(!co && !!p && p.name);
974
- }
975
-
976
- p = getParent('IMG');
977
- if (c = cm.get('image'))
978
- c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1);
979
-
980
- if (c = cm.get('styleselect')) {
981
- t._importClasses();
982
-
983
- formatNames = [];
984
- each(c.items, function(item) {
985
- formatNames.push(item.value);
986
- });
987
-
988
- matches = ed.formatter.matchAll(formatNames);
989
- c.select(matches[0]);
990
- }
991
-
992
- if (c = cm.get('formatselect')) {
993
- p = getParent(DOM.isBlock);
994
-
995
- if (p)
996
- c.select(p.nodeName.toLowerCase());
997
- }
998
-
999
- // Find out current fontSize, fontFamily and fontClass
1000
- getParent(function(n) {
1001
- if (n.nodeName === 'SPAN') {
1002
- if (!cl && n.className)
1003
- cl = n.className;
1004
- }
1005
-
1006
- if (ed.dom.is(n, s.theme_advanced_font_selector)) {
1007
- if (!fz && n.style.fontSize)
1008
- fz = n.style.fontSize;
1009
-
1010
- if (!fn && n.style.fontFamily)
1011
- fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
1012
- }
1013
-
1014
- return false;
1015
- });
1016
-
1017
- if (c = cm.get('fontselect')) {
1018
- c.select(function(v) {
1019
- return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
1020
- });
1021
- }
1022
-
1023
- // Select font size
1024
- if (c = cm.get('fontsizeselect')) {
1025
- // Use computed style
1026
- if (s.theme_advanced_runtime_fontsize && !fz && !cl)
1027
- fz = ed.dom.getStyle(n, 'fontSize', true);
1028
-
1029
- c.select(function(v) {
1030
- if (v.fontSize && v.fontSize === fz)
1031
- return true;
1032
-
1033
- if (v['class'] && v['class'] === cl)
1034
- return true;
1035
- });
1036
- }
1037
-
1038
- if (s.theme_advanced_show_current_color) {
1039
- function updateColor(controlId, color) {
1040
- if (c = cm.get(controlId)) {
1041
- if (!color)
1042
- color = c.settings.default_color;
1043
- if (color !== c.value) {
1044
- c.displayColor(color);
1045
- }
1046
- }
1047
- };
1048
-
1049
- updateColor('forecolor', fc);
1050
- updateColor('backcolor', bc);
1051
- }
1052
-
1053
- if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
1054
- p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
1055
-
1056
- if (t.statusKeyboardNavigation) {
1057
- t.statusKeyboardNavigation.destroy();
1058
- t.statusKeyboardNavigation = null;
1059
- }
1060
-
1061
- DOM.setHTML(p, '');
1062
-
1063
- getParent(function(n) {
1064
- var na = n.nodeName.toLowerCase(), u, pi, ti = '';
1065
-
1066
- if (n.getAttribute('data-mce-bogus'))
1067
- return;
1068
-
1069
- // Ignore non element and hidden elements
1070
- if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')))
1071
- return;
1072
-
1073
- // Handle prefix
1074
- if (tinymce.isIE && n.scopeName !== 'HTML')
1075
- na = n.scopeName + ':' + na;
1076
-
1077
- // Remove internal prefix
1078
- na = na.replace(/mce\:/g, '');
1079
-
1080
- // Handle node name
1081
- switch (na) {
1082
- case 'b':
1083
- na = 'strong';
1084
- break;
1085
-
1086
- case 'i':
1087
- na = 'em';
1088
- break;
1089
-
1090
- case 'img':
1091
- if (v = DOM.getAttrib(n, 'src'))
1092
- ti += 'src: ' + v + ' ';
1093
-
1094
- break;
1095
-
1096
- case 'a':
1097
- if (v = DOM.getAttrib(n, 'name')) {
1098
- ti += 'name: ' + v + ' ';
1099
- na += '#' + v;
1100
- }
1101
-
1102
- if (v = DOM.getAttrib(n, 'href'))
1103
- ti += 'href: ' + v + ' ';
1104
-
1105
- break;
1106
-
1107
- case 'font':
1108
- if (v = DOM.getAttrib(n, 'face'))
1109
- ti += 'font: ' + v + ' ';
1110
-
1111
- if (v = DOM.getAttrib(n, 'size'))
1112
- ti += 'size: ' + v + ' ';
1113
-
1114
- if (v = DOM.getAttrib(n, 'color'))
1115
- ti += 'color: ' + v + ' ';
1116
-
1117
- break;
1118
-
1119
- case 'span':
1120
- if (v = DOM.getAttrib(n, 'style'))
1121
- ti += 'style: ' + v + ' ';
1122
-
1123
- break;
1124
- }
1125
-
1126
- if (v = DOM.getAttrib(n, 'id'))
1127
- ti += 'id: ' + v + ' ';
1128
-
1129
- if (v = n.className) {
1130
- v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '')
1131
-
1132
- if (v) {
1133
- ti += 'class: ' + v + ' ';
1134
-
1135
- if (DOM.isBlock(n) || na == 'img' || na == 'span')
1136
- na += '.' + v;
1137
- }
1138
- }
1139
-
1140
- na = na.replace(/(html:)/g, '');
1141
- na = {name : na, node : n, title : ti};
1142
- t.onResolveName.dispatch(t, na);
1143
- ti = na.title;
1144
- na = na.name;
1145
-
1146
- //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
1147
- pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na);
1148
-
1149
- if (p.hasChildNodes()) {
1150
- p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild);
1151
- p.insertBefore(pi, p.firstChild);
1152
- } else
1153
- p.appendChild(pi);
1154
- }, ed.getBody());
1155
-
1156
- if (DOM.select('a', p).length > 0) {
1157
- t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
1158
- root: ed.id + "_path_row",
1159
- items: DOM.select('a', p),
1160
- excludeFromTabOrder: true,
1161
- onCancel: function() {
1162
- ed.focus();
1163
- }
1164
- }, DOM);
1165
- }
1166
- }
1167
- },
1168
-
1169
- // Commands gets called by execCommand
1170
-
1171
- _sel : function(v) {
1172
- this.editor.execCommand('mceSelectNodeDepth', false, v);
1173
- },
1174
-
1175
- _mceInsertAnchor : function(ui, v) {
1176
- var ed = this.editor;
1177
-
1178
- ed.windowManager.open({
1179
- url : this.url + '/anchor.htm',
1180
- width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
1181
- height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
1182
- inline : true
1183
- }, {
1184
- theme_url : this.url
1185
- });
1186
- },
1187
-
1188
- _mceCharMap : function() {
1189
- var ed = this.editor;
1190
-
1191
- ed.windowManager.open({
1192
- url : this.url + '/charmap.htm',
1193
- width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
1194
- height : 250 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
1195
- inline : true
1196
- }, {
1197
- theme_url : this.url
1198
- });
1199
- },
1200
-
1201
- _mceHelp : function() {
1202
- var ed = this.editor;
1203
-
1204
- ed.windowManager.open({
1205
- url : this.url + '/about.htm',
1206
- width : 480,
1207
- height : 380,
1208
- inline : true
1209
- }, {
1210
- theme_url : this.url
1211
- });
1212
- },
1213
-
1214
- _mceShortcuts : function() {
1215
- var ed = this.editor;
1216
- ed.windowManager.open({
1217
- url: this.url + '/shortcuts.htm',
1218
- width: 480,
1219
- height: 380,
1220
- inline: true
1221
- }, {
1222
- theme_url: this.url
1223
- });
1224
- },
1225
-
1226
- _mceColorPicker : function(u, v) {
1227
- var ed = this.editor;
1228
-
1229
- v = v || {};
1230
-
1231
- ed.windowManager.open({
1232
- url : this.url + '/color_picker.htm',
1233
- width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
1234
- height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
1235
- close_previous : false,
1236
- inline : true
1237
- }, {
1238
- input_color : v.color,
1239
- func : v.func,
1240
- theme_url : this.url
1241
- });
1242
- },
1243
-
1244
- _mceCodeEditor : function(ui, val) {
1245
- var ed = this.editor;
1246
-
1247
- ed.windowManager.open({
1248
- url : this.url + '/source_editor.htm',
1249
- width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
1250
- height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
1251
- inline : true,
1252
- resizable : true,
1253
- maximizable : true
1254
- }, {
1255
- theme_url : this.url
1256
- });
1257
- },
1258
-
1259
- _mceImage : function(ui, val) {
1260
- var ed = this.editor;
1261
-
1262
- // Internal image object like a flash placeholder
1263
- if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
1264
- return;
1265
-
1266
- ed.windowManager.open({
1267
- url : this.url + '/image.htm',
1268
- width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
1269
- height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
1270
- inline : true
1271
- }, {
1272
- theme_url : this.url
1273
- });
1274
- },
1275
-
1276
- _mceLink : function(ui, val) {
1277
- var ed = this.editor;
1278
-
1279
- ed.windowManager.open({
1280
- url : this.url + '/link.htm',
1281
- width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
1282
- height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
1283
- inline : true
1284
- }, {
1285
- theme_url : this.url
1286
- });
1287
- },
1288
-
1289
- _mceNewDocument : function() {
1290
- var ed = this.editor;
1291
-
1292
- ed.windowManager.confirm('advanced.newdocument', function(s) {
1293
- if (s)
1294
- ed.execCommand('mceSetContent', false, '');
1295
- });
1296
- },
1297
-
1298
- _mceForeColor : function() {
1299
- var t = this;
1300
-
1301
- this._mceColorPicker(0, {
1302
- color: t.fgColor,
1303
- func : function(co) {
1304
- t.fgColor = co;
1305
- t.editor.execCommand('ForeColor', false, co);
1306
- }
1307
- });
1308
- },
1309
-
1310
- _mceBackColor : function() {
1311
- var t = this;
1312
-
1313
- this._mceColorPicker(0, {
1314
- color: t.bgColor,
1315
- func : function(co) {
1316
- t.bgColor = co;
1317
- t.editor.execCommand('HiliteColor', false, co);
1318
- }
1319
- });
1320
- },
1321
-
1322
- _ufirst : function(s) {
1323
- return s.substring(0, 1).toUpperCase() + s.substring(1);
1324
- }
1325
- });
1326
-
1327
- tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
1328
- }(tinymce));
1
+ (function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?"highcontrast":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"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,sans-serif;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",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),"dragend",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});i=(d.getStyle(j,"background-color",true)+"").toLowerCase().replace(/ /g,"");d.remove(j);return i!="rgb(171,239,86)"&&i!="#abef56"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang("advanced.help_shortcut")}m=j=d.create("span",{role:"application","aria-labelledby":r.id+"_voice",id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});d.add(m,"span",{"class":"mceVoiceLabel",style:"display:none;",id:r.id+"_voice"},w.aria_label);if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{role:"presentation",id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+"_path_row").focus();return b.cancel(n)}}}});r.addShortcut("alt+0","","mceShortcuts",v);return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_ifr");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i<n.clientWidth){i=n.clientWidth;d.setStyle(o,"width",n.clientWidth)}}if(k&&l.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+j.id+"_size",{cw:i,ch:m})}},destroy:function(){var i=this.editor.id;b.clear(i+"_resize");b.clear(i+"_path_row");b.clear(i+"_external_close")},_simpleLayout:function(y,r,k,i){var x=this,u=x.editor,v=y.theme_advanced_toolbar_location,m=y.theme_advanced_statusbar_location,l,j,q,w;if(y.readonly){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});return j}if(v=="top"){x._addToolbars(r,k)}if(v=="external"){l=w=d.create("div",{style:"position:relative"});l=d.add(l,"div",{id:u.id+"_external","class":"mceExternalToolbar"});d.add(l,"a",{id:u.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});l=d.add(l,"table",{id:u.id+"_tblext",cellSpacing:0,cellPadding:0});q=d.add(l,"tbody");if(i.firstChild.className=="mceOldBoxModel"){i.firstChild.appendChild(w)}else{i.insertBefore(w,i.firstChild)}x._addToolbars(q,k);u.onMouseUp.add(function(){var o=d.get(u.id+"_external");d.show(o);d.hide(g);var n=b.add(u.id+"_external_close","click",function(){d.hide(u.id+"_external");b.remove(u.id+"_external_close","click",n)});d.show(o);d.setStyle(o,"top",0-d.getRect(u.id+"_tblext").h-1);d.hide(o);d.show(o);o.style.filter="";g=u.id+"_external";o=null})}if(m=="top"){x._addStatusBar(r,k)}if(!y.theme_advanced_toolbar_container){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"})}if(v=="bottom"){x._addToolbars(r,k)}if(m=="bottom"){x._addStatusBar(r,k)}return j},_rowLayout:function(w,m,k){var v=this,p=v.editor,u,x,i=p.controlManager,l,j,r,q;u=w.theme_advanced_containers_default_class||"";x=w.theme_advanced_containers_default_align||"center";f(c(w.theme_advanced_containers||""),function(s,o){var n=w["theme_advanced_container_"+s]||"";switch(n.toLowerCase()){case"mceeditor":l=d.add(m,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":v._addStatusBar(m,k);break;default:q=(w["theme_advanced_container_"+s+"_align"]||x).toLowerCase();q="mce"+v._ufirst(q);l=d.add(d.add(m,"tr"),"td",{"class":"mceToolbar "+(w["theme_advanced_container_"+s+"_class"]||u)+" "+q||x});r=i.createToolbar("toolbar"+o);v._addControls(n,r);d.setHTML(l,r.renderHTML());k.deltaHeight-=w.theme_advanced_row_height}});return j},_addControls:function(j,i){var k=this,l=k.settings,m,n=k.editor.controlManager;if(l.theme_advanced_disable&&!k._disabled){m={};f(c(l.theme_advanced_disable),function(o){m[o]=1});k._disabled=m}else{m=k._disabled}f(c(j),function(p){var o;if(m&&m[p]){return}if(p=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(q){q=k.createControl(q,n);if(q){i.add(q)}});return}o=k.createControl(p,n);if(o){i.add(o)}})},_addToolbars:function(x,k){var A=this,p,m,r=A.editor,B=A.settings,z,j=r.controlManager,u,l,q=[],y,w;w=j.createToolbarGroup("toolbargroup",{name:r.getLang("advanced.toolbar"),tab_focus_toolbar:r.getParam("theme_advanced_tab_focus_toolbar")});A.toolbarGroup=w;y=B.theme_advanced_toolbar_align.toLowerCase();y="mce"+A._ufirst(y);l=d.add(d.add(x,"tr",{role:"presentation"}),"td",{"class":"mceToolbar "+y,role:"presentation"});for(p=1;(z=B["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(B["theme_advanced_buttons"+p+"_add"]){z+=","+B["theme_advanced_buttons"+p+"_add"]}if(B["theme_advanced_buttons"+p+"_add_before"]){z=B["theme_advanced_buttons"+p+"_add_before"]+","+z}A._addControls(z,m);w.add(m);k.deltaHeight-=B.theme_advanced_row_height}q.push(w.renderHTML());q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},"<!-- IE -->"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row",role:"group","aria-labelledby":p.id+"_path_voice"});if(w.theme_advanced_path){d.add(k,"span",{id:p.id+"_path_voice"},p.translate("advanced.path"));d.add(k,"span",{},": ")}else{d.add(k,"span",{},"&#160;")}if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager;i.setDisabled("undo",!j.undoManager.hasUndo()&&!j.typing);i.setDisabled("redo",!j.undoManager.hasRedo())},_nodeChanged:function(l,q,B,m,C){var x=this,A,D=0,w,E,y=x.settings,u,k,r,j,i;e.each(x.stateControls,function(n){q.setActive(n,l.queryCommandState(x.controls[n][1]))});function o(p){var s,n=C.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}q.setActive("visualaid",l.hasVisual);q.setDisabled("undo",!l.undoManager.hasUndo()&&!l.typing);q.setDisabled("redo",!l.undoManager.hasRedo());q.setDisabled("outdent",!l.queryCommandState("Outdent"));A=o("A");if(E=q.get("link")){if(!A||!A.name){E.setDisabled(!A&&m);E.setActive(!!A)}}if(E=q.get("unlink")){E.setDisabled(!A&&m);E.setActive(!!A&&!A.name)}if(E=q.get("anchor")){E.setActive(!m&&!!A&&A.name)}A=o("IMG");if(E=q.get("image")){E.setActive(!m&&!!A&&B.className.indexOf("mceItem")==-1)}if(E=q.get("styleselect")){x._importClasses();j=[];f(E.items,function(n){j.push(n.value)});i=l.formatter.matchAll(j);E.select(i[0])}if(E=q.get("formatselect")){A=o(d.isBlock);if(A){E.select(A.nodeName.toLowerCase())}}o(function(p){if(p.nodeName==="SPAN"){if(!u&&p.className){u=p.className}}if(l.dom.is(p,y.theme_advanced_font_selector)){if(!k&&p.style.fontSize){k=p.style.fontSize}if(!r&&p.style.fontFamily){r=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}}return false});if(E=q.get("fontselect")){E.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==r})}if(E=q.get("fontsizeselect")){if(y.theme_advanced_runtime_fontsize&&!k&&!u){k=l.dom.getStyle(B,"fontSize",true)}E.select(function(n){if(n.fontSize&&n.fontSize===k){return true}if(n["class"]&&n["class"]===u){return true}})}if(y.theme_advanced_show_current_color){function z(p,n){if(E=q.get(p)){if(!n){n=E.settings.default_color}if(n!==E.value){E.displayColor(n)}}}z("forecolor",fc);z("backcolor",bc)}if(y.theme_advanced_path&&y.theme_advanced_statusbar_location){A=d.get(l.id+"_path")||d.add(l.id+"_path_row","span",{id:l.id+"_path"});if(x.statusKeyboardNavigation){x.statusKeyboardNavigation.destroy();x.statusKeyboardNavigation=null}d.setHTML(A,"");o(function(F){var p=F.nodeName.toLowerCase(),s,v,t="";if(F.getAttribute("data-mce-bogus")){return}if(F.nodeType!=1||F.nodeName==="BR"||(d.hasClass(F,"mceItemHidden")||d.hasClass(F,"mceItemRemoved"))){return}if(e.isIE&&F.scopeName!=="HTML"){p=F.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(w=d.getAttrib(F,"src")){t+="src: "+w+" "}break;case"a":if(w=d.getAttrib(F,"name")){t+="name: "+w+" ";p+="#"+w}if(w=d.getAttrib(F,"href")){t+="href: "+w+" "}break;case"font":if(w=d.getAttrib(F,"face")){t+="font: "+w+" "}if(w=d.getAttrib(F,"size")){t+="size: "+w+" "}if(w=d.getAttrib(F,"color")){t+="color: "+w+" "}break;case"span":if(w=d.getAttrib(F,"style")){t+="style: "+w+" "}break}if(w=d.getAttrib(F,"id")){t+="id: "+w+" "}if(w=F.className){w=w.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(w){t+="class: "+w+" ";if(d.isBlock(F)||p=="img"||p=="span"){p+="."+w}}}p=p.replace(/(html:)/g,"");p={name:p,node:F,title:t};x.onResolveName.dispatch(x,p);t=p.title;p=p.name;v=d.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(D++)},p);if(A.hasChildNodes()){A.insertBefore(d.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),A.firstChild);A.insertBefore(v,A.firstChild)}else{A.appendChild(v)}},l.getBody());if(d.select("a",A).length>0){x.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:l.id+"_path_row",items:d.select("a",A),excludeFromTabOrder:true,onCancel:function(){l.focus()}},d)}}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce));