glebtv-ckeditor 4.4.7.4 → 4.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (443) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +38 -0
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +124 -84
  5. data/Rakefile +1 -25
  6. data/app/assets/javascripts/ckeditor/application.js +0 -1
  7. data/app/assets/javascripts/ckeditor/config.js.erb +5 -59
  8. data/app/assets/javascripts/ckeditor/config_orig.js +58 -0
  9. data/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.jpg +0 -0
  10. data/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.png +0 -0
  11. data/app/assets/javascripts/ckeditor/filebrowser/images/gal_del.png +0 -0
  12. data/app/assets/javascripts/ckeditor/filebrowser/images/gal_more.gif +0 -0
  13. data/app/assets/javascripts/ckeditor/filebrowser/images/preloader.gif +0 -0
  14. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/avi.gif +0 -0
  15. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/ckfnothumb.gif +0 -0
  16. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/doc.gif +0 -0
  17. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/docx.gif +0 -0
  18. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/exe.gif +0 -0
  19. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/gz.gif +0 -0
  20. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/htm.gif +0 -0
  21. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/jpg.gif +0 -0
  22. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mp3.gif +0 -0
  23. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mpg.gif +0 -0
  24. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/pdf.gif +0 -0
  25. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/psd.gif +0 -0
  26. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/rar.gif +0 -0
  27. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/swf.gif +0 -0
  28. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/tar.gif +0 -0
  29. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/txt.gif +0 -0
  30. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/unknown.gif +0 -0
  31. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/wmv.gif +0 -0
  32. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xls.gif +0 -0
  33. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xlsx.gif +0 -0
  34. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/zip.gif +0 -0
  35. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/application.js.erb +58 -56
  36. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +0 -0
  37. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +0 -0
  38. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +0 -0
  39. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +0 -0
  40. data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +12 -6
  41. data/app/assets/javascripts/ckeditor/init.js.erb +6 -1
  42. data/app/assets/stylesheets/ckcontent.css +0 -0
  43. data/app/assets/stylesheets/ckeditor/application.css +0 -0
  44. data/app/controllers/ckeditor/application_controller.rb +6 -17
  45. data/app/controllers/ckeditor/attachment_files_controller.rb +10 -3
  46. data/app/controllers/ckeditor/pictures_controller.rb +9 -2
  47. data/app/helpers/ckeditor/application_helper.rb +0 -0
  48. data/app/views/ckeditor/attachment_files/index.html.erb +3 -3
  49. data/app/views/ckeditor/pictures/index.html.erb +3 -3
  50. data/app/views/ckeditor/shared/_asset.html.erb +0 -0
  51. data/app/views/ckeditor/shared/_asset_tmpl.html.erb +0 -0
  52. data/app/views/layouts/ckeditor/application.html.erb +3 -2
  53. data/app/views/rails_admin/main/_form_ck_editor.html.haml +1 -1
  54. data/app/views/rails_admin/main/_form_ck_editorml.html.haml +1 -1
  55. data/config/locales/bg.ckeditor.yml +9 -0
  56. data/config/locales/cs.ckeditor.yml +0 -0
  57. data/config/locales/de.ckeditor.yml +0 -0
  58. data/config/locales/el-GR.cdkeditor.yml +0 -0
  59. data/config/locales/en.ckeditor.yml +0 -0
  60. data/config/locales/es.ckeditor.yml +0 -0
  61. data/config/locales/fr.ckeditor.yml +0 -0
  62. data/config/locales/hu.ckeditor.yml +0 -0
  63. data/config/locales/it.ckeditor.yml +0 -0
  64. data/config/locales/ja.ckeditor.yml +9 -0
  65. data/config/locales/nb.ckeditor.yml +9 -0
  66. data/config/locales/nl.ckeditor.yml +0 -0
  67. data/config/locales/pl.ckeditor.yml +0 -0
  68. data/config/locales/pt-BR.ckeditor.yml +0 -0
  69. data/config/locales/pt-PT.ckeditor.yml +0 -0
  70. data/config/locales/ru.ckeditor.yml +0 -0
  71. data/config/locales/sv-SE.ckeditor.yml +0 -0
  72. data/config/locales/tr.ckeditor.yml +9 -0
  73. data/config/locales/uk.ckeditor.yml +0 -0
  74. data/config/locales/zh-CN.ckeditor.yml +1 -1
  75. data/config/locales/zh-TW.ckeditor.yml +9 -0
  76. data/config/routes.rb +0 -0
  77. data/lib/ckeditor.rb +39 -5
  78. data/lib/ckeditor/asset_response.rb +59 -0
  79. data/lib/ckeditor/backend/carrierwave.rb +1 -8
  80. data/lib/ckeditor/backend/dragonfly.rb +8 -6
  81. data/lib/ckeditor/backend/paperclip.rb +7 -11
  82. data/lib/ckeditor/backend/refile.rb +37 -0
  83. data/lib/ckeditor/engine.rb +4 -0
  84. data/lib/ckeditor/helpers/controllers.rb +0 -0
  85. data/lib/ckeditor/helpers/form_builder.rb +0 -0
  86. data/lib/ckeditor/helpers/form_helper.rb +0 -0
  87. data/lib/ckeditor/helpers/view_helper.rb +0 -0
  88. data/lib/ckeditor/hooks/cancan.rb +4 -1
  89. data/lib/ckeditor/hooks/formtastic.rb +0 -0
  90. data/lib/ckeditor/hooks/pundit.rb +0 -0
  91. data/lib/ckeditor/hooks/simple_form.rb +1 -1
  92. data/lib/ckeditor/http.rb +1 -3
  93. data/lib/ckeditor/orm/active_record.rb +0 -0
  94. data/lib/ckeditor/orm/base.rb +0 -0
  95. data/lib/ckeditor/orm/mongoid.rb +0 -0
  96. data/lib/ckeditor/paginatable.rb +0 -0
  97. data/lib/ckeditor/text_area.rb +2 -1
  98. data/lib/ckeditor/utils.rb +26 -23
  99. data/lib/ckeditor/utils/content_type_detector.rb +41 -0
  100. data/lib/ckeditor/utils/javascript_code.rb +10 -0
  101. data/lib/ckeditor/version.rb +4 -2
  102. data/lib/generators/ckeditor/install_generator.rb +1 -1
  103. data/lib/generators/ckeditor/pundit_policy_generator.rb +0 -0
  104. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +0 -0
  105. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +0 -0
  106. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +0 -0
  107. data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +0 -0
  108. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +1 -1
  109. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +1 -1
  110. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +0 -0
  111. data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +0 -0
  112. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +0 -0
  113. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +3 -5
  114. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +3 -5
  115. data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +7 -7
  116. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/asset.rb +4 -0
  117. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/attachment_file.rb +7 -0
  118. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +11 -0
  119. data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +28 -0
  120. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +2 -0
  121. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +0 -0
  122. data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +13 -19
  123. data/lib/generators/ckeditor/templates/ckeditor.rb +23 -0
  124. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +0 -0
  125. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +0 -0
  126. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +0 -0
  127. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +0 -0
  128. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +3 -6
  129. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +3 -5
  130. data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +3 -3
  131. data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +3 -3
  132. data/lib/glebtv-ckeditor.rb +0 -0
  133. data/lib/tasks/ckeditor.rake +26 -0
  134. data/test/controllers/attachment_files_controller_test.rb +2 -2
  135. data/test/controllers/pictures_controller_test.rb +3 -4
  136. data/test/dummy/Rakefile +0 -0
  137. data/test/dummy/app/assets/javascripts/application.js +0 -1
  138. data/test/dummy/app/assets/stylesheets/application.css +0 -0
  139. data/test/dummy/app/assets/stylesheets/scaffold.css +0 -0
  140. data/test/dummy/app/controllers/application_controller.rb +0 -1
  141. data/test/dummy/app/controllers/posts_controller.rb +0 -0
  142. data/test/dummy/app/helpers/application_helper.rb +0 -0
  143. data/test/dummy/app/helpers/posts_helper.rb +0 -0
  144. data/test/dummy/app/models/post.rb +0 -0
  145. data/test/dummy/app/views/layouts/application.html.erb +2 -2
  146. data/test/dummy/app/views/posts/_form.html.erb +0 -0
  147. data/test/dummy/app/views/posts/edit.html.erb +0 -0
  148. data/test/dummy/app/views/posts/index.html.erb +0 -0
  149. data/test/dummy/app/views/posts/new.html.erb +0 -0
  150. data/test/dummy/app/views/posts/show.html.erb +0 -0
  151. data/test/dummy/config.ru +0 -0
  152. data/test/dummy/config/application.rb +15 -15
  153. data/test/dummy/config/boot.rb +0 -0
  154. data/test/dummy/config/database.yml +0 -0
  155. data/test/dummy/config/environment.rb +0 -0
  156. data/test/dummy/config/environments/development.rb +0 -0
  157. data/test/dummy/config/environments/production.rb +0 -0
  158. data/test/dummy/config/environments/test.rb +7 -5
  159. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
  160. data/test/dummy/config/initializers/ckeditor.rb +0 -0
  161. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  162. data/test/dummy/config/initializers/inflections.rb +0 -0
  163. data/test/dummy/config/initializers/mime_types.rb +0 -0
  164. data/test/dummy/config/initializers/session_store.rb +0 -0
  165. data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
  166. data/test/dummy/config/locales/en.yml +0 -0
  167. data/test/dummy/config/mongoid.yml +135 -1
  168. data/test/dummy/config/routes.rb +3 -3
  169. data/test/dummy/config/secrets.yml +8 -0
  170. data/test/dummy/db/migrate/20110623120047_create_posts.rb +1 -1
  171. data/test/dummy/public/404.html +0 -0
  172. data/test/dummy/public/422.html +0 -0
  173. data/test/dummy/public/500.html +0 -0
  174. data/test/dummy/public/favicon.ico +0 -0
  175. data/test/dummy/script/rails +0 -0
  176. data/test/dummy/test/fixtures/files/rails.png +0 -0
  177. data/test/dummy/test/fixtures/files/rails.tar.gz +0 -0
  178. data/test/functional/posts_controller_test.rb +6 -6
  179. data/test/generators/install_generator_test.rb +14 -0
  180. data/test/integration/navigation_test.rb +0 -0
  181. data/test/models/attachment_file_test.rb +2 -2
  182. data/test/{ckeditor_test.rb → models/ckeditor_test.rb} +35 -0
  183. data/test/models/picture_test.rb +6 -1
  184. data/test/models/utils_test.rb +6 -6
  185. data/test/orm/active_record.rb +0 -0
  186. data/test/orm/mongoid.rb +0 -0
  187. data/test/support/helpers.rb +0 -0
  188. data/test/support/integration_case.rb +0 -0
  189. data/test/support/raw_post.rb +0 -0
  190. data/test/support/routes.txt +0 -0
  191. data/test/test_helper.rb +3 -5
  192. data/vendor/assets/javascripts/ckeditor/LICENSE.md +159 -3
  193. data/vendor/assets/javascripts/ckeditor/README.md +39 -0
  194. data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +7 -7
  195. data/vendor/assets/javascripts/ckeditor/build-config.js +4 -3
  196. data/vendor/assets/javascripts/ckeditor/ckeditor.js +1028 -964
  197. data/vendor/assets/javascripts/ckeditor/config.js +1 -1
  198. data/vendor/assets/javascripts/ckeditor/lang/en.js +3 -3
  199. data/vendor/assets/javascripts/ckeditor/lang/ru.js +3 -3
  200. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +5 -5
  201. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +4 -4
  202. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
  203. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +4 -4
  204. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  205. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  206. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +9 -8
  207. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  208. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autocomplete.png +0 -0
  209. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
  210. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/commentselectedrange.png +0 -0
  211. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
  212. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
  213. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +1 -1
  214. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -1
  215. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  216. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -1
  217. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js +0 -0
  218. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +0 -0
  219. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -1
  220. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  221. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -1
  222. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +0 -0
  223. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +0 -0
  224. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +49 -29
  225. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +2 -0
  226. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +2 -0
  227. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +0 -0
  228. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +7 -8
  229. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +2 -0
  230. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +2 -0
  231. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +2 -0
  232. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +2 -0
  233. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +33 -0
  234. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +0 -0
  235. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +0 -0
  236. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +3 -1
  237. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +4 -2
  238. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +95 -0
  239. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +2 -0
  240. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +3 -1
  241. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +2 -0
  242. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -1
  243. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +0 -0
  244. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neo.css +0 -0
  245. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +2 -0
  246. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +2 -0
  247. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +2 -0
  248. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +3 -0
  249. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +2 -0
  250. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +9 -9
  251. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +2 -0
  252. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-bright.css +35 -0
  253. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +2 -0
  254. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +65 -0
  255. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +2 -0
  256. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +2 -0
  257. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +2 -0
  258. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +0 -0
  259. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/zenburn.css +37 -0
  260. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +10 -10
  261. data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
  262. data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +8 -8
  263. data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +16 -16
  264. data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +14 -14
  265. data/vendor/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
  266. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +2 -2
  267. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +4 -3
  268. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +4 -4
  269. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +4 -4
  270. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +6 -5
  271. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +15 -15
  272. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +3 -3
  273. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +6 -5
  274. data/vendor/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  275. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  276. data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
  277. data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +3 -3
  278. data/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  279. data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +29 -34
  280. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +41 -40
  281. data/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
  282. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/LICENSE +22 -0
  283. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/README.md +2 -0
  284. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/en.js +3 -0
  285. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +3 -0
  286. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/plugin.js +81 -0
  287. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/readme.txt +30 -0
  288. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +2 -2
  289. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +20 -20
  290. data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
  291. data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  292. data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +7 -7
  293. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/hidpi/loremipsum.png +0 -0
  294. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/loremipsum.png +0 -0
  295. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/en.js +8 -0
  296. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +8 -0
  297. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +131 -0
  298. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  299. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  300. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  301. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
  302. data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +7 -0
  303. data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +7 -0
  304. data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +923 -0
  305. data/vendor/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  306. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +29 -28
  307. data/vendor/assets/javascripts/ckeditor/plugins/preview/preview.html +0 -0
  308. data/vendor/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +20 -0
  309. data/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -28
  310. data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  311. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +19 -17
  312. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
  313. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  314. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  315. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  316. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  317. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  318. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  319. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  320. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  321. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  322. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  323. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  324. data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +8 -7
  325. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  326. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
  327. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  328. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
  329. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  330. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
  331. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  332. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
  333. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  334. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
  335. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  336. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
  337. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  338. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  339. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
  340. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  341. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.png +0 -0
  342. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
  343. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.png +0 -0
  344. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  345. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.png +0 -0
  346. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  347. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
  348. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  349. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
  350. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  351. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
  352. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  353. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
  354. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  355. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
  356. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  357. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
  358. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  359. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
  360. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  361. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
  362. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  363. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
  364. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  365. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  366. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
  367. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  368. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
  369. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
  370. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
  371. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +10 -10
  372. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +9 -3
  373. data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +17 -17
  374. data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +12 -12
  375. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
  376. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +7 -7
  377. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +4 -3
  378. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  379. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  380. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  381. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +1 -1
  382. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +4 -2
  383. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +4 -2
  384. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +286 -145
  385. data/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
  386. data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
  387. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
  388. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
  389. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +1 -1
  390. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +88 -70
  391. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +7 -7
  392. data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
  393. data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -1
  394. data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +388 -388
  395. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +5 -0
  396. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +5 -0
  397. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +5 -0
  398. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +5 -0
  399. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  400. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +5 -0
  401. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +5 -0
  402. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +5 -0
  403. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +5 -0
  404. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
  405. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +5 -0
  406. data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  407. data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
  408. data/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
  409. data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
  410. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  411. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  412. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  413. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  414. data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
  415. data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
  416. data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
  417. data/vendor/assets/javascripts/ckeditor/skins/moono/images/spinner.gif +0 -0
  418. data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +49 -0
  419. data/vendor/assets/javascripts/ckeditor/styles.js +1 -1
  420. metadata +105 -130
  421. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.min.js +0 -4
  422. data/app/assets/javascripts/ckeditor/override.js.erb +0 -21
  423. data/test/dummy/config/initializers/secret_token.rb +0 -7
  424. data/test/support/controller_hooks.rb +0 -27
  425. data/vendor/assets/javascripts/ckeditor/plugins/ipsum/icon.png +0 -0
  426. data/vendor/assets/javascripts/ckeditor/plugins/ipsum/plugin.js +0 -63
  427. data/vendor/assets/javascripts/ckeditor/plugins/map/example_usage.js +0 -30
  428. data/vendor/assets/javascripts/ckeditor/plugins/map/map.gif +0 -0
  429. data/vendor/assets/javascripts/ckeditor/plugins/map/plugin.js +0 -187
  430. data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
  431. data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
  432. data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +0 -64
  433. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css.scss +0 -771
  434. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css.scss +0 -812
  435. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css.scss +0 -844
  436. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css.scss +0 -825
  437. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css.scss +0 -816
  438. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css.scss +0 -2136
  439. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css.scss +0 -2145
  440. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css.scss +0 -2194
  441. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css.scss +0 -2362
  442. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css.scss +0 -2206
  443. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css.scss +0 -2254
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
2
  <!--
3
- Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
3
+ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
4
4
  For licensing, see LICENSE.html or http://ckeditor.com/license
5
5
  -->
6
6
  <html>
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
2
2
  <!--
3
- Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
3
+ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
4
4
  For licensing, see LICENSE.html or http://ckeditor.com/license
5
5
  -->
6
6
  <html>
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
5
 
@@ -1,74 +1,92 @@
1
1
  /*
2
- Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
- (function(){function q(a){return a&&a.domId&&a.getInputElement().$?a.getInputElement():a&&a.$?a:!1}function z(a){if(!a)throw"Languages-by-groups list are required for construct selectbox";var c=[],d="",f;for(f in a)for(var g in a[f]){var h=a[f][g];"en_US"==h?d=h:c.push(h)}c.sort();d&&c.unshift(d);return{getCurrentLangGroup:function(c){a:{for(var d in a)for(var f in a[d])if(f.toUpperCase()===c.toUpperCase()){c=d;break a}c=""}return c},setLangList:function(){var c={},d;for(d in a)for(var f in a[d])c[a[d][f]]=
6
- f;return c}()}}var e=function(){var a=function(a,b,f){var f=f||{},g=f.expires;if("number"==typeof g&&g){var h=new Date;h.setTime(h.getTime()+1E3*g);g=f.expires=h}g&&g.toUTCString&&(f.expires=g.toUTCString());var b=encodeURIComponent(b),a=a+"="+b,e;for(e in f)b=f[e],a+="; "+e,!0!==b&&(a+="="+b);document.cookie=a};return{postMessage:{init:function(a){window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent("onmessage",a)},send:function(a){var b=Object.prototype.toString,f=
7
- a.fn||null,g=a.id||"",e=a.target||window,i=a.message||{id:g};a.message&&"[object Object]"==b.call(a.message)&&(a.message.id||(a.message.id=g),i=a.message);a=window.JSON.stringify(i,f);e.postMessage(a,"*")},unbindHandler:function(a){window.removeEventListener?window.removeEventListener("message",a,!1):window.detachEvent("onmessage",a)}},hash:{create:function(){},parse:function(){}},cookie:{set:a,get:function(a){return(a=document.cookie.match(RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,
8
- "\\$1")+"=([^;]*)")))?decodeURIComponent(a[1]):void 0},remove:function(c){a(c,"",{expires:-1})}},misc:{findFocusable:function(a){var b=null;a&&(b=a.find("a[href], area[href], input, select, textarea, button, *[tabindex], *[contenteditable]"));return b},isVisible:function(a){return!(0===a.offsetWidth||0==a.offsetHeight||"none"===(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null).display:a.currentStyle?a.currentStyle.display:a.style.display))},
9
- hasClass:function(a,b){return!(!a.className||!a.className.match(RegExp("(\\s|^)"+b+"(\\s|$)")))}}}}(),a=a||{};a.TextAreaNumber=null;a.load=!0;a.cmd={SpellTab:"spell",Thesaurus:"thes",GrammTab:"grammar"};a.dialog=null;a.optionNode=null;a.selectNode=null;a.grammerSuggest=null;a.textNode={};a.iframeMain=null;a.dataTemp="";a.div_overlay=null;a.textNodeInfo={};a.selectNode={};a.selectNodeResponce={};a.langList=null;a.langSelectbox=null;a.banner="";a.show_grammar=null;a.div_overlay_no_check=null;a.targetFromFrame=
10
- {};a.onLoadOverlay=null;a.LocalizationComing={};a.OverlayPlace=null;a.LocalizationButton={ChangeTo:{instance:null,text:"Change to"},ChangeAll:{instance:null,text:"Change All"},IgnoreWord:{instance:null,text:"Ignore word"},IgnoreAllWords:{instance:null,text:"Ignore all words"},Options:{instance:null,text:"Options",optionsDialog:{instance:null}},AddWord:{instance:null,text:"Add word"},FinishChecking:{instance:null,text:"Finish Checking"}};a.LocalizationLabel={ChangeTo:{instance:null,text:"Change to"},
11
- Suggestions:{instance:null,text:"Suggestions"}};var A=function(b){var c,d;for(d in b)c=b[d].instance.getElement().getFirst()||b[d].instance.getElement(),c.setText(a.LocalizationComing[d])},B=function(b){for(var c in b){if(!b[c].instance.setLabel)break;b[c].instance.setLabel(a.LocalizationComing[c])}},j,r;a.framesetHtml=function(b){return"<iframe id="+a.iframeNumber+"_"+b+' frameborder="0" allowtransparency="1" style="width:100%;border: 1px solid #AEB3B9;overflow: auto;background:#fff; border-radius: 3px;"></iframe>'};
12
- a.setIframe=function(b,c){var d;d=a.framesetHtml(c);var f=a.iframeNumber+"_"+c;b.getElement().setHtml(d);d=document.getElementById(f);d=d.contentWindow?d.contentWindow:d.contentDocument.document?d.contentDocument.document:d.contentDocument;d.document.open();d.document.write('<!DOCTYPE html><html><head><meta charset="UTF-8"><title>iframe</title><style>html,body{margin: 0;height: 100%;font: 13px/1.555 "Trebuchet MS", sans-serif;}a{color: #888;font-weight: bold;text-decoration: none;border-bottom: 1px solid #888;}.main-box {color:#252525;padding: 3px 5px;text-align: justify;}.main-box p{margin: 0 0 14px;}.main-box .cerr{color: #f00000;border-bottom-color: #f00000;}</style></head><body><div id="content" class="main-box"></div><iframe src="" frameborder="0" id="spelltext" name="spelltext" style="display:none; width: 100%" ></iframe><iframe src="" frameborder="0" id="loadsuggestfirst" name="loadsuggestfirst" style="display:none; width: 100%" ></iframe><iframe src="" frameborder="0" id="loadspellsuggestall" name="loadspellsuggestall" style="display:none; width: 100%" ></iframe><iframe src="" frameborder="0" id="loadOptionsForm" name="loadOptionsForm" style="display:none; width: 100%" ></iframe><script>(function(window) {var ManagerPostMessage = function() {var _init = function(handler) {if (document.addEventListener) {window.addEventListener("message", handler, false);} else {window.attachEvent("onmessage", handler);};};var _sendCmd = function(o) {var str,type = Object.prototype.toString,fn = o.fn || null,id = o.id || "",target = o.target || window,message = o.message || { "id": id };if (o.message && type.call(o.message) == "[object Object]") {(o.message["id"]) ? o.message["id"] : o.message["id"] = id;message = o.message;};str = JSON.stringify(message, fn);target.postMessage(str, "*");};return {init: _init,send: _sendCmd};};var manageMessageTmp = new ManagerPostMessage;var appString = (function(){var spell = parent.CKEDITOR.config.wsc.DefaultParams.scriptPath;var serverUrl = parent.CKEDITOR.config.wsc.DefaultParams.serviceHost;return serverUrl + spell;})();function loadScript(src, callback) {var scriptTag = document.createElement("script");scriptTag.type = "text/javascript";callback ? callback : callback = function() {};if(scriptTag.readyState) {scriptTag.onreadystatechange = function() {if (scriptTag.readyState == "loaded" ||scriptTag.readyState == "complete") {scriptTag.onreadystatechange = null;setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1);callback();}};}else{scriptTag.onload = function() {setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1);callback();};};scriptTag.src = src;document.getElementsByTagName("head")[0].appendChild(scriptTag);};window.onload = function(){loadScript(appString, function(){manageMessageTmp.send({"id": "iframeOnload","target": window.parent});});}})(this);<\/script></body></html>');
13
- d.document.close()};a.setCurrentIframe=function(b){a.setIframe(a.dialog._.contents[b].Content,b)};a.setHeightBannerFrame=function(){var b=a.dialog.getContentElement("SpellTab","banner").getElement(),c=a.dialog.getContentElement("GrammTab","banner").getElement(),d=a.dialog.getContentElement("Thesaurus","banner").getElement();b.setStyle("height","90px");c.setStyle("height","90px");d.setStyle("height","90px")};a.setHeightFrame=function(){document.getElementById(a.iframeNumber+"_"+a.dialog._.currentTabId).style.height=
14
- "240px"};a.sendData=function(b){var c=b._.currentTabId,d=b._.contents[c].Content,f,g;a.setIframe(d,c);var e=function(e){e=e||window.event;e.data.getTarget().is("a")&&c!=b._.currentTabId&&(c=b._.currentTabId,d=b._.contents[c].Content,f=a.iframeNumber+"_"+c,a.div_overlay.setEnable(),d.getElement().getChildCount()?v(a.targetFromFrame[f],a.cmd[c]):(a.setIframe(d,c),g=document.getElementById(f),a.targetFromFrame[f]=g.contentWindow))};b.parts.tabs.removeListener("click",e);b.parts.tabs.on("click",e)};a.buildSelectLang=
15
- function(a){var c=new CKEDITOR.dom.element("div"),d=new CKEDITOR.dom.element("select"),a="wscLang"+a;c.addClass("cke_dialog_ui_input_select");c.setAttribute("role","presentation");c.setStyles({height:"auto",position:"absolute",right:"0",top:"-1px",width:"160px","white-space":"normal"});d.setAttribute("id",a);d.addClass("cke_dialog_ui_input_select");d.setStyles({width:"160px"});c.append(d);return c};a.buildOptionLang=function(b,c){var d=document.getElementById("wscLang"+c),f=document.createDocumentFragment(),
16
- g,e,i=[];if(0===d.options.length){for(g in b)i.push([g,b[g]]);i.sort();for(var k=0;k<i.length;k++)g=document.createElement("option"),g.setAttribute("value",i[k][1]),e=document.createTextNode(i[k][0]),g.appendChild(e),i[k][1]==a.selectingLang&&g.setAttribute("selected","selected"),f.appendChild(g);d.appendChild(f)}};a.buildOptionSynonyms=function(b){var b=a.selectNodeResponce[b],c=q(a.selectNode.synonyms);a.selectNode.synonyms.clear();for(var d=0;d<b.length;d++){var f=document.createElement("option");
17
- f.text=b[d];f.value=b[d];c.$.add(f,d)}a.selectNode.synonyms.getInputElement().$.firstChild.selected=!0;a.textNode.Thesaurus.setValue(a.selectNode.synonyms.getInputElement().getValue())};var s=function(a){var c=document,d=a.target||c.body,f=a.id||"overlayBlock",g=a.opacity||"0.9",a=a.background||"#f1f1f1",e=c.getElementById(f),i=e||c.createElement("div");i.style.cssText="position: absolute;top:30px;bottom:41px;left:1px;right:1px;z-index: 10020;padding:0;margin:0;background:"+a+";opacity: "+g+";filter: alpha(opacity="+
18
- 100*g+");display: none;";i.id=f;e||d.appendChild(i);return{setDisable:function(){i.style.display="none"},setEnable:function(){i.style.display="block"}}},C=function(b,c,d){var f=new CKEDITOR.dom.element("div"),e=new CKEDITOR.dom.element("input"),h=new CKEDITOR.dom.element("label"),i="wscGrammerSuggest"+b+"_"+c;f.addClass("cke_dialog_ui_input_radio");f.setAttribute("role","presentation");f.setStyles({width:"97%",padding:"5px","white-space":"normal"});e.setAttributes({type:"radio",value:c,name:"wscGrammerSuggest",
19
- id:i});e.setStyles({"float":"left"});e.on("click",function(b){a.textNode.GrammTab.setValue(b.sender.getValue())});d&&e.setAttribute("checked",!0);e.addClass("cke_dialog_ui_radio_input");h.appendText(b);h.setAttribute("for",i);h.setStyles({display:"block","line-height":"16px","margin-left":"18px","white-space":"normal"});f.append(e);f.append(h);return f},w=function(a){a=a||"true";null!==a&&"false"==a&&m()},n=function(b){var c=new z(b),b="wscLang"+a.dialog.getParentEditor().name,b=document.getElementById(b),
20
- d=a.iframeNumber+"_"+a.dialog._.currentTabId;a.buildOptionLang(c.setLangList,a.dialog.getParentEditor().name);x[c.getCurrentLangGroup(a.selectingLang)]();w(a.show_grammar);b.onchange=function(){x[c.getCurrentLangGroup(this.value)]();w(a.show_grammar);a.div_overlay.setEnable();a.selectingLang=this.value;e.postMessage.send({message:{changeLang:a.selectingLang,text:a.dataTemp},target:a.targetFromFrame[d],id:"selectionLang_outer__page"})}},D=function(b){if("no_any_suggestions"==b){b="No suggestions";
21
- a.LocalizationButton.ChangeTo.instance.disable();a.LocalizationButton.ChangeAll.instance.disable();var c=function(b){b=a.LocalizationButton[b].instance;b.getElement().hasClass("cke_disabled")?b.getElement().setStyle("color","#a0a0a0"):b.disable()};c("ChangeTo");c("ChangeAll")}else a.LocalizationButton.ChangeTo.instance.enable(),a.LocalizationButton.ChangeAll.instance.enable(),a.LocalizationButton.ChangeTo.instance.getElement().setStyle("color","#333"),a.LocalizationButton.ChangeAll.instance.getElement().setStyle("color",
22
- "#333");return b},F={iframeOnload:function(){a.div_overlay.setEnable();var b=a.dialog._.currentTabId;v(a.targetFromFrame[a.iframeNumber+"_"+b],a.cmd[b])},suggestlist:function(b){delete b.id;a.div_overlay_no_check.setDisable();t();n(a.langList);var c=D(b.word),d="";c instanceof Array&&(c=b.word[0]);d=c=c.split(",");a.textNode.SpellTab.setValue(d[0]);b=q(r);r.clear();for(c=0;c<d.length;c++){var f=document.createElement("option");f.text=d[c];f.value=d[c];b.$.add(f,c)}l();a.div_overlay.setDisable()},
23
- grammerSuggest:function(b){delete b.id;delete b.mocklangs;t();n(a.langList);var c=b.grammSuggest[0];a.grammerSuggest.getElement().setHtml("");a.textNode.GrammTab.reset();a.textNode.GrammTab.setValue(c);a.textNodeInfo.GrammTab.getElement().setHtml("");a.textNodeInfo.GrammTab.getElement().setText(b.info);for(var b=b.grammSuggest,c=b.length,d=!0,f=0;f<c;f++)a.grammerSuggest.getElement().append(C(b[f],b[f],d)),d=!1;l();a.div_overlay.setDisable()},thesaurusSuggest:function(b){delete b.id;delete b.mocklangs;
24
- t();n(a.langList);a.selectNodeResponce=b;a.textNode.Thesaurus.reset();var c=q(a.selectNode.categories),d=0;a.selectNode.categories.clear();for(var f in b){var e=document.createElement("option");e.text=f;e.value=f;c.$.add(e,d);d++}b=a.selectNode.categories.getInputElement().getChildren().$[0].value;a.selectNode.categories.getInputElement().getChildren().$[0].selected=!0;a.buildOptionSynonyms(b);l();a.div_overlay.setDisable()},finish:function(b){delete b.id;E();b=a.dialog.getContentElement(a.dialog._.currentTabId,
25
- "BlockFinishChecking").getElement();b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.show();a.div_overlay.setDisable()},settext:function(b){delete b.id;a.dialog.getParentEditor().getCommand("checkspell");var c=a.dialog.getParentEditor();try{c.focus()}catch(d){}c.setData(b.text,function(){a.dataTemp="";c.unlockSelection();c.fire("saveSnapshot");a.dialog.hide()})},ReplaceText:function(b){delete b.id;a.div_overlay.setEnable();a.dataTemp=b.text;a.selectingLang=b.currentLang;
26
- window.setTimeout(function(){try{a.div_overlay.setDisable()}catch(b){}},500);A(a.LocalizationButton);B(a.LocalizationLabel)},options_checkbox_send:function(b){delete b.id;b={osp:e.cookie.get("osp"),udn:e.cookie.get("udn"),cust_dic_ids:a.cust_dic_ids};e.postMessage.send({message:b,target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId],id:"options_outer__page"})},getOptions:function(b){var c=b.DefOptions.udn;a.LocalizationComing=b.DefOptions.localizationButtonsAndText;a.show_grammar=b.show_grammar;
27
- a.langList=b.lang;if(a.bnr=b.bannerId){a.setHeightBannerFrame();var d=b.banner;a.dialog.getContentElement(a.dialog._.currentTabId,"banner").getElement().setHtml(d)}else a.setHeightFrame();"undefined"==c&&(a.userDictionaryName?(c=a.userDictionaryName,d={osp:e.cookie.get("osp"),udn:a.userDictionaryName,cust_dic_ids:a.cust_dic_ids,id:"options_dic_send",udnCmd:"create"},e.postMessage.send({message:d,target:a.targetFromFrame[void 0]})):c="");e.cookie.set("osp",b.DefOptions.osp);e.cookie.set("udn",c);e.cookie.set("cust_dic_ids",
28
- b.DefOptions.cust_dic_ids);e.postMessage.send({id:"giveOptions"})},options_dic_send:function(){var b={osp:e.cookie.get("osp"),udn:e.cookie.get("udn"),cust_dic_ids:a.cust_dic_ids,id:"options_dic_send",udnCmd:e.cookie.get("udnCmd")};e.postMessage.send({message:b,target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId]})},data:function(a){delete a.id},giveOptions:function(){},setOptionsConfirmF:function(){},setOptionsConfirmT:function(){j.setValue("")},clickBusy:function(){a.div_overlay.setEnable()},
29
- suggestAllCame:function(){a.div_overlay.setDisable();a.div_overlay_no_check.setDisable()},TextCorrect:function(){n(a.langList)}},y=function(a){a=a||window.event;if((a=window.JSON.parse(a.data))&&a.id)F[a.id](a)},v=function(b,c,d,f){c=c||CKEDITOR.config.wsc_cmd;d=d||a.dataTemp;e.postMessage.send({message:{customerId:a.wsc_customerId,text:d,txt_ctrl:a.TextAreaNumber,cmd:c,cust_dic_ids:a.cust_dic_ids,udn:a.userDictionaryName,slang:a.selectingLang,reset_suggest:f||!1},target:b,id:"data_outer__page"});
30
- a.div_overlay.setEnable()},x={superset:function(){a.dialog.showPage("Thesaurus");a.dialog.showPage("GrammTab");o()},usual:function(){u();m();o()},rtl:function(){u();m();o()}},G=function(b){var c=new function(a){var b={};return{getCmdByTab:function(c){for(var e in a)b[a[e]]=e;return b[c]}}}(a.cmd);b.selectPage(c.getCmdByTab(CKEDITOR.config.wsc_cmd));a.sendData(b)},u=function(){a.dialog.hidePage("Thesaurus")},m=function(){a.dialog.hidePage("GrammTab")},o=function(){a.dialog.showPage("SpellTab")},l=
31
- function(){var b=a.dialog.getContentElement(a.dialog._.currentTabId,"bottomGroup").getElement();b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.show()},E=function(){var b=a.dialog.getContentElement(a.dialog._.currentTabId,"bottomGroup").getElement(),c=document.activeElement,d;b.setStyles({display:"block",position:"absolute",left:"-9999px"});setTimeout(function(){b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.hide();a.dialog._.editor.focusManager.currentActive.focusNext();
32
- d=e.misc.findFocusable(a.dialog.parts.contents);if(!e.misc.hasClass(c,"cke_dialog_tab")&&!e.misc.hasClass(c,"cke_dialog_contents_body")&&e.misc.isVisible(c))try{c.focus()}catch(f){}else for(var g=0,h;g<d.count();g++)if(h=d.getItem(g),e.misc.isVisible(h.$)){try{h.$.focus()}catch(i){}break}},0)},t=function(){var b=a.dialog.getContentElement(a.dialog._.currentTabId,"BlockFinishChecking").getElement(),c=document.activeElement,d;b.setStyles({display:"block",position:"absolute",left:"-9999px"});setTimeout(function(){b.removeStyle("display");
33
- b.removeStyle("position");b.removeStyle("left");b.hide();a.dialog._.editor.focusManager.currentActive.focusNext();d=e.misc.findFocusable(a.dialog.parts.contents);if(!e.misc.hasClass(c,"cke_dialog_tab")&&!e.misc.hasClass(c,"cke_dialog_contents_body")&&e.misc.isVisible(c))try{c.focus()}catch(f){}else for(var g=0,h;g<d.count();g++)if(h=d.getItem(g),e.misc.isVisible(h.$)){try{h.$.focus()}catch(i){}break}},0)};CKEDITOR.dialog.add("checkspell",function(b){var c=function(){this.getElement().focus();a.div_overlay.setEnable();
34
- var c=a.dialog._.currentTabId,f=a.iframeNumber+"_"+c,g=a.textNode[c].getValue(),h=this.getElement().getAttribute("title-cmd");e.postMessage.send({message:{cmd:h,tabId:c,new_word:g},target:a.targetFromFrame[f],id:"cmd_outer__page"});("ChangeTo"==h||"ChangeAll"==h)&&b.fire("saveSnapshot");"FinishChecking"==h&&b.config.wsc_onFinish.call(CKEDITOR.document.getWindow().getFrame())};return{title:b.config.wsc_dialogTitle||b.lang.wsc.title,minWidth:560,minHeight:444,buttons:[CKEDITOR.dialog.cancelButton],
35
- onLoad:function(){a.dialog=this;u();m();o()},onShow:function(){b.lockSelection(b.getSelection());a.TextAreaNumber="cke_textarea_"+CKEDITOR.currentInstance.name;e.postMessage.init(y);a.dataTemp=CKEDITOR.currentInstance.getData();a.OverlayPlace=a.dialog.parts.tabs.getParent().$;if(CKEDITOR&&CKEDITOR.config){a.wsc_customerId=b.config.wsc_customerId;a.cust_dic_ids=b.config.wsc_customDictionaryIds;a.userDictionaryName=b.config.wsc_userDictionaryName;a.defaultLanguage=CKEDITOR.config.defaultLanguage;var c=
36
- "file:"==document.location.protocol?"http:":document.location.protocol;CKEDITOR.scriptLoader.load(b.config.wsc_customLoaderScript||c+"//loader.webspellchecker.net/sproxy_fck/sproxy.php?plugin=fck2&customerid="+a.wsc_customerId+"&cmd=script&doc=wsc&schema=22",function(c){CKEDITOR.config&&CKEDITOR.config.wsc&&CKEDITOR.config.wsc.DefaultParams?(a.serverLocationHash=CKEDITOR.config.wsc.DefaultParams.serviceHost,a.logotype=CKEDITOR.config.wsc.DefaultParams.logoPath,a.loadIcon=CKEDITOR.config.wsc.DefaultParams.iconPath,
37
- a.loadIconEmptyEditor=CKEDITOR.config.wsc.DefaultParams.iconPathEmptyEditor,a.LangComparer=new CKEDITOR.config.wsc.DefaultParams._SP_FCK_LangCompare):(a.serverLocationHash=DefaultParams.serviceHost,a.logotype=DefaultParams.logoPath,a.loadIcon=DefaultParams.iconPath,a.loadIconEmptyEditor=DefaultParams.iconPathEmptyEditor,a.LangComparer=new _SP_FCK_LangCompare);a.pluginPath=CKEDITOR.getUrl(b.plugins.wsc.path);a.iframeNumber=a.TextAreaNumber;a.templatePath=a.pluginPath+"dialogs/tmp.html";a.LangComparer.setDefaulLangCode(a.defaultLanguage);
38
- a.currentLang=b.config.wsc_lang||a.LangComparer.getSPLangCode(b.langCode);a.selectingLang=a.currentLang;a.div_overlay=new s({opacity:"1",background:"#fff url("+a.loadIcon+") no-repeat 50% 50%",target:a.OverlayPlace});var d=a.dialog.parts.tabs.getId(),d=CKEDITOR.document.getById(d);d.setStyle("width","97%");d.getElementsByTag("DIV").count()||d.append(a.buildSelectLang(a.dialog.getParentEditor().name));a.div_overlay_no_check=new s({opacity:"1",id:"no_check_over",background:"#fff url("+a.loadIconEmptyEditor+
39
- ") no-repeat 50% 50%",target:a.OverlayPlace});c&&(G(a.dialog),a.dialog.setupContent(a.dialog))})}else a.dialog.hide()},onHide:function(){var c=CKEDITOR.plugins.scayt,f=b.scayt;b.unlockSelection();c&&(f&&c.state[b.name]&&f.setMarkupPaused)&&f.setMarkupPaused(!1);a.dataTemp="";e.postMessage.unbindHandler(y)},contents:[{id:"SpellTab",label:"SpellChecker",accessKey:"S",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"<div></div>"},{type:"html",id:"Content",label:"spellContent",html:"",
40
- setup:function(b){var b=a.iframeNumber+"_"+b._.currentTabId,c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"hbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;",widths:["50%","50%"],children:[{type:"hbox",id:"leftCol",align:"left",width:"50%",children:[{type:"vbox",id:"rightCol1",widths:["50%","50%"],children:[{type:"text",id:"text",label:a.LocalizationLabel.ChangeTo.text+":",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",width:"140px","default":"",
41
- onShow:function(){a.textNode.SpellTab=this;a.LocalizationLabel.ChangeTo.instance=this},onHide:function(){this.reset()}},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"text",id:"labelSuggestions",label:a.LocalizationLabel.Suggestions.text+":",onShow:function(){a.LocalizationLabel.Suggestions.instance=this;this.getInputElement().setStyles({display:"none"})}},{type:"html",id:"logo",html:'<img width="99" height="68" border="0" src="" title="WebSpellChecker.net" alt="WebSpellChecker.net" style="display: inline-block;">',
42
- setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"left"})}}]},{type:"select",id:"list_of_suggestions",labelStyle:"font: 12px/25px arial, sans-serif;",size:"6",inputStyle:"width: 140px; height: auto;",items:[["loading..."]],onShow:function(){r=this},onChange:function(){a.textNode.SpellTab.setValue(this.getValue())}}]}]}]},{type:"hbox",id:"rightCol",align:"right",width:"50%",children:[{type:"vbox",id:"rightCol_col__left",widths:["50%","50%","50%",
43
- "50%"],children:[{type:"button",id:"ChangeTo",label:a.LocalizationButton.ChangeTo.text,title:"Change to",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.ChangeTo.instance=this},onClick:c},{type:"button",id:"ChangeAll",label:a.LocalizationButton.ChangeAll.text,title:"Change All",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.ChangeAll.instance=this},onClick:c},{type:"button",
44
- id:"AddWord",label:a.LocalizationButton.AddWord.text,title:"Add word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.AddWord.instance=this},onClick:c},{type:"button",id:"FinishChecking",label:a.LocalizationButton.FinishChecking.text,title:"Finish Checking",style:"width: 100%;margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.FinishChecking.instance=this},onClick:c}]},{type:"vbox",
45
- id:"rightCol_col__right",widths:["50%","50%","50%"],children:[{type:"button",id:"IgnoreWord",label:a.LocalizationButton.IgnoreWord.text,title:"Ignore word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.IgnoreWord.instance=this},onClick:c},{type:"button",id:"IgnoreAllWords",label:a.LocalizationButton.IgnoreAllWords.text,title:"Ignore all words",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);
46
- a.LocalizationButton.IgnoreAllWords.instance=this},onClick:c},{type:"button",id:"option",label:a.LocalizationButton.Options.text,title:"Option",style:"width: 100%;",onLoad:function(){a.LocalizationButton.Options.instance=this;"file:"==document.location.protocol&&this.disable()},onClick:function(){this.getElement().focus();"file:"==document.location.protocol?alert("WSC: Options functionality is disabled when runing from file system"):(p=document.activeElement,b.openDialog("options"))}}]}]}]},{type:"hbox",
47
- id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},onHide:l,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",setup:function(){this.getChild()[0].getElement().$.src=a.logotype;this.getChild()[0].getElement().getParent().setStyles({"text-align":"center"})},children:[{type:"html",id:"logo",html:'<img width="99" height="68" border="0" src="" title="WebSpellChecker.net" alt="WebSpellChecker.net" style="display: inline-block;">'}]}]},
5
+ (function(){function z(a){return a&&a.domId&&a.getInputElement().$?a.getInputElement():a&&a.$?a:!1}function I(a){if(!a)throw"Languages-by-groups list are required for construct selectbox";var c=[],e="",d;for(d in a)for(var f in a[d]){var h=a[d][f];"en_US"==h?e=h:c.push(h)}c.sort();e&&c.unshift(e);return{getCurrentLangGroup:function(c){a:{for(var d in a)for(var e in a[d])if(e.toUpperCase()===c.toUpperCase()){c=d;break a}c=""}return c},setLangList:function(){var c={},d;for(d in a)for(var e in a[d])c[a[d][e]]=
6
+ e;return c}()}}var g=function(){var a=function(a,b,d){d=d||{};var f=d.expires;if("number"==typeof f&&f){var h=new Date;h.setTime(h.getTime()+1E3*f);f=d.expires=h}f&&f.toUTCString&&(d.expires=f.toUTCString());b=encodeURIComponent(b);a=a+"\x3d"+b;for(var k in d)b=d[k],a+="; "+k,!0!==b&&(a+="\x3d"+b);document.cookie=a};return{postMessage:{init:function(a){window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent("onmessage",a)},send:function(a){var b=Object.prototype.toString,
7
+ d=a.fn||null,f=a.id||"",h=a.target||window,k=a.message||{id:f};a.message&&"[object Object]"==b.call(a.message)&&(a.message.id?a.message.id:a.message.id=f,k=a.message);a=window.JSON.stringify(k,d);h.postMessage(a,"*")},unbindHandler:function(a){window.removeEventListener?window.removeEventListener("message",a,!1):window.detachEvent("onmessage",a)}},hash:{create:function(){},parse:function(){}},cookie:{set:a,get:function(a){return(a=document.cookie.match(new RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,
8
+ "\\$1")+"\x3d([^;]*)")))?decodeURIComponent(a[1]):void 0},remove:function(c){a(c,"",{expires:-1})}},misc:{findFocusable:function(a){var b=null;a&&(b=a.find("a[href], area[href], input, select, textarea, button, *[tabindex], *[contenteditable]"));return b},isVisible:function(a){var b;(b=0===a.offsetWidth||0==a.offsetHeight)||(b="none"===(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null).display:a.currentStyle?a.currentStyle.display:a.style.display));
9
+ return!b},hasClass:function(a,b){return!(!a.className||!a.className.match(new RegExp("(\\s|^)"+b+"(\\s|$)")))}}}}(),a=a||{};a.TextAreaNumber=null;a.load=!0;a.cmd={SpellTab:"spell",Thesaurus:"thes",GrammTab:"grammar"};a.dialog=null;a.optionNode=null;a.selectNode=null;a.grammerSuggest=null;a.textNode={};a.iframeMain=null;a.dataTemp="";a.div_overlay=null;a.textNodeInfo={};a.selectNode={};a.selectNodeResponce={};a.langList=null;a.langSelectbox=null;a.banner="";a.show_grammar=null;a.div_overlay_no_check=
10
+ null;a.targetFromFrame={};a.onLoadOverlay=null;a.LocalizationComing={};a.OverlayPlace=null;a.sessionid="";a.LocalizationButton={ChangeTo_button:{instance:null,text:"Change to",localizationID:"ChangeTo"},ChangeAll:{instance:null,text:"Change All"},IgnoreWord:{instance:null,text:"Ignore word"},IgnoreAllWords:{instance:null,text:"Ignore all words"},Options:{instance:null,text:"Options",optionsDialog:{instance:null}},AddWord:{instance:null,text:"Add word"},FinishChecking_button:{instance:null,text:"Finish Checking",
11
+ localizationID:"FinishChecking"},FinishChecking_button_block:{instance:null,text:"Finish Checking",localizationID:"FinishChecking"}};a.LocalizationLabel={ChangeTo_label:{instance:null,text:"Change to",localizationID:"ChangeTo"},Suggestions:{instance:null,text:"Suggestions"},Categories:{instance:null,text:"Categories"},Synonyms:{instance:null,text:"Synonyms"}};var J=function(b){var c,e,d;for(d in b)c=(c=a.dialog.getContentElement(a.dialog._.currentTabId,d))?c.getElement():b[d].instance.getElement().getFirst()||
12
+ b[d].instance.getElement(),e=b[d].localizationID||d,c.setText(a.LocalizationComing[e])},K=function(b){var c,e,d;for(d in b)c=a.dialog.getContentElement(a.dialog._.currentTabId,d),c||(c=b[d].instance),c.setLabel&&(e=b[d].localizationID||d,c.setLabel(a.LocalizationComing[e]+":"))},r,A;a.framesetHtml=function(b){return"\x3ciframe id\x3d"+a.iframeNumber+"_"+b+' frameborder\x3d"0" allowtransparency\x3d"1" style\x3d"width:100%;border: 1px solid #AEB3B9;overflow: auto;background:#fff; border-radius: 3px;"\x3e\x3c/iframe\x3e'};
13
+ a.setIframe=function(b,c){var e;e=a.framesetHtml(c);var d=a.iframeNumber+"_"+c;b.getElement().setHtml(e);e=document.getElementById(d);e=e.contentWindow?e.contentWindow:e.contentDocument.document?e.contentDocument.document:e.contentDocument;e.document.open();e.document.write('\x3c!DOCTYPE html\x3e\x3chtml\x3e\x3chead\x3e\x3cmeta charset\x3d"UTF-8"\x3e\x3ctitle\x3eiframe\x3c/title\x3e\x3cstyle\x3ehtml,body{margin: 0;height: 100%;font: 13px/1.555 "Trebuchet MS", sans-serif;}a{color: #888;font-weight: bold;text-decoration: none;border-bottom: 1px solid #888;}.main-box {color:#252525;padding: 3px 5px;text-align: justify;}.main-box p{margin: 0 0 14px;}.main-box .cerr{color: #f00000;border-bottom-color: #f00000;}\x3c/style\x3e\x3c/head\x3e\x3cbody\x3e\x3cdiv id\x3d"content" class\x3d"main-box"\x3e\x3c/div\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"spelltext" name\x3d"spelltext" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"loadsuggestfirst" name\x3d"loadsuggestfirst" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"loadspellsuggestall" name\x3d"loadspellsuggestall" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3ciframe src\x3d"" frameborder\x3d"0" id\x3d"loadOptionsForm" name\x3d"loadOptionsForm" style\x3d"display:none; width: 100%" \x3e\x3c/iframe\x3e\x3cscript\x3e(function(window) {var ManagerPostMessage \x3d function() {var _init \x3d function(handler) {if (document.addEventListener) {window.addEventListener("message", handler, false);} else {window.attachEvent("onmessage", handler);};};var _sendCmd \x3d function(o) {var str,type \x3d Object.prototype.toString,fn \x3d o.fn || null,id \x3d o.id || "",target \x3d o.target || window,message \x3d o.message || { "id": id };if (o.message \x26\x26 type.call(o.message) \x3d\x3d "[object Object]") {(o.message["id"]) ? o.message["id"] : o.message["id"] \x3d id;message \x3d o.message;};str \x3d JSON.stringify(message, fn);target.postMessage(str, "*");};return {init: _init,send: _sendCmd};};var manageMessageTmp \x3d new ManagerPostMessage;var appString \x3d (function(){var spell \x3d parent.CKEDITOR.config.wsc.DefaultParams.scriptPath;var serverUrl \x3d parent.CKEDITOR.config.wsc.DefaultParams.serviceHost;return serverUrl + spell;})();function loadScript(src, callback) {var scriptTag \x3d document.createElement("script");scriptTag.type \x3d "text/javascript";callback ? callback : callback \x3d function() {};if(scriptTag.readyState) {scriptTag.onreadystatechange \x3d function() {if (scriptTag.readyState \x3d\x3d "loaded" ||scriptTag.readyState \x3d\x3d "complete") {scriptTag.onreadystatechange \x3d null;setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1);callback();}};}else{scriptTag.onload \x3d function() {setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1);callback();};};scriptTag.src \x3d src;document.getElementsByTagName("head")[0].appendChild(scriptTag);};window.onload \x3d function(){loadScript(appString, function(){manageMessageTmp.send({"id": "iframeOnload","target": window.parent});});}})(this);\x3c/script\x3e\x3c/body\x3e\x3c/html\x3e');
14
+ e.document.close()};a.setCurrentIframe=function(b){a.setIframe(a.dialog._.contents[b].Content,b)};a.setHeightBannerFrame=function(){var b=a.dialog.getContentElement("SpellTab","banner").getElement(),c=a.dialog.getContentElement("GrammTab","banner").getElement(),e=a.dialog.getContentElement("Thesaurus","banner").getElement();b.setStyle("height","90px");c.setStyle("height","90px");e.setStyle("height","90px")};a.setHeightFrame=function(){document.getElementById(a.iframeNumber+"_"+a.dialog._.currentTabId).style.height=
15
+ "240px"};a.sendData=function(b){var c=b._.currentTabId,e=b._.contents[c].Content,d,f;a.previousTab=c;a.setIframe(e,c);var h=function(h){c=b._.currentTabId;h=h||window.event;h.data.getTarget().is("a")&&c!==a.previousTab&&(a.previousTab=c,e=b._.contents[c].Content,d=a.iframeNumber+"_"+c,a.div_overlay.setEnable(),e.getElement().getChildCount()?E(a.targetFromFrame[d],a.cmd[c]):(a.setIframe(e,c),f=document.getElementById(d),a.targetFromFrame[d]=f.contentWindow))};b.parts.tabs.removeListener("click",h);
16
+ b.parts.tabs.on("click",h)};a.buildSelectLang=function(a){var c=new CKEDITOR.dom.element("div"),e=new CKEDITOR.dom.element("select");a="wscLang"+a;c.addClass("cke_dialog_ui_input_select");c.setAttribute("role","presentation");c.setStyles({height:"auto",position:"absolute",right:"0",top:"-1px",width:"160px","white-space":"normal"});e.setAttribute("id",a);e.addClass("cke_dialog_ui_input_select");e.setStyles({width:"160px"});c.append(e);return c};a.buildOptionLang=function(b,c){var e=document.getElementById("wscLang"+
17
+ c),d=document.createDocumentFragment(),f,h,k=[];if(0===e.options.length){for(f in b)k.push([f,b[f]]);k.sort();for(var p=0;p<k.length;p++)f=document.createElement("option"),f.setAttribute("value",k[p][1]),h=document.createTextNode(k[p][0]),f.appendChild(h),d.appendChild(f);e.appendChild(d)}for(d=0;d<e.options.length;d++)e.options[d].value==a.selectingLang&&(e.options[d].selected="selected")};a.buildOptionSynonyms=function(b){b=a.selectNodeResponce[b];var c=z(a.selectNode.Synonyms);a.selectNode.Synonyms.clear();
18
+ for(var e=0;e<b.length;e++){var d=document.createElement("option");d.text=b[e];d.value=b[e];c.$.add(d,e)}a.selectNode.Synonyms.getInputElement().$.firstChild.selected=!0;a.textNode.Thesaurus.setValue(a.selectNode.Synonyms.getInputElement().getValue())};var B=function(a){var c=document,e=a.target||c.body,d=a.id||"overlayBlock",f=a.opacity||"0.9";a=a.background||"#f1f1f1";var h=c.getElementById(d),k=h||c.createElement("div");k.style.cssText="position: absolute;top:30px;bottom:41px;left:1px;right:1px;z-index: 10020;padding:0;margin:0;background:"+
19
+ a+";opacity: "+f+";filter: alpha(opacity\x3d"+100*f+");display: none;";k.id=d;h||e.appendChild(k);return{setDisable:function(){k.style.display="none"},setEnable:function(){k.style.display="block"}}},L=function(b,c,e){var d=new CKEDITOR.dom.element("div"),f=new CKEDITOR.dom.element("input"),h=new CKEDITOR.dom.element("label"),k="wscGrammerSuggest"+b+"_"+c;d.addClass("cke_dialog_ui_input_radio");d.setAttribute("role","presentation");d.setStyles({width:"97%",padding:"5px","white-space":"normal"});f.setAttributes({type:"radio",
20
+ value:c,name:"wscGrammerSuggest",id:k});f.setStyles({"float":"left"});f.on("click",function(b){a.textNode.GrammTab.setValue(b.sender.getValue())});e?f.setAttribute("checked",!0):!1;f.addClass("cke_dialog_ui_radio_input");h.appendText(b);h.setAttribute("for",k);h.setStyles({display:"block","line-height":"16px","margin-left":"18px","white-space":"normal"});d.append(f);d.append(h);return d},F=function(a){a=a||"true";null!==a&&"false"==a&&t()},w=function(b){var c=new I(b);b="wscLang"+a.dialog.getParentEditor().name;
21
+ b=document.getElementById(b);var e=a.iframeNumber+"_"+a.dialog._.currentTabId;a.buildOptionLang(c.setLangList,a.dialog.getParentEditor().name);u[c.getCurrentLangGroup(a.selectingLang)].onShow();F(a.show_grammar);b.onchange=function(b){b=c.getCurrentLangGroup(this.value);var f=a.dialog._.currentTabId;u[b].onShow();F(a.show_grammar);a.div_overlay.setEnable();a.selectingLang=this.value;f=a.cmd[f];b&&u[b]&&u[b].allowedTabCommands[f]||(f=u[b].defaultTabCommand);for(var h in a.cmd)if(a.cmd[h]==f){a.previousTab=
22
+ h;break}g.postMessage.send({message:{changeLang:a.selectingLang,text:a.dataTemp,cmd:f},target:a.targetFromFrame[e],id:"selectionLang_outer__page"})}},M=function(b){var c,e=function(b){b=a.dialog.getContentElement(a.dialog._.currentTabId,b)||a.LocalizationButton[b].instance;b.getElement().hasClass("cke_disabled")?b.getElement().setStyle("color","#a0a0a0"):b.disable()};c=function(b){b=a.dialog.getContentElement(a.dialog._.currentTabId,b)||a.LocalizationButton[b].instance;b.enable();b.getElement().setStyle("color",
23
+ "#333")};"no_any_suggestions"==b?(b="No suggestions",c=a.dialog.getContentElement(a.dialog._.currentTabId,"ChangeTo_button")||a.LocalizationButton.ChangeTo_button.instance,c.disable(),c=a.dialog.getContentElement(a.dialog._.currentTabId,"ChangeAll")||a.LocalizationButton.ChangeAll.instance,c.disable(),e("ChangeTo_button"),e("ChangeAll")):(c("ChangeTo_button"),c("ChangeAll"));return b},O={iframeOnload:function(b){a.div_overlay.setEnable();b=a.dialog._.currentTabId;E(a.targetFromFrame[a.iframeNumber+
24
+ "_"+b],a.cmd[b])},suggestlist:function(b){delete b.id;a.div_overlay_no_check.setDisable();C();w(a.langList);var c=M(b.word),e="";c instanceof Array&&(c=b.word[0]);e=c=c.split(",");a.textNode.SpellTab.setValue(e[0]);b=z(A);A.clear();for(c=0;c<e.length;c++){var d=document.createElement("option");d.text=e[c];d.value=e[c];b.$.add(d,c)}v();a.div_overlay.setDisable()},grammerSuggest:function(b){delete b.id;delete b.mocklangs;C();w(a.langList);var c=b.grammSuggest[0];a.grammerSuggest.getElement().setHtml("");
25
+ a.textNode.GrammTab.reset();a.textNode.GrammTab.setValue(c);a.textNodeInfo.GrammTab.getElement().setHtml("");a.textNodeInfo.GrammTab.getElement().setText(b.info);b=b.grammSuggest;for(var c=b.length,e=!0,d=0;d<c;d++)a.grammerSuggest.getElement().append(L(b[d],b[d],e)),e=!1;v();a.div_overlay.setDisable()},thesaurusSuggest:function(b){delete b.id;delete b.mocklangs;C();w(a.langList);a.selectNodeResponce=b;a.textNode.Thesaurus.reset();var c=z(a.selectNode.Categories),e=0;a.selectNode.Categories.clear();
26
+ for(var d in b)b=document.createElement("option"),b.text=d,b.value=d,c.$.add(b,e),e++;c=a.selectNode.Categories.getInputElement().getChildren().$[0].value;a.selectNode.Categories.getInputElement().getChildren().$[0].selected=!0;a.buildOptionSynonyms(c);v();a.div_overlay.setDisable()},finish:function(b){delete b.id;N();b=a.dialog.getContentElement(a.dialog._.currentTabId,"BlockFinishChecking").getElement();b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.show();a.div_overlay.setDisable()},
27
+ settext:function(b){delete b.id;a.dialog.getParentEditor().getCommand("checkspell");var c=a.dialog.getParentEditor();if(c.scayt&&c.wsc.isSsrvSame){var e=c.wsc.udn;e?c.wsc.DataStorage.setData("scayt_user_dictionary_name",e):c.wsc.DataStorage.setData("scayt_user_dictionary_name","")}try{c.focus()}catch(d){}c.setData(b.text,function(){a.dataTemp="";c.unlockSelection();c.fire("saveSnapshot");a.dialog.hide()})},ReplaceText:function(b){delete b.id;a.div_overlay.setEnable();a.dataTemp=b.text;a.selectingLang=
28
+ b.currentLang;(b.cmd="0"!==b.len&&b.len)?a.div_overlay.setDisable():window.setTimeout(function(){try{a.div_overlay.setDisable()}catch(b){}},500);J(a.LocalizationButton);K(a.LocalizationLabel)},options_checkbox_send:function(b){delete b.id;b={osp:g.cookie.get("osp"),udn:g.cookie.get("udn"),cust_dic_ids:a.cust_dic_ids};g.postMessage.send({message:b,target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId],id:"options_outer__page"})},getOptions:function(b){var c=b.DefOptions.udn;a.LocalizationComing=
29
+ b.DefOptions.localizationButtonsAndText;a.show_grammar=b.show_grammar;a.langList=b.lang;a.bnr=b.bannerId;a.sessionid=b.sessionid;if(b.bannerId){a.setHeightBannerFrame();var e=b.banner;a.dialog.getContentElement(a.dialog._.currentTabId,"banner").getElement().setHtml(e)}else a.setHeightFrame();"undefined"==c&&(a.userDictionaryName?(c=a.userDictionaryName,e={osp:g.cookie.get("osp"),udn:a.userDictionaryName,cust_dic_ids:a.cust_dic_ids,id:"options_dic_send",udnCmd:"create"},g.postMessage.send({message:e,
30
+ target:a.targetFromFrame[void 0]})):c="");g.cookie.set("osp",b.DefOptions.osp);g.cookie.set("udn",c);g.cookie.set("cust_dic_ids",b.DefOptions.cust_dic_ids);g.postMessage.send({id:"giveOptions"})},options_dic_send:function(b){b={osp:g.cookie.get("osp"),udn:g.cookie.get("udn"),cust_dic_ids:a.cust_dic_ids,id:"options_dic_send",udnCmd:g.cookie.get("udnCmd")};g.postMessage.send({message:b,target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId]})},data:function(a){delete a.id},giveOptions:function(){},
31
+ setOptionsConfirmF:function(){},setOptionsConfirmT:function(){r.setValue("")},clickBusy:function(){a.div_overlay.setEnable()},suggestAllCame:function(){a.div_overlay.setDisable();a.div_overlay_no_check.setDisable()},TextCorrect:function(){w(a.langList)}},G=function(a){a=a||window.event;if((a=window.JSON.parse(a.data))&&a.id)O[a.id](a)},E=function(b,c,e,d){c=c||CKEDITOR.config.wsc_cmd;e=e||a.dataTemp;g.postMessage.send({message:{customerId:a.wsc_customerId,text:e,txt_ctrl:a.TextAreaNumber,cmd:c,cust_dic_ids:a.cust_dic_ids,
32
+ udn:a.userDictionaryName,slang:a.selectingLang,reset_suggest:d||!1,sessionid:a.sessionid},target:b,id:"data_outer__page"});a.div_overlay.setEnable()},u={superset:{onShow:function(){a.dialog.showPage("Thesaurus");a.dialog.showPage("GrammTab");l()},allowedTabCommands:{spell:!0,grammar:!0,thes:!0},defaultTabCommand:"spell"},usual:{onShow:function(){x();t();l()},allowedTabCommands:{spell:!0},defaultTabCommand:"spell"},rtl:{onShow:function(){x();t();l()},allowedTabCommands:{spell:!0},defaultTabCommand:"spell"},
33
+ spellgrammar:{onShow:function(){x();a.dialog.showPage("GrammTab");l()},allowedTabCommands:{spell:!0,grammar:!0},defaultTabCommand:"spell"},spellthes:{onShow:function(){a.dialog.showPage("Thesaurus");t();l()},allowedTabCommands:{spell:!0,thes:!0},defaultTabCommand:"spell"}},H=function(b){var c=(new function(a){var b={};return{getCmdByTab:function(c){for(var h in a)b[a[h]]=h;return b[c]}}}(a.cmd)).getCmdByTab(CKEDITOR.config.wsc_cmd);b.selectPage(c);a.sendData(b)},x=function(){a.dialog.hidePage("Thesaurus")},
34
+ t=function(){a.dialog.hidePage("GrammTab")},l=function(){a.dialog.showPage("SpellTab")},v=function(){var b=a.dialog.getContentElement(a.dialog._.currentTabId,"bottomGroup").getElement();b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.show()},N=function(){var b=a.dialog.getContentElement(a.dialog._.currentTabId,"bottomGroup").getElement(),c=document.activeElement,e;b.setStyles({display:"block",position:"absolute",left:"-9999px"});setTimeout(function(){b.removeStyle("display");
35
+ b.removeStyle("position");b.removeStyle("left");b.hide();a.dialog._.editor.focusManager.currentActive.focusNext();e=g.misc.findFocusable(a.dialog.parts.contents);if(g.misc.hasClass(c,"cke_dialog_tab")||g.misc.hasClass(c,"cke_dialog_contents_body")||!g.misc.isVisible(c))for(var d=0,f;d<e.count();d++){if(f=e.getItem(d),g.misc.isVisible(f.$)){try{f.$.focus()}catch(h){}break}}else try{c.focus()}catch(k){}},0)},C=function(){var b=a.dialog.getContentElement(a.dialog._.currentTabId,"BlockFinishChecking").getElement(),
36
+ c=document.activeElement,e;b.setStyles({display:"block",position:"absolute",left:"-9999px"});setTimeout(function(){b.removeStyle("display");b.removeStyle("position");b.removeStyle("left");b.hide();a.dialog._.editor.focusManager.currentActive.focusNext();e=g.misc.findFocusable(a.dialog.parts.contents);if(g.misc.hasClass(c,"cke_dialog_tab")||g.misc.hasClass(c,"cke_dialog_contents_body")||!g.misc.isVisible(c))for(var d=0,f;d<e.count();d++){if(f=e.getItem(d),g.misc.isVisible(f.$)){try{f.$.focus()}catch(h){}break}}else try{c.focus()}catch(k){}},
37
+ 0)};CKEDITOR.dialog.add("checkspell",function(b){function c(a){var c=parseInt(b.config.wsc_left,10),d=parseInt(b.config.wsc_top,10),e=parseInt(b.config.wsc_width,10),g=parseInt(b.config.wsc_height,10),m=CKEDITOR.document.getWindow().getViewPaneSize();a.getPosition();var n=a.getSize(),q=0;if(!a._.resized){var q=n.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),D=n.width-a.parts.contents.getSize("width",1);if(e<f.minWidth||isNaN(e))e=
38
+ f.minWidth;e>m.width-D&&(e=m.width-D);if(g<f.minHeight||isNaN(g))g=f.minHeight;g>m.height-q&&(g=m.height-q);n.width=e+D;n.height=g+q;a._.fromResizeEvent=!1;a.resize(e,g);setTimeout(function(){a._.fromResizeEvent=!1;CKEDITOR.dialog.fire("resize",{dialog:a,width:e,height:g},b)},300)}a._.moved||(q=isNaN(c)&&isNaN(d)?0:1,isNaN(c)&&(c=(m.width-n.width)/2),0>c&&(c=0),c>m.width-n.width&&(c=m.width-n.width),isNaN(d)&&(d=(m.height-n.height)/2),0>d&&(d=0),d>m.height-n.height&&(d=m.height-n.height),a.move(c,
39
+ d,q))}function e(){b.wsc={};(function(a){var b={separator:"\x3c$\x3e",getDataType:function(a){return"undefined"===typeof a?"undefined":null===a?"null":Object.prototype.toString.call(a).slice(8,-1)},convertDataToString:function(a){return this.getDataType(a).toLowerCase()+this.separator+a},restoreDataFromString:function(a){var b=a,c;a=this.backCompatibility(a);if("string"===typeof a)switch(b=a.indexOf(this.separator),c=a.substring(0,b),b=a.substring(b+this.separator.length),c){case "boolean":b="true"===
40
+ b;break;case "number":b=parseFloat(b);break;case "array":b=""===b?[]:b.split(",");break;case "null":b=null;break;case "undefined":b=void 0}return b},backCompatibility:function(a){var b=a,c;"string"===typeof a&&(c=a.indexOf(this.separator),0>c&&(b=parseFloat(a),isNaN(b)&&("["===a[0]&&"]"===a[a.length-1]?(a=a.replace("[",""),a=a.replace("]",""),b=""===a?[]:a.split(",")):b="true"===a||"false"===a?"true"===a:a),b=this.convertDataToString(b)));return b}},c={get:function(a){return b.restoreDataFromString(window.localStorage.getItem(a))},
41
+ set:function(a,c){var d=b.convertDataToString(c);window.localStorage.setItem(a,d)},del:function(a){window.localStorage.removeItem(a)},clear:function(){window.localStorage.clear()}},d={expiration:31622400,get:function(a){return b.restoreDataFromString(this.getCookie(a))},set:function(a,c){var d=b.convertDataToString(c);this.setCookie(a,d,{expires:this.expiration})},del:function(a){this.deleteCookie(a)},getCookie:function(a){return(a=document.cookie.match(new RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,
42
+ "\\$1")+"\x3d([^;]*)")))?decodeURIComponent(a[1]):void 0},setCookie:function(a,b,c){c=c||{};var d=c.expires;if("number"===typeof d&&d){var e=new Date;e.setTime(e.getTime()+1E3*d);d=c.expires=e}d&&d.toUTCString&&(c.expires=d.toUTCString());b=encodeURIComponent(b);a=a+"\x3d"+b;for(var h in c)b=c[h],a+="; "+h,!0!==b&&(a+="\x3d"+b);document.cookie=a},deleteCookie:function(a){this.setCookie(a,null,{expires:-1})},clear:function(){for(var a=document.cookie.split(";"),b=0;b<a.length;b++){var c=a[b],d=c.indexOf("\x3d"),
43
+ c=-1<d?c.substr(0,d):c;this.deleteCookie(c)}}},e=window.localStorage?c:d;a.DataStorage={getData:function(a){return e.get(a)},setData:function(a,b){e.set(a,b)},deleteData:function(a){e.del(a)},clear:function(){e.clear()}}})(b.wsc);b.wsc.operationWithUDN=function(b,c){g.postMessage.send({message:{udn:c,id:"operationWithUDN",udnCmd:b},target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId]})};b.wsc.getLocalStorageUDN=function(){var a=b.wsc.DataStorage.getData("scayt_user_dictionary_name");
44
+ if(a)return a};b.wsc.getLocalStorageUD=function(){var a=b.wsc.DataStorage.getData("scayt_user_dictionary");if(a)return a};b.wsc.addWords=function(a,c){var d=b.config.wsc.DefaultParams.serviceHost+b.config.wsc.DefaultParams.ssrvHost+"?cmd\x3ddictionary\x26format\x3djson\x26customerid\x3d1%3AncttD3-fIoSf2-huzwE4-Y5muI2-mD0Tt-kG9Wz-UEDFC-tYu243-1Uq474-d9Z2l3\x26action\x3daddword\x26word\x3d"+a+"\x26callback\x3dtoString\x26synchronization\x3dtrue",e=document.createElement("script");e.type="text/javascript";
45
+ e.src=d;document.getElementsByTagName("head")[0].appendChild(e);e.onload=c;e.onreadystatechange=function(){"loaded"===this.readyState&&c()}};b.wsc.cgiOrigin=function(){var a=b.config.wsc.DefaultParams.serviceHost.split("/");return a[0]+"//"+a[2]};b.wsc.isSsrvSame=!1}var d=function(c){this.getElement().focus();a.div_overlay.setEnable();c=a.dialog._.currentTabId;var d=a.iframeNumber+"_"+c,e=a.textNode[c].getValue(),f=this.getElement().getAttribute("title-cmd");g.postMessage.send({message:{cmd:f,tabId:c,
46
+ new_word:e},target:a.targetFromFrame[d],id:"cmd_outer__page"});"ChangeTo"!=f&&"ChangeAll"!=f||b.fire("saveSnapshot");"FinishChecking"==f&&b.config.wsc_onFinish.call(CKEDITOR.document.getWindow().getFrame())},f={minWidth:560,minHeight:444};return{title:b.config.wsc_dialogTitle||b.lang.wsc.title,minWidth:f.minWidth,minHeight:f.minHeight,buttons:[CKEDITOR.dialog.cancelButton],onLoad:function(){a.dialog=this;x();t();l();b.plugins.scayt&&e()},onShow:function(){a.dialog=this;b.lockSelection(b.getSelection());
47
+ a.TextAreaNumber="cke_textarea_"+b.name;g.postMessage.init(G);a.dataTemp=b.getData();a.OverlayPlace=a.dialog.parts.tabs.getParent().$;if(CKEDITOR&&CKEDITOR.config){a.wsc_customerId=b.config.wsc_customerId;a.cust_dic_ids=b.config.wsc_customDictionaryIds;a.userDictionaryName=b.config.wsc_userDictionaryName;a.defaultLanguage=CKEDITOR.config.defaultLanguage;var d="file:"==document.location.protocol?"http:":document.location.protocol,d=b.config.wsc_customLoaderScript||d+"//loader.webspellchecker.net/sproxy_fck/sproxy.php?plugin\x3dfck2\x26customerid\x3d"+
48
+ a.wsc_customerId+"\x26cmd\x3dscript\x26doc\x3dwsc\x26schema\x3d22";c(this);CKEDITOR.scriptLoader.load(d,function(c){CKEDITOR.config&&CKEDITOR.config.wsc&&CKEDITOR.config.wsc.DefaultParams?(a.serverLocationHash=CKEDITOR.config.wsc.DefaultParams.serviceHost,a.logotype=CKEDITOR.config.wsc.DefaultParams.logoPath,a.loadIcon=CKEDITOR.config.wsc.DefaultParams.iconPath,a.loadIconEmptyEditor=CKEDITOR.config.wsc.DefaultParams.iconPathEmptyEditor,a.LangComparer=new CKEDITOR.config.wsc.DefaultParams._SP_FCK_LangCompare):
49
+ (a.serverLocationHash=DefaultParams.serviceHost,a.logotype=DefaultParams.logoPath,a.loadIcon=DefaultParams.iconPath,a.loadIconEmptyEditor=DefaultParams.iconPathEmptyEditor,a.LangComparer=new _SP_FCK_LangCompare);a.pluginPath=CKEDITOR.getUrl(b.plugins.wsc.path);a.iframeNumber=a.TextAreaNumber;a.templatePath=a.pluginPath+"dialogs/tmp.html";a.LangComparer.setDefaulLangCode(a.defaultLanguage);a.currentLang=b.config.wsc_lang||a.LangComparer.getSPLangCode(b.langCode)||"en_US";a.selectingLang=a.currentLang;
50
+ a.div_overlay=new B({opacity:"1",background:"#fff url("+a.loadIcon+") no-repeat 50% 50%",target:a.OverlayPlace});var d=a.dialog.parts.tabs.getId(),d=CKEDITOR.document.getById(d);d.setStyle("width","97%");d.getElementsByTag("DIV").count()||d.append(a.buildSelectLang(a.dialog.getParentEditor().name));a.div_overlay_no_check=new B({opacity:"1",id:"no_check_over",background:"#fff url("+a.loadIconEmptyEditor+") no-repeat 50% 50%",target:a.OverlayPlace});c&&(H(a.dialog),a.dialog.setupContent(a.dialog));
51
+ b.plugins.scayt&&(b.wsc.isSsrvSame=function(){var a=CKEDITOR.config.wsc.DefaultParams.serviceHost.replace("lf/22/js/../../../","").split("//")[1],c=CKEDITOR.config.wsc.DefaultParams.ssrvHost,d=b.config.scayt_srcUrl,e,h,f,g,p;window.SCAYT&&window.SCAYT.CKSCAYT&&(f=SCAYT.CKSCAYT.prototype.basePath,f.split("//"),g=f.split("//")[1].split("/")[0],p=f.split(g+"/")[1].replace("/lf/scayt3/ckscayt/","")+"/script/ssrv.cgi");!d||f||b.config.scayt_servicePath||(d.split("//"),e=d.split("//")[1].split("/")[0],
52
+ h=d.split(e+"/")[1].replace("/lf/scayt3/ckscayt/ckscayt.js","")+"/script/ssrv.cgi");return"//"+a+c==="//"+(b.config.scayt_serviceHost||g||e)+"/"+(b.config.scayt_servicePath||p||h)}());if(window.SCAYT&&b.wsc&&b.wsc.isSsrvSame){var e=b.wsc.cgiOrigin();b.wsc.syncIsDone=!1;c=function(a){a.origin===e&&(a=JSON.parse(a.data),a.ud&&"undefined"!==a.ud?b.wsc.ud=a.ud:"undefined"===a.ud&&(b.wsc.ud=void 0),a.udn&&"undefined"!==a.udn?b.wsc.udn=a.udn:"undefined"===a.udn&&(b.wsc.udn=void 0),b.wsc.syncIsDone||(h(b.wsc.ud),
53
+ b.wsc.syncIsDone=!0))};var h=function(c){c=b.wsc.getLocalStorageUD();var d;c instanceof Array&&(d=c.toString());void 0!==d&&""!==d&&setTimeout(function(){b.wsc.addWords(d,function(){H(a.dialog);a.dialog.setupContent(a.dialog)})},400)};window.addEventListener?addEventListener("message",c,!1):window.attachEvent("onmessage",c);setTimeout(function(){var a=b.wsc.getLocalStorageUDN();void 0!==a&&b.wsc.operationWithUDN("restore",a)},500)}})}else a.dialog.hide()},onHide:function(){var c=CKEDITOR.plugins.scayt,
54
+ d=b.scayt;b.unlockSelection();c&&d&&c.state[b.name]&&d.setMarkupPaused(!1);a.dataTemp="";a.sessionid="";g.postMessage.unbindHandler(G);if(b.plugins.scayt&&b.wsc&&b.wsc.isSsrvSame){var c=b.wsc.udn,e=b.wsc.ud,f,l;b.scayt?(c?(b.wsc.DataStorage.setData("scayt_user_dictionary_name",c),b.scayt.restoreUserDictionary(c)):(b.wsc.DataStorage.setData("scayt_user_dictionary_name",""),b.scayt.removeUserDictionary()),e&&setTimeout(function(){f=e.split(",");for(l=0;l<f.length;l+=1)b.scayt.addWordToUserDictionary(f[l])},
55
+ 200),e||b.wsc.DataStorage.setData("scayt_user_dictionary",[])):(c?b.wsc.DataStorage.setData("scayt_user_dictionary_name",c):b.wsc.DataStorage.setData("scayt_user_dictionary_name",""),e&&(f=e.split(","),b.wsc.DataStorage.setData("scayt_user_dictionary",f)))}},contents:[{id:"SpellTab",label:"SpellChecker",accessKey:"S",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"\x3cdiv\x3e\x3c/div\x3e"},{type:"html",id:"Content",label:"spellContent",html:"",setup:function(b){b=a.iframeNumber+"_"+
56
+ b._.currentTabId;var c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"hbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;",widths:["50%","50%"],children:[{type:"hbox",id:"leftCol",align:"left",width:"50%",children:[{type:"vbox",id:"rightCol1",widths:["50%","50%"],children:[{type:"text",id:"ChangeTo_label",label:a.LocalizationLabel.ChangeTo_label.text+":",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",width:"140px","default":"",onShow:function(){a.textNode.SpellTab=
57
+ this;a.LocalizationLabel.ChangeTo_label.instance=this},onHide:function(){this.reset()}},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"text",id:"labelSuggestions",label:a.LocalizationLabel.Suggestions.text+":",onShow:function(){a.LocalizationLabel.Suggestions.instance=this;this.getInputElement().setStyles({display:"none"})}},{type:"html",id:"logo",html:'\x3cimg width\x3d"99" height\x3d"68" border\x3d"0" src\x3d"" title\x3d"WebSpellChecker.net" alt\x3d"WebSpellChecker.net" style\x3d"display: inline-block;"\x3e',
58
+ setup:function(b){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"left"})}}]},{type:"select",id:"list_of_suggestions",labelStyle:"font: 12px/25px arial, sans-serif;",size:"6",inputStyle:"width: 140px; height: auto;",items:[["loading..."]],onShow:function(){A=this},onChange:function(){a.textNode.SpellTab.setValue(this.getValue())}}]}]}]},{type:"hbox",id:"rightCol",align:"right",width:"50%",children:[{type:"vbox",id:"rightCol_col__left",widths:["50%","50%",
59
+ "50%","50%"],children:[{type:"button",id:"ChangeTo_button",label:a.LocalizationButton.ChangeTo_button.text,title:"Change to",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","ChangeTo");a.LocalizationButton.ChangeTo_button.instance=this},onClick:d},{type:"button",id:"ChangeAll",label:a.LocalizationButton.ChangeAll.text,title:"Change All",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.ChangeAll.instance=
60
+ this},onClick:d},{type:"button",id:"AddWord",label:a.LocalizationButton.AddWord.text,title:"Add word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.AddWord.instance=this},onClick:d},{type:"button",id:"FinishChecking_button",label:a.LocalizationButton.FinishChecking_button.text,title:"Finish Checking",style:"width: 100%;margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking");a.LocalizationButton.FinishChecking_button.instance=
61
+ this},onClick:d}]},{type:"vbox",id:"rightCol_col__right",widths:["50%","50%","50%"],children:[{type:"button",id:"IgnoreWord",label:a.LocalizationButton.IgnoreWord.text,title:"Ignore word",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);a.LocalizationButton.IgnoreWord.instance=this},onClick:d},{type:"button",id:"IgnoreAllWords",label:a.LocalizationButton.IgnoreAllWords.text,title:"Ignore all words",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",
62
+ this.id);a.LocalizationButton.IgnoreAllWords.instance=this},onClick:d},{type:"button",id:"Options",label:a.LocalizationButton.Options.text,title:"Option",style:"width: 100%;",onLoad:function(){a.LocalizationButton.Options.instance=this;"file:"==document.location.protocol&&this.disable()},onClick:function(){this.getElement().focus();"file:"==document.location.protocol?alert("WSC: Options functionality is disabled when runing from file system"):(y=document.activeElement,b.openDialog("options"))}}]}]}]},
63
+ {type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},onHide:v,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",setup:function(){this.getChild()[0].getElement().$.src=a.logotype;this.getChild()[0].getElement().getParent().setStyles({"text-align":"center"})},children:[{type:"html",id:"logo",html:'\x3cimg width\x3d"99" height\x3d"68" border\x3d"0" src\x3d"" title\x3d"WebSpellChecker.net" alt\x3d"WebSpellChecker.net" style\x3d"display: inline-block;"\x3e'}]}]},
48
64
  {type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"Option_button",label:a.LocalizationButton.Options.text,title:"Option",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id);"file:"==document.location.protocol&&this.disable()},onClick:function(){this.getElement().focus();"file:"==document.location.protocol?alert("WSC: Options functionality is disabled when runing from file system"):
49
- (p=document.activeElement,b.openDialog("options"))}},{type:"button",id:"FinishChecking",label:a.LocalizationButton.FinishChecking.text,title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]}]},{id:"GrammTab",label:"Grammar",accessKey:"G",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"<div></div>"},{type:"html",id:"Content",label:"GrammarContent",html:"",setup:function(){var b=a.iframeNumber+"_"+a.dialog._.currentTabId,
50
- c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"vbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;",children:[{type:"hbox",id:"leftCol",widths:["66%","34%"],children:[{type:"vbox",children:[{type:"text",id:"text",label:"Change to:",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",inputStyle:"float: right; width: 200px;","default":"",onShow:function(){a.textNode.GrammTab=this},onHide:function(){this.reset()}},{type:"html",id:"html_text",html:"<div style='min-height: 17px; line-height: 17px; padding: 5px; text-align: left;background: #F1F1F1;color: #595959; white-space: normal!important;'></div>",
51
- onShow:function(){a.textNodeInfo.GrammTab=this}},{type:"html",id:"radio",html:"",onShow:function(){a.grammerSuggest=this}}]},{type:"vbox",children:[{type:"button",id:"ChangeTo",label:"Change to",title:"Change to",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c},{type:"button",id:"IgnoreWord",label:"Ignore word",title:"Ignore word",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},
52
- onClick:c},{type:"button",id:"IgnoreAllWords",label:"Ignore Problem",title:"Ignore Problem",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c},{type:"button",id:"FinishChecking",label:"Finish Checking",title:"Finish Checking",style:"width: 133px; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",
53
- widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},onHide:l,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:'<img width="99" height="68" border="0" src="" title="WebSpellChecker.net" alt="WebSpellChecker.net" style="display: inline-block;">',setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},
54
- {type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"FinishChecking",label:"Finish Checking",title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]}]},{id:"Thesaurus",label:"Thesaurus",accessKey:"T",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"<div></div>"},{type:"html",id:"Content",label:"spellContent",html:"",setup:function(){var b=
55
- a.iframeNumber+"_"+a.dialog._.currentTabId,c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"vbox",id:"bottomGroup",style:"width:560px; margin: -10px auto; overflow: hidden;",children:[{type:"hbox",widths:["75%","25%"],children:[{type:"vbox",children:[{type:"hbox",widths:["65%","35%"],children:[{type:"text",id:"ChangeTo",label:"Change to:",labelLayout:"horizontal",inputStyle:"width: 160px;",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onShow:function(){a.textNode.Thesaurus=
56
- this},onHide:function(){this.reset()}},{type:"button",id:"ChangeTo",label:"Change to",title:"Change to",style:"width: 121px; margin-top: 1px;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]},{type:"hbox",children:[{type:"select",id:"categories",label:"Categories:",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",items:[],onShow:function(){a.selectNode.categories=this},onChange:function(){a.buildOptionSynonyms(this.getValue())}},
57
- {type:"select",id:"synonyms",label:"Synonyms:",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",items:[],onShow:function(){a.selectNode.synonyms=this;a.textNode.Thesaurus.setValue(this.getValue())},onChange:function(){a.textNode.Thesaurus.setValue(this.getValue())}}]}]},{type:"vbox",width:"120px",style:"margin-top:46px;",children:[{type:"html",id:"logotype",label:"WebSpellChecker.net",html:'<img width="99" height="68" border="0" src="" title="WebSpellChecker.net" alt="WebSpellChecker.net" style="display: inline-block;">',
58
- setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}},{type:"button",id:"FinishChecking",label:"Finish Checking",title:"Finish Checking",style:"width: 121px; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",
59
- position:"absolute",left:"-9999px"})},children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:'<img width="99" height="68" border="0" src="" title="WebSpellChecker.net" alt="WebSpellChecker.net" style="display: inline-block;">',setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",
60
- id:"rightCol_col__left",children:[{type:"button",id:"FinishChecking",label:"Finish Checking",title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:c}]}]}]}]}]}});var p=null;CKEDITOR.dialog.add("options",function(){var b=null,c={},d={},f=null,g=null;e.cookie.get("udn");e.cookie.get("osp");var h=function(){g=this.getElement().getAttribute("title-cmd");var a=[];a[0]=d.IgnoreAllCapsWords;a[1]=d.IgnoreWordsNumbers;a[2]=d.IgnoreMixedCaseWords;
61
- a[3]=d.IgnoreDomainNames;a=a.toString().replace(/,/g,"");e.cookie.set("osp",a);e.cookie.set("udnCmd",g?g:"ignore");"delete"!=g&&(a="",""!==j.getValue()&&(a=j.getValue()),e.cookie.set("udn",a));e.postMessage.send({id:"options_dic_send"})},i=function(){f.getElement().setHtml(a.LocalizationComing.error);f.getElement().show()};return{title:a.LocalizationComing.Options,minWidth:430,minHeight:130,resizable:CKEDITOR.DIALOG_RESIZE_NONE,contents:[{id:"OptionsTab",label:"Options",accessKey:"O",elements:[{type:"hbox",
62
- id:"options_error",children:[{type:"html",style:"display: block;text-align: center;white-space: normal!important; font-size: 12px;color:red",html:"<div></div>",onShow:function(){f=this}}]},{type:"vbox",id:"Options_content",children:[{type:"hbox",id:"Options_manager",widths:["52%","48%"],children:[{type:"fieldset",label:"Spell Checking Options",style:"border: none;margin-top: 13px;padding: 10px 0 10px 10px",onShow:function(){this.getInputElement().$.children[0].innerHTML=a.LocalizationComing.SpellCheckingOptions},
63
- children:[{type:"vbox",id:"Options_checkbox",children:[{type:"checkbox",id:"IgnoreAllCapsWords",label:"Ignore All-Caps Words",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=!this.getValue()?0:1}},{type:"checkbox",id:"IgnoreWordsNumbers",label:"Ignore Words with Numbers",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",
64
- style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=!this.getValue()?0:1}},{type:"checkbox",id:"IgnoreMixedCaseWords",label:"Ignore Mixed-Case Words",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=!this.getValue()?0:1}},{type:"checkbox",id:"IgnoreDomainNames",label:"Ignore Domain Names",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",
65
- style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=!this.getValue()?0:1}}]}]},{type:"vbox",id:"Options_DictionaryName",children:[{type:"text",id:"DictionaryName",style:"margin-bottom: 10px",label:"Dictionary Name:",labelLayout:"vertical",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onLoad:function(){j=this;this.setValue(a.userDictionaryName?a.userDictionaryName:(e.cookie.get("udn"),this.getValue()))},onShow:function(){j=this;this.setValue(!e.cookie.get("udn")?
66
- this.getValue():e.cookie.get("udn"));this.setLabel(a.LocalizationComing.DictionaryName)},onHide:function(){this.reset()}},{type:"hbox",id:"Options_buttons",children:[{type:"vbox",id:"Options_leftCol_col",widths:["50%","50%"],children:[{type:"button",id:"create",label:"Create",title:"Create",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Create)},onClick:h},
67
- {type:"button",id:"restore",label:"Restore",title:"Restore",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Restore)},onClick:h}]},{type:"vbox",id:"Options_rightCol_col",widths:["50%","50%"],children:[{type:"button",id:"rename",label:"Rename",title:"Rename",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||
68
- this.getElement()).setText(a.LocalizationComing.Rename)},onClick:h},{type:"button",id:"delete",label:"Remove",title:"Remove",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Remove)},onClick:h}]}]}]}]},{type:"hbox",id:"Options_text",children:[{type:"html",style:"text-align: justify;margin-top: 15px;white-space: normal!important; font-size: 12px;color:#777;",html:"<div>"+
69
- a.LocalizationComing.OptionsTextIntro+"</div>",onShow:function(){this.getElement().setText(a.LocalizationComing.OptionsTextIntro)}}]}]}]}],buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton],onOk:function(){var a=[];a[0]=d.IgnoreAllCapsWords;a[1]=d.IgnoreWordsNumbers;a[2]=d.IgnoreMixedCaseWords;a[3]=d.IgnoreDomainNames;a=a.toString().replace(/,/g,"");e.cookie.set("osp",a);e.cookie.set("udn",j.getValue());e.postMessage.send({id:"options_checkbox_send"});f.getElement().hide();f.getElement().setHtml(" ")},
70
- onLoad:function(){b=this;c.IgnoreAllCapsWords=b.getContentElement("OptionsTab","IgnoreAllCapsWords");c.IgnoreWordsNumbers=b.getContentElement("OptionsTab","IgnoreWordsNumbers");c.IgnoreMixedCaseWords=b.getContentElement("OptionsTab","IgnoreMixedCaseWords");c.IgnoreDomainNames=b.getContentElement("OptionsTab","IgnoreDomainNames")},onShow:function(){e.postMessage.init(i);var b=e.cookie.get("osp").split("");d.IgnoreAllCapsWords=b[0];d.IgnoreWordsNumbers=b[1];d.IgnoreMixedCaseWords=b[2];d.IgnoreDomainNames=
71
- b[3];!parseInt(d.IgnoreAllCapsWords,10)?c.IgnoreAllCapsWords.setValue("",!1):c.IgnoreAllCapsWords.setValue("checked",!1);!parseInt(d.IgnoreWordsNumbers,10)?c.IgnoreWordsNumbers.setValue("",!1):c.IgnoreWordsNumbers.setValue("checked",!1);!parseInt(d.IgnoreMixedCaseWords,10)?c.IgnoreMixedCaseWords.setValue("",!1):c.IgnoreMixedCaseWords.setValue("checked",!1);!parseInt(d.IgnoreDomainNames,10)?c.IgnoreDomainNames.setValue("",!1):c.IgnoreDomainNames.setValue("checked",!1);d.IgnoreAllCapsWords=!c.IgnoreAllCapsWords.getValue()?
72
- 0:1;d.IgnoreWordsNumbers=!c.IgnoreWordsNumbers.getValue()?0:1;d.IgnoreMixedCaseWords=!c.IgnoreMixedCaseWords.getValue()?0:1;d.IgnoreDomainNames=!c.IgnoreDomainNames.getValue()?0:1;c.IgnoreAllCapsWords.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreAllCapsWords;c.IgnoreWordsNumbers.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreWordsWithNumbers;c.IgnoreMixedCaseWords.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreMixedCaseWords;c.IgnoreDomainNames.getElement().$.lastChild.innerHTML=
73
- a.LocalizationComing.IgnoreDomainNames},onHide:function(){e.postMessage.unbindHandler(i);if(p)try{p.focus()}catch(a){}}}});CKEDITOR.dialog.on("resize",function(b){var b=b.data,c=b.dialog,d=CKEDITOR.document.getById(a.iframeNumber+"_"+c._.currentTabId);"checkspell"==c._.name&&(a.bnr?d&&d.setSize("height",b.height-310):d&&d.setSize("height",b.height-220))});CKEDITOR.on("dialogDefinition",function(b){if("checkspell"===b.data.name){var c=b.data.definition;a.onLoadOverlay=new s({opacity:"1",background:"#fff",
74
- target:c.dialog.parts.tabs.getParent().$});a.onLoadOverlay.setEnable();c.dialog.on("cancel",function(){c.dialog.getParentEditor().config.wsc_onClose.call(this.document.getWindow().getFrame());a.div_overlay.setDisable();a.onLoadOverlay.setDisable();return!1},this,null,-1)}})})();
65
+ (y=document.activeElement,b.openDialog("options"))}},{type:"button",id:"FinishChecking_button_block",label:a.LocalizationButton.FinishChecking_button_block.text,title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:d}]}]}]}]},{id:"GrammTab",label:"Grammar",accessKey:"G",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"\x3cdiv\x3e\x3c/div\x3e"},{type:"html",id:"Content",label:"GrammarContent",html:"",setup:function(){var b=
66
+ a.iframeNumber+"_"+a.dialog._.currentTabId,c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"vbox",id:"bottomGroup",style:"width:560px; margin: 0 auto;",children:[{type:"hbox",id:"leftCol",widths:["66%","34%"],children:[{type:"vbox",children:[{type:"text",id:"text",label:"Change to:",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",inputStyle:"float: right; width: 200px;","default":"",onShow:function(){a.textNode.GrammTab=this},onHide:function(){this.reset()}},
67
+ {type:"html",id:"html_text",html:"\x3cdiv style\x3d'min-height: 17px; line-height: 17px; padding: 5px; text-align: left;background: #F1F1F1;color: #595959; white-space: normal!important;'\x3e\x3c/div\x3e",onShow:function(b){a.textNodeInfo.GrammTab=this}},{type:"html",id:"radio",html:"",onShow:function(){a.grammerSuggest=this}}]},{type:"vbox",children:[{type:"button",id:"ChangeTo_button",label:"Change to",title:"Change to",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",
68
+ "ChangeTo")},onClick:d},{type:"button",id:"IgnoreWord",label:"Ignore word",title:"Ignore word",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:d},{type:"button",id:"IgnoreAllWords",label:"Ignore Problem",title:"Ignore Problem",style:"width: 133px; float: right;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onClick:d},{type:"button",id:"FinishChecking_button",label:a.LocalizationButton.FinishChecking_button.text,
69
+ title:"Finish Checking",style:"width: 133px; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:d}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},onHide:v,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",
70
+ id:"logo",html:'\x3cimg width\x3d"99" height\x3d"68" border\x3d"0" src\x3d"" title\x3d"WebSpellChecker.net" alt\x3d"WebSpellChecker.net" style\x3d"display: inline-block;"\x3e',setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"FinishChecking_button_block",label:a.LocalizationButton.FinishChecking_button_block.text,
71
+ title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:d}]}]}]}]},{id:"Thesaurus",label:"Thesaurus",accessKey:"T",elements:[{type:"html",id:"banner",label:"banner",style:"",html:"\x3cdiv\x3e\x3c/div\x3e"},{type:"html",id:"Content",label:"spellContent",html:"",setup:function(){var b=a.iframeNumber+"_"+a.dialog._.currentTabId,c=document.getElementById(b);a.targetFromFrame[b]=c.contentWindow}},{type:"vbox",id:"bottomGroup",
72
+ style:"width:560px; margin: -10px auto; overflow: hidden;",children:[{type:"hbox",widths:["75%","25%"],children:[{type:"vbox",children:[{type:"hbox",widths:["65%","35%"],children:[{type:"text",id:"ChangeTo_label",label:a.LocalizationLabel.ChangeTo_label.text+":",labelLayout:"horizontal",inputStyle:"width: 160px;",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onShow:function(b){a.textNode.Thesaurus=this;a.LocalizationLabel.ChangeTo_label.instance=this},onHide:function(){this.reset()}},
73
+ {type:"button",id:"ChangeTo_button",label:a.LocalizationButton.ChangeTo_button.text,title:"Change to",style:"width: 121px; margin-top: 1px;",onLoad:function(){this.getElement().setAttribute("title-cmd","ChangeTo");a.LocalizationButton.ChangeTo_button.instance=this},onClick:d}]},{type:"hbox",children:[{type:"select",id:"Categories",label:a.LocalizationLabel.Categories.text+":",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",items:[],onShow:function(){a.selectNode.Categories=
74
+ this;a.LocalizationLabel.Categories.instance=this},onChange:function(){a.buildOptionSynonyms(this.getValue())}},{type:"select",id:"Synonyms",label:a.LocalizationLabel.Synonyms.text+":",labelStyle:"font: 12px/25px arial, sans-serif;",size:"5",inputStyle:"width: 180px; height: auto;",items:[],onShow:function(){a.selectNode.Synonyms=this;a.textNode.Thesaurus.setValue(this.getValue());a.LocalizationLabel.Synonyms.instance=this},onChange:function(b){a.textNode.Thesaurus.setValue(this.getValue())}}]}]},
75
+ {type:"vbox",width:"120px",style:"margin-top:46px;",children:[{type:"html",id:"logotype",label:"WebSpellChecker.net",html:'\x3cimg width\x3d"99" height\x3d"68" border\x3d"0" src\x3d"" title\x3d"WebSpellChecker.net" alt\x3d"WebSpellChecker.net" style\x3d"display: inline-block;"\x3e',setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}},{type:"button",id:"FinishChecking_button",label:a.LocalizationButton.FinishChecking_button.text,title:"Finish Checking",
76
+ style:"width: 100%; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:d}]}]}]},{type:"hbox",id:"BlockFinishChecking",style:"width:560px; margin: 0 auto;",widths:["70%","30%"],onShow:function(){this.getElement().setStyles({display:"block",position:"absolute",left:"-9999px"})},children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:'\x3cimg width\x3d"99" height\x3d"68" border\x3d"0" src\x3d"" title\x3d"WebSpellChecker.net" alt\x3d"WebSpellChecker.net" style\x3d"display: inline-block;"\x3e',
77
+ setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}}]}]},{type:"hbox",id:"rightCol",align:"right",width:"30%",children:[{type:"vbox",id:"rightCol_col__left",children:[{type:"button",id:"FinishChecking_button_block",label:a.LocalizationButton.FinishChecking_button_block.text,title:"Finish Checking",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:d}]}]}]}]}]}});var y=null;CKEDITOR.dialog.add("options",
78
+ function(b){var c=null,e={},d={},f=null,h=null;g.cookie.get("udn");g.cookie.get("osp");b=function(a){h=this.getElement().getAttribute("title-cmd");a=[];a[0]=d.IgnoreAllCapsWords;a[1]=d.IgnoreWordsNumbers;a[2]=d.IgnoreMixedCaseWords;a[3]=d.IgnoreDomainNames;a=a.toString().replace(/,/g,"");g.cookie.set("osp",a);g.cookie.set("udnCmd",h?h:"ignore");"delete"!=h&&(a="",""!==r.getValue()&&(a=r.getValue()),g.cookie.set("udn",a));g.postMessage.send({id:"options_dic_send"})};var k=function(){f.getElement().setHtml(a.LocalizationComing.error);
79
+ f.getElement().show()};return{title:a.LocalizationComing.Options,minWidth:430,minHeight:130,resizable:CKEDITOR.DIALOG_RESIZE_NONE,contents:[{id:"OptionsTab",label:"Options",accessKey:"O",elements:[{type:"hbox",id:"options_error",children:[{type:"html",style:"display: block;text-align: center;white-space: normal!important; font-size: 12px;color:red",html:"\x3cdiv\x3e\x3c/div\x3e",onShow:function(){f=this}}]},{type:"vbox",id:"Options_content",children:[{type:"hbox",id:"Options_manager",widths:["52%",
80
+ "48%"],children:[{type:"fieldset",label:"Spell Checking Options",style:"border: none;margin-top: 13px;padding: 10px 0 10px 10px",onShow:function(){this.getInputElement().$.children[0].innerHTML=a.LocalizationComing.SpellCheckingOptions},children:[{type:"vbox",id:"Options_checkbox",children:[{type:"checkbox",id:"IgnoreAllCapsWords",label:"Ignore All-Caps Words",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;",
81
+ "default":"",onClick:function(){d[this.id]=this.getValue()?1:0}},{type:"checkbox",id:"IgnoreWordsNumbers",label:"Ignore Words with Numbers",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=this.getValue()?1:0}},{type:"checkbox",id:"IgnoreMixedCaseWords",label:"Ignore Mixed-Case Words",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",
82
+ style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=this.getValue()?1:0}},{type:"checkbox",id:"IgnoreDomainNames",label:"Ignore Domain Names",labelStyle:"margin-left: 5px; font: 12px/16px arial, sans-serif;display: inline-block;white-space: normal;",style:"float:left; min-height: 16px;","default":"",onClick:function(){d[this.id]=this.getValue()?1:0}}]}]},{type:"vbox",id:"Options_DictionaryName",children:[{type:"text",id:"DictionaryName",style:"margin-bottom: 10px",label:"Dictionary Name:",
83
+ labelLayout:"vertical",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onLoad:function(){r=this;var b=a.userDictionaryName?a.userDictionaryName:(g.cookie.get("udn"),this.getValue());this.setValue(b)},onShow:function(){r=this;var b=g.cookie.get("udn")?g.cookie.get("udn"):this.getValue();this.setValue(b);this.setLabel(a.LocalizationComing.DictionaryName)},onHide:function(){this.reset()}},{type:"hbox",id:"Options_buttons",children:[{type:"vbox",id:"Options_leftCol_col",widths:["50%","50%"],
84
+ children:[{type:"button",id:"create",label:"Create",title:"Create",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Create)},onClick:b},{type:"button",id:"restore",label:"Restore",title:"Restore",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Restore)},
85
+ onClick:b}]},{type:"vbox",id:"Options_rightCol_col",widths:["50%","50%"],children:[{type:"button",id:"rename",label:"Rename",title:"Rename",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||this.getElement()).setText(a.LocalizationComing.Rename)},onClick:b},{type:"button",id:"delete",label:"Remove",title:"Remove",style:"width: 100%;",onLoad:function(){this.getElement().setAttribute("title-cmd",this.id)},onShow:function(){(this.getElement().getFirst()||
86
+ this.getElement()).setText(a.LocalizationComing.Remove)},onClick:b}]}]}]}]},{type:"hbox",id:"Options_text",children:[{type:"html",style:"text-align: justify;margin-top: 15px;white-space: normal!important; font-size: 12px;color:#777;",html:"\x3cdiv\x3e"+a.LocalizationComing.OptionsTextIntro+"\x3c/div\x3e",onShow:function(){this.getElement().setText(a.LocalizationComing.OptionsTextIntro)}}]}]}]}],buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton],onOk:function(){var a=[];a[0]=d.IgnoreAllCapsWords;
87
+ a[1]=d.IgnoreWordsNumbers;a[2]=d.IgnoreMixedCaseWords;a[3]=d.IgnoreDomainNames;a=a.toString().replace(/,/g,"");g.cookie.set("osp",a);g.postMessage.send({id:"options_checkbox_send"});f.getElement().hide();f.getElement().setHtml(" ")},onLoad:function(){c=this;e.IgnoreAllCapsWords=c.getContentElement("OptionsTab","IgnoreAllCapsWords");e.IgnoreWordsNumbers=c.getContentElement("OptionsTab","IgnoreWordsNumbers");e.IgnoreMixedCaseWords=c.getContentElement("OptionsTab","IgnoreMixedCaseWords");e.IgnoreDomainNames=
88
+ c.getContentElement("OptionsTab","IgnoreDomainNames")},onShow:function(){g.postMessage.init(k);var b=g.cookie.get("osp").split("");d.IgnoreAllCapsWords=b[0];d.IgnoreWordsNumbers=b[1];d.IgnoreMixedCaseWords=b[2];d.IgnoreDomainNames=b[3];parseInt(d.IgnoreAllCapsWords,10)?e.IgnoreAllCapsWords.setValue("checked",!1):e.IgnoreAllCapsWords.setValue("",!1);parseInt(d.IgnoreWordsNumbers,10)?e.IgnoreWordsNumbers.setValue("checked",!1):e.IgnoreWordsNumbers.setValue("",!1);parseInt(d.IgnoreMixedCaseWords,10)?
89
+ e.IgnoreMixedCaseWords.setValue("checked",!1):e.IgnoreMixedCaseWords.setValue("",!1);parseInt(d.IgnoreDomainNames,10)?e.IgnoreDomainNames.setValue("checked",!1):e.IgnoreDomainNames.setValue("",!1);d.IgnoreAllCapsWords=e.IgnoreAllCapsWords.getValue()?1:0;d.IgnoreWordsNumbers=e.IgnoreWordsNumbers.getValue()?1:0;d.IgnoreMixedCaseWords=e.IgnoreMixedCaseWords.getValue()?1:0;d.IgnoreDomainNames=e.IgnoreDomainNames.getValue()?1:0;e.IgnoreAllCapsWords.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreAllCapsWords;
90
+ e.IgnoreWordsNumbers.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreWordsWithNumbers;e.IgnoreMixedCaseWords.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreMixedCaseWords;e.IgnoreDomainNames.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreDomainNames},onHide:function(){g.postMessage.unbindHandler(k);if(y)try{y.focus()}catch(a){}}}});CKEDITOR.dialog.on("resize",function(b){b=b.data;var c=b.dialog,e=CKEDITOR.document.getById(a.iframeNumber+"_"+c._.currentTabId);
91
+ "checkspell"==c._.name&&(a.bnr?e&&e.setSize("height",b.height-310):e&&e.setSize("height",b.height-220),c._.fromResizeEvent&&!c._.resized&&(c._.resized=!0),c._.fromResizeEvent=!0)});CKEDITOR.on("dialogDefinition",function(b){if("checkspell"===b.data.name){var c=b.data.definition;a.onLoadOverlay=new B({opacity:"1",background:"#fff",target:c.dialog.parts.tabs.getParent().$});a.onLoadOverlay.setEnable();c.dialog.on("cancel",function(b){c.dialog.getParentEditor().config.wsc_onClose.call(this.document.getWindow().getFrame());
92
+ a.div_overlay.setDisable();a.onLoadOverlay.setDisable();return!1},this,null,-1)}})})();
@@ -1,11 +1,11 @@
1
1
  /*
2
- Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
- CKEDITOR.dialog.add("checkspell",function(a){function c(a,c){var d=0;return function(){"function"==typeof window.doSpell?("undefined"!=typeof e&&window.clearInterval(e),j(a)):180==d++&&window._cancelOnError(c)}}function j(c){var f=new window._SP_FCK_LangCompare,b=CKEDITOR.getUrl(a.plugins.wsc.path+"dialogs/"),e=b+"tmpFrameset.html";window.gFCKPluginName="wsc";f.setDefaulLangCode(a.config.defaultLanguage);window.doSpell({ctrl:g,lang:a.config.wsc_lang||f.getSPLangCode(a.langCode),intLang:a.config.wsc_uiLang||
5
+ CKEDITOR.dialog.add("checkspell",function(a){function c(a,c){var d=0;return function(){"function"==typeof window.doSpell?("undefined"!=typeof e&&window.clearInterval(e),l(a)):180==d++&&window._cancelOnError(c)}}function l(c){var f=new window._SP_FCK_LangCompare,b=CKEDITOR.getUrl(a.plugins.wsc.path+"dialogs/"),e=b+"tmpFrameset.html";window.gFCKPluginName="wsc";f.setDefaulLangCode(a.config.defaultLanguage);window.doSpell({ctrl:g,lang:a.config.wsc_lang||f.getSPLangCode(a.langCode),intLang:a.config.wsc_uiLang||
6
6
  f.getSPLangCode(a.langCode),winType:d,onCancel:function(){c.hide()},onFinish:function(b){a.focus();c.getParentEditor().setData(b.value);c.hide()},staticFrame:e,framesetPath:e,iframePath:b+"ciframe.html",schemaURI:b+"wsc.css",userDictionaryName:a.config.wsc_userDictionaryName,customDictionaryName:a.config.wsc_customDictionaryIds&&a.config.wsc_customDictionaryIds.split(","),domainName:a.config.wsc_domainName});CKEDITOR.document.getById(h).setStyle("display","none");CKEDITOR.document.getById(d).setStyle("display",
7
- "block")}var b=CKEDITOR.tools.getNextNumber(),d="cke_frame_"+b,g="cke_data_"+b,h="cke_error_"+b,e,b=document.location.protocol||"http:",i=a.lang.wsc.notAvailable,k='<textarea style="display: none" id="'+g+'" rows="10" cols="40"> </textarea><div id="'+h+'" style="display:none;color:red;font-size:16px;font-weight:bold;padding-top:160px;text-align:center;z-index:11;"></div><iframe src="" style="width:100%;background-color:#f1f1e3;" frameborder="0" name="'+d+'" id="'+d+'" allowtransparency="1"></iframe>',
8
- l=a.config.wsc_customLoaderScript||b+"//loader.webspellchecker.net/sproxy_fck/sproxy.php?plugin=fck2&customerid="+a.config.wsc_customerId+"&cmd=script&doc=wsc&schema=22";a.config.wsc_customLoaderScript&&(i+='<p style="color:#000;font-size:11px;font-weight: normal;text-align:center;padding-top:10px">'+a.lang.wsc.errorLoading.replace(/%s/g,a.config.wsc_customLoaderScript)+"</p>");window._cancelOnError=function(c){if("undefined"==typeof window.WSC_Error){CKEDITOR.document.getById(d).setStyle("display",
9
- "none");var b=CKEDITOR.document.getById(h);b.setStyle("display","block");b.setHtml(c||a.lang.wsc.notAvailable)}};return{title:a.config.wsc_dialogTitle||a.lang.wsc.title,minWidth:485,minHeight:380,buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var b=this.getContentElement("general","content").getElement();b.setHtml(k);b.getChild(2).setStyle("height",this._.contentSize.height+"px");"function"!=typeof window.doSpell&&CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",
10
- {attributes:{type:"text/javascript",src:l}}));b=a.getData();CKEDITOR.document.getById(g).setValue(b);e=window.setInterval(c(this,i),250)},onHide:function(){window.ooo=void 0;window.int_framsetLoaded=void 0;window.framesetLoaded=void 0;window.is_window_opened=!1},contents:[{id:"general",label:a.config.wsc_dialogTitle||a.lang.wsc.title,padding:0,elements:[{type:"html",id:"content",html:""}]}]}});
11
- CKEDITOR.dialog.on("resize",function(a){var a=a.data,c=a.dialog;"checkspell"==c._.name&&((c=(c=c.getContentElement("general","content").getElement())&&c.getChild(2))&&c.setSize("height",a.height),c&&c.setSize("width",a.width))});
7
+ "block")}var b=CKEDITOR.tools.getNextNumber(),d="cke_frame_"+b,g="cke_data_"+b,h="cke_error_"+b,e,b=document.location.protocol||"http:",k=a.lang.wsc.notAvailable,m='\x3ctextarea style\x3d"display: none" id\x3d"'+g+'" rows\x3d"10" cols\x3d"40"\x3e \x3c/textarea\x3e\x3cdiv id\x3d"'+h+'" style\x3d"display:none;color:red;font-size:16px;font-weight:bold;padding-top:160px;text-align:center;z-index:11;"\x3e\x3c/div\x3e\x3ciframe src\x3d"" style\x3d"width:100%;background-color:#f1f1e3;" frameborder\x3d"0" name\x3d"'+
8
+ d+'" id\x3d"'+d+'" allowtransparency\x3d"1"\x3e\x3c/iframe\x3e',n=a.config.wsc_customLoaderScript||b+"//loader.webspellchecker.net/sproxy_fck/sproxy.php?plugin\x3dfck2\x26customerid\x3d"+a.config.wsc_customerId+"\x26cmd\x3dscript\x26doc\x3dwsc\x26schema\x3d22";a.config.wsc_customLoaderScript&&(k+='\x3cp style\x3d"color:#000;font-size:11px;font-weight: normal;text-align:center;padding-top:10px"\x3e'+a.lang.wsc.errorLoading.replace(/%s/g,a.config.wsc_customLoaderScript)+"\x3c/p\x3e");window._cancelOnError=
9
+ function(c){if("undefined"==typeof window.WSC_Error){CKEDITOR.document.getById(d).setStyle("display","none");var b=CKEDITOR.document.getById(h);b.setStyle("display","block");b.setHtml(c||a.lang.wsc.notAvailable)}};return{title:a.config.wsc_dialogTitle||a.lang.wsc.title,minWidth:485,minHeight:380,buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var b=this.getContentElement("general","content").getElement();b.setHtml(m);b.getChild(2).setStyle("height",this._.contentSize.height+"px");"function"!=
10
+ typeof window.doSpell&&CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",src:n}}));b=a.getData();CKEDITOR.document.getById(g).setValue(b);e=window.setInterval(c(this,k),250)},onHide:function(){window.ooo=void 0;window.int_framsetLoaded=void 0;window.framesetLoaded=void 0;window.is_window_opened=!1},contents:[{id:"general",label:a.config.wsc_dialogTitle||a.lang.wsc.title,padding:0,elements:[{type:"html",id:"content",html:""}]}]}});
11
+ CKEDITOR.dialog.on("resize",function(a){a=a.data;var c=a.dialog;"checkspell"==c._.name&&((c=(c=c.getContentElement("general","content").getElement())&&c.getChild(2))&&c.setSize("height",a.height),c&&c.setSize("width",a.width))});
@@ -19,5 +19,5 @@ CKEDITOR.plugins.setLang('youtube', 'ru', {
19
19
  noHeight : 'Вы должны указать высоту',
20
20
  invalidHeight : 'Укажите правильную высоту',
21
21
  invalidTime : 'Укажите правильное время начала',
22
- txtResponsive : 'Responsive video'
22
+ txtResponsive : 'Растягиваемое видео'
23
23
  });
@@ -1,388 +1,388 @@
1
- /*
2
- * Youtube Embed Plugin
3
- *
4
- * @author Jonnas Fonini <contato@fonini.net>
5
- * @version 2.0.0
6
- */
7
- ( function() {
8
- CKEDITOR.plugins.add( 'youtube',
9
- {
10
- lang: [ 'en', 'pt', 'ja', 'hu', 'it', 'fr', 'tr', 'ru', 'de', 'ar', 'nl', 'pl', 'vi', 'zh', 'el'],
11
- init: function( editor )
12
- {
13
- editor.addCommand( 'youtube', new CKEDITOR.dialogCommand( 'youtube', {
14
- allowedContent: 'iframe[!width,!height,!src,!frameborder,!allowfullscreen]; object param[*]'
15
- }));
16
-
17
- editor.ui.addButton( 'Youtube',
18
- {
19
- label : editor.lang.youtube.button,
20
- toolbar : 'insert',
21
- command : 'youtube',
22
- icon : this.path + 'images/icon.png'
23
- });
24
-
25
- CKEDITOR.dialog.add( 'youtube', function ( instance )
26
- {
27
- var video;
28
-
29
- return {
30
- title : editor.lang.youtube.title,
31
- minWidth : 500,
32
- minHeight : 200,
33
- contents :
34
- [{
35
- id : 'youtubePlugin',
36
- expand : true,
37
- elements :
38
- [{
39
- id : 'txtEmbed',
40
- type : 'textarea',
41
- label : editor.lang.youtube.txtEmbed,
42
- autofocus : 'autofocus',
43
- onChange : function ( api )
44
- {
45
- handleEmbedChange( this, api );
46
- },
47
- onKeyUp : function ( api )
48
- {
49
- handleEmbedChange( this, api );
50
- },
51
- validate : function ()
52
- {
53
- if ( this.isEnabled() )
54
- {
55
- if ( !this.getValue() )
56
- {
57
- alert( editor.lang.youtube.noCode );
58
- return false;
59
- }
60
- else
61
- if ( this.getValue().length === 0 || this.getValue().indexOf( '//' ) === -1 )
62
- {
63
- alert( editor.lang.youtube.invalidEmbed );
64
- return false;
65
- }
66
- }
67
- }
68
- },
69
- {
70
- type : 'html',
71
- html : editor.lang.youtube.or + '<hr>'
72
- },
73
- {
74
- type : 'hbox',
75
- widths : [ '70%', '15%', '15%' ],
76
- children :
77
- [
78
- {
79
- id : 'txtUrl',
80
- type : 'text',
81
- label : editor.lang.youtube.txtUrl,
82
- onChange : function ( api )
83
- {
84
- handleLinkChange( this, api );
85
- },
86
- onKeyUp : function ( api )
87
- {
88
- handleLinkChange( this, api );
89
- },
90
- validate : function ()
91
- {
92
- if ( this.isEnabled() )
93
- {
94
- if ( !this.getValue() )
95
- {
96
- alert( editor.lang.youtube.noCode );
97
- return false;
98
- }
99
- else{
100
- video = ytVidId(this.getValue());
101
-
102
- if ( this.getValue().length === 0 || video === false)
103
- {
104
- alert( editor.lang.youtube.invalidUrl );
105
- return false;
106
- }
107
- }
108
- }
109
- }
110
- },
111
- {
112
- type : 'text',
113
- id : 'txtWidth',
114
- width : '60px',
115
- label : editor.lang.youtube.txtWidth,
116
- 'default' : editor.config.youtube_width != null ? editor.config.youtube_width : '640',
117
- validate : function ()
118
- {
119
- if ( this.getValue() )
120
- {
121
- var width = parseInt ( this.getValue() ) || 0;
122
-
123
- if ( width === 0 )
124
- {
125
- alert( editor.lang.youtube.invalidWidth );
126
- return false;
127
- }
128
- }
129
- else {
130
- alert( editor.lang.youtube.noWidth );
131
- return false;
132
- }
133
- }
134
- },
135
- {
136
- type : 'text',
137
- id : 'txtHeight',
138
- width : '60px',
139
- label : editor.lang.youtube.txtHeight,
140
- 'default' : editor.config.youtube_height != null ? editor.config.youtube_height : '360',
141
- validate : function ()
142
- {
143
- if ( this.getValue() )
144
- {
145
- var height = parseInt ( this.getValue() ) || 0;
146
-
147
- if ( height === 0 )
148
- {
149
- alert( editor.lang.youtube.invalidHeight );
150
- return false;
151
- }
152
- }
153
- else {
154
- alert( editor.lang.youtube.noHeight );
155
- return false;
156
- }
157
- }
158
- }
159
- ]
160
- },
161
- {
162
- type : 'hbox',
163
- widths : [ '100%' ],
164
- children :
165
- [
166
- {
167
- id : 'chkResponsive',
168
- type : 'checkbox',
169
- label : editor.lang.youtube.txtResponsive,
170
- 'default' : editor.config.youtube_responsive != null ? editor.config.youtube_responsive : false
171
- }
172
- ]
173
- },
174
- {
175
- type : 'hbox',
176
- widths : [ '55%', '45%' ],
177
- children :
178
- [
179
- {
180
- id : 'chkRelated',
181
- type : 'checkbox',
182
- 'default' : editor.config.youtube_related != null ? editor.config.youtube_related : true,
183
- label : editor.lang.youtube.chkRelated
184
- },
185
- {
186
- id : 'chkOlderCode',
187
- type : 'checkbox',
188
- 'default' : editor.config.youtube_older != null ? editor.config.youtube_older : false,
189
- label : editor.lang.youtube.chkOlderCode
190
- }
191
- ]
192
- },
193
- {
194
- type : 'hbox',
195
- widths : [ '55%', '45%' ],
196
- children :
197
- [
198
- {
199
- id : 'chkPrivacy',
200
- type : 'checkbox',
201
- label : editor.lang.youtube.chkPrivacy,
202
- 'default' : editor.config.youtube_privacy != null ? editor.config.youtube_privacy : false
203
- },
204
- {
205
- id : 'chkAutoplay',
206
- type : 'checkbox',
207
- 'default' : editor.config.youtube_autoplay != null ? editor.config.youtube_autoplay : false,
208
- label : editor.lang.youtube.chkAutoplay
209
- }
210
- ]
211
- },
212
- {
213
- type : 'hbox',
214
- widths : [ '55%', '45%'],
215
- children :
216
- [
217
- {
218
- id : 'txtStartAt',
219
- type : 'text',
220
- label : editor.lang.youtube.txtStartAt,
221
- validate : function ()
222
- {
223
- if ( this.getValue() )
224
- {
225
- var str = this.getValue();
226
-
227
- if ( !/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/i.test( str ) )
228
- {
229
- alert( editor.lang.youtube.invalidTime );
230
- return false;
231
- }
232
- }
233
- }
234
- },
235
- {
236
- id: 'empty',
237
- type: 'html',
238
- html: ''
239
- }
240
- ]
241
- }
242
- ]
243
- }
244
- ],
245
- onOk: function()
246
- {
247
- var content = '';
248
- var responsiveStyle='';
249
-
250
- if ( this.getContentElement( 'youtubePlugin', 'txtEmbed' ).isEnabled() )
251
- {
252
- content = this.getValueOf( 'youtubePlugin', 'txtEmbed' );
253
- }
254
- else {
255
- var url = '//', params = [], startSecs;
256
- var width = this.getValueOf( 'youtubePlugin', 'txtWidth' );
257
- var height = this.getValueOf( 'youtubePlugin', 'txtHeight' );
258
-
259
- if ( this.getContentElement( 'youtubePlugin', 'chkPrivacy' ).getValue() === true )
260
- {
261
- url += 'www.youtube-nocookie.com/';
262
- }
263
- else {
264
- url += 'www.youtube.com/';
265
- }
266
-
267
- url += 'embed/' + video;
268
-
269
- if ( this.getContentElement( 'youtubePlugin', 'chkRelated' ).getValue() === false )
270
- {
271
- params.push('rel=0');
272
- }
273
-
274
- if ( this.getContentElement( 'youtubePlugin', 'chkAutoplay' ).getValue() === true )
275
- {
276
- params.push('autoplay=1');
277
- }
278
-
279
- startSecs = this.getValueOf( 'youtubePlugin', 'txtStartAt' );
280
- if ( startSecs ){
281
- var seconds = hmsToSeconds( startSecs );
282
-
283
- params.push('start=' + seconds);
284
- }
285
-
286
- if ( params.length > 0 )
287
- {
288
- url = url + '?' + params.join( '&' );
289
- }
290
-
291
- if ( this.getContentElement( 'youtubePlugin', 'chkResponsive').getValue() === true ) {
292
- content += '<div style="position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden;">';
293
- responsiveStyle = 'style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;"';
294
- }
295
-
296
- if ( this.getContentElement( 'youtubePlugin', 'chkOlderCode' ).getValue() === true )
297
- {
298
- url = url.replace('embed/', 'v/');
299
- url = url.replace(/&/g, '&amp;');
300
-
301
- if ( url.indexOf('?') === -1 )
302
- {
303
- url += '?';
304
- }
305
- else {
306
- url += '&amp;';
307
- }
308
- url += 'hl=' + (this.getParentEditor().config.language ? this.getParentEditor().config.language : 'en') + '&amp;version=3';
309
-
310
- content += '<object width="' + width + '" height="' + height + '" ' + responsiveStyle + '>';
311
- content += '<param name="movie" value="' + url + '"></param>';
312
- content += '<param name="allowFullScreen" value="true"></param>';
313
- content += '<param name="allowscriptaccess" value="always"></param>';
314
- content += '<embed src="' + url + '" type="application/x-shockwave-flash" ';
315
- content += 'width="' + width + '" height="' + height + '" '+ responsiveStyle + ' allowscriptaccess="always" ';
316
- content += 'allowfullscreen="true"></embed>';
317
- content += '</object>';
318
- }
319
- else {
320
- content += '<iframe width="' + width + '" height="' + height + '" src="' + url + '" ' + responsiveStyle;
321
- content += 'frameborder="0" allowfullscreen></iframe>';
322
- }
323
-
324
- if ( this.getContentElement( 'youtubePlugin', 'chkResponsive').getValue() === true ) {
325
- content += '</div>';
326
- }
327
- }
328
-
329
- var element = CKEDITOR.dom.element.createFromHtml( content );
330
- var instance = this.getParentEditor();
331
- instance.insertElement(element);
332
- }
333
- };
334
- });
335
- }
336
- });
337
- })();
338
-
339
- function handleLinkChange( el, api )
340
- {
341
- if ( el.getValue().length > 0 )
342
- {
343
- el.getDialog().getContentElement( 'youtubePlugin', 'txtEmbed' ).disable();
344
- }
345
- else {
346
- el.getDialog().getContentElement( 'youtubePlugin', 'txtEmbed' ).enable();
347
- }
348
- }
349
-
350
- function handleEmbedChange( el, api )
351
- {
352
- if ( el.getValue().length > 0 )
353
- {
354
- el.getDialog().getContentElement( 'youtubePlugin', 'txtUrl' ).disable();
355
- }
356
- else {
357
- el.getDialog().getContentElement( 'youtubePlugin', 'txtUrl' ).enable();
358
- }
359
- }
360
-
361
-
362
- /**
363
- * JavaScript function to match (and return) the video Id
364
- * of any valid Youtube Url, given as input string.
365
- * @author: Stephan Schmitz <eyecatchup@gmail.com>
366
- * @url: http://stackoverflow.com/a/10315969/624466
367
- */
368
- function ytVidId( url )
369
- {
370
- var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
371
- return ( url.match( p ) ) ? RegExp.$1 : false;
372
- }
373
-
374
- /**
375
- * Converts time in hms format to seconds only
376
- */
377
- function hmsToSeconds( time )
378
- {
379
- var arr = time.split(':'), s = 0, m = 1;
380
-
381
- while (arr.length > 0)
382
- {
383
- s += m * parseInt(arr.pop(), 10);
384
- m *= 60;
385
- }
386
-
387
- return s;
388
- }
1
+ /*
2
+ * Youtube Embed Plugin
3
+ *
4
+ * @author Jonnas Fonini <contato@fonini.net>
5
+ * @version 2.0.9
6
+ */
7
+ ( function() {
8
+ CKEDITOR.plugins.add( 'youtube',
9
+ {
10
+ lang: [ 'en', 'pt', 'ja', 'hu', 'it', 'fr', 'tr', 'ru', 'de', 'ar', 'nl', 'pl', 'vi', 'zh', 'el', 'he', 'es', 'nb', 'nn', 'fi', 'et', 'sk', 'cs'],
11
+ init: function( editor )
12
+ {
13
+ editor.addCommand( 'youtube', new CKEDITOR.dialogCommand( 'youtube', {
14
+ allowedContent: 'div{*}; iframe{*}[!width,!height,!src,!frameborder,!allowfullscreen]; object param[*]'
15
+ }));
16
+
17
+ editor.ui.addButton( 'Youtube',
18
+ {
19
+ label : editor.lang.youtube.button,
20
+ toolbar : 'insert',
21
+ command : 'youtube',
22
+ icon : this.path + 'images/icon.png'
23
+ });
24
+
25
+ CKEDITOR.dialog.add( 'youtube', function ( instance )
26
+ {
27
+ var video;
28
+
29
+ return {
30
+ title : editor.lang.youtube.title,
31
+ minWidth : 500,
32
+ minHeight : 200,
33
+ contents :
34
+ [{
35
+ id : 'youtubePlugin',
36
+ expand : true,
37
+ elements :
38
+ [{
39
+ id : 'txtEmbed',
40
+ type : 'textarea',
41
+ label : editor.lang.youtube.txtEmbed,
42
+ autofocus : 'autofocus',
43
+ onChange : function ( api )
44
+ {
45
+ handleEmbedChange( this, api );
46
+ },
47
+ onKeyUp : function ( api )
48
+ {
49
+ handleEmbedChange( this, api );
50
+ },
51
+ validate : function ()
52
+ {
53
+ if ( this.isEnabled() )
54
+ {
55
+ if ( !this.getValue() )
56
+ {
57
+ alert( editor.lang.youtube.noCode );
58
+ return false;
59
+ }
60
+ else
61
+ if ( this.getValue().length === 0 || this.getValue().indexOf( '//' ) === -1 )
62
+ {
63
+ alert( editor.lang.youtube.invalidEmbed );
64
+ return false;
65
+ }
66
+ }
67
+ }
68
+ },
69
+ {
70
+ type : 'html',
71
+ html : editor.lang.youtube.or + '<hr>'
72
+ },
73
+ {
74
+ type : 'hbox',
75
+ widths : [ '70%', '15%', '15%' ],
76
+ children :
77
+ [
78
+ {
79
+ id : 'txtUrl',
80
+ type : 'text',
81
+ label : editor.lang.youtube.txtUrl,
82
+ onChange : function ( api )
83
+ {
84
+ handleLinkChange( this, api );
85
+ },
86
+ onKeyUp : function ( api )
87
+ {
88
+ handleLinkChange( this, api );
89
+ },
90
+ validate : function ()
91
+ {
92
+ if ( this.isEnabled() )
93
+ {
94
+ if ( !this.getValue() )
95
+ {
96
+ alert( editor.lang.youtube.noCode );
97
+ return false;
98
+ }
99
+ else{
100
+ video = ytVidId(this.getValue());
101
+
102
+ if ( this.getValue().length === 0 || video === false)
103
+ {
104
+ alert( editor.lang.youtube.invalidUrl );
105
+ return false;
106
+ }
107
+ }
108
+ }
109
+ }
110
+ },
111
+ {
112
+ type : 'text',
113
+ id : 'txtWidth',
114
+ width : '60px',
115
+ label : editor.lang.youtube.txtWidth,
116
+ 'default' : editor.config.youtube_width != null ? editor.config.youtube_width : '640',
117
+ validate : function ()
118
+ {
119
+ if ( this.getValue() )
120
+ {
121
+ var width = parseInt ( this.getValue() ) || 0;
122
+
123
+ if ( width === 0 )
124
+ {
125
+ alert( editor.lang.youtube.invalidWidth );
126
+ return false;
127
+ }
128
+ }
129
+ else {
130
+ alert( editor.lang.youtube.noWidth );
131
+ return false;
132
+ }
133
+ }
134
+ },
135
+ {
136
+ type : 'text',
137
+ id : 'txtHeight',
138
+ width : '60px',
139
+ label : editor.lang.youtube.txtHeight,
140
+ 'default' : editor.config.youtube_height != null ? editor.config.youtube_height : '360',
141
+ validate : function ()
142
+ {
143
+ if ( this.getValue() )
144
+ {
145
+ var height = parseInt ( this.getValue() ) || 0;
146
+
147
+ if ( height === 0 )
148
+ {
149
+ alert( editor.lang.youtube.invalidHeight );
150
+ return false;
151
+ }
152
+ }
153
+ else {
154
+ alert( editor.lang.youtube.noHeight );
155
+ return false;
156
+ }
157
+ }
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ type : 'hbox',
163
+ widths : [ '100%' ],
164
+ children :
165
+ [
166
+ {
167
+ id : 'chkResponsive',
168
+ type : 'checkbox',
169
+ label : editor.lang.youtube.txtResponsive,
170
+ 'default' : editor.config.youtube_responsive != null ? editor.config.youtube_responsive : false
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ type : 'hbox',
176
+ widths : [ '55%', '45%' ],
177
+ children :
178
+ [
179
+ {
180
+ id : 'chkRelated',
181
+ type : 'checkbox',
182
+ 'default' : editor.config.youtube_related != null ? editor.config.youtube_related : true,
183
+ label : editor.lang.youtube.chkRelated
184
+ },
185
+ {
186
+ id : 'chkOlderCode',
187
+ type : 'checkbox',
188
+ 'default' : editor.config.youtube_older != null ? editor.config.youtube_older : false,
189
+ label : editor.lang.youtube.chkOlderCode
190
+ }
191
+ ]
192
+ },
193
+ {
194
+ type : 'hbox',
195
+ widths : [ '55%', '45%' ],
196
+ children :
197
+ [
198
+ {
199
+ id : 'chkPrivacy',
200
+ type : 'checkbox',
201
+ label : editor.lang.youtube.chkPrivacy,
202
+ 'default' : editor.config.youtube_privacy != null ? editor.config.youtube_privacy : false
203
+ },
204
+ {
205
+ id : 'chkAutoplay',
206
+ type : 'checkbox',
207
+ 'default' : editor.config.youtube_autoplay != null ? editor.config.youtube_autoplay : false,
208
+ label : editor.lang.youtube.chkAutoplay
209
+ }
210
+ ]
211
+ },
212
+ {
213
+ type : 'hbox',
214
+ widths : [ '55%', '45%'],
215
+ children :
216
+ [
217
+ {
218
+ id : 'txtStartAt',
219
+ type : 'text',
220
+ label : editor.lang.youtube.txtStartAt,
221
+ validate : function ()
222
+ {
223
+ if ( this.getValue() )
224
+ {
225
+ var str = this.getValue();
226
+
227
+ if ( !/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/i.test( str ) )
228
+ {
229
+ alert( editor.lang.youtube.invalidTime );
230
+ return false;
231
+ }
232
+ }
233
+ }
234
+ },
235
+ {
236
+ id: 'empty',
237
+ type: 'html',
238
+ html: ''
239
+ }
240
+ ]
241
+ }
242
+ ]
243
+ }
244
+ ],
245
+ onOk: function()
246
+ {
247
+ var content = '';
248
+ var responsiveStyle='';
249
+
250
+ if ( this.getContentElement( 'youtubePlugin', 'txtEmbed' ).isEnabled() )
251
+ {
252
+ content = this.getValueOf( 'youtubePlugin', 'txtEmbed' );
253
+ }
254
+ else {
255
+ var url = '//', params = [], startSecs;
256
+ var width = this.getValueOf( 'youtubePlugin', 'txtWidth' );
257
+ var height = this.getValueOf( 'youtubePlugin', 'txtHeight' );
258
+
259
+ if ( this.getContentElement( 'youtubePlugin', 'chkPrivacy' ).getValue() === true )
260
+ {
261
+ url += 'www.youtube-nocookie.com/';
262
+ }
263
+ else {
264
+ url += 'www.youtube.com/';
265
+ }
266
+
267
+ url += 'embed/' + video;
268
+
269
+ if ( this.getContentElement( 'youtubePlugin', 'chkRelated' ).getValue() === false )
270
+ {
271
+ params.push('rel=0');
272
+ }
273
+
274
+ if ( this.getContentElement( 'youtubePlugin', 'chkAutoplay' ).getValue() === true )
275
+ {
276
+ params.push('autoplay=1');
277
+ }
278
+
279
+ startSecs = this.getValueOf( 'youtubePlugin', 'txtStartAt' );
280
+ if ( startSecs ){
281
+ var seconds = hmsToSeconds( startSecs );
282
+
283
+ params.push('start=' + seconds);
284
+ }
285
+
286
+ if ( params.length > 0 )
287
+ {
288
+ url = url + '?' + params.join( '&' );
289
+ }
290
+
291
+ if ( this.getContentElement( 'youtubePlugin', 'chkResponsive').getValue() === true ) {
292
+ content += '<div class="youtube-embed-wrapper" style="position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden;">';
293
+ responsiveStyle = 'style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;"';
294
+ }
295
+
296
+ if ( this.getContentElement( 'youtubePlugin', 'chkOlderCode' ).getValue() === true )
297
+ {
298
+ url = url.replace('embed/', 'v/');
299
+ url = url.replace(/&/g, '&amp;');
300
+
301
+ if ( url.indexOf('?') === -1 )
302
+ {
303
+ url += '?';
304
+ }
305
+ else {
306
+ url += '&amp;';
307
+ }
308
+ url += 'hl=' + (this.getParentEditor().config.language ? this.getParentEditor().config.language : 'en') + '&amp;version=3';
309
+
310
+ content += '<object width="' + width + '" height="' + height + '" ' + responsiveStyle + '>';
311
+ content += '<param name="movie" value="' + url + '"></param>';
312
+ content += '<param name="allowFullScreen" value="true"></param>';
313
+ content += '<param name="allowscriptaccess" value="always"></param>';
314
+ content += '<embed src="' + url + '" type="application/x-shockwave-flash" ';
315
+ content += 'width="' + width + '" height="' + height + '" '+ responsiveStyle + ' allowscriptaccess="always" ';
316
+ content += 'allowfullscreen="true"></embed>';
317
+ content += '</object>';
318
+ }
319
+ else {
320
+ content += '<iframe width="' + width + '" height="' + height + '" src="' + url + '" ' + responsiveStyle;
321
+ content += 'frameborder="0" allowfullscreen></iframe>';
322
+ }
323
+
324
+ if ( this.getContentElement( 'youtubePlugin', 'chkResponsive').getValue() === true ) {
325
+ content += '</div>';
326
+ }
327
+ }
328
+
329
+ var element = CKEDITOR.dom.element.createFromHtml( content );
330
+ var instance = this.getParentEditor();
331
+ instance.insertElement(element);
332
+ }
333
+ };
334
+ });
335
+ }
336
+ });
337
+ })();
338
+
339
+ function handleLinkChange( el, api )
340
+ {
341
+ if ( el.getValue().length > 0 )
342
+ {
343
+ el.getDialog().getContentElement( 'youtubePlugin', 'txtEmbed' ).disable();
344
+ }
345
+ else {
346
+ el.getDialog().getContentElement( 'youtubePlugin', 'txtEmbed' ).enable();
347
+ }
348
+ }
349
+
350
+ function handleEmbedChange( el, api )
351
+ {
352
+ if ( el.getValue().length > 0 )
353
+ {
354
+ el.getDialog().getContentElement( 'youtubePlugin', 'txtUrl' ).disable();
355
+ }
356
+ else {
357
+ el.getDialog().getContentElement( 'youtubePlugin', 'txtUrl' ).enable();
358
+ }
359
+ }
360
+
361
+
362
+ /**
363
+ * JavaScript function to match (and return) the video Id
364
+ * of any valid Youtube Url, given as input string.
365
+ * @author: Stephan Schmitz <eyecatchup@gmail.com>
366
+ * @url: http://stackoverflow.com/a/10315969/624466
367
+ */
368
+ function ytVidId( url )
369
+ {
370
+ var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
371
+ return ( url.match( p ) ) ? RegExp.$1 : false;
372
+ }
373
+
374
+ /**
375
+ * Converts time in hms format to seconds only
376
+ */
377
+ function hmsToSeconds( time )
378
+ {
379
+ var arr = time.split(':'), s = 0, m = 1;
380
+
381
+ while (arr.length > 0)
382
+ {
383
+ s += m * parseInt(arr.pop(), 10);
384
+ m *= 60;
385
+ }
386
+
387
+ return s;
388
+ }