adva_fckeditor 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (501) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +22 -0
  5. data/README +21 -0
  6. data/README.md +29 -0
  7. data/Rakefile +2 -0
  8. data/adva_fckeditor.gemspec +19 -0
  9. data/app/assets/javascripts/adva_fckeditor/config.js +58 -0
  10. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckcontextmenu.js +223 -0
  11. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckdataprocessor.js +119 -0
  12. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +53 -0
  13. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +58 -0
  14. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckdomrange.js +935 -0
  15. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckdomrange_gecko.js +104 -0
  16. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckdomrange_ie.js +199 -0
  17. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckdomrangeiterator.js +327 -0
  18. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckeditingarea.js +368 -0
  19. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckelementpath.js +89 -0
  20. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckenterkey.js +708 -0
  21. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckevents.js +71 -0
  22. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckhtmliterator.js +142 -0
  23. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckicon.js +103 -0
  24. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckiecleanup.js +68 -0
  25. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckimagepreloader.js +64 -0
  26. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckkeystrokehandler.js +141 -0
  27. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckmenublock.js +153 -0
  28. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckmenublockpanel.js +54 -0
  29. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckmenuitem.js +161 -0
  30. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckpanel.js +463 -0
  31. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckplugin.js +56 -0
  32. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckspecialcombo.js +376 -0
  33. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckstyle.js +1500 -0
  34. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbar.js +103 -0
  35. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +36 -0
  36. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +38 -0
  37. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarbutton.js +81 -0
  38. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +198 -0
  39. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +139 -0
  40. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +98 -0
  41. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +76 -0
  42. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +103 -0
  43. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +146 -0
  44. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +200 -0
  45. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckw3crange.js +451 -0
  46. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckxml.js +108 -0
  47. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckxml_gecko.js +106 -0
  48. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/classes/fckxml_ie.js +93 -0
  49. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fck_othercommands.js +634 -0
  50. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckblockquotecommand.js +281 -0
  51. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckcorestylecommand.js +61 -0
  52. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckfitwindow.js +213 -0
  53. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckindentcommands.js +282 -0
  54. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckjustifycommands.js +173 -0
  55. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fcklistcommands.js +382 -0
  56. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +39 -0
  57. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +40 -0
  58. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +40 -0
  59. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js +45 -0
  60. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckshowblocks.js +94 -0
  61. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +49 -0
  62. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +72 -0
  63. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fckstylecommand.js +60 -0
  64. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fcktablecommand.js +106 -0
  65. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +201 -0
  66. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/fckconstants.js +56 -0
  67. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/fckeditorapi.js +179 -0
  68. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/fckjscoreextensions.js +159 -0
  69. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/fckscriptloader.js +122 -0
  70. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fck.js +1256 -0
  71. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fck_contextmenu.js +345 -0
  72. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fck_gecko.js +497 -0
  73. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fck_ie.js +456 -0
  74. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckbrowserinfo.js +61 -0
  75. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckcodeformatter.js +100 -0
  76. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckcommands.js +172 -0
  77. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckconfig.js +237 -0
  78. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckdebug.js +59 -0
  79. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckdebug_empty.js +31 -0
  80. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckdialog.js +239 -0
  81. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckdocumentprocessor.js +270 -0
  82. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckdomtools.js +1057 -0
  83. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcklanguagemanager.js +165 -0
  84. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcklisthandler.js +152 -0
  85. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcklistslib.js +63 -0
  86. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckplugins.js +46 -0
  87. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckregexlib.js +100 -0
  88. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckselection.js +42 -0
  89. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckselection_gecko.js +228 -0
  90. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckselection_ie.js +287 -0
  91. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckstyles.js +381 -0
  92. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcktablehandler.js +863 -0
  93. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +56 -0
  94. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcktablehandler_ie.js +64 -0
  95. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcktoolbaritems.js +124 -0
  96. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcktoolbarset.js +399 -0
  97. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcktools.js +749 -0
  98. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcktools_gecko.js +282 -0
  99. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fcktools_ie.js +234 -0
  100. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckundo.js +223 -0
  101. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckurlparams.js +39 -0
  102. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckxhtml.js +534 -0
  103. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckxhtml_gecko.js +114 -0
  104. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckxhtml_ie.js +213 -0
  105. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/_source/internals/fckxhtmlentities.js +357 -0
  106. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/behaviors/disablehandles.htc +15 -0
  107. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/behaviors/showtableborders.htc +36 -0
  108. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/fck_editorarea.css +110 -0
  109. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/fck_internal.css +199 -0
  110. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/fck_showtableborders_gecko.css +49 -0
  111. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_address.png +0 -0
  112. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_blockquote.png +0 -0
  113. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_div.png +0 -0
  114. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_h1.png +0 -0
  115. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_h2.png +0 -0
  116. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_h3.png +0 -0
  117. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_h4.png +0 -0
  118. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_h5.png +0 -0
  119. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_h6.png +0 -0
  120. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_p.png +0 -0
  121. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/block_pre.png +0 -0
  122. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/fck_anchor.gif +0 -0
  123. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/fck_flashlogo.gif +0 -0
  124. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/fck_hiddenfield.gif +0 -0
  125. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/fck_pagebreak.gif +0 -0
  126. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/css/images/fck_plugin.gif +0 -0
  127. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/common/fck_dialog_common.css +85 -0
  128. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/common/fck_dialog_common.js +347 -0
  129. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/common/images/locked.gif +0 -0
  130. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/common/images/reset.gif +0 -0
  131. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/common/images/unlocked.gif +0 -0
  132. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif +0 -0
  133. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_about/logo_fredck.gif +0 -0
  134. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif +0 -0
  135. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_about.html +161 -0
  136. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_anchor.html +220 -0
  137. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_button.html +104 -0
  138. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_checkbox.html +104 -0
  139. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_colorselector.html +172 -0
  140. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_div.html +396 -0
  141. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +113 -0
  142. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_docprops.html +600 -0
  143. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_flash/fck_flash.js +300 -0
  144. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +50 -0
  145. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_flash.html +152 -0
  146. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_form.html +109 -0
  147. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_hiddenfield.html +115 -0
  148. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_image/fck_image.js +512 -0
  149. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_image/fck_image_preview.html +72 -0
  150. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_image.html +258 -0
  151. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_link/fck_link.js +893 -0
  152. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_link.html +295 -0
  153. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_listprop.html +120 -0
  154. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_paste.html +347 -0
  155. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_radiobutton.html +104 -0
  156. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_replace.html +650 -0
  157. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_select/fck_select.js +194 -0
  158. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_select.html +180 -0
  159. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_smiley.html +111 -0
  160. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_source.html +68 -0
  161. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_specialchar.html +121 -0
  162. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html +0 -0
  163. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js +87 -0
  164. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html +153 -0
  165. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +148 -0
  166. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +199 -0
  167. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +181 -0
  168. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +461 -0
  169. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html +71 -0
  170. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +49 -0
  171. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js +272 -0
  172. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_spellerpages.html +70 -0
  173. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_table.html +439 -0
  174. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_tablecell.html +293 -0
  175. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_template/images/template1.gif +0 -0
  176. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_template/images/template2.gif +0 -0
  177. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_template/images/template3.gif +0 -0
  178. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_template.html +242 -0
  179. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_textarea.html +94 -0
  180. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dialog/fck_textfield.html +136 -0
  181. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dtd/fck_dtd_test.html +41 -0
  182. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dtd/fck_xhtml10strict.js +116 -0
  183. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/dtd/fck_xhtml10transitional.js +140 -0
  184. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/fckdebug.html +153 -0
  185. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/fckdialog.html +819 -0
  186. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/fckeditor.html +317 -0
  187. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/fckeditor.original.html +424 -0
  188. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/browser.css +87 -0
  189. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/browser.html +200 -0
  190. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +95 -0
  191. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +114 -0
  192. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/frmfolders.html +198 -0
  193. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +185 -0
  194. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +69 -0
  195. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/frmupload.html +115 -0
  196. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif +0 -0
  197. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/Folder.gif +0 -0
  198. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/Folder32.gif +0 -0
  199. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif +0 -0
  200. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif +0 -0
  201. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif +0 -0
  202. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/ai.gif +0 -0
  203. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gif +0 -0
  204. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gif +0 -0
  205. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif +0 -0
  206. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gif +0 -0
  207. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif +0 -0
  208. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif +0 -0
  209. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif +0 -0
  210. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif +0 -0
  211. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/gif.gif +0 -0
  212. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif +0 -0
  213. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/html.gif +0 -0
  214. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gif +0 -0
  215. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif +0 -0
  216. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gif +0 -0
  217. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/mp3.gif +0 -0
  218. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif +0 -0
  219. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif +0 -0
  220. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gif +0 -0
  221. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gif +0 -0
  222. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif +0 -0
  223. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif +0 -0
  224. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/txt.gif +0 -0
  225. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gif +0 -0
  226. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif +0 -0
  227. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif +0 -0
  228. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif +0 -0
  229. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/ai.gif +0 -0
  230. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/avi.gif +0 -0
  231. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/bmp.gif +0 -0
  232. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/cs.gif +0 -0
  233. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif +0 -0
  234. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/dll.gif +0 -0
  235. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/doc.gif +0 -0
  236. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/exe.gif +0 -0
  237. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/fla.gif +0 -0
  238. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/gif.gif +0 -0
  239. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif +0 -0
  240. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/html.gif +0 -0
  241. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif +0 -0
  242. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/js.gif +0 -0
  243. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/mdb.gif +0 -0
  244. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif +0 -0
  245. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/pdf.gif +0 -0
  246. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/png.gif +0 -0
  247. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/ppt.gif +0 -0
  248. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif +0 -0
  249. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/swf.gif +0 -0
  250. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/swt.gif +0 -0
  251. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/txt.gif +0 -0
  252. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/vsd.gif +0 -0
  253. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/xls.gif +0 -0
  254. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/xml.gif +0 -0
  255. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/icons/zip.gif +0 -0
  256. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/images/spacer.gif +0 -0
  257. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/js/common.js +88 -0
  258. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/browser/default/js/fckxml.js +147 -0
  259. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/asp/basexml.asp +63 -0
  260. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/asp/class_upload.asp +353 -0
  261. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/asp/commands.asp +198 -0
  262. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/asp/config.asp +128 -0
  263. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/asp/connector.asp +88 -0
  264. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/asp/io.asp +237 -0
  265. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/asp/upload.asp +65 -0
  266. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/asp/util.asp +55 -0
  267. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/aspx/config.ascx +98 -0
  268. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +32 -0
  269. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +32 -0
  270. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +273 -0
  271. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +315 -0
  272. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +299 -0
  273. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +68 -0
  274. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +230 -0
  275. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +89 -0
  276. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +291 -0
  277. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +72 -0
  278. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +131 -0
  279. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/config.cfm +189 -0
  280. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +32 -0
  281. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/image.cfc +1324 -0
  282. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/cfm/upload.cfm +31 -0
  283. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/lasso/config.lasso +65 -0
  284. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +322 -0
  285. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +168 -0
  286. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/perl/basexml.pl +63 -0
  287. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/perl/commands.pl +187 -0
  288. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/perl/connector.cgi +136 -0
  289. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/perl/io.pl +141 -0
  290. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/perl/upload.cgi +117 -0
  291. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +686 -0
  292. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/perl/util.pl +68 -0
  293. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/php/basexml.php +93 -0
  294. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/php/commands.php +302 -0
  295. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/php/config.php +151 -0
  296. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/php/connector.php +90 -0
  297. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/php/io.php +296 -0
  298. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/php/phpcompat.php +17 -0
  299. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/php/upload.php +59 -0
  300. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/php/util.php +220 -0
  301. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/config.py +146 -0
  302. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/connector.py +118 -0
  303. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/fckcommands.py +198 -0
  304. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/fckconnector.py +90 -0
  305. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/fckoutput.py +116 -0
  306. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/fckutil.py +126 -0
  307. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/htaccess.txt +23 -0
  308. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/upload.py +88 -0
  309. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/wsgi.py +58 -0
  310. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/py/zope.py +188 -0
  311. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/test.html +210 -0
  312. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/filemanager/connectors/uploadtest.html +192 -0
  313. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/anchor.gif +0 -0
  314. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/arrow_ltr.gif +0 -0
  315. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/arrow_rtl.gif +0 -0
  316. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/angel_smile.gif +0 -0
  317. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/angry_smile.gif +0 -0
  318. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/broken_heart.gif +0 -0
  319. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/cake.gif +0 -0
  320. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/confused_smile.gif +0 -0
  321. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/cry_smile.gif +0 -0
  322. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/devil_smile.gif +0 -0
  323. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/embaressed_smile.gif +0 -0
  324. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/envelope.gif +0 -0
  325. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/heart.gif +0 -0
  326. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/kiss.gif +0 -0
  327. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/lightbulb.gif +0 -0
  328. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/omg_smile.gif +0 -0
  329. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/regular_smile.gif +0 -0
  330. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/sad_smile.gif +0 -0
  331. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/shades_smile.gif +0 -0
  332. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/teeth_smile.gif +0 -0
  333. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/thumbs_down.gif +0 -0
  334. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/thumbs_up.gif +0 -0
  335. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/tounge_smile.gif +0 -0
  336. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif +0 -0
  337. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/smiley/msn/wink_smile.gif +0 -0
  338. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/images/spacer.gif +0 -0
  339. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/js/fckadobeair.js +176 -0
  340. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/js/fckeditorcode_gecko.js +108 -0
  341. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/js/fckeditorcode_ie.js +109 -0
  342. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/_translationstatus.txt +79 -0
  343. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/af.js +534 -0
  344. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/ar.js +534 -0
  345. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/bg.js +534 -0
  346. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/bn.js +534 -0
  347. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/bs.js +534 -0
  348. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/ca.js +534 -0
  349. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/cs.js +534 -0
  350. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/da.js +534 -0
  351. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/de.js +534 -0
  352. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/el.js +534 -0
  353. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/en-au.js +534 -0
  354. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/en-ca.js +534 -0
  355. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/en-uk.js +534 -0
  356. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/en.js +534 -0
  357. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/eo.js +534 -0
  358. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/es.js +534 -0
  359. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/et.js +534 -0
  360. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/eu.js +535 -0
  361. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/fa.js +534 -0
  362. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/fi.js +534 -0
  363. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/fo.js +534 -0
  364. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/fr-ca.js +534 -0
  365. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/fr.js +534 -0
  366. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/gl.js +534 -0
  367. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/gu.js +534 -0
  368. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/he.js +534 -0
  369. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/hi.js +534 -0
  370. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/hr.js +534 -0
  371. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/hu.js +534 -0
  372. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/is.js +534 -0
  373. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/it.js +534 -0
  374. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/ja.js +534 -0
  375. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/km.js +534 -0
  376. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/ko.js +534 -0
  377. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/lt.js +534 -0
  378. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/lv.js +534 -0
  379. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/mn.js +534 -0
  380. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/ms.js +534 -0
  381. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/nb.js +534 -0
  382. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/nl.js +534 -0
  383. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/no.js +534 -0
  384. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/pl.js +534 -0
  385. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/pt-br.js +534 -0
  386. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/pt.js +534 -0
  387. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/ro.js +534 -0
  388. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/ru.js +534 -0
  389. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/sk.js +534 -0
  390. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/sl.js +534 -0
  391. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/sr-latn.js +534 -0
  392. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/sr.js +534 -0
  393. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/sv.js +534 -0
  394. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/th.js +534 -0
  395. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/tr.js +534 -0
  396. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/uk.js +534 -0
  397. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/vi.js +534 -0
  398. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/zh-cn.js +534 -0
  399. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/lang/zh.js +534 -0
  400. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/autogrow/fckplugin.js +111 -0
  401. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/bbcode/_sample/sample.config.js +26 -0
  402. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/bbcode/_sample/sample.html +67 -0
  403. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/bbcode/fckplugin.js +123 -0
  404. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/dragresizetable/fckplugin.js +529 -0
  405. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/placeholder/fck_placeholder.html +105 -0
  406. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/placeholder/fckplugin.js +187 -0
  407. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/placeholder/lang/de.js +27 -0
  408. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/placeholder/lang/en.js +27 -0
  409. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/placeholder/lang/es.js +27 -0
  410. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/placeholder/lang/fr.js +27 -0
  411. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/placeholder/lang/it.js +27 -0
  412. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/placeholder/lang/pl.js +27 -0
  413. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/placeholder/placeholder.gif +0 -0
  414. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/simplecommands/fckplugin.js +29 -0
  415. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/plugins/tablecommands/fckplugin.js +33 -0
  416. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/_fckviewstrips.html +121 -0
  417. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/fck_dialog.css +402 -0
  418. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/fck_dialog_ie6.js +110 -0
  419. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/fck_editor.css +464 -0
  420. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/fck_strip.gif +0 -0
  421. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/dialog.sides.gif +0 -0
  422. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/dialog.sides.png +0 -0
  423. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/dialog.sides.rtl.png +0 -0
  424. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/sprites.gif +0 -0
  425. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/sprites.png +0 -0
  426. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/toolbar.arrowright.gif +0 -0
  427. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/toolbar.buttonarrow.gif +0 -0
  428. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/toolbar.collapse.gif +0 -0
  429. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/toolbar.end.gif +0 -0
  430. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/toolbar.expand.gif +0 -0
  431. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/toolbar.separator.gif +0 -0
  432. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/images/toolbar.start.gif +0 -0
  433. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/default/toolbar/configurecell.gif +0 -0
  434. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/fck_dialog.css +402 -0
  435. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/fck_dialog_ie6.js +110 -0
  436. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/fck_editor.css +476 -0
  437. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/fck_strip.gif +0 -0
  438. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/dialog.sides.gif +0 -0
  439. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/dialog.sides.png +0 -0
  440. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/dialog.sides.rtl.png +0 -0
  441. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/sprites.gif +0 -0
  442. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/sprites.png +0 -0
  443. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/toolbar.arrowright.gif +0 -0
  444. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/toolbar.bg.gif +0 -0
  445. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif +0 -0
  446. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/toolbar.collapse.gif +0 -0
  447. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/toolbar.end.gif +0 -0
  448. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/toolbar.expand.gif +0 -0
  449. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/toolbar.separator.gif +0 -0
  450. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/office2003/images/toolbar.start.gif +0 -0
  451. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/fck_dialog.css +402 -0
  452. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/fck_dialog_ie6.js +110 -0
  453. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/fck_editor.css +473 -0
  454. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/fck_strip.gif +0 -0
  455. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/dialog.sides.gif +0 -0
  456. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/dialog.sides.png +0 -0
  457. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/dialog.sides.rtl.png +0 -0
  458. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/sprites.gif +0 -0
  459. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/sprites.png +0 -0
  460. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/toolbar.arrowright.gif +0 -0
  461. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/toolbar.buttonarrow.gif +0 -0
  462. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/toolbar.buttonbg.gif +0 -0
  463. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/toolbar.collapse.gif +0 -0
  464. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/toolbar.end.gif +0 -0
  465. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/toolbar.expand.gif +0 -0
  466. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/toolbar.separator.gif +0 -0
  467. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/skins/silver/images/toolbar.start.gif +0 -0
  468. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/wsc/ciframe.html +65 -0
  469. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/wsc/tmpFrameset.html +67 -0
  470. data/app/assets/javascripts/adva_fckeditor/fckeditor/editor/wsc/w.html +227 -0
  471. data/app/assets/javascripts/adva_fckeditor/fckeditor/fckconfig.js +325 -0
  472. data/app/assets/javascripts/adva_fckeditor/fckeditor/fckeditor.js +330 -0
  473. data/app/assets/javascripts/adva_fckeditor/fckeditor/fckpackager.xml +262 -0
  474. data/app/assets/javascripts/adva_fckeditor/fckeditor/fckstyles.xml +111 -0
  475. data/app/assets/javascripts/adva_fckeditor/fckeditor/fcktemplates.xml +103 -0
  476. data/app/assets/javascripts/adva_fckeditor/fckeditor/license.txt +1246 -0
  477. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/cells/cell.html +259 -0
  478. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/cells/fckplugin.js +21 -0
  479. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/cells/lang/de.js +4 -0
  480. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/cells/lang/en.js +4 -0
  481. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/fckplugin.js +8 -0
  482. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/lang/de.js +21 -0
  483. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/lang/en.js +21 -0
  484. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/lang/it.js +22 -0
  485. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/lang/ja.js +21 -0
  486. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/lang/lt.js +21 -0
  487. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/lang/no.js +21 -0
  488. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/lang/pt.js +21 -0
  489. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/lang/zh-cn.js +21 -0
  490. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/lang/zh.js +21 -0
  491. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/license.txt +286 -0
  492. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/readme.txt +54 -0
  493. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/youtube.gif +0 -0
  494. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/youtube.html +47 -0
  495. data/app/assets/javascripts/adva_fckeditor/fckeditor_plugins/youtube/youtube.js +121 -0
  496. data/app/assets/javascripts/adva_fckeditor/setup_fckeditor.js +49 -0
  497. data/app/assets/javascripts/adva_fckeditor/setup_fckeditor.prototype.js +38 -0
  498. data/lib/adva_fckeditor/version.rb +3 -0
  499. data/lib/adva_fckeditor.rb +13 -0
  500. data/lib/fckeditor.rb +6 -0
  501. metadata +556 -0
@@ -0,0 +1,863 @@
1
+ /*
2
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
+ * Copyright (C) 2003-2009 Frederico Caldeira Knabben
4
+ *
5
+ * == BEGIN LICENSE ==
6
+ *
7
+ * Licensed under the terms of any of the following licenses at your
8
+ * choice:
9
+ *
10
+ * - GNU General Public License Version 2 or later (the "GPL")
11
+ * http://www.gnu.org/licenses/gpl.html
12
+ *
13
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14
+ * http://www.gnu.org/licenses/lgpl.html
15
+ *
16
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
17
+ * http://www.mozilla.org/MPL/MPL-1.1.html
18
+ *
19
+ * == END LICENSE ==
20
+ *
21
+ * Manage table operations.
22
+ */
23
+
24
+ var FCKTableHandler = new Object() ;
25
+
26
+ FCKTableHandler.InsertRow = function( insertBefore )
27
+ {
28
+ // Get the row where the selection is placed in.
29
+ var oRow = FCKSelection.MoveToAncestorNode( 'TR' ) ;
30
+ if ( !oRow ) return ;
31
+
32
+ // Create a clone of the row.
33
+ var oNewRow = oRow.cloneNode( true ) ;
34
+
35
+ // Insert the new row (copy) before of it.
36
+ oRow.parentNode.insertBefore( oNewRow, oRow ) ;
37
+
38
+ // Clean one of the rows to produce the illusion of inserting an empty row before or after.
39
+ FCKTableHandler.ClearRow( insertBefore ? oNewRow : oRow ) ;
40
+ }
41
+
42
+ FCKTableHandler.DeleteRows = function( row )
43
+ {
44
+ // If no row has been passed as a parameter,
45
+ // then get the row( s ) containing the cells where the selection is placed in.
46
+ // If user selected multiple rows ( by selecting multiple cells ), walk
47
+ // the selected cell list and delete the rows containing the selected cells
48
+ if ( ! row )
49
+ {
50
+ var aCells = FCKTableHandler.GetSelectedCells() ;
51
+ var aRowsToDelete = new Array() ;
52
+ //queue up the rows -- it's possible ( and likely ) that we may get duplicates
53
+ for ( var i = 0; i < aCells.length; i++ )
54
+ {
55
+ var oRow = aCells[i].parentNode ;
56
+ aRowsToDelete[oRow.rowIndex] = oRow ;
57
+ }
58
+ for ( var i = aRowsToDelete.length; i >= 0; i-- )
59
+ {
60
+ if ( aRowsToDelete[i] )
61
+ FCKTableHandler.DeleteRows( aRowsToDelete[i] );
62
+ }
63
+ return ;
64
+ }
65
+
66
+ // Get the row's table.
67
+ var oTable = FCKTools.GetElementAscensor( row, 'TABLE' ) ;
68
+
69
+ // If just one row is available then delete the entire table.
70
+ if ( oTable.rows.length == 1 )
71
+ {
72
+ FCKTableHandler.DeleteTable( oTable ) ;
73
+ return ;
74
+ }
75
+
76
+ // Delete the row.
77
+ row.parentNode.removeChild( row ) ;
78
+ }
79
+
80
+ FCKTableHandler.DeleteTable = function( table )
81
+ {
82
+ // If no table has been passed as a parameter,
83
+ // then get the table where the selection is placed in.
84
+ if ( !table )
85
+ {
86
+ table = FCKSelection.GetSelectedElement() ;
87
+ if ( !table || table.tagName != 'TABLE' )
88
+ table = FCKSelection.MoveToAncestorNode( 'TABLE' ) ;
89
+ }
90
+ if ( !table ) return ;
91
+
92
+ // Delete the table.
93
+ FCKSelection.SelectNode( table ) ;
94
+ FCKSelection.Collapse();
95
+
96
+ // if the table is wrapped with a singleton <p> ( or something similar ), remove
97
+ // the surrounding tag -- which likely won't show after deletion anyway
98
+ if ( table.parentNode.childNodes.length == 1 )
99
+ table.parentNode.parentNode.removeChild( table.parentNode );
100
+ else
101
+ table.parentNode.removeChild( table ) ;
102
+ }
103
+
104
+ FCKTableHandler.InsertColumn = function( insertBefore )
105
+ {
106
+ // Get the cell where the selection is placed in.
107
+ var oCell = null ;
108
+ var nodes = this.GetSelectedCells() ;
109
+
110
+ if ( nodes && nodes.length )
111
+ oCell = nodes[ insertBefore ? 0 : ( nodes.length - 1 ) ] ;
112
+
113
+ if ( ! oCell )
114
+ return ;
115
+
116
+ // Get the cell's table.
117
+ var oTable = FCKTools.GetElementAscensor( oCell, 'TABLE' ) ;
118
+
119
+ var iIndex = oCell.cellIndex ;
120
+
121
+ // Loop through all rows available in the table.
122
+ for ( var i = 0 ; i < oTable.rows.length ; i++ )
123
+ {
124
+ // Get the row.
125
+ var oRow = oTable.rows[i] ;
126
+
127
+ // If the row doesn't have enough cells, ignore it.
128
+ if ( oRow.cells.length < ( iIndex + 1 ) )
129
+ continue ;
130
+
131
+ oCell = oRow.cells[iIndex].cloneNode(false) ;
132
+
133
+ if ( FCKBrowserInfo.IsGeckoLike )
134
+ FCKTools.AppendBogusBr( oCell ) ;
135
+
136
+ // Get back the currently selected cell.
137
+ var oBaseCell = oRow.cells[iIndex] ;
138
+
139
+ oRow.insertBefore( oCell, ( insertBefore ? oBaseCell : oBaseCell.nextSibling ) ) ;
140
+ }
141
+ }
142
+
143
+ FCKTableHandler.DeleteColumns = function( oCell )
144
+ {
145
+ // if user selected multiple cols ( by selecting multiple cells ), walk
146
+ // the selected cell list and delete the rows containing the selected cells
147
+ if ( !oCell )
148
+ {
149
+ var aColsToDelete = FCKTableHandler.GetSelectedCells();
150
+ for ( var i = aColsToDelete.length; i >= 0; i-- )
151
+ {
152
+ if ( aColsToDelete[i] )
153
+ FCKTableHandler.DeleteColumns( aColsToDelete[i] );
154
+ }
155
+ return;
156
+ }
157
+
158
+ if ( !oCell ) return ;
159
+
160
+ // Get the cell's table.
161
+ var oTable = FCKTools.GetElementAscensor( oCell, 'TABLE' ) ;
162
+
163
+ // Get the cell index.
164
+ var iIndex = oCell.cellIndex ;
165
+
166
+ // Loop throw all rows (from down to up, because it's possible that some
167
+ // rows will be deleted).
168
+ for ( var i = oTable.rows.length - 1 ; i >= 0 ; i-- )
169
+ {
170
+ // Get the row.
171
+ var oRow = oTable.rows[i] ;
172
+
173
+ // If the cell to be removed is the first one and the row has just one cell.
174
+ if ( iIndex == 0 && oRow.cells.length == 1 )
175
+ {
176
+ // Remove the entire row.
177
+ FCKTableHandler.DeleteRows( oRow ) ;
178
+ continue ;
179
+ }
180
+
181
+ // If the cell to be removed exists the delete it.
182
+ if ( oRow.cells[iIndex] )
183
+ oRow.removeChild( oRow.cells[iIndex] ) ;
184
+ }
185
+ }
186
+
187
+ FCKTableHandler.InsertCell = function( cell, insertBefore )
188
+ {
189
+ // Get the cell where the selection is placed in.
190
+ var oCell = null ;
191
+ var nodes = this.GetSelectedCells() ;
192
+ if ( nodes && nodes.length )
193
+ oCell = nodes[ insertBefore ? 0 : ( nodes.length - 1 ) ] ;
194
+ if ( ! oCell )
195
+ return null ;
196
+
197
+ // Create the new cell element to be added.
198
+ var oNewCell = FCK.EditorDocument.createElement( 'TD' ) ;
199
+ if ( FCKBrowserInfo.IsGeckoLike )
200
+ FCKTools.AppendBogusBr( oNewCell ) ;
201
+
202
+ if ( !insertBefore && oCell.cellIndex == oCell.parentNode.cells.length - 1 )
203
+ oCell.parentNode.appendChild( oNewCell ) ;
204
+ else
205
+ oCell.parentNode.insertBefore( oNewCell, insertBefore ? oCell : oCell.nextSibling ) ;
206
+
207
+ return oNewCell ;
208
+ }
209
+
210
+ FCKTableHandler.DeleteCell = function( cell )
211
+ {
212
+ // If this is the last cell in the row.
213
+ if ( cell.parentNode.cells.length == 1 )
214
+ {
215
+ // Delete the entire row.
216
+ FCKTableHandler.DeleteRows( cell.parentNode ) ;
217
+ return ;
218
+ }
219
+
220
+ // Delete the cell from the row.
221
+ cell.parentNode.removeChild( cell ) ;
222
+ }
223
+
224
+ FCKTableHandler.DeleteCells = function()
225
+ {
226
+ var aCells = FCKTableHandler.GetSelectedCells() ;
227
+
228
+ for ( var i = aCells.length - 1 ; i >= 0 ; i-- )
229
+ {
230
+ FCKTableHandler.DeleteCell( aCells[i] ) ;
231
+ }
232
+ }
233
+
234
+ FCKTableHandler._MarkCells = function( cells, label )
235
+ {
236
+ for ( var i = 0 ; i < cells.length ; i++ )
237
+ cells[i][label] = true ;
238
+ }
239
+
240
+ FCKTableHandler._UnmarkCells = function( cells, label )
241
+ {
242
+ for ( var i = 0 ; i < cells.length ; i++ )
243
+ {
244
+ FCKDomTools.ClearElementJSProperty(cells[i], label ) ;
245
+ }
246
+ }
247
+
248
+ FCKTableHandler._ReplaceCellsByMarker = function( tableMap, marker, substitute )
249
+ {
250
+ for ( var i = 0 ; i < tableMap.length ; i++ )
251
+ {
252
+ for ( var j = 0 ; j < tableMap[i].length ; j++ )
253
+ {
254
+ if ( tableMap[i][j][marker] )
255
+ tableMap[i][j] = substitute ;
256
+ }
257
+ }
258
+ }
259
+
260
+ FCKTableHandler._GetMarkerGeometry = function( tableMap, rowIdx, colIdx, markerName )
261
+ {
262
+ var selectionWidth = 0 ;
263
+ var selectionHeight = 0 ;
264
+ var cellsLeft = 0 ;
265
+ var cellsUp = 0 ;
266
+ for ( var i = colIdx ; tableMap[rowIdx][i] && tableMap[rowIdx][i][markerName] ; i++ )
267
+ selectionWidth++ ;
268
+ for ( var i = colIdx - 1 ; tableMap[rowIdx][i] && tableMap[rowIdx][i][markerName] ; i-- )
269
+ {
270
+ selectionWidth++ ;
271
+ cellsLeft++ ;
272
+ }
273
+ for ( var i = rowIdx ; tableMap[i] && tableMap[i][colIdx] && tableMap[i][colIdx][markerName] ; i++ )
274
+ selectionHeight++ ;
275
+ for ( var i = rowIdx - 1 ; tableMap[i] && tableMap[i][colIdx] && tableMap[i][colIdx][markerName] ; i-- )
276
+ {
277
+ selectionHeight++ ;
278
+ cellsUp++ ;
279
+ }
280
+ return { 'width' : selectionWidth, 'height' : selectionHeight, 'x' : cellsLeft, 'y' : cellsUp } ;
281
+ }
282
+
283
+ FCKTableHandler.CheckIsSelectionRectangular = function()
284
+ {
285
+ // If every row and column in an area on a plane are of the same width and height,
286
+ // Then the area is a rectangle.
287
+ var cells = FCKTableHandler.GetSelectedCells() ;
288
+ if ( cells.length < 1 )
289
+ return false ;
290
+
291
+ // Check if the selected cells are all in the same table section (thead, tfoot or tbody)
292
+ for (var i = 0; i < cells.length; i++)
293
+ {
294
+ if ( cells[i].parentNode.parentNode != cells[0].parentNode.parentNode )
295
+ return false ;
296
+ }
297
+
298
+ this._MarkCells( cells, '_CellSelected' ) ;
299
+
300
+ var tableMap = this._CreateTableMap( cells[0] ) ;
301
+ var rowIdx = cells[0].parentNode.rowIndex ;
302
+ var colIdx = this._GetCellIndexSpan( tableMap, rowIdx, cells[0] ) ;
303
+
304
+ var geometry = this._GetMarkerGeometry( tableMap, rowIdx, colIdx, '_CellSelected' ) ;
305
+ var baseColIdx = colIdx - geometry.x ;
306
+ var baseRowIdx = rowIdx - geometry.y ;
307
+
308
+ if ( geometry.width >= geometry.height )
309
+ {
310
+ for ( colIdx = baseColIdx ; colIdx < baseColIdx + geometry.width ; colIdx++ )
311
+ {
312
+ rowIdx = baseRowIdx + ( colIdx - baseColIdx ) % geometry.height ;
313
+ if ( ! tableMap[rowIdx] || ! tableMap[rowIdx][colIdx] )
314
+ {
315
+ this._UnmarkCells( cells, '_CellSelected' ) ;
316
+ return false ;
317
+ }
318
+ var g = this._GetMarkerGeometry( tableMap, rowIdx, colIdx, '_CellSelected' ) ;
319
+ if ( g.width != geometry.width || g.height != geometry.height )
320
+ {
321
+ this._UnmarkCells( cells, '_CellSelected' ) ;
322
+ return false ;
323
+ }
324
+ }
325
+ }
326
+ else
327
+ {
328
+ for ( rowIdx = baseRowIdx ; rowIdx < baseRowIdx + geometry.height ; rowIdx++ )
329
+ {
330
+ colIdx = baseColIdx + ( rowIdx - baseRowIdx ) % geometry.width ;
331
+ if ( ! tableMap[rowIdx] || ! tableMap[rowIdx][colIdx] )
332
+ {
333
+ this._UnmarkCells( cells, '_CellSelected' ) ;
334
+ return false ;
335
+ }
336
+ var g = this._GetMarkerGeometry( tableMap, rowIdx, colIdx, '_CellSelected' ) ;
337
+ if ( g.width != geometry.width || g.height != geometry.height )
338
+ {
339
+ this._UnmarkCells( cells, '_CellSelected' ) ;
340
+ return false ;
341
+ }
342
+ }
343
+ }
344
+
345
+ this._UnmarkCells( cells, '_CellSelected' ) ;
346
+ return true ;
347
+ }
348
+
349
+ FCKTableHandler.MergeCells = function()
350
+ {
351
+ // Get all selected cells.
352
+ var cells = this.GetSelectedCells() ;
353
+ if ( cells.length < 2 )
354
+ return ;
355
+
356
+ // Assume the selected cells are already in a rectangular geometry.
357
+ // Because the checking is already done by FCKTableCommand.
358
+ var refCell = cells[0] ;
359
+ var tableMap = this._CreateTableMap( refCell ) ;
360
+ var rowIdx = refCell.parentNode.rowIndex ;
361
+ var colIdx = this._GetCellIndexSpan( tableMap, rowIdx, refCell ) ;
362
+
363
+ this._MarkCells( cells, '_SelectedCells' ) ;
364
+ var selectionGeometry = this._GetMarkerGeometry( tableMap, rowIdx, colIdx, '_SelectedCells' ) ;
365
+
366
+ var baseColIdx = colIdx - selectionGeometry.x ;
367
+ var baseRowIdx = rowIdx - selectionGeometry.y ;
368
+ var cellContents = FCKTools.GetElementDocument( refCell ).createDocumentFragment() ;
369
+ for ( var i = 0 ; i < selectionGeometry.height ; i++ )
370
+ {
371
+ var rowChildNodesCount = 0 ;
372
+ for ( var j = 0 ; j < selectionGeometry.width ; j++ )
373
+ {
374
+ var currentCell = tableMap[baseRowIdx + i][baseColIdx + j] ;
375
+ while ( currentCell.childNodes.length > 0 )
376
+ {
377
+ var node = currentCell.removeChild( currentCell.firstChild ) ;
378
+ if ( node.nodeType != 1
379
+ || ( node.getAttribute( 'type', 2 ) != '_moz' && node.getAttribute( '_moz_dirty' ) != null ) )
380
+ {
381
+ cellContents.appendChild( node ) ;
382
+ rowChildNodesCount++ ;
383
+ }
384
+ }
385
+ }
386
+ if ( rowChildNodesCount > 0 )
387
+ cellContents.appendChild( FCK.EditorDocument.createElement( 'br' ) ) ;
388
+ }
389
+
390
+ this._ReplaceCellsByMarker( tableMap, '_SelectedCells', refCell ) ;
391
+ this._UnmarkCells( cells, '_SelectedCells' ) ;
392
+ this._InstallTableMap( tableMap, refCell.parentNode.parentNode.parentNode ) ;
393
+ refCell.appendChild( cellContents ) ;
394
+
395
+ if ( FCKBrowserInfo.IsGeckoLike && ( ! refCell.firstChild ) )
396
+ FCKTools.AppendBogusBr( refCell ) ;
397
+
398
+ this._MoveCaretToCell( refCell, false ) ;
399
+ }
400
+
401
+ FCKTableHandler.MergeRight = function()
402
+ {
403
+ var target = this.GetMergeRightTarget() ;
404
+ if ( target == null )
405
+ return ;
406
+ var refCell = target.refCell ;
407
+ var tableMap = target.tableMap ;
408
+ var nextCell = target.nextCell ;
409
+
410
+ var cellContents = FCK.EditorDocument.createDocumentFragment() ;
411
+ while ( nextCell && nextCell.childNodes && nextCell.childNodes.length > 0 )
412
+ cellContents.appendChild( nextCell.removeChild( nextCell.firstChild ) ) ;
413
+
414
+ nextCell.parentNode.removeChild( nextCell ) ;
415
+ refCell.appendChild( cellContents ) ;
416
+ this._MarkCells( [nextCell], '_Replace' ) ;
417
+ this._ReplaceCellsByMarker( tableMap, '_Replace', refCell ) ;
418
+ this._InstallTableMap( tableMap, refCell.parentNode.parentNode.parentNode ) ;
419
+
420
+ this._MoveCaretToCell( refCell, false ) ;
421
+ }
422
+
423
+ FCKTableHandler.MergeDown = function()
424
+ {
425
+ var target = this.GetMergeDownTarget() ;
426
+ if ( target == null )
427
+ return ;
428
+ var refCell = target.refCell ;
429
+ var tableMap = target.tableMap ;
430
+ var nextCell = target.nextCell ;
431
+
432
+ var cellContents = FCKTools.GetElementDocument( refCell ).createDocumentFragment() ;
433
+ while ( nextCell && nextCell.childNodes && nextCell.childNodes.length > 0 )
434
+ cellContents.appendChild( nextCell.removeChild( nextCell.firstChild ) ) ;
435
+ if ( cellContents.firstChild )
436
+ cellContents.insertBefore( FCK.EditorDocument.createElement( 'br' ), cellContents.firstChild ) ;
437
+ refCell.appendChild( cellContents ) ;
438
+ this._MarkCells( [nextCell], '_Replace' ) ;
439
+ this._ReplaceCellsByMarker( tableMap, '_Replace', refCell ) ;
440
+ this._InstallTableMap( tableMap, refCell.parentNode.parentNode.parentNode ) ;
441
+
442
+ this._MoveCaretToCell( refCell, false ) ;
443
+ }
444
+
445
+ FCKTableHandler.HorizontalSplitCell = function()
446
+ {
447
+ var cells = FCKTableHandler.GetSelectedCells() ;
448
+ if ( cells.length != 1 )
449
+ return ;
450
+
451
+ var refCell = cells[0] ;
452
+ var tableMap = this._CreateTableMap( refCell ) ;
453
+ var rowIdx = refCell.parentNode.rowIndex ;
454
+ var colIdx = FCKTableHandler._GetCellIndexSpan( tableMap, rowIdx, refCell ) ;
455
+ var cellSpan = isNaN( refCell.colSpan ) ? 1 : refCell.colSpan ;
456
+
457
+ if ( cellSpan > 1 )
458
+ {
459
+ // Splitting a multi-column cell - original cell gets ceil(colSpan/2) columns,
460
+ // new cell gets floor(colSpan/2).
461
+ var newCellSpan = Math.ceil( cellSpan / 2 ) ;
462
+ var newCell = FCK.EditorDocument.createElement( refCell.nodeName ) ;
463
+ if ( FCKBrowserInfo.IsGeckoLike )
464
+ FCKTools.AppendBogusBr( newCell ) ;
465
+ var startIdx = colIdx + newCellSpan ;
466
+ var endIdx = colIdx + cellSpan ;
467
+ var rowSpan = isNaN( refCell.rowSpan ) ? 1 : refCell.rowSpan ;
468
+ for ( var r = rowIdx ; r < rowIdx + rowSpan ; r++ )
469
+ {
470
+ for ( var i = startIdx ; i < endIdx ; i++ )
471
+ tableMap[r][i] = newCell ;
472
+ }
473
+ }
474
+ else
475
+ {
476
+ // Splitting a single-column cell - add a new cell, and expand
477
+ // cells crossing the same column.
478
+ var newTableMap = [] ;
479
+ for ( var i = 0 ; i < tableMap.length ; i++ )
480
+ {
481
+ var newRow = tableMap[i].slice( 0, colIdx ) ;
482
+ if ( tableMap[i].length <= colIdx )
483
+ {
484
+ newTableMap.push( newRow ) ;
485
+ continue ;
486
+ }
487
+ if ( tableMap[i][colIdx] == refCell )
488
+ {
489
+ newRow.push( refCell ) ;
490
+ newRow.push( FCK.EditorDocument.createElement( refCell.nodeName ) ) ;
491
+ if ( FCKBrowserInfo.IsGeckoLike )
492
+ FCKTools.AppendBogusBr( newRow[newRow.length - 1] ) ;
493
+ }
494
+ else
495
+ {
496
+ newRow.push( tableMap[i][colIdx] ) ;
497
+ newRow.push( tableMap[i][colIdx] ) ;
498
+ }
499
+ for ( var j = colIdx + 1 ; j < tableMap[i].length ; j++ )
500
+ newRow.push( tableMap[i][j] ) ;
501
+ newTableMap.push( newRow ) ;
502
+ }
503
+ tableMap = newTableMap ;
504
+ }
505
+
506
+ this._InstallTableMap( tableMap, refCell.parentNode.parentNode.parentNode ) ;
507
+ }
508
+
509
+ FCKTableHandler.VerticalSplitCell = function()
510
+ {
511
+ var cells = FCKTableHandler.GetSelectedCells() ;
512
+ if ( cells.length != 1 )
513
+ return ;
514
+
515
+ var currentCell = cells[0] ;
516
+ var tableMap = this._CreateTableMap( currentCell ) ;
517
+ var currentRowIndex = currentCell.parentNode.rowIndex ;
518
+ var cellIndex = FCKTableHandler._GetCellIndexSpan( tableMap, currentRowIndex, currentCell ) ;
519
+ // Save current cell colSpan
520
+ var currentColSpan = isNaN( currentCell.colSpan ) ? 1 : currentCell.colSpan ;
521
+ var currentRowSpan = currentCell.rowSpan ;
522
+ if ( isNaN( currentRowSpan ) )
523
+ currentRowSpan = 1 ;
524
+
525
+ if ( currentRowSpan > 1 )
526
+ {
527
+ // 1. Set the current cell's rowSpan to 1.
528
+ currentCell.rowSpan = Math.ceil( currentRowSpan / 2 ) ;
529
+
530
+ // 2. Find the appropriate place to insert a new cell at the next row.
531
+ var newCellRowIndex = currentRowIndex + Math.ceil( currentRowSpan / 2 ) ;
532
+ var oRow = tableMap[newCellRowIndex] ;
533
+ var insertMarker = null ;
534
+ for ( var i = cellIndex+1 ; i < oRow.length ; i++ )
535
+ {
536
+ if ( oRow[i].parentNode.rowIndex == newCellRowIndex )
537
+ {
538
+ insertMarker = oRow[i] ;
539
+ break ;
540
+ }
541
+ }
542
+
543
+ // 3. Insert the new cell to the indicated place, with the appropriate rowSpan and colSpan, next row.
544
+ var newCell = FCK.EditorDocument.createElement( currentCell.nodeName ) ;
545
+ newCell.rowSpan = Math.floor( currentRowSpan / 2 ) ;
546
+ if ( currentColSpan > 1 )
547
+ newCell.colSpan = currentColSpan ;
548
+ if ( FCKBrowserInfo.IsGeckoLike )
549
+ FCKTools.AppendBogusBr( newCell ) ;
550
+ currentCell.parentNode.parentNode.parentNode.rows[newCellRowIndex].insertBefore( newCell, insertMarker ) ;
551
+ }
552
+ else
553
+ {
554
+ // 1. Insert a new row.
555
+ var newSectionRowIdx = currentCell.parentNode.sectionRowIndex + 1 ;
556
+ var newRow = FCK.EditorDocument.createElement( 'tr' ) ;
557
+ var tSection = currentCell.parentNode.parentNode ;
558
+ if ( tSection.rows.length > newSectionRowIdx )
559
+ tSection.insertBefore( newRow, tSection.rows[newSectionRowIdx] ) ;
560
+ else
561
+ tSection.appendChild( newRow ) ;
562
+
563
+ // 2. +1 to rowSpan for all cells crossing currentCell's row.
564
+ for ( var i = 0 ; i < tableMap[currentRowIndex].length ; )
565
+ {
566
+ var colSpan = tableMap[currentRowIndex][i].colSpan ;
567
+ if ( isNaN( colSpan ) || colSpan < 1 )
568
+ colSpan = 1 ;
569
+ if ( i == cellIndex )
570
+ {
571
+ i += colSpan ;
572
+ continue ;
573
+ }
574
+ var rowSpan = tableMap[currentRowIndex][i].rowSpan ;
575
+ if ( isNaN( rowSpan ) )
576
+ rowSpan = 1 ;
577
+ tableMap[currentRowIndex][i].rowSpan = rowSpan + 1 ;
578
+ i += colSpan ;
579
+ }
580
+
581
+ // 3. Insert a new cell to new row. Set colSpan on the new cell.
582
+ var newCell = FCK.EditorDocument.createElement( currentCell.nodeName ) ;
583
+ if ( currentColSpan > 1 )
584
+ newCell.colSpan = currentColSpan ;
585
+ if ( FCKBrowserInfo.IsGeckoLike )
586
+ FCKTools.AppendBogusBr( newCell ) ;
587
+ newRow.appendChild( newCell ) ;
588
+ }
589
+ }
590
+
591
+ // Get the cell index from a TableMap.
592
+ FCKTableHandler._GetCellIndexSpan = function( tableMap, rowIndex, cell )
593
+ {
594
+ if ( tableMap.length < rowIndex + 1 )
595
+ return null ;
596
+
597
+ var oRow = tableMap[ rowIndex ] ;
598
+
599
+ for ( var c = 0 ; c < oRow.length ; c++ )
600
+ {
601
+ if ( oRow[c] == cell )
602
+ return c ;
603
+ }
604
+
605
+ return null ;
606
+ }
607
+
608
+ // Get the cell location from a TableMap. Returns an array with an [x,y] location
609
+ FCKTableHandler._GetCellLocation = function( tableMap, cell )
610
+ {
611
+ for ( var i = 0 ; i < tableMap.length; i++ )
612
+ {
613
+ for ( var c = 0 ; c < tableMap[i].length ; c++ )
614
+ {
615
+ if ( tableMap[i][c] == cell ) return [i,c];
616
+ }
617
+ }
618
+ return null ;
619
+ }
620
+
621
+ // This function is quite hard to explain. It creates a matrix representing all cells in a table.
622
+ // The difference here is that the "spanned" cells (colSpan and rowSpan) are duplicated on the matrix
623
+ // cells that are "spanned". For example, a row with 3 cells where the second cell has colSpan=2 and rowSpan=3
624
+ // will produce a bi-dimensional matrix with the following values (representing the cells):
625
+ // Cell1, Cell2, Cell2, Cell3
626
+ // Cell4, Cell2, Cell2, Cell5
627
+ // Cell6, Cell2, Cell2, Cell7
628
+ FCKTableHandler._CreateTableMap = function( refCell )
629
+ {
630
+ var table = (refCell.nodeName == 'TABLE' ? refCell : refCell.parentNode.parentNode.parentNode ) ;
631
+
632
+ var aRows = table.rows ;
633
+
634
+ // Row and Column counters.
635
+ var r = -1 ;
636
+
637
+ var aMap = new Array() ;
638
+
639
+ for ( var i = 0 ; i < aRows.length ; i++ )
640
+ {
641
+ r++ ;
642
+ if ( !aMap[r] )
643
+ aMap[r] = new Array() ;
644
+
645
+ var c = -1 ;
646
+
647
+ for ( var j = 0 ; j < aRows[i].cells.length ; j++ )
648
+ {
649
+ var oCell = aRows[i].cells[j] ;
650
+
651
+ c++ ;
652
+ while ( aMap[r][c] )
653
+ c++ ;
654
+
655
+ var iColSpan = isNaN( oCell.colSpan ) ? 1 : oCell.colSpan ;
656
+ var iRowSpan = isNaN( oCell.rowSpan ) ? 1 : oCell.rowSpan ;
657
+
658
+ for ( var rs = 0 ; rs < iRowSpan ; rs++ )
659
+ {
660
+ if ( !aMap[r + rs] )
661
+ aMap[r + rs] = new Array() ;
662
+
663
+ for ( var cs = 0 ; cs < iColSpan ; cs++ )
664
+ {
665
+ aMap[r + rs][c + cs] = aRows[i].cells[j] ;
666
+ }
667
+ }
668
+
669
+ c += iColSpan - 1 ;
670
+ }
671
+ }
672
+ return aMap ;
673
+ }
674
+
675
+ // This function is the inverse of _CreateTableMap - it takes in a table map and converts it to an HTML table.
676
+ FCKTableHandler._InstallTableMap = function( tableMap, table )
677
+ {
678
+ // Workaround for #1917 : MSIE will always report a cell's rowSpan as 1 as long
679
+ // as the cell is not attached to a row. So we'll need an alternative attribute
680
+ // for storing the calculated rowSpan in IE.
681
+ var rowSpanAttr = FCKBrowserInfo.IsIE ? "_fckrowspan" : "rowSpan" ;
682
+
683
+ // Disconnect all the cells in tableMap from their parents, set all colSpan and rowSpan attributes to 1.
684
+ for ( var i = 0 ; i < tableMap.length ; i++ )
685
+ {
686
+ for ( var j = 0 ; j < tableMap[i].length ; j++ )
687
+ {
688
+ var cell = tableMap[i][j] ;
689
+ if ( cell.parentNode )
690
+ cell.parentNode.removeChild( cell ) ;
691
+ cell.colSpan = cell[rowSpanAttr] = 1 ;
692
+ }
693
+ }
694
+
695
+ // Scan by rows and set colSpan.
696
+ var maxCol = 0 ;
697
+ for ( var i = 0 ; i < tableMap.length ; i++ )
698
+ {
699
+ for ( var j = 0 ; j < tableMap[i].length ; j++ )
700
+ {
701
+ var cell = tableMap[i][j] ;
702
+ if ( ! cell)
703
+ continue ;
704
+ if ( j > maxCol )
705
+ maxCol = j ;
706
+ if ( cell._colScanned === true )
707
+ continue ;
708
+ if ( tableMap[i][j-1] == cell )
709
+ cell.colSpan++ ;
710
+ if ( tableMap[i][j+1] != cell )
711
+ cell._colScanned = true ;
712
+ }
713
+ }
714
+
715
+ // Scan by columns and set rowSpan.
716
+ for ( var i = 0 ; i <= maxCol ; i++ )
717
+ {
718
+ for ( var j = 0 ; j < tableMap.length ; j++ )
719
+ {
720
+ if ( ! tableMap[j] )
721
+ continue ;
722
+ var cell = tableMap[j][i] ;
723
+ if ( ! cell || cell._rowScanned === true )
724
+ continue ;
725
+ if ( tableMap[j-1] && tableMap[j-1][i] == cell )
726
+ cell[rowSpanAttr]++ ;
727
+ if ( ! tableMap[j+1] || tableMap[j+1][i] != cell )
728
+ cell._rowScanned = true ;
729
+ }
730
+ }
731
+
732
+ // Clear all temporary flags.
733
+ for ( var i = 0 ; i < tableMap.length ; i++ )
734
+ {
735
+ for ( var j = 0 ; j < tableMap[i].length ; j++)
736
+ {
737
+ var cell = tableMap[i][j] ;
738
+ FCKDomTools.ClearElementJSProperty(cell, '_colScanned' ) ;
739
+ FCKDomTools.ClearElementJSProperty(cell, '_rowScanned' ) ;
740
+ }
741
+ }
742
+
743
+ // Insert physical rows and columns to the table.
744
+ for ( var i = 0 ; i < tableMap.length ; i++ )
745
+ {
746
+ var rowObj = FCK.EditorDocument.createElement( 'tr' ) ;
747
+ for ( var j = 0 ; j < tableMap[i].length ; )
748
+ {
749
+ var cell = tableMap[i][j] ;
750
+ if ( tableMap[i-1] && tableMap[i-1][j] == cell )
751
+ {
752
+ j += cell.colSpan ;
753
+ continue ;
754
+ }
755
+ rowObj.appendChild( cell ) ;
756
+ if ( rowSpanAttr != 'rowSpan' )
757
+ {
758
+ cell.rowSpan = cell[rowSpanAttr] ;
759
+ cell.removeAttribute( rowSpanAttr ) ;
760
+ }
761
+ j += cell.colSpan ;
762
+ if ( cell.colSpan == 1 )
763
+ cell.removeAttribute( 'colspan' ) ;
764
+ if ( cell.rowSpan == 1 )
765
+ cell.removeAttribute( 'rowspan' ) ;
766
+ }
767
+ if ( FCKBrowserInfo.IsIE )
768
+ {
769
+ table.rows[i].replaceNode( rowObj ) ;
770
+ }
771
+ else
772
+ {
773
+ table.rows[i].innerHTML = '' ;
774
+ FCKDomTools.MoveChildren( rowObj, table.rows[i] ) ;
775
+ }
776
+ }
777
+ }
778
+
779
+ FCKTableHandler._MoveCaretToCell = function ( refCell, toStart )
780
+ {
781
+ var range = new FCKDomRange( FCK.EditorWindow ) ;
782
+ range.MoveToNodeContents( refCell ) ;
783
+ range.Collapse( toStart ) ;
784
+ range.Select() ;
785
+ }
786
+
787
+ FCKTableHandler.ClearRow = function( tr )
788
+ {
789
+ // Get the array of row's cells.
790
+ var aCells = tr.cells ;
791
+
792
+ // Replace the contents of each cell with "nothing".
793
+ for ( var i = 0 ; i < aCells.length ; i++ )
794
+ {
795
+ aCells[i].innerHTML = '' ;
796
+
797
+ if ( FCKBrowserInfo.IsGeckoLike )
798
+ FCKTools.AppendBogusBr( aCells[i] ) ;
799
+ }
800
+ }
801
+
802
+ FCKTableHandler.GetMergeRightTarget = function()
803
+ {
804
+ var cells = this.GetSelectedCells() ;
805
+ if ( cells.length != 1 )
806
+ return null ;
807
+
808
+ var refCell = cells[0] ;
809
+ var tableMap = this._CreateTableMap( refCell ) ;
810
+ var rowIdx = refCell.parentNode.rowIndex ;
811
+ var colIdx = this._GetCellIndexSpan( tableMap, rowIdx, refCell ) ;
812
+ var nextColIdx = colIdx + ( isNaN( refCell.colSpan ) ? 1 : refCell.colSpan ) ;
813
+ var nextCell = tableMap[rowIdx][nextColIdx] ;
814
+
815
+ if ( ! nextCell )
816
+ return null ;
817
+
818
+ // The two cells must have the same vertical geometry, otherwise merging does not make sense.
819
+ this._MarkCells( [refCell, nextCell], '_SizeTest' ) ;
820
+ var refGeometry = this._GetMarkerGeometry( tableMap, rowIdx, colIdx, '_SizeTest' ) ;
821
+ var nextGeometry = this._GetMarkerGeometry( tableMap, rowIdx, nextColIdx, '_SizeTest' ) ;
822
+ this._UnmarkCells( [refCell, nextCell], '_SizeTest' ) ;
823
+
824
+ if ( refGeometry.height != nextGeometry.height || refGeometry.y != nextGeometry.y )
825
+ return null ;
826
+
827
+ return { 'refCell' : refCell, 'nextCell' : nextCell, 'tableMap' : tableMap } ;
828
+ }
829
+
830
+ FCKTableHandler.GetMergeDownTarget = function()
831
+ {
832
+ var cells = this.GetSelectedCells() ;
833
+ if ( cells.length != 1 )
834
+ return null ;
835
+
836
+ var refCell = cells[0] ;
837
+ var tableMap = this._CreateTableMap( refCell ) ;
838
+ var rowIdx = refCell.parentNode.rowIndex ;
839
+ var colIdx = this._GetCellIndexSpan( tableMap, rowIdx, refCell ) ;
840
+ var newRowIdx = rowIdx + ( isNaN( refCell.rowSpan ) ? 1 : refCell.rowSpan ) ;
841
+ if ( ! tableMap[newRowIdx] )
842
+ return null ;
843
+
844
+ var nextCell = tableMap[newRowIdx][colIdx] ;
845
+
846
+ if ( ! nextCell )
847
+ return null ;
848
+
849
+ // Check if the selected cells are both in the same table section (thead, tfoot or tbody).
850
+ if ( refCell.parentNode.parentNode != nextCell.parentNode.parentNode )
851
+ return null ;
852
+
853
+ // The two cells must have the same horizontal geometry, otherwise merging does not makes sense.
854
+ this._MarkCells( [refCell, nextCell], '_SizeTest' ) ;
855
+ var refGeometry = this._GetMarkerGeometry( tableMap, rowIdx, colIdx, '_SizeTest' ) ;
856
+ var nextGeometry = this._GetMarkerGeometry( tableMap, newRowIdx, colIdx, '_SizeTest' ) ;
857
+ this._UnmarkCells( [refCell, nextCell], '_SizeTest' ) ;
858
+
859
+ if ( refGeometry.width != nextGeometry.width || refGeometry.x != nextGeometry.x )
860
+ return null ;
861
+
862
+ return { 'refCell' : refCell, 'nextCell' : nextCell, 'tableMap' : tableMap } ;
863
+ }