glebtv-ckeditor 4.6.0 → 4.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (456) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +15 -22
  3. data/MIT-LICENSE +0 -0
  4. data/README.md +2 -325
  5. data/Rakefile +1 -2
  6. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.jpg +0 -0
  7. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.png +0 -0
  8. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_del.png +0 -0
  9. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_more.gif +0 -0
  10. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/preloader.gif +0 -0
  11. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/avi.gif +0 -0
  12. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/ckfnothumb.gif +0 -0
  13. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/doc.gif +0 -0
  14. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/docx.gif +0 -0
  15. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/exe.gif +0 -0
  16. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/gz.gif +0 -0
  17. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/htm.gif +0 -0
  18. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/jpg.gif +0 -0
  19. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/mp3.gif +0 -0
  20. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/mpg.gif +0 -0
  21. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/pdf.gif +0 -0
  22. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/psd.gif +0 -0
  23. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/rar.gif +0 -0
  24. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/swf.gif +0 -0
  25. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/tar.gif +0 -0
  26. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/txt.gif +0 -0
  27. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/unknown.gif +0 -0
  28. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/wmv.gif +0 -0
  29. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/xls.gif +0 -0
  30. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/xlsx.gif +0 -0
  31. data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/zip.gif +0 -0
  32. data/app/assets/javascripts/ckeditor/application.js +0 -0
  33. data/app/assets/javascripts/ckeditor/config.js.erb +1 -2
  34. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js.erb → application.js} +4 -6
  35. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +0 -0
  36. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +0 -0
  37. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +0 -0
  38. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +0 -0
  39. data/app/assets/javascripts/ckeditor/init.js.erb +0 -0
  40. data/app/assets/stylesheets/ckeditor/application.css +1 -1
  41. data/app/assets/stylesheets/ckeditor/filebrowser/uploader.scss +172 -0
  42. data/app/controllers/ckeditor/application_controller.rb +9 -10
  43. data/app/controllers/ckeditor/attachment_files_controller.rb +11 -12
  44. data/app/controllers/ckeditor/pictures_controller.rb +10 -12
  45. data/app/helpers/ckeditor/application_helper.rb +1 -10
  46. data/app/views/ckeditor/attachment_files/index.html.erb +5 -5
  47. data/app/views/ckeditor/pictures/index.html.erb +5 -5
  48. data/app/views/ckeditor/shared/_asset.html.erb +18 -21
  49. data/app/views/ckeditor/shared/_asset_tmpl.html.erb +17 -20
  50. data/app/views/layouts/ckeditor/application.html.erb +3 -3
  51. data/config/locales/en.ckeditor.yml +0 -0
  52. data/config/locales/ru.ckeditor.yml +0 -0
  53. data/config/routes.rb +2 -2
  54. data/lib/ckeditor.rb +42 -34
  55. data/lib/ckeditor/asset_response.rb +74 -25
  56. data/lib/ckeditor/backend/carrierwave.rb +8 -5
  57. data/lib/ckeditor/backend/dragonfly.rb +5 -3
  58. data/lib/ckeditor/backend/paperclip.rb +15 -22
  59. data/lib/ckeditor/backend/refile.rb +6 -4
  60. data/lib/ckeditor/helpers/controllers.rb +15 -20
  61. data/lib/ckeditor/helpers/form_builder.rb +1 -1
  62. data/lib/ckeditor/helpers/form_helper.rb +0 -0
  63. data/lib/ckeditor/helpers/view_helper.rb +0 -0
  64. data/lib/ckeditor/hooks/cancan.rb +0 -2
  65. data/lib/ckeditor/hooks/formtastic.rb +2 -2
  66. data/lib/ckeditor/hooks/pundit.rb +1 -4
  67. data/lib/ckeditor/hooks/simple_form.rb +9 -14
  68. data/lib/ckeditor/http.rb +9 -11
  69. data/lib/ckeditor/orm/active_record.rb +1 -3
  70. data/lib/ckeditor/orm/base.rb +5 -5
  71. data/lib/ckeditor/orm/mongoid.rb +4 -6
  72. data/lib/ckeditor/paginatable.rb +3 -1
  73. data/lib/ckeditor/rails.rb +39 -0
  74. data/lib/ckeditor/text_area.rb +16 -15
  75. data/lib/ckeditor/utils.rb +45 -39
  76. data/lib/ckeditor/utils/content_type_detector.rb +7 -10
  77. data/lib/ckeditor/utils/javascript_code.rb +8 -3
  78. data/lib/ckeditor/version.rb +2 -2
  79. data/lib/generators/ckeditor/install_generator.rb +52 -30
  80. data/lib/generators/ckeditor/pundit_policy_generator.rb +1 -3
  81. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +2 -2
  82. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +1 -1
  83. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +1 -1
  84. data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +6 -10
  85. data/lib/generators/ckeditor/templates/active_record/carrierwave/migration_versioned.rb +22 -0
  86. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +1 -1
  87. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +1 -1
  88. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +4 -4
  89. data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +6 -10
  90. data/lib/generators/ckeditor/templates/active_record/dragonfly/migration_versioned.rb +23 -0
  91. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +0 -0
  92. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +3 -3
  93. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +5 -5
  94. data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +2 -5
  95. data/lib/generators/ckeditor/templates/active_record/paperclip/migration_versioned.rb +23 -0
  96. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/asset.rb +0 -0
  97. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/attachment_file.rb +0 -0
  98. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +0 -0
  99. data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +7 -12
  100. data/lib/generators/ckeditor/templates/active_record/refile/migration_versioned.rb +23 -0
  101. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +0 -0
  102. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +4 -4
  103. data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +4 -5
  104. data/lib/generators/ckeditor/templates/ckeditor.rb +16 -7
  105. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +2 -2
  106. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +1 -1
  107. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +1 -1
  108. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +0 -0
  109. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +5 -5
  110. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +5 -5
  111. data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +2 -2
  112. data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +2 -2
  113. data/lib/glebtv-ckeditor.rb +0 -0
  114. data/lib/tasks/ckeditor.rake +6 -14
  115. data/test/controllers/attachment_files_controller_test.rb +0 -0
  116. data/test/controllers/pictures_controller_test.rb +0 -0
  117. data/test/dummy/Rakefile +0 -0
  118. data/test/dummy/app/assets/javascripts/application.js +0 -0
  119. data/test/dummy/app/assets/stylesheets/application.css +0 -0
  120. data/test/dummy/app/assets/stylesheets/scaffold.css +0 -0
  121. data/test/dummy/app/controllers/application_controller.rb +0 -0
  122. data/test/dummy/app/controllers/posts_controller.rb +0 -0
  123. data/test/dummy/app/helpers/application_helper.rb +0 -0
  124. data/test/dummy/app/helpers/posts_helper.rb +0 -0
  125. data/test/dummy/app/models/post.rb +0 -0
  126. data/test/dummy/app/views/layouts/application.html.erb +0 -0
  127. data/test/dummy/app/views/posts/_form.html.erb +0 -0
  128. data/test/dummy/app/views/posts/edit.html.erb +0 -0
  129. data/test/dummy/app/views/posts/index.html.erb +0 -0
  130. data/test/dummy/app/views/posts/new.html.erb +0 -0
  131. data/test/dummy/app/views/posts/show.html.erb +0 -0
  132. data/test/dummy/config.ru +0 -0
  133. data/test/dummy/config/application.rb +0 -0
  134. data/test/dummy/config/boot.rb +0 -0
  135. data/test/dummy/config/database.yml +0 -0
  136. data/test/dummy/config/environment.rb +0 -0
  137. data/test/dummy/config/environments/development.rb +0 -0
  138. data/test/dummy/config/environments/production.rb +0 -0
  139. data/test/dummy/config/environments/test.rb +0 -0
  140. data/test/dummy/config/initializers/assets.rb +1 -0
  141. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
  142. data/test/dummy/config/initializers/ckeditor.rb +0 -0
  143. data/test/dummy/config/initializers/cookies_serializer.rb +0 -0
  144. data/test/dummy/config/initializers/inflections.rb +0 -0
  145. data/test/dummy/config/initializers/mime_types.rb +0 -0
  146. data/test/dummy/config/initializers/paperclip.rb +3 -0
  147. data/test/dummy/config/initializers/session_store.rb +0 -0
  148. data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
  149. data/test/dummy/config/locales/en.yml +0 -0
  150. data/test/dummy/config/mongoid.yml +0 -0
  151. data/test/dummy/config/routes.rb +0 -0
  152. data/test/dummy/config/secrets.yml +0 -0
  153. data/test/dummy/db/migrate/20110623120047_create_posts.rb +0 -0
  154. data/test/dummy/public/404.html +0 -0
  155. data/test/dummy/public/422.html +0 -0
  156. data/test/dummy/public/500.html +0 -0
  157. data/test/dummy/public/favicon.ico +0 -0
  158. data/test/dummy/script/rails +0 -0
  159. data/test/dummy/test/fixtures/files/rails.png +0 -0
  160. data/test/dummy/test/fixtures/files/rails.tar.gz +0 -0
  161. data/test/functional/posts_controller_test.rb +2 -3
  162. data/test/generators/install_generator_test.rb +2 -2
  163. data/test/integration/navigation_test.rb +0 -0
  164. data/test/models/attachment_file_test.rb +3 -8
  165. data/test/models/ckeditor_test.rb +1 -1
  166. data/test/models/picture_test.rb +0 -0
  167. data/test/models/utils_test.rb +6 -6
  168. data/test/orm/active_record.rb +0 -0
  169. data/test/orm/mongoid.rb +0 -0
  170. data/test/support/helpers.rb +0 -0
  171. data/test/support/integration_case.rb +0 -0
  172. data/test/support/raw_post.rb +0 -0
  173. data/test/support/routes.txt +0 -0
  174. data/test/test_helper.rb +1 -1
  175. data/vendor/assets/javascripts/ckeditor/CHANGES.md +1358 -0
  176. data/vendor/assets/javascripts/ckeditor/README.md +39 -0
  177. data/vendor/assets/javascripts/ckeditor/build-config.js +31 -30
  178. data/vendor/assets/javascripts/ckeditor/ckeditor.js +709 -675
  179. data/vendor/assets/javascripts/ckeditor/config.js +10 -0
  180. data/vendor/assets/javascripts/ckeditor/contents.css +208 -0
  181. data/vendor/assets/javascripts/ckeditor/lang/en.js +4 -4
  182. data/vendor/assets/javascripts/ckeditor/lang/ru.js +4 -4
  183. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +5 -5
  184. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +3 -2
  185. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
  186. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  187. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -1
  188. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -1
  189. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  190. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +6 -1
  191. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
  192. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -1
  193. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  194. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -1
  195. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -0
  196. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +230 -74
  197. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/abcdef.css +1 -1
  198. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +1 -1
  199. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +1 -1
  200. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +1 -1
  201. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/dracula.css +2 -3
  202. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-dark.css +1 -1
  203. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-light.css +1 -1
  204. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +1 -1
  205. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +1 -1
  206. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/icecoder.css +1 -1
  207. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
  208. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +3 -3
  209. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/material.css +3 -3
  210. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +1 -1
  211. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +0 -2
  212. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +1 -1
  213. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +1 -1
  214. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +1 -1
  215. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +1 -1
  216. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +1 -1
  217. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/seti.css +1 -1
  218. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +1 -1
  219. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +1 -1
  220. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +1 -1
  221. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +1 -1
  222. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +1 -1
  223. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +1 -1
  224. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +1 -1
  225. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/yeti.css +1 -1
  226. data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +2 -2
  227. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +2 -2
  228. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +2 -2
  229. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  230. data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
  231. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +1 -1
  232. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +4 -3
  233. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +23 -23
  234. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/hidpi/loremipsum.png +0 -0
  235. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/loremipsum.png +0 -0
  236. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/en.js +0 -0
  237. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +2 -2
  238. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +2 -2
  239. data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +13 -7
  240. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +49 -39
  241. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
  242. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +33 -19
  243. data/vendor/assets/javascripts/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +6 -1
  244. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +1 -1
  245. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +4 -1
  246. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +92 -23
  247. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +81 -82
  248. data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon-hdpi.png +0 -0
  249. data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
  250. data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +2 -1
  251. data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +448 -448
  252. data/vendor/assets/javascripts/ckeditor/samples/css/samples.css +1632 -0
  253. data/vendor/assets/javascripts/ckeditor/samples/img/github-top.png +0 -0
  254. data/vendor/assets/javascripts/ckeditor/samples/img/header-bg.png +0 -0
  255. data/vendor/assets/javascripts/ckeditor/samples/img/header-separator.png +0 -0
  256. data/vendor/assets/javascripts/ckeditor/samples/img/logo.png +0 -0
  257. data/vendor/assets/javascripts/ckeditor/samples/img/navigation-tip.png +0 -0
  258. data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
  259. data/vendor/assets/javascripts/ckeditor/samples/js/sample.js +53 -0
  260. data/vendor/assets/javascripts/ckeditor/samples/js/sf.js +17 -0
  261. data/vendor/assets/javascripts/ckeditor/samples/old/ajax.html +85 -0
  262. data/vendor/assets/javascripts/ckeditor/samples/old/api.html +210 -0
  263. data/vendor/assets/javascripts/ckeditor/samples/old/appendto.html +59 -0
  264. data/vendor/assets/javascripts/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
  265. data/vendor/assets/javascripts/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +204 -0
  266. data/vendor/assets/javascripts/ckeditor/samples/old/assets/posteddata.php +59 -0
  267. data/vendor/assets/javascripts/ckeditor/samples/old/assets/sample.jpg +0 -0
  268. data/vendor/assets/javascripts/ckeditor/samples/old/assets/uilanguages/languages.js +7 -0
  269. data/vendor/assets/javascripts/ckeditor/samples/old/datafiltering.html +508 -0
  270. data/vendor/assets/javascripts/ckeditor/samples/old/dialog/assets/my_dialog.js +48 -0
  271. data/vendor/assets/javascripts/ckeditor/samples/old/dialog/dialog.html +190 -0
  272. data/vendor/assets/javascripts/ckeditor/samples/old/divreplace.html +144 -0
  273. data/vendor/assets/javascripts/ckeditor/samples/old/enterkey/enterkey.html +106 -0
  274. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  275. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  276. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/swfobject.js +19 -0
  277. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputforflash.html +283 -0
  278. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputhtml.html +224 -0
  279. data/vendor/assets/javascripts/ckeditor/samples/old/index.html +131 -0
  280. data/vendor/assets/javascripts/ckeditor/samples/old/inlineall.html +314 -0
  281. data/vendor/assets/javascripts/ckeditor/samples/old/inlinebycode.html +124 -0
  282. data/vendor/assets/javascripts/ckeditor/samples/old/inlinetextarea.html +113 -0
  283. data/vendor/assets/javascripts/ckeditor/samples/old/jquery.html +103 -0
  284. data/vendor/assets/javascripts/ckeditor/samples/old/magicline/magicline.html +209 -0
  285. data/vendor/assets/javascripts/ckeditor/samples/old/readonly.html +76 -0
  286. data/vendor/assets/javascripts/ckeditor/samples/old/replacebyclass.html +60 -0
  287. data/vendor/assets/javascripts/ckeditor/samples/old/replacebycode.html +59 -0
  288. data/vendor/assets/javascripts/ckeditor/samples/old/sample.css +357 -0
  289. data/vendor/assets/javascripts/ckeditor/samples/old/sample.js +50 -0
  290. data/vendor/assets/javascripts/ckeditor/samples/old/sample_posteddata.php +16 -0
  291. data/vendor/assets/javascripts/ckeditor/samples/old/tabindex.html +78 -0
  292. data/vendor/assets/javascripts/ckeditor/samples/old/toolbar/toolbar.html +235 -0
  293. data/vendor/assets/javascripts/ckeditor/samples/old/uicolor.html +72 -0
  294. data/vendor/assets/javascripts/ckeditor/samples/old/uilanguages.html +122 -0
  295. data/vendor/assets/javascripts/ckeditor/samples/old/wysiwygarea/fullpage.html +80 -0
  296. data/vendor/assets/javascripts/ckeditor/samples/old/xhtmlstyle.html +234 -0
  297. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/css/fontello.css +55 -0
  298. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +10 -0
  299. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/config.json +28 -0
  300. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
  301. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.svg +14 -0
  302. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
  303. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
  304. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/index.html +446 -0
  305. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +13 -0
  306. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +9 -0
  307. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +33 -0
  308. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +14 -0
  309. data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/LICENSE.md → samples/toolbarconfigurator/lib/codemirror/LICENSE} +19 -21
  310. data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/css → samples/toolbarconfigurator/lib/codemirror}/codemirror.css +325 -341
  311. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +288 -0
  312. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +25 -0
  313. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +36 -0
  314. data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/js/addon/hint → samples/toolbarconfigurator/lib/codemirror}/show-hint.css +38 -36
  315. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +16 -0
  316. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog.css +5 -0
  317. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie.css +5 -0
  318. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie7.css +5 -0
  319. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie8.css +5 -0
  320. data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_iequirks.css +5 -0
  321. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor.css +5 -0
  322. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_gecko.css +5 -0
  323. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie.css +5 -0
  324. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie7.css +5 -0
  325. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie8.css +5 -0
  326. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_iequirks.css +5 -0
  327. data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons.png +0 -0
  328. data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons_hidpi.png +0 -0
  329. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/arrow.png +0 -0
  330. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/close.png +0 -0
  331. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/close.png +0 -0
  332. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/lock-open.png +0 -0
  333. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/lock.png +0 -0
  334. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/refresh.png +0 -0
  335. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/lock-open.png +0 -0
  336. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/lock.png +0 -0
  337. data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/refresh.png +0 -0
  338. data/vendor/assets/javascripts/ckeditor/skins/minimalist/readme.md +7 -0
  339. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons16.png +0 -0
  340. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons16.svg +2374 -0
  341. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons32.png +0 -0
  342. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons32.svg +2722 -0
  343. data/vendor/assets/javascripts/ckeditor/skins/moono/dev/locations.json +145 -0
  344. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +1 -1
  345. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +1 -1
  346. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +1 -1
  347. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +1 -1
  348. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +1 -1
  349. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +1 -1
  350. data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  351. data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
  352. data/vendor/assets/javascripts/ckeditor/skins/moono/skin.js +10 -0
  353. data/vendor/assets/javascripts/ckeditor/styles.js +1 -1
  354. metadata +182 -177
  355. data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +0 -128
  356. data/app/views/rails_admin/main/_form_ck_editor.html.haml +0 -10
  357. data/app/views/rails_admin/main/_form_ck_editorml.html.haml +0 -11
  358. data/config/locales/bg.ckeditor.yml +0 -9
  359. data/config/locales/cs.ckeditor.yml +0 -9
  360. data/config/locales/de.ckeditor.yml +0 -9
  361. data/config/locales/el-GR.cdkeditor.yml +0 -9
  362. data/config/locales/es.ckeditor.yml +0 -9
  363. data/config/locales/fr.ckeditor.yml +0 -9
  364. data/config/locales/hu.ckeditor.yml +0 -9
  365. data/config/locales/it.ckeditor.yml +0 -9
  366. data/config/locales/ja.ckeditor.yml +0 -9
  367. data/config/locales/nb.ckeditor.yml +0 -9
  368. data/config/locales/nl.ckeditor.yml +0 -9
  369. data/config/locales/pl.ckeditor.yml +0 -9
  370. data/config/locales/pt-BR.ckeditor.yml +0 -9
  371. data/config/locales/pt-PT.ckeditor.yml +0 -9
  372. data/config/locales/sv-SE.ckeditor.yml +0 -9
  373. data/config/locales/tr.ckeditor.yml +0 -9
  374. data/config/locales/uk.ckeditor.yml +0 -9
  375. data/config/locales/zh-CN.ckeditor.yml +0 -9
  376. data/config/locales/zh-TW.ckeditor.yml +0 -9
  377. data/lib/ckeditor/engine.rb +0 -46
  378. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -12
  379. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.ckeditor.css +0 -183
  380. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/comment.js +0 -206
  381. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/continuecomment.js +0 -85
  382. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.css +0 -32
  383. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js +0 -157
  384. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +0 -202
  385. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closetag.js +0 -169
  386. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuelist.js +0 -51
  387. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js +0 -122
  388. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchtags.js +0 -66
  389. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/trailingspace.js +0 -27
  390. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/brace-fold.js +0 -105
  391. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/comment-fold.js +0 -59
  392. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldcode.js +0 -150
  393. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.css +0 -20
  394. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.js +0 -146
  395. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/indent-fold.js +0 -44
  396. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/markdown-fold.js +0 -49
  397. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/xml-fold.js +0 -182
  398. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js +0 -43
  399. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/formatting.js +0 -226
  400. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/anyword-hint.js +0 -41
  401. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/css-hint.js +0 -60
  402. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/html-hint.js +0 -348
  403. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/javascript-hint.js +0 -155
  404. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.js +0 -438
  405. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/sql-hint.js +0 -271
  406. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/xml-hint.js +0 -110
  407. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/loadmode.js +0 -64
  408. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex.js +0 -123
  409. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex_test.js +0 -33
  410. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/overlay.js +0 -85
  411. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/simple.js +0 -213
  412. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/jump-to-line.js +0 -49
  413. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/match-highlighter.js +0 -165
  414. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.css +0 -8
  415. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.js +0 -97
  416. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/search.js +0 -252
  417. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/searchcursor.js +0 -189
  418. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/active-line.js +0 -74
  419. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/mark-selection.js +0 -118
  420. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/selection-pointer.js +0 -98
  421. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify-html.js +0 -952
  422. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.js +0 -2087
  423. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +0 -9109
  424. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/bbcode.js +0 -137
  425. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/index.html +0 -73
  426. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/bbcodemixed.js +0 -161
  427. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/index.html +0 -128
  428. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/clike.js +0 -785
  429. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/index.html +0 -360
  430. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/scala.html +0 -767
  431. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/test.js +0 -55
  432. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/css.js +0 -825
  433. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss.html +0 -103
  434. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss_test.js +0 -17
  435. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/index.html +0 -75
  436. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less.html +0 -152
  437. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less_test.js +0 -54
  438. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss.html +0 -157
  439. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss_test.js +0 -110
  440. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/test.js +0 -200
  441. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/htmlembedded.js +0 -28
  442. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/index.html +0 -60
  443. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/htmlmixed.js +0 -152
  444. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/index.html +0 -89
  445. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/index.html +0 -114
  446. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/javascript.js +0 -784
  447. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/json-ld.html +0 -72
  448. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/test.js +0 -247
  449. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/typescript.html +0 -61
  450. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/index.html +0 -64
  451. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/php.js +0 -234
  452. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/test.js +0 -154
  453. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/index.html +0 -61
  454. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/test.js +0 -51
  455. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/xml.js +0 -394
  456. data/vendor/assets/javascripts/ckeditor/plugins/youtube/LICENSE.md +0 -15
@@ -2,91 +2,90 @@
2
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 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,
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=[],d="",e;for(e in a)for(var f in a[e]){var h=a[e][f];"en_US"==h?d=h:c.push(h)}c.sort();d&&c.unshift(d);return{getCurrentLangGroup:function(c){a:{for(var e in a)for(var d in a[e])if(d.toUpperCase()===c.toUpperCase()){c=e;break a}c=""}return c},setLangList:function(){var c={},e;for(e in a)for(var d in a[e])c[a[e][d]]=
6
+ d;return c}()}}var g=function(){var a=function(a,b,e){e=e||{};var f=e.expires;if("number"==typeof f&&f){var h=new Date;h.setTime(h.getTime()+1E3*f);f=e.expires=h}f&&f.toUTCString&&(e.expires=f.toUTCString());b=encodeURIComponent(b);a=a+"\x3d"+b;for(var k in e)b=e[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
+ e=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,e);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
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
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
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,interfaceLang:a.interfaceLang,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;
23
- b.enable();b.getElement().setStyle("color","#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;
24
- E(a.targetFromFrame[a.iframeNumber+"_"+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,interfaceLang:a.interfaceLang,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},
33
- defaultTabCommand:"spell"},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.interfaceLang=b.config.wsc_interfaceLang;
50
- a.selectingLang=a.currentLang;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%"],className:"wsc-spelltab-bottom",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",
57
- "default":"",onShow:function(){a.textNode.SpellTab=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'}]}]},
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"):
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%"],
11
+ localizationID:"FinishChecking"},Option_button:{instance:null,text:"Options",localizationID:"Options"},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,d,e;for(e in b){if(c=a.dialog.getContentElement(a.dialog._.currentTabId,
12
+ e))c=c.getElement();else if(b[e].instance)c=b[e].instance.getElement().getFirst()||b[e].instance.getElement();else continue;d=b[e].localizationID||e;c.setText(a.LocalizationComing[d])}},K=function(b){var c,d,e;for(e in b)c=a.dialog.getContentElement(a.dialog._.currentTabId,e),c||(c=b[e].instance),c.setLabel&&(d=b[e].localizationID||e,c.setLabel(a.LocalizationComing[d]+":"))},t,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 d;d=a.framesetHtml(c);var e=a.iframeNumber+"_"+c;b.getElement().setHtml(d);d=document.getElementById(e);d=d.contentWindow?d.contentWindow:d.contentDocument.document?d.contentDocument.document:d.contentDocument;d.document.open();d.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
+ d.document.close();a.div_overlay.setEnable()};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+
15
+ "_"+a.dialog._.currentTabId).style.height="240px"};a.sendData=function(b){var c=b._.currentTabId,d=b._.contents[c].Content,e,f;a.previousTab=c;a.setIframe(d,c);var h=function(h){c=b._.currentTabId;h=h||window.event;h.data.getTarget().is("a")&&c!==a.previousTab&&(a.previousTab=c,d=b._.contents[c].Content,e=a.iframeNumber+"_"+c,a.div_overlay.setEnable(),d.getElement().getChildCount()?E(a.targetFromFrame[e],a.cmd[c]):(a.setIframe(d,c),f=document.getElementById(e),a.targetFromFrame[e]=f.contentWindow))};
16
+ b.parts.tabs.removeListener("click",h);b.parts.tabs.on("click",h)};a.buildSelectLang=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=
17
+ function(b,c){var d=document.getElementById("wscLang"+c),e=document.createDocumentFragment(),f,h,k=[];if(0===d.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),e.appendChild(f);d.appendChild(e)}for(e=0;e<d.options.length;e++)d.options[e].value==a.selectingLang&&(d.options[e].selected="selected")};a.buildOptionSynonyms=function(b){b=a.selectNodeResponce[b];
18
+ var c=z(a.selectNode.Synonyms);a.selectNode.Synonyms.clear();for(var d=0;d<b.length;d++){var e=document.createElement("option");e.text=b[d];e.value=b[d];c.$.add(e,d)}a.selectNode.Synonyms.getInputElement().$.firstChild.selected=!0;a.textNode.Thesaurus.setValue(a.selectNode.Synonyms.getInputElement().getValue())};var B=function(a){var c=document,d=a.target||c.body,e=a.id||"overlayBlock",f=a.opacity||"0.9";a=a.background||"#f1f1f1";var h=c.getElementById(e),k=h||c.createElement("div");k.style.cssText=
19
+ "position: absolute;top:30px;bottom:41px;left:1px;right:1px;z-index: 10020;padding:0;margin:0;background:"+a+";opacity: "+f+";filter: alpha(opacity\x3d"+100*f+");display: none;";k.id=e;h||d.appendChild(k);return{setDisable:function(){k.style.display="none"},setEnable:function(){k.style.display="block"}}},L=function(b,c,d){var e=new CKEDITOR.dom.element("div"),f=new CKEDITOR.dom.element("input"),h=new CKEDITOR.dom.element("label"),k="wscGrammerSuggest"+b+"_"+c;e.addClass("cke_dialog_ui_input_radio");
20
+ e.setAttribute("role","presentation");e.setStyles({width:"97%",padding:"5px","white-space":"normal"});f.setAttributes({type:"radio",value:c,name:"wscGrammerSuggest",id:k});f.setStyles({"float":"left"});f.on("click",function(b){a.textNode.GrammTab.setValue(b.sender.getValue())});d?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"});e.append(f);
21
+ e.append(h);return e},F=function(a){a=a||"true";null!==a&&"false"==a&&u()},w=function(b){var c=new I(b);b="wscLang"+a.dialog.getParentEditor().name;b=document.getElementById(b);var d,e=a.iframeNumber+"_"+a.dialog._.currentTabId;a.buildOptionLang(c.setLangList,a.dialog.getParentEditor().name);if(d=c.getCurrentLangGroup(a.selectingLang))v[d].onShow();F(a.show_grammar);b.onchange=function(b){b=c.getCurrentLangGroup(this.value);var d=a.dialog._.currentTabId;v[b].onShow();F(a.show_grammar);a.div_overlay.setEnable();
22
+ a.selectingLang=this.value;d=a.cmd[d];b&&v[b]&&v[b].allowedTabCommands[d]||(d=v[b].defaultTabCommand);for(var k in a.cmd)if(a.cmd[k]==d){a.previousTab=k;break}g.postMessage.send({message:{changeLang:a.selectingLang,interfaceLang:a.interfaceLang,text:a.dataTemp,cmd:d},target:a.targetFromFrame[e],id:"selectionLang_outer__page"})}},M=function(b){var c,d=function(b){b=a.dialog.getContentElement(a.dialog._.currentTabId,b)||a.LocalizationButton[b].instance;b.getElement().hasClass("cke_disabled")?b.getElement().setStyle("color",
23
+ "#a0a0a0"):b.disable()};c=function(b){b=a.dialog.getContentElement(a.dialog._.currentTabId,b)||a.LocalizationButton[b].instance;b.enable();b.getElement().setStyle("color","#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(),d("ChangeTo_button"),d("ChangeAll")):
24
+ (c("ChangeTo_button"),c("ChangeAll"));return b},O={iframeOnload:function(b){b=a.dialog._.currentTabId;E(a.targetFromFrame[a.iframeNumber+"_"+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),d="";c instanceof Array&&(c=b.word[0]);d=c=c.split(",");a.textNode.SpellTab.setValue(d[0]);b=z(A);A.clear();for(c=0;c<d.length;c++){var e=document.createElement("option");e.text=d[c];e.value=d[c];b.$.add(e,c)}l();a.div_overlay.setDisable()},
25
+ grammerSuggest:function(b){delete b.id;delete b.mocklangs;C();w(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);b=b.grammSuggest;for(var c=b.length,d=!0,e=0;e<c;e++)a.grammerSuggest.getElement().append(L(b[e],b[e],d)),d=!1;l();a.div_overlay.setDisable()},thesaurusSuggest:function(b){delete b.id;delete b.mocklangs;
26
+ C();w(a.langList);a.selectNodeResponce=b;a.textNode.Thesaurus.reset();var c=z(a.selectNode.Categories),d=0;a.selectNode.Categories.clear();for(var e in b)b=document.createElement("option"),b.text=e,b.value=e,c.$.add(b,d),d++;c=a.selectNode.Categories.getInputElement().getChildren().$[0].value;a.selectNode.Categories.getInputElement().getChildren().$[0].selected=!0;a.buildOptionSynonyms(c);l();a.div_overlay.setDisable()},finish:function(b){delete b.id;N();b=a.dialog.getContentElement(a.dialog._.currentTabId,
27
+ "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();if(c.scayt&&c.wsc.isSsrvSame){var d=c.wsc.udn;d?c.wsc.DataStorage.setData("scayt_user_dictionary_name",d):c.wsc.DataStorage.setData("scayt_user_dictionary_name","")}try{c.focus()}catch(e){}c.setData(b.text,function(){a.dataTemp="";c.unlockSelection();
28
+ c.fire("saveSnapshot");a.dialog.hide()})},ReplaceText:function(b){delete b.id;a.div_overlay.setEnable();a.dataTemp=b.text;a.selectingLang=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+
29
+ "_"+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;a.langList=b.lang;a.bnr=b.bannerId;a.sessionid=b.sessionid;if(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:g.cookie.get("osp"),
30
+ udn:a.userDictionaryName,cust_dic_ids:a.cust_dic_ids,id:"options_dic_send",udnCmd:"create"},g.postMessage.send({message:d,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,
31
+ target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId]})},data:function(a){delete a.id},giveOptions:function(){},setOptionsConfirmF:function(){},setOptionsConfirmT:function(){t.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,d,e){c=c||CKEDITOR.config.wsc_cmd;
32
+ d=d||a.dataTemp;g.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,interfaceLang:a.interfaceLang,reset_suggest:e||!1,sessionid:a.sessionid},target:b,id:"data_outer__page"});a.div_overlay.setEnable()},v={superset:{onShow:function(){a.dialog.showPage("Thesaurus");a.dialog.showPage("GrammTab");q()},allowedTabCommands:{spell:!0,grammar:!0,thes:!0},defaultTabCommand:"spell"},usual:{onShow:function(){x();
33
+ u();q()},allowedTabCommands:{spell:!0},defaultTabCommand:"spell"},rtl:{onShow:function(){x();u();q()},allowedTabCommands:{spell:!0},defaultTabCommand:"spell"},spellgrammar:{onShow:function(){x();a.dialog.showPage("GrammTab");q()},allowedTabCommands:{spell:!0,grammar:!0},defaultTabCommand:"spell"},spellthes:{onShow:function(){a.dialog.showPage("Thesaurus");u();q()},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]]=
34
+ h;return b[c]}}}(a.cmd)).getCmdByTab(CKEDITOR.config.wsc_cmd);l();b.selectPage(c);a.sendData(b)},x=function(){a.dialog.hidePage("Thesaurus")},u=function(){a.dialog.hidePage("GrammTab")},q=function(){a.dialog.showPage("SpellTab")},l=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(),
35
+ 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();d=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 e=0,f;e<d.count();e++){if(f=d.getItem(e),g.misc.isVisible(f.$)){try{f.$.focus()}catch(h){}break}}else try{c.focus()}catch(k){}},
36
+ 0)},C=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");b.removeStyle("position");b.removeStyle("left");b.hide();a.dialog._.editor.focusManager.currentActive.focusNext();d=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 e=
37
+ 0,f;e<d.count();e++){if(f=d.getItem(e),g.misc.isVisible(f.$)){try{f.$.focus()}catch(h){}break}}else try{c.focus()}catch(k){}},0)};CKEDITOR.dialog.add("checkspell",function(b){function c(a){var c=parseInt(b.config.wsc_left,10),e=parseInt(b.config.wsc_top,10),d=parseInt(b.config.wsc_width,10),g=parseInt(b.config.wsc_height,10),m=CKEDITOR.document.getWindow().getViewPaneSize();a.getPosition();var n=a.getSize(),r=0;if(!a._.resized){var r=n.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||
38
+ CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),D=n.width-a.parts.contents.getSize("width",1);if(d<f.minWidth||isNaN(d))d=f.minWidth;d>m.width-D&&(d=m.width-D);if(g<f.minHeight||isNaN(g))g=f.minHeight;g>m.height-r&&(g=m.height-r);n.width=d+D;n.height=g+r;a._.fromResizeEvent=!1;a.resize(d,g);setTimeout(function(){a._.fromResizeEvent=!1;CKEDITOR.dialog.fire("resize",{dialog:a,width:d,height:g},b)},300)}a._.moved||(r=isNaN(c)&&isNaN(e)?0:1,isNaN(c)&&(c=(m.width-n.width)/2),0>c&&(c=0),c>m.width-
39
+ n.width&&(c=m.width-n.width),isNaN(e)&&(e=(m.height-n.height)/2),0>e&&(e=0),e>m.height-n.height&&(e=m.height-n.height),a.move(c,e,r))}function d(){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"===
40
+ 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"===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(",")):
41
+ 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))},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()}},e={expiration:31622400,get:function(a){return b.restoreDataFromString(this.getCookie(a))},set:function(a,c){var d=b.convertDataToString(c);this.setCookie(a,
42
+ d,{expires:this.expiration})},del:function(a){this.deleteCookie(a)},getCookie:function(a){return(a=document.cookie.match(new RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$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+=
43
+ "\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"),c=-1<d?c.substr(0,d):c;this.deleteCookie(c)}}},d=window.localStorage?c:e;a.DataStorage={getData:function(a){return d.get(a)},setData:function(a,b){d.set(a,b)},deleteData:function(a){d.del(a)},clear:function(){d.clear()}}})(b.wsc);b.wsc.operationWithUDN=function(b,c){g.postMessage.send({message:{udn:c,id:"operationWithUDN",
44
+ udnCmd:b},target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId]})};b.wsc.getLocalStorageUDN=function(){var a=b.wsc.DataStorage.getData("scayt_user_dictionary_name");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"+
45
+ a+"\x26callback\x3dtoString\x26synchronization\x3dtrue",e=document.createElement("script");e.type="text/javascript";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 e=function(c){this.getElement().focus();a.div_overlay.setEnable();c=a.dialog._.currentTabId;var d=a.iframeNumber+"_"+
46
+ c,e=a.textNode[c].getValue(),f=this.getElement().getAttribute("title-cmd");g.postMessage.send({message:{cmd:f,tabId:c,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=
47
+ this;x();u();q();b.plugins.scayt&&d()},onShow:function(){a.dialog=this;b.lockSelection(b.getSelection());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?
48
+ "http:":document.location.protocol,d=b.config.wsc_customLoaderScript||d+"//www.webspellchecker.net/spellcheck3/script/ssrv.cgi?plugin\x3dfck2\x26customerid\x3d"+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,
49
+ 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);
50
+ a.currentLang=b.config.wsc_lang||a.LangComparer.getSPLangCode(b.langCode)||"en_US";a.interfaceLang=b.config.wsc_interfaceLang;a.selectingLang=a.currentLang;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",
51
+ background:"#fff url("+a.loadIconEmptyEditor+") no-repeat 50% 50%",target:a.OverlayPlace});c&&(H(a.dialog),a.dialog.setupContent(a.dialog));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/",
52
+ "")+"/script/ssrv.cgi");!d||f||b.config.scayt_servicePath||(d.split("//"),e=d.split("//")[1].split("/")[0],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),
53
+ 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),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!==
54
+ a&&b.wsc.operationWithUDN("restore",a)},500)}})}else a.dialog.hide()},onHide:function(){var c=CKEDITOR.plugins.scayt,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()),
55
+ e&&setTimeout(function(){f=e.split(",");for(l=0;l<f.length;l+=1)b.scayt.addWordToUserDictionary(f[l])},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"},
56
+ {type:"html",id:"Content",label:"spellContent",html:"",setup:function(b){b=a.iframeNumber+"_"+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%"],className:"wsc-spelltab-bottom",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+
57
+ ":",labelLayout:"horizontal",labelStyle:"font: 12px/25px arial, sans-serif;",width:"140px","default":"",onShow:function(){a.textNode.SpellTab=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"})}},
58
+ {type:"html",id:"logo",html:"",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",
59
+ widths:["50%","50%","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:e},{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:e},{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:e},{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:e}]},{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:e},{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:e},{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: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:""}]}]},{type:"hbox",
64
+ 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"):(y=document.activeElement,
65
+ 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:e}]}]}]}]},{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=a.iframeNumber+
66
+ "_"+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()}},{type:"html",
67
+ 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:e},{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:e},{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:e},{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:e}]}]}]},{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:l,children:[{type:"hbox",id:"leftCol",align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",
70
+ id:"logo",html:"",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:e}]}]}]}]},
71
+ {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",style:"width:560px; margin: -10px auto; overflow: hidden;",children:[{type:"hbox",widths:["75%","25%"],children:[{type:"vbox",children:[{type:"hbox",
72
+ 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()}},{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",
73
+ "ChangeTo");a.LocalizationButton.ChangeTo_button.instance=this},onClick:e}]},{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=this;a.LocalizationLabel.Categories.instance=this},onChange:function(){a.buildOptionSynonyms(this.getValue())}},{type:"select",id:"Synonyms",label:a.LocalizationLabel.Synonyms.text+
74
+ ":",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())}}]}]},{type:"vbox",width:"120px",style:"margin-top:46px;",children:[{type:"html",id:"logotype",label:"WebSpellChecker.net",html:"",setup:function(){this.getElement().$.src=a.logotype;this.getElement().getParent().setStyles({"text-align":"center"})}},
75
+ {type:"button",id:"FinishChecking_button",label:a.LocalizationButton.FinishChecking_button.text,title:"Finish Checking",style:"width: 100%; float: right; margin-top: 9px;",onLoad:function(){this.getElement().setAttribute("title-cmd","FinishChecking")},onClick:e}]}]}]},{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",
76
+ align:"left",width:"70%",children:[{type:"vbox",id:"rightCol1",children:[{type:"html",id:"logo",html:"",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",
77
+ "FinishChecking")},onClick:e}]}]}]}]}]}});var y=null;CKEDITOR.dialog.add("options",function(b){var c=null,d={},e={},f=null,h=null;g.cookie.get("udn");g.cookie.get("osp");b=function(a){h=this.getElement().getAttribute("title-cmd");a=[];a[0]=e.IgnoreAllCapsWords;a[1]=e.IgnoreWordsNumbers;a[2]=e.IgnoreMixedCaseWords;a[3]=e.IgnoreDomainNames;a=a.toString().replace(/,/g,"");g.cookie.set("osp",a);g.cookie.set("udnCmd",h?h:"ignore");"delete"!=h&&(a="",""!==t.getValue()&&(a=t.getValue()),g.cookie.set("udn",
78
+ a));g.postMessage.send({id:"options_dic_send"})};var k=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",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=
79
+ 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},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;",
80
+ style:"float:left; min-height: 16px;","default":"",onClick:function(){e[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(){e[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;",
81
+ style:"float:left; min-height: 16px;","default":"",onClick:function(){e[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(){e[this.id]=this.getValue()?1:0}}]}]},{type:"vbox",id:"Options_DictionaryName",children:[{type:"text",id:"DictionaryName",style:"margin-bottom: 10px",label:"Dictionary Name:",
82
+ labelLayout:"vertical",labelStyle:"font: 12px/25px arial, sans-serif;","default":"",onLoad:function(){t=this;var b=a.userDictionaryName?a.userDictionaryName:(g.cookie.get("udn"),this.getValue());this.setValue(b)},onShow:function(){t=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
83
  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
84
  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());
85
+ 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]=e.IgnoreAllCapsWords;
86
+ a[1]=e.IgnoreWordsNumbers;a[2]=e.IgnoreMixedCaseWords;a[3]=e.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;d.IgnoreAllCapsWords=c.getContentElement("OptionsTab","IgnoreAllCapsWords");d.IgnoreWordsNumbers=c.getContentElement("OptionsTab","IgnoreWordsNumbers");d.IgnoreMixedCaseWords=c.getContentElement("OptionsTab","IgnoreMixedCaseWords");d.IgnoreDomainNames=
87
+ c.getContentElement("OptionsTab","IgnoreDomainNames")},onShow:function(){g.postMessage.init(k);var b=g.cookie.get("osp").split("");e.IgnoreAllCapsWords=b[0];e.IgnoreWordsNumbers=b[1];e.IgnoreMixedCaseWords=b[2];e.IgnoreDomainNames=b[3];parseInt(e.IgnoreAllCapsWords,10)?d.IgnoreAllCapsWords.setValue("checked",!1):d.IgnoreAllCapsWords.setValue("",!1);parseInt(e.IgnoreWordsNumbers,10)?d.IgnoreWordsNumbers.setValue("checked",!1):d.IgnoreWordsNumbers.setValue("",!1);parseInt(e.IgnoreMixedCaseWords,10)?
88
+ d.IgnoreMixedCaseWords.setValue("checked",!1):d.IgnoreMixedCaseWords.setValue("",!1);parseInt(e.IgnoreDomainNames,10)?d.IgnoreDomainNames.setValue("checked",!1):d.IgnoreDomainNames.setValue("",!1);e.IgnoreAllCapsWords=d.IgnoreAllCapsWords.getValue()?1:0;e.IgnoreWordsNumbers=d.IgnoreWordsNumbers.getValue()?1:0;e.IgnoreMixedCaseWords=d.IgnoreMixedCaseWords.getValue()?1:0;e.IgnoreDomainNames=d.IgnoreDomainNames.getValue()?1:0;d.IgnoreAllCapsWords.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreAllCapsWords;
89
+ d.IgnoreWordsNumbers.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreWordsWithNumbers;d.IgnoreMixedCaseWords.getElement().$.lastChild.innerHTML=a.LocalizationComing.IgnoreMixedCaseWords;d.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,d=CKEDITOR.document.getById(a.iframeNumber+"_"+c._.currentTabId);
90
+ "checkspell"==c._.name&&(a.bnr?d&&d.setSize("height",b.height-310):d&&d.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
91
  a.div_overlay.setDisable();a.onLoadOverlay.setDisable();return!1},this,null,-1)}})})();
@@ -20,5 +20,6 @@ CKEDITOR.plugins.setLang('youtube', 'ru', {
20
20
  noHeight : 'Вы должны указать высоту',
21
21
  invalidHeight : 'Укажите правильную высоту',
22
22
  invalidTime : 'Укажите правильное время начала',
23
- txtResponsive : 'Растягиваемое видео'
23
+ txtResponsive : 'Растягиваемое видео',
24
+ txtNoEmbed : 'Не встраивать видео (обложка-ссылка на YouTube)'
24
25
  });
@@ -1,448 +1,448 @@
1
- /*
2
- * Youtube Embed Plugin
3
- *
4
- * @author Jonnas Fonini <jonnasfonini@gmail.com>
5
- * @version 2.1.5
6
- */
7
- (function () {
8
- CKEDITOR.plugins.add('youtube', {
9
- lang: [ 'en', 'pt', 'pt-br', 'ja', 'hu', 'it', 'fr', 'tr', 'ru', 'de', 'ar', 'nl', 'pl', 'vi', 'zh', 'el', 'he', 'es', 'nb', 'nn', 'fi', 'et', 'sk', 'cs', 'ko'],
10
- init: function (editor) {
11
- editor.addCommand('youtube', new CKEDITOR.dialogCommand('youtube', {
12
- allowedContent: 'div{*}(*); iframe{*}[!width,!height,!src,!frameborder,!allowfullscreen]; object param[*]; a[*]; img[*]'
13
- }));
14
-
15
- editor.ui.addButton('Youtube', {
16
- label : editor.lang.youtube.button,
17
- toolbar : 'insert',
18
- command : 'youtube',
19
- icon : this.path + 'images/icon.png'
20
- });
21
-
22
- CKEDITOR.dialog.add('youtube', function (instance) {
23
- var video,
24
- disabled = editor.config.youtube_disabled_fields || [];
25
-
26
- return {
27
- title : editor.lang.youtube.title,
28
- minWidth : 510,
29
- minHeight : 200,
30
- onShow: function () {
31
- for (var i = 0; i < disabled.length; i++) {
32
- this.getContentElement('youtubePlugin', disabled[i]).disable();
33
- }
34
- },
35
- contents :
36
- [{
37
- id : 'youtubePlugin',
38
- expand : true,
39
- elements :
40
- [{
41
- id : 'txtEmbed',
42
- type : 'textarea',
43
- label : editor.lang.youtube.txtEmbed,
44
- onChange : function (api) {
45
- handleEmbedChange(this, api);
46
- },
47
- onKeyUp : function (api) {
48
- handleEmbedChange(this, api);
49
- },
50
- validate : function () {
51
- if (this.isEnabled()) {
52
- if (!this.getValue()) {
53
- alert(editor.lang.youtube.noCode);
54
- return false;
55
- }
56
- else
57
- if (this.getValue().length === 0 || this.getValue().indexOf('//') === -1) {
58
- alert(editor.lang.youtube.invalidEmbed);
59
- return false;
60
- }
61
- }
62
- }
63
- },
64
- {
65
- type : 'html',
66
- html : editor.lang.youtube.or + '<hr>'
67
- },
68
- {
69
- type : 'hbox',
70
- widths : [ '70%', '15%', '15%' ],
71
- children :
72
- [
73
- {
74
- id : 'txtUrl',
75
- type : 'text',
76
- label : editor.lang.youtube.txtUrl,
77
- onChange : function (api) {
78
- handleLinkChange(this, api);
79
- },
80
- onKeyUp : function (api) {
81
- handleLinkChange(this, api);
82
- },
83
- validate : function () {
84
- if (this.isEnabled()) {
85
- if (!this.getValue()) {
86
- alert(editor.lang.youtube.noCode);
87
- return false;
88
- }
89
- else{
90
- video = ytVidId(this.getValue());
91
-
92
- if (this.getValue().length === 0 || video === false)
93
- {
94
- alert(editor.lang.youtube.invalidUrl);
95
- return false;
96
- }
97
- }
98
- }
99
- }
100
- },
101
- {
102
- type : 'text',
103
- id : 'txtWidth',
104
- width : '60px',
105
- label : editor.lang.youtube.txtWidth,
106
- 'default' : editor.config.youtube_width != null ? editor.config.youtube_width : '640',
107
- validate : function () {
108
- if (this.getValue()) {
109
- var width = parseInt (this.getValue()) || 0;
110
-
111
- if (width === 0) {
112
- alert(editor.lang.youtube.invalidWidth);
113
- return false;
114
- }
115
- }
116
- else {
117
- alert(editor.lang.youtube.noWidth);
118
- return false;
119
- }
120
- }
121
- },
122
- {
123
- type : 'text',
124
- id : 'txtHeight',
125
- width : '60px',
126
- label : editor.lang.youtube.txtHeight,
127
- 'default' : editor.config.youtube_height != null ? editor.config.youtube_height : '360',
128
- validate : function () {
129
- if (this.getValue()) {
130
- var height = parseInt(this.getValue()) || 0;
131
-
132
- if (height === 0) {
133
- alert(editor.lang.youtube.invalidHeight);
134
- return false;
135
- }
136
- }
137
- else {
138
- alert(editor.lang.youtube.noHeight);
139
- return false;
140
- }
141
- }
142
- }
143
- ]
144
- },
145
- {
146
- type : 'hbox',
147
- widths : [ '55%', '45%' ],
148
- children :
149
- [
150
- {
151
- id : 'chkResponsive',
152
- type : 'checkbox',
153
- label : editor.lang.youtube.txtResponsive,
154
- 'default' : editor.config.youtube_responsive != null ? editor.config.youtube_responsive : false
155
- },
156
- {
157
- id : 'chkNoEmbed',
158
- type : 'checkbox',
159
- label : editor.lang.youtube.txtNoEmbed,
160
- 'default' : editor.config.youtube_noembed != null ? editor.config.youtube_noembed : false
161
- }
162
- ]
163
- },
164
- {
165
- type : 'hbox',
166
- widths : [ '55%', '45%' ],
167
- children :
168
- [
169
- {
170
- id : 'chkRelated',
171
- type : 'checkbox',
172
- 'default' : editor.config.youtube_related != null ? editor.config.youtube_related : true,
173
- label : editor.lang.youtube.chkRelated
174
- },
175
- {
176
- id : 'chkOlderCode',
177
- type : 'checkbox',
178
- 'default' : editor.config.youtube_older != null ? editor.config.youtube_older : false,
179
- label : editor.lang.youtube.chkOlderCode
180
- }
181
- ]
182
- },
183
- {
184
- type : 'hbox',
185
- widths : [ '55%', '45%' ],
186
- children :
187
- [
188
- {
189
- id : 'chkPrivacy',
190
- type : 'checkbox',
191
- label : editor.lang.youtube.chkPrivacy,
192
- 'default' : editor.config.youtube_privacy != null ? editor.config.youtube_privacy : false
193
- },
194
- {
195
- id : 'chkAutoplay',
196
- type : 'checkbox',
197
- 'default' : editor.config.youtube_autoplay != null ? editor.config.youtube_autoplay : false,
198
- label : editor.lang.youtube.chkAutoplay
199
- }
200
- ]
201
- },
202
- {
203
- type : 'hbox',
204
- widths : [ '55%', '45%'],
205
- children :
206
- [
207
- {
208
- id : 'txtStartAt',
209
- type : 'text',
210
- label : editor.lang.youtube.txtStartAt,
211
- validate : function () {
212
- if (this.getValue()) {
213
- var str = this.getValue();
214
-
215
- if (!/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/i.test(str)) {
216
- alert(editor.lang.youtube.invalidTime);
217
- return false;
218
- }
219
- }
220
- }
221
- },
222
- {
223
- id : 'chkControls',
224
- type : 'checkbox',
225
- 'default' : editor.config.youtube_controls != null ? editor.config.youtube_controls : true,
226
- label : editor.lang.youtube.chkControls
227
- }
228
- ]
229
- }
230
- ]
231
- }
232
- ],
233
- onOk: function()
234
- {
235
- var content = '';
236
- var responsiveStyle = '';
237
-
238
- if (this.getContentElement('youtubePlugin', 'txtEmbed').isEnabled()) {
239
- content = this.getValueOf('youtubePlugin', 'txtEmbed');
240
- }
241
- else {
242
- var url = 'https://', params = [], startSecs;
243
- var width = this.getValueOf('youtubePlugin', 'txtWidth');
244
- var height = this.getValueOf('youtubePlugin', 'txtHeight');
245
-
246
- if (this.getContentElement('youtubePlugin', 'chkPrivacy').getValue() === true) {
247
- url += 'www.youtube-nocookie.com/';
248
- }
249
- else {
250
- url += 'www.youtube.com/';
251
- }
252
-
253
- url += 'embed/' + video;
254
-
255
- if (this.getContentElement('youtubePlugin', 'chkRelated').getValue() === false) {
256
- params.push('rel=0');
257
- }
258
-
259
- if (this.getContentElement('youtubePlugin', 'chkAutoplay').getValue() === true) {
260
- params.push('autoplay=1');
261
- }
262
-
263
- if (this.getContentElement('youtubePlugin', 'chkControls').getValue() === false) {
264
- params.push('controls=0');
265
- }
266
-
267
- startSecs = this.getValueOf('youtubePlugin', 'txtStartAt');
268
-
269
- if (startSecs) {
270
- var seconds = hmsToSeconds(startSecs);
271
-
272
- params.push('start=' + seconds);
273
- }
274
-
275
- if (params.length > 0) {
276
- url = url + '?' + params.join('&');
277
- }
278
-
279
- if (this.getContentElement('youtubePlugin', 'chkResponsive').getValue() === true) {
280
- content += '<div class="youtube-embed-wrapper" style="position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden">';
281
- responsiveStyle = 'style="position:absolute;top:0;left:0;width:100%;height:100%"';
282
- }
283
-
284
- if (this.getContentElement('youtubePlugin', 'chkOlderCode').getValue() === true) {
285
- url = url.replace('embed/', 'v/');
286
- url = url.replace(/&/g, '&amp;');
287
-
288
- if (url.indexOf('?') === -1) {
289
- url += '?';
290
- }
291
- else {
292
- url += '&amp;';
293
- }
294
- url += 'hl=' + (this.getParentEditor().config.language ? this.getParentEditor().config.language : 'en') + '&amp;version=3';
295
-
296
- content += '<object width="' + width + '" height="' + height + '" ' + responsiveStyle + '>';
297
- content += '<param name="movie" value="' + url + '"></param>';
298
- content += '<param name="allowFullScreen" value="true"></param>';
299
- content += '<param name="allowscriptaccess" value="always"></param>';
300
- content += '<embed src="' + url + '" type="application/x-shockwave-flash" ';
301
- content += 'width="' + width + '" height="' + height + '" '+ responsiveStyle + ' allowscriptaccess="always" ';
302
- content += 'allowfullscreen="true"></embed>';
303
- content += '</object>';
304
- }
305
- else
306
- if (this.getContentElement('youtubePlugin', 'chkNoEmbed').getValue() === true) {
307
- var imgSrc = '//img.youtube.com/vi/' + video + '/sddefault.jpg';
308
- content += '<a href="' + url + '" ><img width="' + width + '" height="' + height + '" src="' + imgSrc + '" ' + responsiveStyle + '/></a>';
309
- }
310
- else {
311
- content += '<iframe width="' + width + '" height="' + height + '" src="' + url + '" ' + responsiveStyle;
312
- content += 'frameborder="0" allowfullscreen></iframe>';
313
- }
314
-
315
- if (this.getContentElement('youtubePlugin', 'chkResponsive').getValue() === true) {
316
- content += '</div>';
317
- }
318
- }
319
-
320
- var element = CKEDITOR.dom.element.createFromHtml(content);
321
- var instance = this.getParentEditor();
322
- instance.insertElement(element);
323
- }
324
- };
325
- });
326
- }
327
- });
328
- })();
329
-
330
- function handleLinkChange(el, api) {
331
- var video = ytVidId(el.getValue());
332
- var time = ytVidTime(el.getValue());
333
-
334
- if (el.getValue().length > 0) {
335
- el.getDialog().getContentElement('youtubePlugin', 'txtEmbed').disable();
336
- }
337
- else {
338
- el.getDialog().getContentElement('youtubePlugin', 'txtEmbed').enable();
339
- }
340
-
341
- if (video && time) {
342
- var seconds = timeParamToSeconds(time);
343
- var hms = secondsToHms(seconds);
344
- el.getDialog().getContentElement('youtubePlugin', 'txtStartAt').setValue(hms);
345
- }
346
- }
347
-
348
- function handleEmbedChange(el, api) {
349
- if (el.getValue().length > 0) {
350
- el.getDialog().getContentElement('youtubePlugin', 'txtUrl').disable();
351
- }
352
- else {
353
- el.getDialog().getContentElement('youtubePlugin', 'txtUrl').enable();
354
- }
355
- }
356
-
357
-
358
- /**
359
- * JavaScript function to match (and return) the video Id
360
- * of any valid Youtube Url, given as input string.
361
- * @author: Stephan Schmitz <eyecatchup@gmail.com>
362
- * @url: http://stackoverflow.com/a/10315969/624466
363
- */
364
- function ytVidId(url) {
365
- var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
366
- return (url.match(p)) ? RegExp.$1 : false;
367
- }
368
-
369
- /**
370
- * Matches and returns time param in YouTube Urls.
371
- */
372
- function ytVidTime(url) {
373
- var p = /t=([0-9hms]+)/;
374
- return (url.match(p)) ? RegExp.$1 : false;
375
- }
376
-
377
- /**
378
- * Converts time in hms format to seconds only
379
- */
380
- function hmsToSeconds(time) {
381
- var arr = time.split(':'), s = 0, m = 1;
382
-
383
- while (arr.length > 0) {
384
- s += m * parseInt(arr.pop(), 10);
385
- m *= 60;
386
- }
387
-
388
- return s;
389
- }
390
-
391
- /**
392
- * Converts seconds to hms format
393
- */
394
- function secondsToHms(seconds) {
395
- var h = Math.floor(seconds / 3600);
396
- var m = Math.floor((seconds / 60) % 60);
397
- var s = seconds % 60;
398
-
399
- var pad = function (n) {
400
- n = String(n);
401
- return n.length >= 2 ? n : "0" + n;
402
- };
403
-
404
- if (h > 0) {
405
- return pad(h) + ':' + pad(m) + ':' + pad(s);
406
- }
407
- else {
408
- return pad(m) + ':' + pad(s);
409
- }
410
- }
411
-
412
- /**
413
- * Converts time in youtube t-param format to seconds
414
- */
415
- function timeParamToSeconds(param) {
416
- var componentValue = function (si) {
417
- var regex = new RegExp('(\\d+)' + si);
418
- return param.match(regex) ? parseInt(RegExp.$1, 10) : 0;
419
- };
420
-
421
- return componentValue('h') * 3600
422
- + componentValue('m') * 60
423
- + componentValue('s');
424
- }
425
-
426
- /**
427
- * Converts seconds into youtube t-param value, e.g. 1h4m30s
428
- */
429
- function secondsToTimeParam(seconds) {
430
- var h = Math.floor(seconds / 3600);
431
- var m = Math.floor((seconds / 60) % 60);
432
- var s = seconds % 60;
433
- var param = '';
434
-
435
- if (h > 0) {
436
- param += h + 'h';
437
- }
438
-
439
- if (m > 0) {
440
- param += m + 'm';
441
- }
442
-
443
- if (s > 0) {
444
- param += s + 's';
445
- }
446
-
447
- return param;
448
- }
1
+ /*
2
+ * Youtube Embed Plugin
3
+ *
4
+ * @author Jonnas Fonini <jonnasfonini@gmail.com>
5
+ * @version 2.1.8
6
+ */
7
+ (function () {
8
+ CKEDITOR.plugins.add('youtube', {
9
+ lang: [ 'en', 'ru' ],
10
+ init: function (editor) {
11
+ editor.addCommand('youtube', new CKEDITOR.dialogCommand('youtube', {
12
+ allowedContent: 'div{*}(*); iframe{*}[!width,!height,!src,!frameborder,!allowfullscreen]; object param[*]; a[*]; img[*]'
13
+ }));
14
+
15
+ editor.ui.addButton('Youtube', {
16
+ label : editor.lang.youtube.button,
17
+ toolbar : 'insert',
18
+ command : 'youtube',
19
+ icon : this.path + 'images/icon.png'
20
+ });
21
+
22
+ CKEDITOR.dialog.add('youtube', function (instance) {
23
+ var video,
24
+ disabled = editor.config.youtube_disabled_fields || [];
25
+
26
+ return {
27
+ title : editor.lang.youtube.title,
28
+ minWidth : 510,
29
+ minHeight : 200,
30
+ onShow: function () {
31
+ for (var i = 0; i < disabled.length; i++) {
32
+ this.getContentElement('youtubePlugin', disabled[i]).disable();
33
+ }
34
+ },
35
+ contents :
36
+ [{
37
+ id : 'youtubePlugin',
38
+ expand : true,
39
+ elements :
40
+ [{
41
+ id : 'txtEmbed',
42
+ type : 'textarea',
43
+ label : editor.lang.youtube.txtEmbed,
44
+ onChange : function (api) {
45
+ handleEmbedChange(this, api);
46
+ },
47
+ onKeyUp : function (api) {
48
+ handleEmbedChange(this, api);
49
+ },
50
+ validate : function () {
51
+ if (this.isEnabled()) {
52
+ if (!this.getValue()) {
53
+ alert(editor.lang.youtube.noCode);
54
+ return false;
55
+ }
56
+ else
57
+ if (this.getValue().length === 0 || this.getValue().indexOf('//') === -1) {
58
+ alert(editor.lang.youtube.invalidEmbed);
59
+ return false;
60
+ }
61
+ }
62
+ }
63
+ },
64
+ {
65
+ type : 'html',
66
+ html : editor.lang.youtube.or + '<hr>'
67
+ },
68
+ {
69
+ type : 'hbox',
70
+ widths : [ '70%', '15%', '15%' ],
71
+ children :
72
+ [
73
+ {
74
+ id : 'txtUrl',
75
+ type : 'text',
76
+ label : editor.lang.youtube.txtUrl,
77
+ onChange : function (api) {
78
+ handleLinkChange(this, api);
79
+ },
80
+ onKeyUp : function (api) {
81
+ handleLinkChange(this, api);
82
+ },
83
+ validate : function () {
84
+ if (this.isEnabled()) {
85
+ if (!this.getValue()) {
86
+ alert(editor.lang.youtube.noCode);
87
+ return false;
88
+ }
89
+ else{
90
+ video = ytVidId(this.getValue());
91
+
92
+ if (this.getValue().length === 0 || video === false)
93
+ {
94
+ alert(editor.lang.youtube.invalidUrl);
95
+ return false;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ },
101
+ {
102
+ type : 'text',
103
+ id : 'txtWidth',
104
+ width : '60px',
105
+ label : editor.lang.youtube.txtWidth,
106
+ 'default' : editor.config.youtube_width != null ? editor.config.youtube_width : '640',
107
+ validate : function () {
108
+ if (this.getValue()) {
109
+ var width = parseInt (this.getValue()) || 0;
110
+
111
+ if (width === 0) {
112
+ alert(editor.lang.youtube.invalidWidth);
113
+ return false;
114
+ }
115
+ }
116
+ else {
117
+ alert(editor.lang.youtube.noWidth);
118
+ return false;
119
+ }
120
+ }
121
+ },
122
+ {
123
+ type : 'text',
124
+ id : 'txtHeight',
125
+ width : '60px',
126
+ label : editor.lang.youtube.txtHeight,
127
+ 'default' : editor.config.youtube_height != null ? editor.config.youtube_height : '360',
128
+ validate : function () {
129
+ if (this.getValue()) {
130
+ var height = parseInt(this.getValue()) || 0;
131
+
132
+ if (height === 0) {
133
+ alert(editor.lang.youtube.invalidHeight);
134
+ return false;
135
+ }
136
+ }
137
+ else {
138
+ alert(editor.lang.youtube.noHeight);
139
+ return false;
140
+ }
141
+ }
142
+ }
143
+ ]
144
+ },
145
+ {
146
+ type : 'hbox',
147
+ widths : [ '55%', '45%' ],
148
+ children :
149
+ [
150
+ {
151
+ id : 'chkResponsive',
152
+ type : 'checkbox',
153
+ label : editor.lang.youtube.txtResponsive,
154
+ 'default' : editor.config.youtube_responsive != null ? editor.config.youtube_responsive : false
155
+ },
156
+ {
157
+ id : 'chkNoEmbed',
158
+ type : 'checkbox',
159
+ label : editor.lang.youtube.txtNoEmbed,
160
+ 'default' : editor.config.youtube_noembed != null ? editor.config.youtube_noembed : false
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ type : 'hbox',
166
+ widths : [ '55%', '45%' ],
167
+ children :
168
+ [
169
+ {
170
+ id : 'chkRelated',
171
+ type : 'checkbox',
172
+ 'default' : editor.config.youtube_related != null ? editor.config.youtube_related : true,
173
+ label : editor.lang.youtube.chkRelated
174
+ },
175
+ {
176
+ id : 'chkOlderCode',
177
+ type : 'checkbox',
178
+ 'default' : editor.config.youtube_older != null ? editor.config.youtube_older : false,
179
+ label : editor.lang.youtube.chkOlderCode
180
+ }
181
+ ]
182
+ },
183
+ {
184
+ type : 'hbox',
185
+ widths : [ '55%', '45%' ],
186
+ children :
187
+ [
188
+ {
189
+ id : 'chkPrivacy',
190
+ type : 'checkbox',
191
+ label : editor.lang.youtube.chkPrivacy,
192
+ 'default' : editor.config.youtube_privacy != null ? editor.config.youtube_privacy : false
193
+ },
194
+ {
195
+ id : 'chkAutoplay',
196
+ type : 'checkbox',
197
+ 'default' : editor.config.youtube_autoplay != null ? editor.config.youtube_autoplay : false,
198
+ label : editor.lang.youtube.chkAutoplay
199
+ }
200
+ ]
201
+ },
202
+ {
203
+ type : 'hbox',
204
+ widths : [ '55%', '45%'],
205
+ children :
206
+ [
207
+ {
208
+ id : 'txtStartAt',
209
+ type : 'text',
210
+ label : editor.lang.youtube.txtStartAt,
211
+ validate : function () {
212
+ if (this.getValue()) {
213
+ var str = this.getValue();
214
+
215
+ if (!/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/i.test(str)) {
216
+ alert(editor.lang.youtube.invalidTime);
217
+ return false;
218
+ }
219
+ }
220
+ }
221
+ },
222
+ {
223
+ id : 'chkControls',
224
+ type : 'checkbox',
225
+ 'default' : editor.config.youtube_controls != null ? editor.config.youtube_controls : true,
226
+ label : editor.lang.youtube.chkControls
227
+ }
228
+ ]
229
+ }
230
+ ]
231
+ }
232
+ ],
233
+ onOk: function()
234
+ {
235
+ var content = '';
236
+ var responsiveStyle = '';
237
+
238
+ if (this.getContentElement('youtubePlugin', 'txtEmbed').isEnabled()) {
239
+ content = this.getValueOf('youtubePlugin', 'txtEmbed');
240
+ }
241
+ else {
242
+ var url = 'https://', params = [], startSecs;
243
+ var width = this.getValueOf('youtubePlugin', 'txtWidth');
244
+ var height = this.getValueOf('youtubePlugin', 'txtHeight');
245
+
246
+ if (this.getContentElement('youtubePlugin', 'chkPrivacy').getValue() === true) {
247
+ url += 'www.youtube-nocookie.com/';
248
+ }
249
+ else {
250
+ url += 'www.youtube.com/';
251
+ }
252
+
253
+ url += 'embed/' + video;
254
+
255
+ if (this.getContentElement('youtubePlugin', 'chkRelated').getValue() === false) {
256
+ params.push('rel=0');
257
+ }
258
+
259
+ if (this.getContentElement('youtubePlugin', 'chkAutoplay').getValue() === true) {
260
+ params.push('autoplay=1');
261
+ }
262
+
263
+ if (this.getContentElement('youtubePlugin', 'chkControls').getValue() === false) {
264
+ params.push('controls=0');
265
+ }
266
+
267
+ startSecs = this.getValueOf('youtubePlugin', 'txtStartAt');
268
+
269
+ if (startSecs) {
270
+ var seconds = hmsToSeconds(startSecs);
271
+
272
+ params.push('start=' + seconds);
273
+ }
274
+
275
+ if (params.length > 0) {
276
+ url = url + '?' + params.join('&');
277
+ }
278
+
279
+ if (this.getContentElement('youtubePlugin', 'chkResponsive').getValue() === true) {
280
+ content += '<div class="youtube-embed-wrapper" style="position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden">';
281
+ responsiveStyle = 'style="position:absolute;top:0;left:0;width:100%;height:100%"';
282
+ }
283
+
284
+ if (this.getContentElement('youtubePlugin', 'chkOlderCode').getValue() === true) {
285
+ url = url.replace('embed/', 'v/');
286
+ url = url.replace(/&/g, '&amp;');
287
+
288
+ if (url.indexOf('?') === -1) {
289
+ url += '?';
290
+ }
291
+ else {
292
+ url += '&amp;';
293
+ }
294
+ url += 'hl=' + (this.getParentEditor().config.language ? this.getParentEditor().config.language : 'en') + '&amp;version=3';
295
+
296
+ content += '<object width="' + width + '" height="' + height + '" ' + responsiveStyle + '>';
297
+ content += '<param name="movie" value="' + url + '"></param>';
298
+ content += '<param name="allowFullScreen" value="true"></param>';
299
+ content += '<param name="allowscriptaccess" value="always"></param>';
300
+ content += '<embed src="' + url + '" type="application/x-shockwave-flash" ';
301
+ content += 'width="' + width + '" height="' + height + '" '+ responsiveStyle + ' allowscriptaccess="always" ';
302
+ content += 'allowfullscreen="true"></embed>';
303
+ content += '</object>';
304
+ }
305
+ else
306
+ if (this.getContentElement('youtubePlugin', 'chkNoEmbed').getValue() === true) {
307
+ var imgSrc = '//img.youtube.com/vi/' + video + '/sddefault.jpg';
308
+ content += '<a href="' + url + '" ><img width="' + width + '" height="' + height + '" src="' + imgSrc + '" ' + responsiveStyle + '/></a>';
309
+ }
310
+ else {
311
+ content += '<iframe width="' + width + '" height="' + height + '" src="' + url + '" ' + responsiveStyle;
312
+ content += 'frameborder="0" allowfullscreen></iframe>';
313
+ }
314
+
315
+ if (this.getContentElement('youtubePlugin', 'chkResponsive').getValue() === true) {
316
+ content += '</div>';
317
+ }
318
+ }
319
+
320
+ var element = CKEDITOR.dom.element.createFromHtml(content);
321
+ var instance = this.getParentEditor();
322
+ instance.insertElement(element);
323
+ }
324
+ };
325
+ });
326
+ }
327
+ });
328
+ })();
329
+
330
+ function handleLinkChange(el, api) {
331
+ var video = ytVidId(el.getValue());
332
+ var time = ytVidTime(el.getValue());
333
+
334
+ if (el.getValue().length > 0) {
335
+ el.getDialog().getContentElement('youtubePlugin', 'txtEmbed').disable();
336
+ }
337
+ else {
338
+ el.getDialog().getContentElement('youtubePlugin', 'txtEmbed').enable();
339
+ }
340
+
341
+ if (video && time) {
342
+ var seconds = timeParamToSeconds(time);
343
+ var hms = secondsToHms(seconds);
344
+ el.getDialog().getContentElement('youtubePlugin', 'txtStartAt').setValue(hms);
345
+ }
346
+ }
347
+
348
+ function handleEmbedChange(el, api) {
349
+ if (el.getValue().length > 0) {
350
+ el.getDialog().getContentElement('youtubePlugin', 'txtUrl').disable();
351
+ }
352
+ else {
353
+ el.getDialog().getContentElement('youtubePlugin', 'txtUrl').enable();
354
+ }
355
+ }
356
+
357
+
358
+ /**
359
+ * JavaScript function to match (and return) the video Id
360
+ * of any valid Youtube Url, given as input string.
361
+ * @author: Stephan Schmitz <eyecatchup@gmail.com>
362
+ * @url: http://stackoverflow.com/a/10315969/624466
363
+ */
364
+ function ytVidId(url) {
365
+ var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
366
+ return (url.match(p)) ? RegExp.$1 : false;
367
+ }
368
+
369
+ /**
370
+ * Matches and returns time param in YouTube Urls.
371
+ */
372
+ function ytVidTime(url) {
373
+ var p = /t=([0-9hms]+)/;
374
+ return (url.match(p)) ? RegExp.$1 : false;
375
+ }
376
+
377
+ /**
378
+ * Converts time in hms format to seconds only
379
+ */
380
+ function hmsToSeconds(time) {
381
+ var arr = time.split(':'), s = 0, m = 1;
382
+
383
+ while (arr.length > 0) {
384
+ s += m * parseInt(arr.pop(), 10);
385
+ m *= 60;
386
+ }
387
+
388
+ return s;
389
+ }
390
+
391
+ /**
392
+ * Converts seconds to hms format
393
+ */
394
+ function secondsToHms(seconds) {
395
+ var h = Math.floor(seconds / 3600);
396
+ var m = Math.floor((seconds / 60) % 60);
397
+ var s = seconds % 60;
398
+
399
+ var pad = function (n) {
400
+ n = String(n);
401
+ return n.length >= 2 ? n : "0" + n;
402
+ };
403
+
404
+ if (h > 0) {
405
+ return pad(h) + ':' + pad(m) + ':' + pad(s);
406
+ }
407
+ else {
408
+ return pad(m) + ':' + pad(s);
409
+ }
410
+ }
411
+
412
+ /**
413
+ * Converts time in youtube t-param format to seconds
414
+ */
415
+ function timeParamToSeconds(param) {
416
+ var componentValue = function (si) {
417
+ var regex = new RegExp('(\\d+)' + si);
418
+ return param.match(regex) ? parseInt(RegExp.$1, 10) : 0;
419
+ };
420
+
421
+ return componentValue('h') * 3600
422
+ + componentValue('m') * 60
423
+ + componentValue('s');
424
+ }
425
+
426
+ /**
427
+ * Converts seconds into youtube t-param value, e.g. 1h4m30s
428
+ */
429
+ function secondsToTimeParam(seconds) {
430
+ var h = Math.floor(seconds / 3600);
431
+ var m = Math.floor((seconds / 60) % 60);
432
+ var s = seconds % 60;
433
+ var param = '';
434
+
435
+ if (h > 0) {
436
+ param += h + 'h';
437
+ }
438
+
439
+ if (m > 0) {
440
+ param += m + 'm';
441
+ }
442
+
443
+ if (s > 0) {
444
+ param += s + 's';
445
+ }
446
+
447
+ return param;
448
+ }