kuztuscms 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (271) hide show
  1. data/CHANGELOG.rdoc +5 -0
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.rdoc +26 -1
  5. data/app/assets/javascripts/kuztuscms/tiny_mce/jquery.tinymce.js +1 -0
  6. data/app/assets/javascripts/kuztuscms/tiny_mce/langs/en.js +1 -0
  7. data/app/assets/javascripts/kuztuscms/tiny_mce/license.txt +504 -0
  8. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advhr/css/advhr.css +5 -0
  9. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
  10. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
  11. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advhr/js/rule.js +43 -0
  12. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advhr/langs/en_dlg.js +1 -0
  13. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advhr/rule.htm +58 -0
  14. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advimage/css/advimage.css +13 -0
  15. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
  16. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
  17. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advimage/image.htm +235 -0
  18. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  19. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advimage/js/image.js +462 -0
  20. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advimage/langs/en_dlg.js +1 -0
  21. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advlink/css/advlink.css +8 -0
  22. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
  23. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
  24. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advlink/js/advlink.js +539 -0
  25. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advlink/langs/en_dlg.js +1 -0
  26. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advlink/link.htm +338 -0
  27. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
  28. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/advlist/editor_plugin_src.js +176 -0
  29. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/autolink/editor_plugin.js +1 -0
  30. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/autolink/editor_plugin_src.js +174 -0
  31. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
  32. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/autoresize/editor_plugin_src.js +119 -0
  33. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
  34. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/autosave/editor_plugin_src.js +431 -0
  35. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/autosave/langs/en.js +4 -0
  36. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
  37. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
  38. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
  39. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/contextmenu/editor_plugin_src.js +161 -0
  40. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
  41. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
  42. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
  43. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
  44. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/emotions.htm +42 -0
  45. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  46. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  47. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  48. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  49. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  50. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  51. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  52. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  53. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  54. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  55. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  56. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  57. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  58. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  59. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  60. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  61. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/js/emotions.js +43 -0
  62. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/emotions/langs/en_dlg.js +1 -0
  63. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/example/dialog.htm +22 -0
  64. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/example/editor_plugin.js +1 -0
  65. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
  66. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/example/img/example.gif +0 -0
  67. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/example/js/dialog.js +19 -0
  68. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/example/langs/en.js +3 -0
  69. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
  70. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/example_dependency/editor_plugin.js +1 -0
  71. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/example_dependency/editor_plugin_src.js +50 -0
  72. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/fullpage/css/fullpage.css +143 -0
  73. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
  74. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/fullpage/editor_plugin_src.js +405 -0
  75. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/fullpage/fullpage.htm +259 -0
  76. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/fullpage/js/fullpage.js +232 -0
  77. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/fullpage/langs/en_dlg.js +1 -0
  78. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
  79. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/fullscreen/editor_plugin_src.js +159 -0
  80. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/fullscreen/fullscreen.htm +110 -0
  81. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
  82. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
  83. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
  84. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +699 -0
  85. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  86. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  87. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  88. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  89. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  90. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  91. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  92. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
  93. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/inlinepopups/template.htm +387 -0
  94. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
  95. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
  96. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/layer/editor_plugin.js +1 -0
  97. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/layer/editor_plugin_src.js +262 -0
  98. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
  99. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +139 -0
  100. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/lists/editor_plugin.js +1 -0
  101. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/lists/editor_plugin_src.js +951 -0
  102. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/media/css/media.css +17 -0
  103. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/media/editor_plugin.js +1 -0
  104. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/media/editor_plugin_src.js +890 -0
  105. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/media/js/embed.js +73 -0
  106. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/media/js/media.js +470 -0
  107. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/media/langs/en_dlg.js +1 -0
  108. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/media/media.htm +922 -0
  109. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/media/moxieplayer.swf +0 -0
  110. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
  111. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +54 -0
  112. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
  113. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/noneditable/editor_plugin_src.js +438 -0
  114. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
  115. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/pagebreak/editor_plugin_src.js +74 -0
  116. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/paste/editor_plugin.js +1 -0
  117. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/paste/editor_plugin_src.js +871 -0
  118. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/paste/js/pastetext.js +36 -0
  119. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/paste/js/pasteword.js +51 -0
  120. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/paste/langs/en_dlg.js +1 -0
  121. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/paste/pastetext.htm +27 -0
  122. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/paste/pasteword.htm +21 -0
  123. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/preview/editor_plugin.js +1 -0
  124. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
  125. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/preview/example.html +28 -0
  126. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
  127. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/preview/preview.html +17 -0
  128. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/print/editor_plugin.js +1 -0
  129. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
  130. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/save/editor_plugin.js +1 -0
  131. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
  132. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
  133. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
  134. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/searchreplace/editor_plugin_src.js +61 -0
  135. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/searchreplace/js/searchreplace.js +142 -0
  136. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/searchreplace/langs/en_dlg.js +1 -0
  137. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/searchreplace/searchreplace.htm +100 -0
  138. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/spellchecker/css/content.css +1 -0
  139. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
  140. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/spellchecker/editor_plugin_src.js +436 -0
  141. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
  142. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/style/css/props.css +14 -0
  143. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/style/editor_plugin.js +1 -0
  144. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/style/editor_plugin_src.js +71 -0
  145. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/style/js/props.js +709 -0
  146. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/style/langs/en_dlg.js +1 -0
  147. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/style/props.htm +845 -0
  148. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/style/readme.txt +19 -0
  149. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
  150. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/tabfocus/editor_plugin_src.js +122 -0
  151. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/cell.htm +180 -0
  152. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/css/cell.css +17 -0
  153. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/css/row.css +25 -0
  154. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/css/table.css +13 -0
  155. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/editor_plugin.js +1 -0
  156. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/editor_plugin_src.js +1428 -0
  157. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/js/cell.js +319 -0
  158. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/js/merge_cells.js +27 -0
  159. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/js/row.js +237 -0
  160. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/js/table.js +489 -0
  161. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/langs/en_dlg.js +1 -0
  162. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/merge_cells.htm +32 -0
  163. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/row.htm +158 -0
  164. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/table/table.htm +188 -0
  165. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/template/blank.htm +12 -0
  166. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/template/css/template.css +23 -0
  167. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/template/editor_plugin.js +1 -0
  168. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
  169. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/template/js/template.js +106 -0
  170. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/template/langs/en_dlg.js +1 -0
  171. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/template/template.htm +31 -0
  172. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/visualblocks/css/visualblocks.css +19 -0
  173. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/visualblocks/editor_plugin.js +1 -0
  174. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/visualblocks/editor_plugin_src.js +63 -0
  175. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
  176. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/visualchars/editor_plugin_src.js +83 -0
  177. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
  178. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/wordcount/editor_plugin_src.js +122 -0
  179. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/abbr.htm +142 -0
  180. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/acronym.htm +142 -0
  181. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/attributes.htm +149 -0
  182. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/cite.htm +142 -0
  183. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
  184. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
  185. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/del.htm +162 -0
  186. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
  187. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +132 -0
  188. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/ins.htm +162 -0
  189. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
  190. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
  191. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/js/attributes.js +111 -0
  192. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
  193. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/js/del.js +53 -0
  194. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/js/element_common.js +229 -0
  195. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/js/ins.js +53 -0
  196. data/app/assets/javascripts/kuztuscms/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +1 -0
  197. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/about.htm +52 -0
  198. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/anchor.htm +26 -0
  199. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/charmap.htm +55 -0
  200. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/color_picker.htm +74 -0
  201. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/editor_template.js +1 -0
  202. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/editor_template_src.js +1467 -0
  203. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/image.htm +80 -0
  204. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  205. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/flash.gif +0 -0
  206. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/icons.gif +0 -0
  207. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/iframe.gif +0 -0
  208. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
  209. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
  210. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
  211. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
  212. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/trans.gif +0 -0
  213. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/video.gif +0 -0
  214. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
  215. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/js/about.js +73 -0
  216. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/js/anchor.js +44 -0
  217. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/js/charmap.js +363 -0
  218. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/js/color_picker.js +345 -0
  219. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/js/image.js +251 -0
  220. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/js/link.js +153 -0
  221. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/js/source_editor.js +78 -0
  222. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/langs/en.js +1 -0
  223. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/langs/en_dlg.js +1 -0
  224. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/link.htm +57 -0
  225. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/shortcuts.htm +47 -0
  226. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/default/content.css +51 -0
  227. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
  228. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  229. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  230. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  231. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  232. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  233. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  234. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/default/ui.css +215 -0
  235. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/highcontrast/content.css +25 -0
  236. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +105 -0
  237. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/highcontrast/ui.css +102 -0
  238. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/o2k7/content.css +49 -0
  239. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/o2k7/dialog.css +117 -0
  240. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  241. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  242. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  243. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/o2k7/ui.css +218 -0
  244. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
  245. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
  246. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/advanced/source_editor.htm +25 -0
  247. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/simple/editor_template.js +1 -0
  248. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/simple/editor_template_src.js +84 -0
  249. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/simple/img/icons.gif +0 -0
  250. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/simple/langs/en.js +1 -0
  251. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/simple/skins/default/content.css +25 -0
  252. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/simple/skins/default/ui.css +32 -0
  253. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
  254. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  255. data/app/assets/javascripts/kuztuscms/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
  256. data/app/assets/javascripts/kuztuscms/tiny_mce/tiny_mce.js +1 -0
  257. data/app/assets/javascripts/kuztuscms/tiny_mce/tiny_mce_popup.js +5 -0
  258. data/app/assets/javascripts/kuztuscms/tiny_mce/tiny_mce_src.js +16573 -0
  259. data/app/assets/javascripts/kuztuscms/tiny_mce/utils/editable_selects.js +70 -0
  260. data/app/assets/javascripts/kuztuscms/tiny_mce/utils/form_utils.js +210 -0
  261. data/app/assets/javascripts/kuztuscms/tiny_mce/utils/mctabs.js +162 -0
  262. data/app/assets/javascripts/kuztuscms/tiny_mce/utils/validate.js +252 -0
  263. data/app/assets/stylesheets/kuztuscms/tiny_mce.css +105 -0
  264. data/app/views/kuztuscms/articles/edit.html.erb +1 -0
  265. data/app/views/kuztuscms/articles/new.html.erb +1 -0
  266. data/app/views/kuztuscms/articles/show.html.erb +1 -1
  267. data/app/views/kuztuscms/pages/show.html.erb +1 -1
  268. data/app/views/kuztuscms/shared/_tiny_mce.html.erb +40 -0
  269. data/lib/kuztuscms/version.rb +1 -1
  270. data/spec/dummy/app/assets/stylesheets/application.css +2 -0
  271. metadata +282 -22
@@ -0,0 +1,539 @@
1
+ /* Functions for the advlink plugin popup */
2
+
3
+ tinyMCEPopup.requireLangPack();
4
+
5
+ var templates = {
6
+ "window.open" : "window.open('${url}','${target}','${options}')"
7
+ };
8
+
9
+ function preinit() {
10
+ var url;
11
+
12
+ if (url = tinyMCEPopup.getParam("external_link_list_url"))
13
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
14
+ }
15
+
16
+ function changeClass() {
17
+ var f = document.forms[0];
18
+
19
+ f.classes.value = getSelectValue(f, 'classlist');
20
+ }
21
+
22
+ function init() {
23
+ tinyMCEPopup.resizeToInnerSize();
24
+
25
+ var formObj = document.forms[0];
26
+ var inst = tinyMCEPopup.editor;
27
+ var elm = inst.selection.getNode();
28
+ var action = "insert";
29
+ var html;
30
+
31
+ document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
32
+ document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
33
+ document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
34
+
35
+ // Link list
36
+ html = getLinkListHTML('linklisthref','href');
37
+ if (html == "")
38
+ document.getElementById("linklisthrefrow").style.display = 'none';
39
+ else
40
+ document.getElementById("linklisthrefcontainer").innerHTML = html;
41
+
42
+ // Anchor list
43
+ html = getAnchorListHTML('anchorlist','href');
44
+ if (html == "")
45
+ document.getElementById("anchorlistrow").style.display = 'none';
46
+ else
47
+ document.getElementById("anchorlistcontainer").innerHTML = html;
48
+
49
+ // Resize some elements
50
+ if (isVisible('hrefbrowser'))
51
+ document.getElementById('href').style.width = '260px';
52
+
53
+ if (isVisible('popupurlbrowser'))
54
+ document.getElementById('popupurl').style.width = '180px';
55
+
56
+ elm = inst.dom.getParent(elm, "A");
57
+ if (elm == null) {
58
+ var prospect = inst.dom.create("p", null, inst.selection.getContent());
59
+ if (prospect.childNodes.length === 1) {
60
+ elm = prospect.firstChild;
61
+ }
62
+ }
63
+
64
+ if (elm != null && elm.nodeName == "A")
65
+ action = "update";
66
+
67
+ formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
68
+
69
+ setPopupControlsDisabled(true);
70
+
71
+ if (action == "update") {
72
+ var href = inst.dom.getAttrib(elm, 'href');
73
+ var onclick = inst.dom.getAttrib(elm, 'onclick');
74
+
75
+ // Setup form data
76
+ setFormValue('href', href);
77
+ setFormValue('title', inst.dom.getAttrib(elm, 'title'));
78
+ setFormValue('id', inst.dom.getAttrib(elm, 'id'));
79
+ setFormValue('style', inst.dom.getAttrib(elm, "style"));
80
+ setFormValue('rel', inst.dom.getAttrib(elm, 'rel'));
81
+ setFormValue('rev', inst.dom.getAttrib(elm, 'rev'));
82
+ setFormValue('charset', inst.dom.getAttrib(elm, 'charset'));
83
+ setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang'));
84
+ setFormValue('dir', inst.dom.getAttrib(elm, 'dir'));
85
+ setFormValue('lang', inst.dom.getAttrib(elm, 'lang'));
86
+ setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
87
+ setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
88
+ setFormValue('type', inst.dom.getAttrib(elm, 'type'));
89
+ setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus'));
90
+ setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur'));
91
+ setFormValue('onclick', onclick);
92
+ setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick'));
93
+ setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown'));
94
+ setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup'));
95
+ setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover'));
96
+ setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove'));
97
+ setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout'));
98
+ setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
99
+ setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
100
+ setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
101
+ setFormValue('target', inst.dom.getAttrib(elm, 'target'));
102
+ setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
103
+
104
+ // Parse onclick data
105
+ if (onclick != null && onclick.indexOf('window.open') != -1)
106
+ parseWindowOpen(onclick);
107
+ else
108
+ parseFunction(onclick);
109
+
110
+ // Select by the values
111
+ selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir'));
112
+ selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel'));
113
+ selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev'));
114
+ selectByValue(formObj, 'linklisthref', href);
115
+
116
+ if (href.charAt(0) == '#')
117
+ selectByValue(formObj, 'anchorlist', href);
118
+
119
+ addClassesToList('classlist', 'advlink_styles');
120
+
121
+ selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
122
+ selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
123
+ } else
124
+ addClassesToList('classlist', 'advlink_styles');
125
+ }
126
+
127
+ function checkPrefix(n) {
128
+ if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
129
+ n.value = 'mailto:' + n.value;
130
+
131
+ if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
132
+ n.value = 'http://' + n.value;
133
+ }
134
+
135
+ function setFormValue(name, value) {
136
+ document.forms[0].elements[name].value = value;
137
+ }
138
+
139
+ function parseWindowOpen(onclick) {
140
+ var formObj = document.forms[0];
141
+
142
+ // Preprocess center code
143
+ if (onclick.indexOf('return false;') != -1) {
144
+ formObj.popupreturn.checked = true;
145
+ onclick = onclick.replace('return false;', '');
146
+ } else
147
+ formObj.popupreturn.checked = false;
148
+
149
+ var onClickData = parseLink(onclick);
150
+
151
+ if (onClickData != null) {
152
+ formObj.ispopup.checked = true;
153
+ setPopupControlsDisabled(false);
154
+
155
+ var onClickWindowOptions = parseOptions(onClickData['options']);
156
+ var url = onClickData['url'];
157
+
158
+ formObj.popupname.value = onClickData['target'];
159
+ formObj.popupurl.value = url;
160
+ formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
161
+ formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
162
+
163
+ formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
164
+ formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
165
+
166
+ if (formObj.popupleft.value.indexOf('screen') != -1)
167
+ formObj.popupleft.value = "c";
168
+
169
+ if (formObj.popuptop.value.indexOf('screen') != -1)
170
+ formObj.popuptop.value = "c";
171
+
172
+ formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
173
+ formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
174
+ formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
175
+ formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
176
+ formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
177
+ formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
178
+ formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
179
+
180
+ buildOnClick();
181
+ }
182
+ }
183
+
184
+ function parseFunction(onclick) {
185
+ var formObj = document.forms[0];
186
+ var onClickData = parseLink(onclick);
187
+
188
+ // TODO: Add stuff here
189
+ }
190
+
191
+ function getOption(opts, name) {
192
+ return typeof(opts[name]) == "undefined" ? "" : opts[name];
193
+ }
194
+
195
+ function setPopupControlsDisabled(state) {
196
+ var formObj = document.forms[0];
197
+
198
+ formObj.popupname.disabled = state;
199
+ formObj.popupurl.disabled = state;
200
+ formObj.popupwidth.disabled = state;
201
+ formObj.popupheight.disabled = state;
202
+ formObj.popupleft.disabled = state;
203
+ formObj.popuptop.disabled = state;
204
+ formObj.popuplocation.disabled = state;
205
+ formObj.popupscrollbars.disabled = state;
206
+ formObj.popupmenubar.disabled = state;
207
+ formObj.popupresizable.disabled = state;
208
+ formObj.popuptoolbar.disabled = state;
209
+ formObj.popupstatus.disabled = state;
210
+ formObj.popupreturn.disabled = state;
211
+ formObj.popupdependent.disabled = state;
212
+
213
+ setBrowserDisabled('popupurlbrowser', state);
214
+ }
215
+
216
+ function parseLink(link) {
217
+ link = link.replace(new RegExp('&#39;', 'g'), "'");
218
+
219
+ var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
220
+
221
+ // Is function name a template function
222
+ var template = templates[fnName];
223
+ if (template) {
224
+ // Build regexp
225
+ var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
226
+ var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
227
+ var replaceStr = "";
228
+ for (var i=0; i<variableNames.length; i++) {
229
+ // Is string value
230
+ if (variableNames[i].indexOf("'${") != -1)
231
+ regExp += "'(.*)'";
232
+ else // Number value
233
+ regExp += "([0-9]*)";
234
+
235
+ replaceStr += "$" + (i+1);
236
+
237
+ // Cleanup variable name
238
+ variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
239
+
240
+ if (i != variableNames.length-1) {
241
+ regExp += "\\s*,\\s*";
242
+ replaceStr += "<delim>";
243
+ } else
244
+ regExp += ".*";
245
+ }
246
+
247
+ regExp += "\\);?";
248
+
249
+ // Build variable array
250
+ var variables = [];
251
+ variables["_function"] = fnName;
252
+ var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
253
+ for (var i=0; i<variableNames.length; i++)
254
+ variables[variableNames[i]] = variableValues[i];
255
+
256
+ return variables;
257
+ }
258
+
259
+ return null;
260
+ }
261
+
262
+ function parseOptions(opts) {
263
+ if (opts == null || opts == "")
264
+ return [];
265
+
266
+ // Cleanup the options
267
+ opts = opts.toLowerCase();
268
+ opts = opts.replace(/;/g, ",");
269
+ opts = opts.replace(/[^0-9a-z=,]/g, "");
270
+
271
+ var optionChunks = opts.split(',');
272
+ var options = [];
273
+
274
+ for (var i=0; i<optionChunks.length; i++) {
275
+ var parts = optionChunks[i].split('=');
276
+
277
+ if (parts.length == 2)
278
+ options[parts[0]] = parts[1];
279
+ }
280
+
281
+ return options;
282
+ }
283
+
284
+ function buildOnClick() {
285
+ var formObj = document.forms[0];
286
+
287
+ if (!formObj.ispopup.checked) {
288
+ formObj.onclick.value = "";
289
+ return;
290
+ }
291
+
292
+ var onclick = "window.open('";
293
+ var url = formObj.popupurl.value;
294
+
295
+ onclick += url + "','";
296
+ onclick += formObj.popupname.value + "','";
297
+
298
+ if (formObj.popuplocation.checked)
299
+ onclick += "location=yes,";
300
+
301
+ if (formObj.popupscrollbars.checked)
302
+ onclick += "scrollbars=yes,";
303
+
304
+ if (formObj.popupmenubar.checked)
305
+ onclick += "menubar=yes,";
306
+
307
+ if (formObj.popupresizable.checked)
308
+ onclick += "resizable=yes,";
309
+
310
+ if (formObj.popuptoolbar.checked)
311
+ onclick += "toolbar=yes,";
312
+
313
+ if (formObj.popupstatus.checked)
314
+ onclick += "status=yes,";
315
+
316
+ if (formObj.popupdependent.checked)
317
+ onclick += "dependent=yes,";
318
+
319
+ if (formObj.popupwidth.value != "")
320
+ onclick += "width=" + formObj.popupwidth.value + ",";
321
+
322
+ if (formObj.popupheight.value != "")
323
+ onclick += "height=" + formObj.popupheight.value + ",";
324
+
325
+ if (formObj.popupleft.value != "") {
326
+ if (formObj.popupleft.value != "c")
327
+ onclick += "left=" + formObj.popupleft.value + ",";
328
+ else
329
+ onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
330
+ }
331
+
332
+ if (formObj.popuptop.value != "") {
333
+ if (formObj.popuptop.value != "c")
334
+ onclick += "top=" + formObj.popuptop.value + ",";
335
+ else
336
+ onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
337
+ }
338
+
339
+ if (onclick.charAt(onclick.length-1) == ',')
340
+ onclick = onclick.substring(0, onclick.length-1);
341
+
342
+ onclick += "');";
343
+
344
+ if (formObj.popupreturn.checked)
345
+ onclick += "return false;";
346
+
347
+ // tinyMCE.debug(onclick);
348
+
349
+ formObj.onclick.value = onclick;
350
+
351
+ if (formObj.href.value == "")
352
+ formObj.href.value = url;
353
+ }
354
+
355
+ function setAttrib(elm, attrib, value) {
356
+ var formObj = document.forms[0];
357
+ var valueElm = formObj.elements[attrib.toLowerCase()];
358
+ var dom = tinyMCEPopup.editor.dom;
359
+
360
+ if (typeof(value) == "undefined" || value == null) {
361
+ value = "";
362
+
363
+ if (valueElm)
364
+ value = valueElm.value;
365
+ }
366
+
367
+ // Clean up the style
368
+ if (attrib == 'style')
369
+ value = dom.serializeStyle(dom.parseStyle(value), 'a');
370
+
371
+ dom.setAttrib(elm, attrib, value);
372
+ }
373
+
374
+ function getAnchorListHTML(id, target) {
375
+ var ed = tinyMCEPopup.editor, nodes = ed.dom.select('a'), name, i, len, html = "";
376
+
377
+ for (i=0, len=nodes.length; i<len; i++) {
378
+ if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
379
+ html += '<option value="#' + name + '">' + name + '</option>';
380
+ }
381
+
382
+ if (html == "")
383
+ return "";
384
+
385
+ html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
386
+ + ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
387
+ + '>'
388
+ + '<option value="">---</option>'
389
+ + html
390
+ + '</select>';
391
+
392
+ return html;
393
+ }
394
+
395
+ function insertAction() {
396
+ var inst = tinyMCEPopup.editor;
397
+ var elm, elementArray, i;
398
+
399
+ elm = inst.selection.getNode();
400
+ checkPrefix(document.forms[0].href);
401
+
402
+ elm = inst.dom.getParent(elm, "A");
403
+
404
+ // Remove element if there is no href
405
+ if (!document.forms[0].href.value) {
406
+ i = inst.selection.getBookmark();
407
+ inst.dom.remove(elm, 1);
408
+ inst.selection.moveToBookmark(i);
409
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
410
+ tinyMCEPopup.close();
411
+ return;
412
+ }
413
+
414
+ // Create new anchor elements
415
+ if (elm == null) {
416
+ inst.getDoc().execCommand("unlink", false, null);
417
+ tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
418
+
419
+ elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
420
+ for (i=0; i<elementArray.length; i++)
421
+ setAllAttribs(elm = elementArray[i]);
422
+ } else
423
+ setAllAttribs(elm);
424
+
425
+ // Don't move caret if selection was image
426
+ if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') {
427
+ inst.focus();
428
+ inst.selection.select(elm);
429
+ inst.selection.collapse(0);
430
+ tinyMCEPopup.storeSelection();
431
+ }
432
+
433
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
434
+ tinyMCEPopup.close();
435
+ }
436
+
437
+ function setAllAttribs(elm) {
438
+ var formObj = document.forms[0];
439
+ var href = formObj.href.value.replace(/ /g, '%20');
440
+ var target = getSelectValue(formObj, 'targetlist');
441
+
442
+ setAttrib(elm, 'href', href);
443
+ setAttrib(elm, 'title');
444
+ setAttrib(elm, 'target', target == '_self' ? '' : target);
445
+ setAttrib(elm, 'id');
446
+ setAttrib(elm, 'style');
447
+ setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
448
+ setAttrib(elm, 'rel');
449
+ setAttrib(elm, 'rev');
450
+ setAttrib(elm, 'charset');
451
+ setAttrib(elm, 'hreflang');
452
+ setAttrib(elm, 'dir');
453
+ setAttrib(elm, 'lang');
454
+ setAttrib(elm, 'tabindex');
455
+ setAttrib(elm, 'accesskey');
456
+ setAttrib(elm, 'type');
457
+ setAttrib(elm, 'onfocus');
458
+ setAttrib(elm, 'onblur');
459
+ setAttrib(elm, 'onclick');
460
+ setAttrib(elm, 'ondblclick');
461
+ setAttrib(elm, 'onmousedown');
462
+ setAttrib(elm, 'onmouseup');
463
+ setAttrib(elm, 'onmouseover');
464
+ setAttrib(elm, 'onmousemove');
465
+ setAttrib(elm, 'onmouseout');
466
+ setAttrib(elm, 'onkeypress');
467
+ setAttrib(elm, 'onkeydown');
468
+ setAttrib(elm, 'onkeyup');
469
+
470
+ // Refresh in old MSIE
471
+ if (tinyMCE.isMSIE5)
472
+ elm.outerHTML = elm.outerHTML;
473
+ }
474
+
475
+ function getSelectValue(form_obj, field_name) {
476
+ var elm = form_obj.elements[field_name];
477
+
478
+ if (!elm || elm.options == null || elm.selectedIndex == -1)
479
+ return "";
480
+
481
+ return elm.options[elm.selectedIndex].value;
482
+ }
483
+
484
+ function getLinkListHTML(elm_id, target_form_element, onchange_func) {
485
+ if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
486
+ return "";
487
+
488
+ var html = "";
489
+
490
+ html += '<select id="' + elm_id + '" name="' + elm_id + '"';
491
+ html += ' class="mceLinkList" onchange="this.form.' + target_form_element + '.value=';
492
+ html += 'this.options[this.selectedIndex].value;';
493
+
494
+ if (typeof(onchange_func) != "undefined")
495
+ html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
496
+
497
+ html += '"><option value="">---</option>';
498
+
499
+ for (var i=0; i<tinyMCELinkList.length; i++)
500
+ html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
501
+
502
+ html += '</select>';
503
+
504
+ return html;
505
+
506
+ // tinyMCE.debug('-- image list start --', html, '-- image list end --');
507
+ }
508
+
509
+ function getTargetListHTML(elm_id, target_form_element) {
510
+ var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
511
+ var html = '';
512
+
513
+ html += '<select id="' + elm_id + '" name="' + elm_id + '" onchange="this.form.' + target_form_element + '.value=';
514
+ html += 'this.options[this.selectedIndex].value;">';
515
+ html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
516
+ html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
517
+ html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>';
518
+ html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>';
519
+
520
+ for (var i=0; i<targets.length; i++) {
521
+ var key, value;
522
+
523
+ if (targets[i] == "")
524
+ continue;
525
+
526
+ key = targets[i].split('=')[0];
527
+ value = targets[i].split('=')[1];
528
+
529
+ html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
530
+ }
531
+
532
+ html += '</select>';
533
+
534
+ return html;
535
+ }
536
+
537
+ // While loading
538
+ preinit();
539
+ tinyMCEPopup.onInit.add(init);
@@ -0,0 +1 @@
1
+ tinyMCE.addI18n('en.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"});