glebtv-ckeditor 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (596) hide show
  1. data/Gemfile +4 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +202 -0
  4. data/Rakefile +66 -0
  5. data/app/assets/javascripts/ckeditor/application.js +5 -0
  6. data/app/assets/javascripts/ckeditor/init.js +8 -0
  7. data/app/assets/stylesheets/ckeditor/application.css +6 -0
  8. data/app/controllers/ckeditor/application_controller.rb +32 -0
  9. data/app/controllers/ckeditor/attachment_files_controller.rb +24 -0
  10. data/app/controllers/ckeditor/pictures_controller.rb +24 -0
  11. data/app/views/ckeditor/attachment_files/index.html.erb +15 -0
  12. data/app/views/ckeditor/pictures/index.html.erb +15 -0
  13. data/app/views/ckeditor/shared/_asset.html.erb +20 -0
  14. data/app/views/ckeditor/shared/_asset_tmpl.html.erb +22 -0
  15. data/app/views/layouts/ckeditor/application.html.erb +31 -0
  16. data/app/views/rails_admin/main/_form_ckeditor.html.haml +3 -0
  17. data/config/locales/cs.ckeditor.yml +8 -0
  18. data/config/locales/en.ckeditor.yml +8 -0
  19. data/config/locales/es.ckeditor.yml +8 -0
  20. data/config/locales/fr.ckeditor.yml +8 -0
  21. data/config/locales/it.ckeditor.yml +8 -0
  22. data/config/locales/nl.ckeditor.yml +8 -0
  23. data/config/locales/pl.ckeditor.yml +8 -0
  24. data/config/locales/pt-BR.ckeditor.yml +8 -0
  25. data/config/locales/ru.ckeditor.yml +8 -0
  26. data/config/locales/sv-SE.ckeditor.yml +8 -0
  27. data/config/locales/uk.ckeditor.yml +8 -0
  28. data/config/locales/zh-CN.ckeditor.yml +8 -0
  29. data/config/routes.rb +4 -0
  30. data/lib/ckeditor.rb +81 -0
  31. data/lib/ckeditor/backend/carrierwave.rb +64 -0
  32. data/lib/ckeditor/backend/dragonfly.rb +45 -0
  33. data/lib/ckeditor/backend/paperclip.rb +56 -0
  34. data/lib/ckeditor/engine.rb +37 -0
  35. data/lib/ckeditor/helpers/controllers.rb +30 -0
  36. data/lib/ckeditor/helpers/form_builder.rb +11 -0
  37. data/lib/ckeditor/helpers/form_helper.rb +27 -0
  38. data/lib/ckeditor/helpers/view_helper.rb +22 -0
  39. data/lib/ckeditor/hooks/formtastic.rb +12 -0
  40. data/lib/ckeditor/hooks/simple_form.rb +9 -0
  41. data/lib/ckeditor/http.rb +89 -0
  42. data/lib/ckeditor/orm/active_record.rb +26 -0
  43. data/lib/ckeditor/orm/base.rb +46 -0
  44. data/lib/ckeditor/orm/mongoid.rb +43 -0
  45. data/lib/ckeditor/rails_admin/config/fields/types/ckeditor.rb +29 -0
  46. data/lib/ckeditor/utils.rb +70 -0
  47. data/lib/ckeditor/version.rb +6 -0
  48. data/lib/generators/ckeditor/install_generator.rb +83 -0
  49. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +7 -0
  50. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +7 -0
  51. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +7 -0
  52. data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +26 -0
  53. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +7 -0
  54. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +7 -0
  55. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +12 -0
  56. data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +27 -0
  57. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +4 -0
  58. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +12 -0
  59. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +13 -0
  60. data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +26 -0
  61. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +42 -0
  62. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +53 -0
  63. data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +26 -0
  64. data/lib/generators/ckeditor/templates/ckeditor.rb +18 -0
  65. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +7 -0
  66. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +7 -0
  67. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +7 -0
  68. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +5 -0
  69. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +12 -0
  70. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +13 -0
  71. data/test/ckeditor_test.rb +13 -0
  72. data/test/controllers/attachment_files_controller_test.rb +63 -0
  73. data/test/controllers/pictures_controller_test.rb +64 -0
  74. data/test/dummy/Rakefile +7 -0
  75. data/test/dummy/app/assets/javascripts/application.js +11 -0
  76. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  77. data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
  78. data/test/dummy/app/controllers/application_controller.rb +4 -0
  79. data/test/dummy/app/controllers/posts_controller.rb +83 -0
  80. data/test/dummy/app/helpers/application_helper.rb +2 -0
  81. data/test/dummy/app/helpers/posts_helper.rb +2 -0
  82. data/test/dummy/app/models/post.rb +17 -0
  83. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  84. data/test/dummy/app/views/posts/_form.html.erb +30 -0
  85. data/test/dummy/app/views/posts/edit.html.erb +6 -0
  86. data/test/dummy/app/views/posts/index.html.erb +27 -0
  87. data/test/dummy/app/views/posts/new.html.erb +5 -0
  88. data/test/dummy/app/views/posts/show.html.erb +5 -0
  89. data/test/dummy/config.ru +4 -0
  90. data/test/dummy/config/application.rb +63 -0
  91. data/test/dummy/config/boot.rb +10 -0
  92. data/test/dummy/config/database.yml +25 -0
  93. data/test/dummy/config/environment.rb +5 -0
  94. data/test/dummy/config/environments/development.rb +37 -0
  95. data/test/dummy/config/environments/production.rb +67 -0
  96. data/test/dummy/config/environments/test.rb +37 -0
  97. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  98. data/test/dummy/config/initializers/ckeditor.rb +10 -0
  99. data/test/dummy/config/initializers/inflections.rb +15 -0
  100. data/test/dummy/config/initializers/mime_types.rb +5 -0
  101. data/test/dummy/config/initializers/secret_token.rb +7 -0
  102. data/test/dummy/config/initializers/session_store.rb +8 -0
  103. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  104. data/test/dummy/config/locales/en.yml +5 -0
  105. data/test/dummy/config/mongoid.yml +2 -0
  106. data/test/dummy/config/routes.rb +6 -0
  107. data/test/dummy/db/migrate/20110623120047_create_posts.rb +14 -0
  108. data/test/dummy/public/404.html +26 -0
  109. data/test/dummy/public/422.html +26 -0
  110. data/test/dummy/public/500.html +26 -0
  111. data/test/dummy/public/favicon.ico +0 -0
  112. data/test/dummy/script/rails +6 -0
  113. data/test/dummy/test/fixtures/files/rails.png +0 -0
  114. data/test/dummy/test/fixtures/files/rails.tar.gz +0 -0
  115. data/test/functional/posts_controller_test.rb +41 -0
  116. data/test/generators/install_generator_test.rb +97 -0
  117. data/test/integration/navigation_test.rb +7 -0
  118. data/test/models/attachment_file_test.rb +22 -0
  119. data/test/models/picture_test.rb +21 -0
  120. data/test/models/utils_test.rb +19 -0
  121. data/test/orm/active_record.rb +1 -0
  122. data/test/orm/mongoid.rb +6 -0
  123. data/test/support/controller_hooks.rb +27 -0
  124. data/test/support/helpers.rb +30 -0
  125. data/test/support/integration_case.rb +5 -0
  126. data/test/support/raw_post.rb +9 -0
  127. data/test/support/routes.txt +4 -0
  128. data/test/test_helper.rb +38 -0
  129. data/vendor/assets/javascripts/ckeditor/CHANGES.md +56 -0
  130. data/vendor/assets/javascripts/ckeditor/LICENSE.md +1264 -0
  131. data/vendor/assets/javascripts/ckeditor/README.md +39 -0
  132. data/vendor/assets/javascripts/ckeditor/build-config.js +161 -0
  133. data/vendor/assets/javascripts/ckeditor/ckeditor.js +873 -0
  134. data/vendor/assets/javascripts/ckeditor/config.js.erb +69 -0
  135. data/vendor/assets/javascripts/ckeditor/contents.css +99 -0
  136. data/vendor/assets/javascripts/ckeditor/filebrowser/images/gal_add.jpg +0 -0
  137. data/vendor/assets/javascripts/ckeditor/filebrowser/images/gal_add.png +0 -0
  138. data/vendor/assets/javascripts/ckeditor/filebrowser/images/gal_del.png +0 -0
  139. data/vendor/assets/javascripts/ckeditor/filebrowser/images/gal_more.gif +0 -0
  140. data/vendor/assets/javascripts/ckeditor/filebrowser/images/preloader.gif +0 -0
  141. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/avi.gif +0 -0
  142. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/ckfnothumb.gif +0 -0
  143. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/doc.gif +0 -0
  144. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/docx.gif +0 -0
  145. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/exe.gif +0 -0
  146. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/gz.gif +0 -0
  147. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/htm.gif +0 -0
  148. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/jpg.gif +0 -0
  149. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/mp3.gif +0 -0
  150. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/mpg.gif +0 -0
  151. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/pdf.gif +0 -0
  152. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/psd.gif +0 -0
  153. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/rar.gif +0 -0
  154. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/swf.gif +0 -0
  155. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/tar.gif +0 -0
  156. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/txt.gif +0 -0
  157. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/unknown.gif +0 -0
  158. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/wmv.gif +0 -0
  159. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/xls.gif +0 -0
  160. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/xlsx.gif +0 -0
  161. data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/zip.gif +0 -0
  162. data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/application.js +221 -0
  163. data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +1301 -0
  164. data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.min.js +4 -0
  165. data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +10 -0
  166. data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +373 -0
  167. data/vendor/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.sass +102 -0
  168. data/vendor/assets/javascripts/ckeditor/lang/af.js +5 -0
  169. data/vendor/assets/javascripts/ckeditor/lang/ar.js +5 -0
  170. data/vendor/assets/javascripts/ckeditor/lang/bg.js +5 -0
  171. data/vendor/assets/javascripts/ckeditor/lang/bn.js +5 -0
  172. data/vendor/assets/javascripts/ckeditor/lang/bs.js +5 -0
  173. data/vendor/assets/javascripts/ckeditor/lang/ca.js +5 -0
  174. data/vendor/assets/javascripts/ckeditor/lang/cs.js +5 -0
  175. data/vendor/assets/javascripts/ckeditor/lang/cy.js +5 -0
  176. data/vendor/assets/javascripts/ckeditor/lang/da.js +5 -0
  177. data/vendor/assets/javascripts/ckeditor/lang/de.js +5 -0
  178. data/vendor/assets/javascripts/ckeditor/lang/el.js +5 -0
  179. data/vendor/assets/javascripts/ckeditor/lang/en-au.js +5 -0
  180. data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
  181. data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
  182. data/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
  183. data/vendor/assets/javascripts/ckeditor/lang/eo.js +5 -0
  184. data/vendor/assets/javascripts/ckeditor/lang/es.js +5 -0
  185. data/vendor/assets/javascripts/ckeditor/lang/et.js +5 -0
  186. data/vendor/assets/javascripts/ckeditor/lang/eu.js +5 -0
  187. data/vendor/assets/javascripts/ckeditor/lang/fa.js +5 -0
  188. data/vendor/assets/javascripts/ckeditor/lang/fi.js +5 -0
  189. data/vendor/assets/javascripts/ckeditor/lang/fo.js +5 -0
  190. data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
  191. data/vendor/assets/javascripts/ckeditor/lang/fr.js +5 -0
  192. data/vendor/assets/javascripts/ckeditor/lang/gl.js +5 -0
  193. data/vendor/assets/javascripts/ckeditor/lang/gu.js +5 -0
  194. data/vendor/assets/javascripts/ckeditor/lang/he.js +5 -0
  195. data/vendor/assets/javascripts/ckeditor/lang/hi.js +5 -0
  196. data/vendor/assets/javascripts/ckeditor/lang/hr.js +5 -0
  197. data/vendor/assets/javascripts/ckeditor/lang/hu.js +5 -0
  198. data/vendor/assets/javascripts/ckeditor/lang/is.js +5 -0
  199. data/vendor/assets/javascripts/ckeditor/lang/it.js +5 -0
  200. data/vendor/assets/javascripts/ckeditor/lang/ja.js +5 -0
  201. data/vendor/assets/javascripts/ckeditor/lang/ka.js +5 -0
  202. data/vendor/assets/javascripts/ckeditor/lang/km.js +5 -0
  203. data/vendor/assets/javascripts/ckeditor/lang/ko.js +5 -0
  204. data/vendor/assets/javascripts/ckeditor/lang/ku.js +5 -0
  205. data/vendor/assets/javascripts/ckeditor/lang/lt.js +5 -0
  206. data/vendor/assets/javascripts/ckeditor/lang/lv.js +5 -0
  207. data/vendor/assets/javascripts/ckeditor/lang/mk.js +5 -0
  208. data/vendor/assets/javascripts/ckeditor/lang/mn.js +5 -0
  209. data/vendor/assets/javascripts/ckeditor/lang/ms.js +5 -0
  210. data/vendor/assets/javascripts/ckeditor/lang/nb.js +5 -0
  211. data/vendor/assets/javascripts/ckeditor/lang/nl.js +5 -0
  212. data/vendor/assets/javascripts/ckeditor/lang/no.js +5 -0
  213. data/vendor/assets/javascripts/ckeditor/lang/pl.js +5 -0
  214. data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
  215. data/vendor/assets/javascripts/ckeditor/lang/pt.js +5 -0
  216. data/vendor/assets/javascripts/ckeditor/lang/ro.js +5 -0
  217. data/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
  218. data/vendor/assets/javascripts/ckeditor/lang/sk.js +5 -0
  219. data/vendor/assets/javascripts/ckeditor/lang/sl.js +5 -0
  220. data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
  221. data/vendor/assets/javascripts/ckeditor/lang/sr.js +5 -0
  222. data/vendor/assets/javascripts/ckeditor/lang/sv.js +5 -0
  223. data/vendor/assets/javascripts/ckeditor/lang/th.js +5 -0
  224. data/vendor/assets/javascripts/ckeditor/lang/tr.js +5 -0
  225. data/vendor/assets/javascripts/ckeditor/lang/ug.js +5 -0
  226. data/vendor/assets/javascripts/ckeditor/lang/uk.js +5 -0
  227. data/vendor/assets/javascripts/ckeditor/lang/vi.js +5 -0
  228. data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
  229. data/vendor/assets/javascripts/ckeditor/lang/zh.js +5 -0
  230. data/vendor/assets/javascripts/ckeditor/plugins/CKCss/CKCss.xml +26 -0
  231. data/vendor/assets/javascripts/ckeditor/plugins/CKCss/ckcss.png +0 -0
  232. data/vendor/assets/javascripts/ckeditor/plugins/CKCss/ckcss1.png +0 -0
  233. data/vendor/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +10 -0
  234. data/vendor/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +3589 -0
  235. data/vendor/assets/javascripts/ckeditor/plugins/CKCss/lang/en.js +16 -0
  236. data/vendor/assets/javascripts/ckeditor/plugins/CKCss/lang/ru.js +16 -0
  237. data/vendor/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +62 -0
  238. data/vendor/assets/javascripts/ckeditor/plugins/LoremIpsum/images/icon.png +0 -0
  239. data/vendor/assets/javascripts/ckeditor/plugins/LoremIpsum/images/icon1.png +0 -0
  240. data/vendor/assets/javascripts/ckeditor/plugins/LoremIpsum/plugin.js +66 -0
  241. data/vendor/assets/javascripts/ckeditor/plugins/MediaEmbed/icons/mediaembed.png +0 -0
  242. data/vendor/assets/javascripts/ckeditor/plugins/MediaEmbed/images/icon.png +0 -0
  243. data/vendor/assets/javascripts/ckeditor/plugins/MediaEmbed/plugin.js +64 -0
  244. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  245. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  246. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +9 -0
  247. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +9 -0
  248. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +9 -0
  249. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +10 -0
  250. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +9 -0
  251. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +9 -0
  252. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +10 -0
  253. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +10 -0
  254. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +9 -0
  255. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +10 -0
  256. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +10 -0
  257. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +9 -0
  258. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +9 -0
  259. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +10 -0
  260. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +10 -0
  261. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +9 -0
  262. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +9 -0
  263. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +9 -0
  264. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +9 -0
  265. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +9 -0
  266. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +10 -0
  267. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  268. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +10 -0
  269. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +9 -0
  270. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +10 -0
  271. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +9 -0
  272. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +9 -0
  273. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +9 -0
  274. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +10 -0
  275. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +9 -0
  276. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +9 -0
  277. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +9 -0
  278. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +9 -0
  279. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +9 -0
  280. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +9 -0
  281. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +10 -0
  282. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +9 -0
  283. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +10 -0
  284. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +10 -0
  285. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +9 -0
  286. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +9 -0
  287. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +9 -0
  288. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +7 -0
  289. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +6 -0
  290. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  291. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  292. data/vendor/assets/javascripts/ckeditor/plugins/code/code/code.js +48 -0
  293. data/vendor/assets/javascripts/ckeditor/plugins/code/images/code.png +0 -0
  294. data/vendor/assets/javascripts/ckeditor/plugins/code/plugin.js +17 -0
  295. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.css +239 -0
  296. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.eot +0 -0
  297. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.otf +0 -0
  298. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.svg +242 -0
  299. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.ttf +0 -0
  300. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.woff +0 -0
  301. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +4553 -0
  302. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/css.js +465 -0
  303. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/htmlmixed.js +84 -0
  304. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/javascript.js +411 -0
  305. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/closetag.js +85 -0
  306. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/colorize.js +29 -0
  307. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/continuecomment.js +36 -0
  308. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/continuelist.js +28 -0
  309. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/dialog.css +32 -0
  310. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/dialog.js +75 -0
  311. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/foldcode.js +182 -0
  312. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/formatting.js +108 -0
  313. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/javascript-hint.js +137 -0
  314. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/loadmode.js +51 -0
  315. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/match-highlighter.js +46 -0
  316. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/matchbrackets.js +63 -0
  317. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/multiplex.js +95 -0
  318. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/overlay.js +59 -0
  319. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/pig-hint.js +117 -0
  320. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/runmode-standalone.js +90 -0
  321. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/runmode.js +52 -0
  322. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/search.js +119 -0
  323. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/searchcursor.js +119 -0
  324. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/simple-hint.css +16 -0
  325. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/simple-hint.js +102 -0
  326. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/xml-hint.js +131 -0
  327. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/xml.js +324 -0
  328. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/af.js +7 -0
  329. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ar.js +7 -0
  330. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +7 -0
  331. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bn.js +7 -0
  332. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bs.js +7 -0
  333. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ca.js +7 -0
  334. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cs.js +7 -0
  335. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cy.js +7 -0
  336. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/da.js +7 -0
  337. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/de.js +7 -0
  338. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/el.js +7 -0
  339. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-au.js +7 -0
  340. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-ca.js +7 -0
  341. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-gb.js +7 -0
  342. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +7 -0
  343. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eo.js +7 -0
  344. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/es.js +7 -0
  345. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/et.js +7 -0
  346. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eu.js +7 -0
  347. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fa.js +7 -0
  348. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fi.js +7 -0
  349. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fo.js +7 -0
  350. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr-ca.js +7 -0
  351. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr.js +7 -0
  352. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gl.js +7 -0
  353. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gu.js +7 -0
  354. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/he.js +7 -0
  355. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hi.js +7 -0
  356. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hr.js +7 -0
  357. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hu.js +7 -0
  358. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/is.js +7 -0
  359. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/it.js +7 -0
  360. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ja.js +7 -0
  361. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ka.js +7 -0
  362. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/km.js +7 -0
  363. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ko.js +7 -0
  364. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ku.js +7 -0
  365. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lt.js +7 -0
  366. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lv.js +7 -0
  367. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mk.js +7 -0
  368. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mn.js +7 -0
  369. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ms.js +7 -0
  370. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nb.js +7 -0
  371. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nl.js +7 -0
  372. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/no.js +7 -0
  373. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pl.js +7 -0
  374. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt-br.js +7 -0
  375. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt.js +7 -0
  376. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ro.js +7 -0
  377. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +7 -0
  378. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sk.js +7 -0
  379. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sl.js +7 -0
  380. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr-latn.js +7 -0
  381. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr.js +7 -0
  382. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sv.js +7 -0
  383. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/th.js +7 -0
  384. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/tr.js +7 -0
  385. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ug.js +7 -0
  386. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/uk.js +7 -0
  387. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/vi.js +7 -0
  388. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh-cn.js +7 -0
  389. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh.js +7 -0
  390. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +189 -0
  391. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +6 -0
  392. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +76 -0
  393. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +25 -0
  394. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +18 -0
  395. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +25 -0
  396. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +10 -0
  397. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +21 -0
  398. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +44 -0
  399. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +28 -0
  400. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +9 -0
  401. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +21 -0
  402. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +21 -0
  403. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +207 -0
  404. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +25 -0
  405. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +27 -0
  406. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +46 -0
  407. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +13 -0
  408. data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  409. data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -0
  410. data/vendor/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
  411. data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +24 -0
  412. data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +23 -0
  413. data/vendor/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
  414. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +8 -0
  415. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +8 -0
  416. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +8 -0
  417. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +8 -0
  418. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +8 -0
  419. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +20 -0
  420. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +8 -0
  421. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +10 -0
  422. data/vendor/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  423. data/vendor/assets/javascripts/ckeditor/plugins/highslide/dialogs/hs.js +73 -0
  424. data/vendor/assets/javascripts/ckeditor/plugins/highslide/icon.png +0 -0
  425. data/vendor/assets/javascripts/ckeditor/plugins/highslide/lang/en.js +7 -0
  426. data/vendor/assets/javascripts/ckeditor/plugins/highslide/lang/ru.js +7 -0
  427. data/vendor/assets/javascripts/ckeditor/plugins/highslide/plugin.js +26 -0
  428. data/vendor/assets/javascripts/ckeditor/plugins/highslide/readme.txt +55 -0
  429. data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/install.html +93 -0
  430. data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/styles.css +59 -0
  431. data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/icon1.png +0 -0
  432. data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/icon2.png +0 -0
  433. data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/icon3.png +0 -0
  434. data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/plugin.js +71 -0
  435. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  436. data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
  437. data/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  438. data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +173 -0
  439. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +41 -0
  440. data/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
  441. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  442. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +36 -0
  443. data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
  444. data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
  445. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
  446. data/vendor/assets/javascripts/ckeditor/plugins/oembed/images/icon.png +0 -0
  447. data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/de.js +9 -0
  448. data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/en.js +9 -0
  449. data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/fr.js +11 -0
  450. data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/nl.js +9 -0
  451. data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/ru.js +9 -0
  452. data/vendor/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.js +781 -0
  453. data/vendor/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.min.js +4 -0
  454. data/vendor/assets/javascripts/ckeditor/plugins/oembed/plugin.js +106 -0
  455. data/vendor/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  456. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +31 -0
  457. data/vendor/assets/javascripts/ckeditor/plugins/preview/preview.html +10 -0
  458. data/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
  459. data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  460. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +19 -0
  461. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  462. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  463. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  464. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  465. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  466. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  467. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  468. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  469. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  470. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  471. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  472. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  473. data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +10 -0
  474. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  475. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  476. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  477. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  478. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  479. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  480. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  481. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  482. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  483. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
  484. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  485. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  486. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  487. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  488. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  489. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  490. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  491. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  492. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  493. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  494. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  495. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  496. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  497. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  498. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +13 -0
  499. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  500. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  501. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  502. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  503. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  504. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  505. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  506. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +13 -0
  507. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  508. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
  509. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +13 -0
  510. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  511. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  512. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +14 -0
  513. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  514. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  515. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  516. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  517. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  518. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  519. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  520. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  521. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  522. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  523. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  524. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +138 -0
  525. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/assets/sample.css +70 -0
  526. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +82 -0
  527. data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +20 -0
  528. data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -0
  529. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +84 -0
  530. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +10 -0
  531. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +6 -0
  532. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  533. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  534. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  535. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +9 -0
  536. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +9 -0
  537. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +95 -0
  538. data/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
  539. data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
  540. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
  541. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  542. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  543. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +11 -0
  544. data/vendor/assets/javascripts/ckeditor/samples/ajax.html +82 -0
  545. data/vendor/assets/javascripts/ckeditor/samples/api.html +207 -0
  546. data/vendor/assets/javascripts/ckeditor/samples/appendto.html +57 -0
  547. data/vendor/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
  548. data/vendor/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
  549. data/vendor/assets/javascripts/ckeditor/samples/assets/posteddata.php +59 -0
  550. data/vendor/assets/javascripts/ckeditor/samples/assets/sample.css +3 -0
  551. data/vendor/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
  552. data/vendor/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +7 -0
  553. data/vendor/assets/javascripts/ckeditor/samples/divreplace.html +141 -0
  554. data/vendor/assets/javascripts/ckeditor/samples/index.html +119 -0
  555. data/vendor/assets/javascripts/ckeditor/samples/inlineall.html +311 -0
  556. data/vendor/assets/javascripts/ckeditor/samples/inlinebycode.html +122 -0
  557. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
  558. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +187 -0
  559. data/vendor/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
  560. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  561. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  562. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
  563. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
  564. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +237 -0
  565. data/vendor/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +203 -0
  566. data/vendor/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +200 -0
  567. data/vendor/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +71 -0
  568. data/vendor/assets/javascripts/ckeditor/samples/readonly.html +73 -0
  569. data/vendor/assets/javascripts/ckeditor/samples/replacebyclass.html +57 -0
  570. data/vendor/assets/javascripts/ckeditor/samples/replacebycode.html +56 -0
  571. data/vendor/assets/javascripts/ckeditor/samples/sample.css +333 -0
  572. data/vendor/assets/javascripts/ckeditor/samples/sample.js +5 -0
  573. data/vendor/assets/javascripts/ckeditor/samples/sample_posteddata.php +16 -0
  574. data/vendor/assets/javascripts/ckeditor/samples/tabindex.html +75 -0
  575. data/vendor/assets/javascripts/ckeditor/samples/uicolor.html +69 -0
  576. data/vendor/assets/javascripts/ckeditor/samples/uilanguages.html +119 -0
  577. data/vendor/assets/javascripts/ckeditor/samples/xhtmlstyle.html +219 -0
  578. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +5 -0
  579. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +5 -0
  580. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +5 -0
  581. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +5 -0
  582. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +687 -0
  583. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_opera.css +5 -0
  584. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +5 -0
  585. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +5 -0
  586. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +5 -0
  587. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +5 -0
  588. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
  589. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +1389 -0
  590. data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  591. data/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
  592. data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
  593. data/vendor/assets/javascripts/ckeditor/skins/moono/images/mini.png +0 -0
  594. data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +51 -0
  595. data/vendor/assets/javascripts/ckeditor/styles.js +112 -0
  596. metadata +736 -0
@@ -0,0 +1,5 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.lang['zh']={"dir":"ltr","editor":"富文本編輯器","common":{"editorHelp":"按 ALT+0 以獲得幫助","browseServer":"瀏覽伺服器端","url":"URL","protocol":"通訊協定","upload":"上傳","uploadSubmit":"上傳至伺服器","image":"影像","flash":"Flash","form":"表單","checkbox":"核取方塊","radio":"選項按鈕","textField":"文字方塊","textarea":"文字區域","hiddenField":"隱藏欄位","button":"按鈕","select":"清單/選單","imageButton":"影像按鈕","notSet":"<尚未設定>","id":"ID","name":"名稱","langDir":"語言方向","langDirLtr":"由左而右 (LTR)","langDirRtl":"由右而左 (RTL)","langCode":"語言代碼","longDescr":"詳細 URL","cssClass":"樣式表類別","advisoryTitle":"標題","cssStyle":"樣式","ok":"確定","cancel":"取消","close":"关闭","preview":"预览","resize":"拖拽改變大小","generalTab":"一般","advancedTab":"進階","validateNumberFailed":"需要輸入數字格式","confirmNewPage":"現存的修改尚未儲存,要開新檔案?","confirmCancel":"部份選項尚未儲存,要關閉對話盒?","options":"选项","target":"目标","targetNew":"新窗口(_blank)","targetTop":"整页(_top)","targetSelf":"本窗口(_self)","targetParent":"父窗口(_parent)","langDirLTR":"由左而右 (LTR)","langDirRTL":"由右而左 (RTL)","styles":"樣式","cssClasses":"樣式表類別","width":"寬度","height":"高度","align":"對齊","alignLeft":"靠左對齊","alignRight":"靠右對齊","alignCenter":"置中","alignTop":"靠上對齊","alignMiddle":"置中對齊","alignBottom":"靠下對齊","invalidValue":"Invalid value.","invalidHeight":"高度必須為數字格式","invalidWidth":"寬度必須為數字格式","invalidCssLength":"Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).","invalidHtmlLength":"Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).","invalidInlineStyle":"Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.","cssLengthTooltip":"Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).","unavailable":"%1<span class=\"cke_accessibility\">, 已關閉</span>"},"about":{"copy":"Copyright &copy; $1. All rights reserved.","dlgTitle":"關於 CKEditor","help":"Check $1 for help.","moreInfo":"訪問我們的網站以獲取更多關於協議的信息","title":"關於 CKEditor","userGuide":"CKEditor User's Guide"},"basicstyles":{"bold":"粗體","italic":"斜體","strike":"刪除線","subscript":"下標","superscript":"上標","underline":"底線"},"bidi":{"ltr":"Text direction from left to right","rtl":"Text direction from right to left"},"blockquote":{"toolbar":"引用文字"},"clipboard":{"copy":"複製","copyError":"瀏覽器的安全性設定不允許編輯器自動執行複製動作。請使用快捷鍵 (Ctrl/Cmd+C) 複製。","cut":"剪下","cutError":"瀏覽器的安全性設定不允許編輯器自動執行剪下動作。請使用快捷鍵 (Ctrl/Cmd+X) 剪下。","paste":"貼上","pasteArea":"Paste Area","pasteMsg":"請使用快捷鍵 (<strong>Ctrl/Cmd+V</strong>) 貼到下方區域中並按下 <strong>確定</strong>","securityMsg":"因為瀏覽器的安全性設定,本編輯器無法直接存取您的剪貼簿資料,請您自行在本視窗進行貼上動作。","title":"貼上"},"colorbutton":{"auto":"自動","bgColorTitle":"背景顏色","colors":{"000":"Black","800000":"Maroon","8B4513":"Saddle Brown","2F4F4F":"Dark Slate Gray","008080":"Teal","000080":"Navy","4B0082":"Indigo","696969":"Dark Gray","B22222":"Fire Brick","A52A2A":"Brown","DAA520":"Golden Rod","006400":"Dark Green","40E0D0":"Turquoise","0000CD":"Medium Blue","800080":"Purple","808080":"Gray","F00":"Red","FF8C00":"Dark Orange","FFD700":"Gold","008000":"Green","0FF":"Cyan","00F":"Blue","EE82EE":"Violet","A9A9A9":"Dim Gray","FFA07A":"Light Salmon","FFA500":"Orange","FFFF00":"Yellow","00FF00":"Lime","AFEEEE":"Pale Turquoise","ADD8E6":"Light Blue","DDA0DD":"Plum","D3D3D3":"Light Grey","FFF0F5":"Lavender Blush","FAEBD7":"Antique White","FFFFE0":"Light Yellow","F0FFF0":"Honeydew","F0FFFF":"Azure","F0F8FF":"Alice Blue","E6E6FA":"Lavender","FFF":"White"},"more":"更多顏色…","panelTitle":"Colors","textColorTitle":"文字顏色"},"colordialog":{"clear":"Clear","highlight":"Highlight","options":"Color Options","selected":"Selected Color","title":"Select color"},"templates":{"button":"樣版","emptyListMsg":"(無樣版)","insertOption":"取代原有內容","options":"Template Options","selectPromptMsg":"請選擇欲開啟的樣版<br> (原有的內容將會被清除):","title":"內容樣版"},"contextmenu":{"options":"Context Menu Options"},"div":{"IdInputLabel":"Id","advisoryTitleInputLabel":"Advisory Title","cssClassInputLabel":"Stylesheet Classes","edit":"Edit Div","inlineStyleInputLabel":"Inline Style","langDirLTRLabel":"Left to Right (LTR)","langDirLabel":"Language Direction","langDirRTLLabel":"Right to Left (RTL)","languageCodeInputLabel":" Language Code","remove":"Remove Div","styleSelectLabel":"Style","title":"Create Div Container","toolbar":"Create Div Container"},"toolbar":{"toolbarCollapse":"折叠工具栏","toolbarExpand":"展开工具栏","toolbarGroups":{"document":"Document","clipboard":"Clipboard/Undo","editing":"Editing","forms":"Forms","basicstyles":"Basic Styles","paragraph":"Paragraph","links":"Links","insert":"Insert","styles":"Styles","colors":"Colors","tools":"Tools"},"toolbars":"編輯器工具欄"},"elementspath":{"eleLabel":"Elements path","eleTitle":"%1 元素"},"list":{"bulletedlist":"項目清單","numberedlist":"編號清單"},"indent":{"indent":"增加縮排","outdent":"減少縮排"},"find":{"find":"尋找","findOptions":"Find Options","findWhat":"尋找:","matchCase":"大小寫須相符","matchCyclic":"循環搜索","matchWord":"全字相符","notFoundMsg":"未找到指定的文字。","replace":"取代","replaceAll":"全部取代","replaceSuccessMsg":"共完成 %1 次取代","replaceWith":"取代:","title":"尋找與取代"},"fakeobjects":{"anchor":"錨點","flash":"Flash 動畫","hiddenfield":"隱藏欄位","iframe":"IFrame","unknown":"不明物件"},"flash":{"access":"允許腳本訪問","accessAlways":"永遠","accessNever":"永不","accessSameDomain":"相同域名","alignAbsBottom":"絕對下方","alignAbsMiddle":"絕對中間","alignBaseline":"基準線","alignTextTop":"文字上方","bgcolor":"背景顏色","chkFull":"啟動全螢幕顯示","chkLoop":"重複","chkMenu":"開啟選單","chkPlay":"自動播放","flashvars":"Flash 變數","hSpace":"水平距離","properties":"Flash 屬性","propertiesTab":"屬性","quality":"質素","qualityAutoHigh":"高(自動)","qualityAutoLow":"低(自動)","qualityBest":"最好","qualityHigh":"高","qualityLow":"低","qualityMedium":"中(自動)","scale":"縮放","scaleAll":"全部顯示","scaleFit":"精確符合","scaleNoBorder":"無邊框","title":"Flash 屬性","vSpace":"垂直距離","validateHSpace":"水平間距必須為數字格式","validateSrc":"請輸入欲連結的 URL","validateVSpace":"垂直間距必須為數字格式","windowMode":"視窗模式","windowModeOpaque":"不透明","windowModeTransparent":"透明","windowModeWindow":"視窗"},"font":{"fontSize":{"label":"大小","voiceLabel":"文字大小","panelTitle":"大小"},"label":"字體","panelTitle":"字體","voiceLabel":"字體"},"forms":{"button":{"title":"按鈕屬性","text":"顯示文字 (值)","type":"類型","typeBtn":"按鈕 (Button)","typeSbm":"送出 (Submit)","typeRst":"重設 (Reset)"},"checkboxAndRadio":{"checkboxTitle":"核取方塊屬性","radioTitle":"選項按鈕屬性","value":"選取值","selected":"已選取"},"form":{"title":"表單屬性","menu":"表單屬性","action":"動作","method":"方法","encoding":"表單編碼"},"hidden":{"title":"隱藏欄位屬性","name":"名稱","value":"值"},"select":{"title":"清單/選單屬性","selectInfo":"資訊","opAvail":"可用選項","value":"值","size":"大小","lines":"行","chkMulti":"可多選","opText":"顯示文字","opValue":"選取值","btnAdd":"新增","btnModify":"修改","btnUp":"上移","btnDown":"下移","btnSetValue":"設為預設值","btnDelete":"刪除"},"textarea":{"title":"文字區域屬性","cols":"字元寬度","rows":"列數"},"textfield":{"title":"文字方塊屬性","name":"名稱","value":"值","charWidth":"字元寬度","maxChars":"最多字元數","type":"類型","typeText":"文字","typePass":"密碼","typeEmail":"Email","typeSearch":"Search","typeTel":"Telephone Number","typeUrl":"URL"}},"format":{"label":"格式","panelTitle":"格式","tag_address":"位址","tag_div":"一般 (DIV)","tag_h1":"標題 1","tag_h2":"標題 2","tag_h3":"標題 3","tag_h4":"標題 4","tag_h5":"標題 5","tag_h6":"標題 6","tag_p":"一般","tag_pre":"已格式化"},"horizontalrule":{"toolbar":"插入水平線"},"iframe":{"border":"Show frame border","noUrl":"Please type the iframe URL","scrolling":"Enable scrollbars","title":"IFrame Properties","toolbar":"IFrame"},"image":{"alertUrl":"請輸入影像 URL","alt":"替代文字","border":"邊框","btnUpload":"上傳至伺服器","button2Img":"要把影像按鈕改成影像嗎?","hSpace":"水平距離","img2Button":"要把影像改成影像按鈕嗎?","infoTab":"影像資訊","linkTab":"超連結","lockRatio":"等比例","menu":"影像屬性","resetSize":"重設為原大小","title":"影像屬性","titleButton":"影像按鈕屬性","upload":"上傳","urlMissing":"Image source URL is missing.","vSpace":"垂直距離","validateBorder":"Border must be a whole number.","validateHSpace":"HSpace must be a whole number.","validateVSpace":"VSpace must be a whole number."},"smiley":{"options":"Smiley Options","title":"插入表情符號","toolbar":"表情符號"},"justify":{"block":"左右對齊","center":"置中","left":"靠左對齊","right":"靠右對齊"},"link":{"acccessKey":"存取鍵","advanced":"進階","advisoryContentType":"內容類型","advisoryTitle":"標題","anchor":{"toolbar":"插入/編輯錨點","menu":"錨點屬性","title":"錨點屬性","name":"錨點名稱","errorName":"請輸入錨點名稱","remove":"Remove Anchor"},"anchorId":"依元件 ID","anchorName":"依錨點名稱","charset":"連結資源之編碼","cssClasses":"樣式表類別","emailAddress":"電子郵件","emailBody":"郵件內容","emailSubject":"郵件主旨","id":"ID","info":"超連結資訊","langCode":"語言方向","langDir":"語言方向","langDirLTR":"由左而右 (LTR)","langDirRTL":"由右而左 (RTL)","menu":"編輯超連結","name":"名稱","noAnchors":"(本文件尚無可用之錨點)","noEmail":"請輸入電子郵件位址","noUrl":"請輸入欲連結的 URL","other":"<其他>","popupDependent":"從屬 (NS)","popupFeatures":"快顯視窗屬性","popupFullScreen":"全螢幕 (IE)","popupLeft":"左","popupLocationBar":"網址列","popupMenuBar":"選單列","popupResizable":"可縮放","popupScrollBars":"捲軸","popupStatusBar":"狀態列","popupToolbar":"工具列","popupTop":"右","rel":"Relationship","selectAnchor":"請選擇錨點","styles":"樣式","tabIndex":"定位順序","target":"目標","targetFrame":"<框架>","targetFrameName":"目標框架名稱","targetPopup":"<快顯視窗>","targetPopupName":"快顯視窗名稱","title":"超連結","toAnchor":"本頁錨點","toEmail":"電子郵件","toUrl":"URL","toolbar":"插入/編輯超連結","type":"超連接類型","unlink":"移除超連結","upload":"上傳"},"liststyle":{"armenian":"Armenian numbering","bulletedTitle":"Bulleted List Properties","circle":"Circle","decimal":"Decimal (1, 2, 3, etc.)","decimalLeadingZero":"Decimal leading zero (01, 02, 03, etc.)","disc":"Disc","georgian":"Georgian numbering (an, ban, gan, etc.)","lowerAlpha":"Lower Alpha (a, b, c, d, e, etc.)","lowerGreek":"Lower Greek (alpha, beta, gamma, etc.)","lowerRoman":"Lower Roman (i, ii, iii, iv, v, etc.)","none":"None","notset":"<not set>","numberedTitle":"Numbered List Properties","square":"Square","start":"Start","type":"Type","upperAlpha":"Upper Alpha (A, B, C, D, E, etc.)","upperRoman":"Upper Roman (I, II, III, IV, V, etc.)","validateStartNumber":"List start number must be a whole number."},"magicline":{"title":"Insert paragraph here"},"maximize":{"maximize":"最大化","minimize":"最小化"},"newpage":{"toolbar":"開新檔案"},"pagebreak":{"alt":"分頁符號","toolbar":"插入分頁符號"},"pastetext":{"button":"貼為純文字格式","title":"貼為純文字格式"},"pastefromword":{"confirmCleanup":"您想貼上的文字似乎是自 Word 複製而來,請問您是否要先清除 Word 的格式後再行貼上?","error":"It was not possible to clean up the pasted data due to an internal error","title":"自 Word 貼上","toolbar":"自 Word 貼上"},"preview":{"preview":"預覽"},"print":{"toolbar":"列印"},"removeformat":{"toolbar":"清除格式"},"save":{"toolbar":"儲存"},"selectall":{"toolbar":"全選"},"showblocks":{"toolbar":"顯示區塊"},"sourcearea":{"toolbar":"原始碼"},"specialchar":{"options":"Special Character Options","title":"請選擇特殊符號","toolbar":"插入特殊符號"},"scayt":{"about":"關於即時拼寫檢查","aboutTab":"關於","addWord":"添加單詞","allCaps":"Ignore All-Caps Words","dic_create":"Create","dic_delete":"Delete","dic_field_name":"Dictionary name","dic_info":"Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.","dic_rename":"Rename","dic_restore":"Restore","dictionariesTab":"字典","disable":"關閉即時拼寫檢查","emptyDic":"字典名不應為空.","enable":"啟用即時拼寫檢查","ignore":"忽略","ignoreAll":"全部忽略","ignoreDomainNames":"Ignore Domain Names","langs":"語言","languagesTab":"語言","mixedCase":"Ignore Words with Mixed Case","mixedWithDigits":"Ignore Words with Numbers","moreSuggestions":"更多拼寫建議","opera_title":"Not supported by Opera","options":"選項","optionsTab":"選項","title":"即時拼寫檢查","toggle":"啟用/關閉即時拼寫檢查","noSuggestions":"No suggestion"},"stylescombo":{"label":"樣式","panelTitle":"Formatting Styles","panelTitle1":"塊級元素樣式","panelTitle2":"內聯元素樣式","panelTitle3":"物件元素樣式"},"table":{"border":"邊框","caption":"標題","cell":{"menu":"儲存格","insertBefore":"向左插入儲存格","insertAfter":"向右插入儲存格","deleteCell":"刪除儲存格","merge":"合併儲存格","mergeRight":"向右合併儲存格","mergeDown":"向下合併儲存格","splitHorizontal":"橫向分割儲存格","splitVertical":"縱向分割儲存格","title":"儲存格屬性","cellType":"儲存格類別","rowSpan":"儲存格列數","colSpan":"儲存格欄數","wordWrap":"自動換行","hAlign":"水平對齊","vAlign":"垂直對齊","alignBaseline":"基線對齊","bgColor":"背景顏色","borderColor":"邊框顏色","data":"數據","header":"標題","yes":"是","no":"否","invalidWidth":"儲存格寬度必須為數字格式","invalidHeight":"儲存格高度必須為數字格式","invalidRowSpan":"儲存格列數必須為整數格式","invalidColSpan":"儲存格欄數度必須為整數格式","chooseColor":"Choose"},"cellPad":"內距","cellSpace":"間距","column":{"menu":"欄","insertBefore":"向左插入欄","insertAfter":"向右插入欄","deleteColumn":"刪除欄"},"columns":"欄數","deleteTable":"刪除表格","headers":"標題","headersBoth":"第一欄和第一列","headersColumn":"第一欄","headersNone":"無標題","headersRow":"第一列","invalidBorder":"邊框大小必須為數字格式","invalidCellPadding":"儲存格內距必須為數字格式","invalidCellSpacing":"儲存格間距必須為數字格式","invalidCols":"必須有一或更多的欄","invalidHeight":"表格高度必須為數字格式","invalidRows":"必須有一或更多的列","invalidWidth":"表格寬度必須為數字格式","menu":"表格屬性","row":{"menu":"列","insertBefore":"向上插入列","insertAfter":"向下插入列","deleteRow":"刪除列"},"rows":"列數","summary":"摘要","title":"表格屬性","toolbar":"表格","widthPc":"百分比","widthPx":"像素","widthUnit":"width unit"},"undo":{"redo":"重複","undo":"復原"},"wsc":{"btnIgnore":"忽略","btnIgnoreAll":"全部忽略","btnReplace":"取代","btnReplaceAll":"全部取代","btnUndo":"復原","changeTo":"更改為","errorLoading":"無法聯系侍服器: %s.","ieSpellDownload":"尚未安裝拼字檢查元件。您是否想要現在下載?","manyChanges":"拼字檢查完成:更改了 %1 個單字","noChanges":"拼字檢查完成:未更改任何單字","noMispell":"拼字檢查完成:未發現拼字錯誤","noSuggestions":"- 無建議值 -","notAvailable":"抱歉,服務目前暫不可用","notInDic":"不在字典中","oneChange":"拼字檢查完成:更改了 1 個單字","progress":"進行拼字檢查中…","title":"拼字檢查","toolbar":"拼字檢查"}};
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0"?>
2
+ <install version="1.5" type="plugin" plugin="CKCss" method="upgrade">
3
+ <name>CKCss</name>
4
+ <version>1.4</version>
5
+ <creationDate>Sept 2012</creationDate>
6
+ <author>Charlie Croom, JoomlaCK Team</author>
7
+ <copyright>Copyright (C) 2012 - 2013 Webxsolution Ltd</copyright>
8
+ <authorUrl>http://www.joomlackeditor.com</authorUrl>
9
+ <license>GNU/GPLv2</license>
10
+ <description>CSS Editor for CKEditor</description>
11
+ <languages>
12
+ </languages>
13
+ <icon>ckcss.png</icon>
14
+ <files>
15
+ <filename>ckcss.png</filename>
16
+ <filename>plugin.js</filename>
17
+ <folder>dialogs</folder>
18
+ <folder>lang</folder>
19
+ <folder>css</folder>
20
+ </files>
21
+ <params>
22
+ <param name="dialogtitle" type="text" default="CSS Editor Properties" label="Dialog Title" description="The Title shown in the dialog for this plugin" />
23
+ <param name="height" type="text" default="400" label="Dialog height" description="The height of dialog" />
24
+ <param name="width" type="text" default="550" label="Dialog width" description="The width of dialog"/>
25
+ </params>
26
+ </install>
@@ -0,0 +1,10 @@
1
+ /*------------------------------------------------------------------------
2
+ # Copyright (C) 2005-2010 WebxSolution Ltd. All Rights Reserved.
3
+ # @license - GPLv2.0
4
+ # Author: WebxSolution Ltd
5
+ # Websites: http://www.webxsolution.com
6
+ # Terms of Use: An extension that is derived from the JoomlaCK editor will only be allowed under the following conditions: http://joomlackeditor.com/terms-of-use
7
+ # ------------------------------------------------------------------------*/
8
+ .selectOvertype {
9
+ cursor:text;
10
+ }
@@ -0,0 +1,3589 @@
1
+ var _editor;
2
+ (function () {
3
+
4
+ var _positionVar = ['Top', 'Right', 'Bottom', 'Left'];
5
+ var _pageUsedElem = new Hash();
6
+ var imagePreviewBoxId = CKEDITOR.tools.getNextId() + '_imgPreview';
7
+
8
+ function distPreview(dlg, cssText) {
9
+ var prw1 = CKEDITOR.document.getById(imagePreviewBoxId);
10
+ var prw2 = CKEDITOR.document.getById(imagePreviewBoxId + '2');
11
+ var prw3 = CKEDITOR.document.getById(imagePreviewBoxId + '3');
12
+ var prw4 = CKEDITOR.document.getById(imagePreviewBoxId + '4');
13
+ var prw5 = CKEDITOR.document.getById(imagePreviewBoxId + '5');
14
+ var prw6 = CKEDITOR.document.getById(imagePreviewBoxId + '6');
15
+ var prw7 = CKEDITOR.document.getById(imagePreviewBoxId + '7');
16
+ var prw8 = CKEDITOR.document.getById(imagePreviewBoxId + '8');
17
+ var prw9 = CKEDITOR.document.getById(imagePreviewBoxId + '9');
18
+ var prwH1 = dlg.getContentElement('page1', 'stylePreview');
19
+ var prwH2 = dlg.getContentElement('page2', 'stylePreview');
20
+ var prwH3 = dlg.getContentElement('page3', 'stylePreview');
21
+ var prwH4 = dlg.getContentElement('page4', 'stylePreview');
22
+ var prwH5 = dlg.getContentElement('page5', 'stylePreview');
23
+ var prwH6 = dlg.getContentElement('page6', 'stylePreview');
24
+ var prwH7 = dlg.getContentElement('page7', 'stylePreview');
25
+ var prwH8 = dlg.getContentElement('page8', 'stylePreview');
26
+ var prwH9 = dlg.getContentElement('page9', 'stylePreview');
27
+
28
+ prwH1.setValue(cssText);
29
+ prwH2.setValue(cssText);
30
+ prwH3.setValue(cssText);
31
+ prwH4.setValue(cssText);
32
+ prwH5.setValue(cssText);
33
+ prwH6.setValue(cssText);
34
+ prwH7.setValue(cssText);
35
+ prwH8.setValue(cssText);
36
+ prwH9.setValue(cssText);
37
+
38
+ prw1.$.style.cssText = cssText;
39
+ prw2.$.style.cssText = cssText;
40
+ prw3.$.style.cssText = cssText;
41
+ prw4.$.style.cssText = cssText;
42
+ prw5.$.style.cssText = cssText;
43
+ prw6.$.style.cssText = cssText;
44
+ prw7.$.style.cssText = cssText;
45
+ prw8.$.style.cssText = cssText;
46
+ prw9.$.style.cssText = cssText;
47
+
48
+ }
49
+
50
+
51
+ function getParentTabName(elem) {
52
+ var element = elem.getInputElement(),
53
+ cursor = element;
54
+ while ((cursor = cursor.getParent()) && cursor.$.className.search('cke_dialog_page_contents') == -1)
55
+ { /*jsl:pass*/ }
56
+
57
+
58
+ if (!cursor)
59
+ return null;
60
+ return cursor.getAttribute('name');
61
+ }
62
+
63
+ function getParentTabElem(dlg, pageName) {
64
+ for (var i = 0; i < dlg.parts.tabs.$.children.length; i++) {
65
+ if (dlg.parts.tabs.$.children[i].id.indexOf('cke_' + pageName) != -1) {
66
+ return dlg.parts.tabs.$.children[i];
67
+ }
68
+ }
69
+ return null;
70
+ }
71
+
72
+ function isPageUsed(pageName, curStyle, cnt) {
73
+ if (cnt == 1) {
74
+ if (!_pageUsedElem.hasItem(curStyle)) _pageUsedElem.setItem(curStyle, pageName);
75
+ return true;
76
+ } else {
77
+ _pageUsedElem.removeItem(curStyle);
78
+ }
79
+
80
+ for (var itm in _pageUsedElem.items) {
81
+ if (_pageUsedElem.getItem(itm) == pageName) return true;
82
+ }
83
+ return false;
84
+ }
85
+
86
+ function boldTab(elem) {
87
+
88
+ var dlg = elem.getDialog();
89
+ var pageUsed = false;
90
+ var relTab = getParentTabElem(dlg, getParentTabName(elem));
91
+ var pageName = getParentTabName(elem);
92
+ var _vl = elem.getValue();
93
+ //if (_vl != ' ') {
94
+ if ((_vl == '') || (_vl == ' ')) {
95
+ pageUsed = isPageUsed(pageName, elem.id, -1)
96
+ } else {
97
+ pageUsed = isPageUsed(pageName, elem.id, +1)
98
+ }
99
+ if (pageUsed) {
100
+ relTab.style.fontWeight = 'bold';
101
+ relTab.style.color = '#990000';
102
+ } else {
103
+ relTab.style.fontWeight = '';
104
+ relTab.style.color = '';
105
+ }
106
+ //}
107
+ }
108
+
109
+ function findElement(dlg, elemId) {
110
+ for (var i = 0; i < dlg.definition.contents.length; i++) {
111
+ var elem = dlg.getContentElement(dlg.definition.contents[i].id, elemId);
112
+ if (elem != null) {
113
+ return elem;
114
+ }
115
+
116
+ }
117
+ }
118
+
119
+ function gestUm(elem) {
120
+ var dialog = elem.getDialog();
121
+ var um = findElement(dialog, elem.id + 'Um');
122
+ if (um != null) {
123
+ if (elem.isEnabled()) {
124
+ if (isNumeric(elem.getValue())) um.enable(); else um.disable();
125
+ } else {
126
+ um.disable();
127
+ }
128
+ }
129
+ }
130
+
131
+ function arContains(arr, obj) {
132
+ for (var i = 0; i < arr.length; i++) {
133
+ if (arr[i].value == obj) return i;
134
+ }
135
+ return -1;
136
+ }
137
+
138
+ function selectOnKeyDownAll(elem, pre, post, page, ev) {
139
+ var dialog = elem.getDialog();
140
+ var _val = elem.getValue();
141
+ var _topElem = dialog.getContentElement(page, pre + 'Top' + post);
142
+ for (var i = 0; i < _positionVar.length; i++) {
143
+ if (_positionVar[i] != 'Top') {
144
+ var elem = dialog.getContentElement(page, pre + _positionVar[i] + post);
145
+ selectOnKeyDown(elem, ev);
146
+ }
147
+ }
148
+ }
149
+
150
+ function selectOnKeyUpAll(elem, pre, post, page, ev) {
151
+ var dialog = elem.getDialog();
152
+ var _val = elem.getValue();
153
+ var _topElem = dialog.getContentElement(page, pre + 'Top' + post);
154
+ for (var i = 0; i < _positionVar.length; i++) {
155
+ if (_positionVar[i] != 'Top') {
156
+ var elem = dialog.getContentElement(page, pre + _positionVar[i] + post);
157
+ selectOnKeyUp(elem, ev);
158
+ }
159
+ }
160
+ }
161
+
162
+ function selectOnKeyPressAll(elem, pre, post, page, ev) {
163
+ var dialog = elem.getDialog();
164
+ var _val = elem.getValue();
165
+ var _topElem = dialog.getContentElement(page, pre + 'Top' + post);
166
+ for (var i = 0; i < _positionVar.length; i++) {
167
+ if (_positionVar[i] != 'Top') {
168
+ var elem = dialog.getContentElement(page, pre + _positionVar[i] + post);
169
+ selectOnKeyPress(elem, ev);
170
+ }
171
+ }
172
+ }
173
+
174
+ function setAll(elem, pre, post, page) {
175
+ var dialog = elem.getDialog();
176
+ var _val = elem.getValue();
177
+ var _topElem = dialog.getContentElement(page, pre + 'Top' + post);
178
+ for (var i = 0; i < _positionVar.length; i++) {
179
+ if (_positionVar[i] != 'Top') {
180
+ var elem = dialog.getContentElement(page, pre + _positionVar[i] + post);
181
+ if (_val) {
182
+ elem.disable();
183
+ elem.setValue(_topElem.getValue());
184
+ } else {
185
+ elem.enable();
186
+ }
187
+ }
188
+ }
189
+ }
190
+
191
+ function elemSetup(elem, _style) {
192
+ var _value = _style[elem.id];
193
+ var editor = elem.getDialog().getParentEditor();
194
+ var overType = editor.lang.CKCss.value;
195
+
196
+ if (elem.id=='clipTop') _value = _style['clip'];
197
+ if ((_value != undefined) && (_value != '')) {
198
+ if (elem.id=='clipTop') {
199
+ var dialog = elem.getDialog();
200
+ var values = _style['clip'].replace('rect(','').replace(')','').split(',');
201
+ var page = getParentTabName(elem);
202
+ for (var i = 0; i < _positionVar.length; i++) {
203
+ var elemClip = dialog.getContentElement(page,'clip' + _positionVar[i]);
204
+ selectSetValue(elemClip,values[i]);
205
+ }
206
+ } else {
207
+ switch (elem.type) {
208
+ case 'select':
209
+ selectSetValue(elem,_value);
210
+ break;
211
+ default:
212
+ elem.setValue(_value, _value);
213
+ break;
214
+ }
215
+ }
216
+ } else {
217
+ switch (elem.type) {
218
+ case 'select':
219
+ gestUm(elem);
220
+ }
221
+ }
222
+ boldTab(elem);
223
+ }
224
+
225
+ function selectSetValue(elem,_value) {
226
+ gestUm(elem);
227
+ if (arContains(elem.getInputElement().$.options, _value) > -1) {
228
+ elem.setValue(_value, _value);
229
+ } else {
230
+ if (arContains(elem.getInputElement().$.options, ' ') > -1) {
231
+ elem.remove(0);
232
+ }
233
+ var dialog = elem.getDialog();
234
+ var um = findElement(dialog, elem.id + 'Um');
235
+ if (um != null) {
236
+ if (_value.length > 2) {
237
+ var _umValue = _value.substring(_value.length - 2, _value.length)
238
+ var _value = _value.replace(_umValue, '');
239
+ }
240
+ if (isNumeric(_value)) {
241
+ um.setValue(_umValue);
242
+ um.enable();
243
+ } else {
244
+ um.disable();
245
+ }
246
+ }
247
+ elem.add(_value, _value, null);
248
+ elem.setValue(_value);
249
+ }
250
+ }
251
+
252
+ function selectOnKeyDown(elem, ev) {
253
+ var obj = elem.getInputElement().$;
254
+ ev = ev.data.$;
255
+ fnKeyDownHandler_A(obj, ev);
256
+ }
257
+
258
+ function selectOnKeyUp(elem, ev) {
259
+ var obj = elem.getInputElement().$;
260
+ ev = ev.data.$;
261
+ fnKeyUpHandler_A(obj, ev);
262
+ gestUm(elem);
263
+ preview(elem);
264
+ }
265
+
266
+ function selectOnKeyPress(elem, ev) {
267
+ var obj = elem.getInputElement().$;
268
+ ev = ev.data.$;
269
+ return fnKeyPressHandler_A(obj, ev);
270
+ }
271
+
272
+ function selectOnChange(elem, ev) {
273
+ var obj = elem.getInputElement().$;
274
+ ev = ev.data.$;
275
+ fnChangeHandler_A(obj, ev);
276
+ preview(elem);
277
+
278
+ var sel = elem.getInputElement();
279
+ var editor = elem.getDialog().getParentEditor();
280
+ var overType = editor.lang.CKCss.value;
281
+ var selIndex = obj.selectedIndex;
282
+ var selectedtxt = obj.options[selIndex].text;
283
+
284
+ var opts = sel.getChildren();
285
+ var opt = opts.getItem(selIndex);
286
+
287
+ if(selectedtxt == overType || opt.hasClass('cssEditable'))
288
+ {
289
+ var className = sel.getAttribute('class')
290
+ sel.setAttribute('class',className +' selectOvertype');
291
+ opt.setAttribute('class','cssEditable');
292
+ }
293
+ else
294
+ {
295
+ var className = sel.getAttribute('class');
296
+ className = className.replace(' selectOvertype','');
297
+ sel.setAttribute('class',className);
298
+ }
299
+ }
300
+
301
+ function preview(elem) {
302
+ var dialog = elem.getDialog();
303
+ var prw = CKEDITOR.document.getById(imagePreviewBoxId);
304
+ var _vl = elem.getValue();
305
+ var _style=elem.id;
306
+ var dlg=elem.getDialog();
307
+
308
+ //files
309
+ if ((_style == 'backgroundImage') || (_style == 'listStyleImage')) {
310
+ if(!_vl.match(/:\/\//))
311
+ _vl = _editor.config.baseHref + _vl;
312
+ _vl = 'url(\'' + _vl + '\')';
313
+ }
314
+
315
+ //clip:rect
316
+ if ((_style=='clipLeft')||(_style=='clipTop')||(_style=='clipBottom')||(_style=='clipRight')) {
317
+ var _notSet=true;
318
+ var elemPage=getParentTabName(elem);
319
+ var cur=_style.replace('clip','');
320
+ _vl='rect(';
321
+ for (var i = 0; i < _positionVar.length; i++) {
322
+ var cElem=dlg.getContentElement(elemPage,'clip' + _positionVar[i] );
323
+ var cElemUm=dlg.getContentElement(elemPage,'clip' + _positionVar[i] + "Um");
324
+ var _tmp=cElem.getValue();
325
+
326
+ if ((_tmp!=' ') && (_tmp!='')) {
327
+ _notSet=false;
328
+ if (isNumeric(_tmp)) _tmp+=cElemUm.getValue(); else _tmp='auto';
329
+ } else{
330
+ _tmp='auto';
331
+ }
332
+ _vl+=_tmp + ',';
333
+ }
334
+ _style='clip';
335
+ if (!_notSet) {
336
+ _vl=_vl.substr(0,_vl.length-1) + ')';
337
+ } else {
338
+ /* ie non consente di impostare clip=''*/
339
+ if (CKEDITOR.env.ie) {
340
+ _vl='rect(auto,auto,auto,auto)';
341
+ } else {
342
+ _vl='';
343
+ }
344
+
345
+ }
346
+ }
347
+
348
+ if ((_vl != ' ') && (_vl != '')) {
349
+ if (isNumeric(_vl)) {
350
+ var um = findElement(dialog, _style + 'Um');
351
+ if (um != null) {
352
+ _vl = _vl + um.getValue();
353
+ }
354
+ }
355
+ prw.setStyle(_style, _vl);
356
+ } else {
357
+ prw.removeStyle(_style);
358
+ }
359
+
360
+ prw.$.style.cssText = prw.$.style.cssText.replace(/\/administrator\//g,'/');
361
+
362
+ distPreview(dialog, prw.$.style.cssText);
363
+ boldTab(elem);
364
+ // var prwH = dialog.getContentElement('page1', 'stylePreview');
365
+ // prwH.setValue(prw.$.style.cssText);
366
+ }
367
+
368
+ function isNumeric(n) {
369
+ return !isNaN(parseFloat(n)) && isFinite(n);
370
+ }
371
+
372
+
373
+ var exampleDialog = function (editor) {
374
+ _editor=editor;
375
+ var _fontName = [[editor.lang.CKCss.notSet, ''],['Arial', 'arial, helvetica, sans-serif'], ['Comic Sans MS', 'comic sans ms, cursive'], ['Courier New', 'courier new, courier, monospace'],
376
+ ['Georgia', 'georgia, serif'], ['Lucida Sans Unicode', 'lucida sans unicode, lucida grande, sans-serif'], ['Tahoma', 'tahoma, geneva, sans-serif'], ['Times New Roman', 'times new roman, times, serif'], ['Trebuchet MS', 'trebuchet ms, helvetica, sans-serif'], ['Verdana', 'verdana, geneva, sans-serif']];
377
+ var _fontSize = [[editor.lang.CKCss.value, ' '], ['xx-small', 'xx-small'], ['x-small', 'x-small'], ['small', 'small'], ['medium', 'medium'], ['large', 'large'], ['x-large', 'x-large'], ['xx-large', 'xx-large'], ['smaller', 'smaller'], ['larger', 'larger'], [editor.lang.CKCss.notSet, '']];
378
+ var _um = [['px', 'px'], ['pt', 'pt'], ['in', 'in'], ['cm', 'cm'], ['mm', 'mm'], ['pc', 'pc'], ['em', 'em'], ['ex', 'ex'], ['%', '%']];
379
+ var _fontWeight = [[editor.lang.CKCss.notSet, ''], ['normal', 'normal'], ['bold', 'bold'], ['lighter', 'lighter'], ['bolder', 'bolder'], ['100', '100'], ['200', '200'], ['300', '300'], ['400', '400'], ['500', '500'], ['600', '600'], ['700', '700'], ['800', '800'], ['900', '900']]
380
+ var _fontStyle = [[editor.lang.CKCss.notSet, ''], ['italic', 'italic'], ['normal', 'normal'], ['oblique', 'oblique']]
381
+ var _fontVariant = [[editor.lang.CKCss.notSet, ''], ['normal', 'normal'], ['small-caps', 'small-caps']]
382
+ var _textTransform = [[editor.lang.CKCss.notSet, ''], ['capitalize', 'capitalize'], ['lowercase', 'lowercase'], ['none', 'none'], ['uppercase', 'uppercase']]
383
+ var _textDecoration = [['underline', 'underline'], ['overline', 'overline'], ['line-through', 'line-through'], ['blink', 'blink'], ['none', 'none']]
384
+ var _common2 = [[editor.lang.CKCss.value, ' '], [editor.lang.CKCss.notSet, '']];
385
+ var _common3 = [[editor.lang.CKCss.value, ' '], ['auto', 'auto'], [editor.lang.CKCss.notSet, '']];
386
+ var _common = [[editor.lang.CKCss.value, ' '], ['normal', 'normal'], [editor.lang.CKCss.notSet, '']];
387
+ var _verticalAlign = [[editor.lang.CKCss.value, ' '], ['baseline', 'baseline'], ['bottom', 'bottom'], ['middle', 'middle'], ['sub', 'sub'], ['super', 'super'], ['text-bottom', 'text-bottom'], ['text-top', 'text-top'], ['top', 'top'], [editor.lang.CKCss.notSet, '']];
388
+ var _textAlign = [['center', 'center'], ['justify', 'justify'], ['left', 'left'], ['right', 'right'], [editor.lang.CKCss.notSet, '']];
389
+ var _whiteSpace = [['normal', 'normal'], ['nowrap', 'nowrap'], ['pre', 'pre'], ['pre-line', 'pre-line'], ['pre-wrap', 'pre-wrap'], [editor.lang.CKCss.notSet, '']];
390
+ var _backgroundRepeat = [[editor.lang.CKCss.notSet, ''], ['no-repeat', 'no-repeat'], ['repeat', 'repeat'], ['repeat-x', 'repeat-x'], ['repeat-y', 'repeat-y']];
391
+ var _backgroundAttachment = [[editor.lang.CKCss.notSet, ''], ['fixed', 'fixed'], ['scroll', 'scroll']];
392
+ var _backgroundPositionX = [[editor.lang.CKCss.value, ' '], ['center', 'center'], ['left', 'left'], ['right', 'right'], [editor.lang.CKCss.notSet, '']];
393
+ var _backgroundPositionY = [[editor.lang.CKCss.value, ' '], ['bottom', 'bottom'], ['center', 'center'], ['top', 'top'], [editor.lang.CKCss.notSet, '']];
394
+ var _borderStyle = [[editor.lang.CKCss.notSet, ''], ['dashed', 'dashed'], ['dotted', 'dotted'], ['double', 'double'], ['groove', 'groove'], ['hidden', 'hidden'], ['inset', 'inset'], ['none', 'none'], ['outset', 'outset'], ['ridge', 'ridge'], ['solid', 'solid']];
395
+ var _borderWidth = [[editor.lang.CKCss.value, ' '], ['thin', 'thin'], ['medium', 'medium'], ['thick', 'thick'], [editor.lang.CKCss.notSet, '']];
396
+ var _position = [[editor.lang.CKCss.notSet, ''], ['absolute', 'absolute'], ['fixed', 'fixed'], ['relative', 'relative'], ['static', 'static']];
397
+ var _visibility = [[editor.lang.CKCss.notSet, ''], ['collapse', 'collapse'], ['hidden', 'hidden'], ['visible', 'visible']];
398
+ var _overflow = [[editor.lang.CKCss.notSet, ''], ['auto', 'auto'], ['hidden', 'hidden'], ['scroll', 'scroll'], ['visible', 'visible']];
399
+ var _display = [[editor.lang.CKCss.notSet, ''], ['block', 'block'], ['inline', 'inline'], ['inline-block', 'inline-block'], ['inline-table', 'inline-table'], ['list-item', 'list-item'], ['none', 'none'], ['run-in', 'run-in'], ['table', 'table'], ['table-caption', 'table-caption'], ['table-cell', 'table-cell'], ['table-column', 'table-column'], ['table-column-group', 'table-column-group'], ['table-footer-group', 'table-footer-group'], ['table-header-group', 'table-header-group'], ['table-row', 'table-row'], ['table-row-group', 'table-row-group']];
400
+ var _float = [[editor.lang.CKCss.notSet, ''], ['left', 'left'], ['none', 'none'], ['right', 'right']];
401
+ var _clear = [[editor.lang.CKCss.notSet, ''], ['both', 'both'], ['left', 'left'], ['none', 'none'], ['right', 'right']];
402
+ var _cursor = [[editor.lang.CKCss.notSet, ''], ['auto', 'auto'], ['crosshair', 'crosshair'], ['default', 'default'], ['e-resize', 'e-resize'], ['help', 'help'], ['move', 'move'], ['n-resize', 'n-resize'], ['ne-resize', 'ne-resize'], ['nw-resize', 'nw-resize'], ['pointer', 'pointer'], ['progress', 'progress'], ['s-resize', 's-resize'], ['se-resize', 'se-resize'], ['sw-resize', 'sw-resize'], ['text', 'text'], ['w-resize', 'w-resize'], ['wait', 'wait']];
403
+ var _listStyleType = [[editor.lang.CKCss.notSet, ''], ['disc', 'disc'], ['circle', 'circle'], ['square', 'square'], ['decimal', 'decimal'], ['decimal-leading-zero', 'decimal-leading-zero'], ['lower-roman', 'lower-roman'], ['upper-roman', 'upper-roman'], ['lower-greek', 'lower-greek'], ['lower-latin', 'lower-latin'], ['upper-latin', 'upper-latin'], ['armenian', 'armenian'], ['georgian', 'georgian'], ['lower-alpha', 'lower-alpha'], ['upper-alpha', 'upper-alpha'], ['none', 'none']];
404
+ var _listStylePosition = [[editor.lang.CKCss.notSet, ''], ['inside', 'inside'], ['outside', 'outside']];
405
+ var _tableLayout = [[editor.lang.CKCss.notSet, ''], ['auto', 'auto'], ['fixed', 'fixed']];
406
+ var _borderCollapse = [[editor.lang.CKCss.notSet, ''], ['collapse', 'collapse'], ['separate', 'separate']];
407
+ var _emptyCells = [[editor.lang.CKCss.notSet, ''], ['hide', 'hide'], ['show', 'show']];
408
+ var _captionSide = [[editor.lang.CKCss.notSet, ''], ['bottom', 'bottom'], ['top', 'top']];
409
+ function getDialogValue(dialogName, callback) {
410
+ var onOk = function () {
411
+ releaseHandlers(this);
412
+ callback(this, this._.parentDialog);
413
+ this._.parentDialog.changeFocus(true);
414
+ };
415
+ var onCancel = function () {
416
+ releaseHandlers(this);
417
+ this._.parentDialog.changeFocus();
418
+ };
419
+ var releaseHandlers = function (dialog) {
420
+ dialog.removeListener('ok', onOk);
421
+ dialog.removeListener('cancel', onCancel);
422
+ };
423
+ var bindToDialog = function (dialog) {
424
+ dialog.on('ok', onOk);
425
+ dialog.on('cancel', onCancel);
426
+ };
427
+ editor.execCommand(dialogName);
428
+ if (editor._.storedDialogs.colordialog)
429
+ bindToDialog(editor._.storedDialogs.colordialog);
430
+ else {
431
+ CKEDITOR.on('dialogDefinition', function (e) {
432
+ if (e.data.name != dialogName)
433
+ return;
434
+
435
+ var definition = e.data.definition;
436
+
437
+ e.removeListener();
438
+ definition.onLoad = CKEDITOR.tools.override(definition.onLoad, function (orginal) {
439
+ return function () {
440
+ bindToDialog(this);
441
+ definition.onLoad = orginal;
442
+ if (typeof orginal == 'function')
443
+ orginal.call(this);
444
+ };
445
+ });
446
+ });
447
+ }
448
+ }
449
+
450
+ return {
451
+ title: 'CKCss Editor',
452
+ minWidth: 550,
453
+ minHeight: 400,
454
+ buttons: [CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton],
455
+ onOk: function () {
456
+ var elem = null; //get the current selected element
457
+ var t = this;
458
+ if ( !this._.selectedElement )
459
+ {
460
+ if (!this._.selectedElements) {
461
+ var prwH = this.getContentElement('page1', 'stylePreview');
462
+ var cssText = prwH.getValue();
463
+
464
+ // Apply style.
465
+ var style = new CKEDITOR.style( { element : 'span', attributes : {style : cssText } } );
466
+ style.type = CKEDITOR.STYLE_INLINE; // need to override... dunno why.
467
+ style.apply( editor.document );
468
+ } else {
469
+ var elem;
470
+ this._.selectedElements.forEach(function(elem) {
471
+ var prwH = t.getContentElement('page1', 'stylePreview');
472
+ var cssText = prwH.getValue();
473
+ if(!cssText && !elem.hasAttribute('class') && !elem.hasAttribute('id') && elem.is('span'))
474
+ elem.setAttribute('id','data-remove-span'); //mark to remove
475
+ elem.$.style.cssText = prwH.getValue();
476
+ });
477
+ delete this._.selectedElements;
478
+ }
479
+ }
480
+ else
481
+ {
482
+ elem = this._.selectedElement;
483
+ var prwH = this.getContentElement('page1', 'stylePreview');
484
+ var cssText = prwH.getValue();
485
+ if(!cssText && !elem.hasAttribute('class') && !elem.hasAttribute('id') && elem.is('span'))
486
+ elem.setAttribute('id','data-remove-span'); //mark to remove
487
+ elem.$.style.cssText = prwH.getValue();
488
+
489
+ delete this._.selectedElement;
490
+ }
491
+ },
492
+ onLoad: onLoad(),
493
+ onShow: function () {
494
+ var elem = null,
495
+ elems = null,
496
+ selection = this.getParentEditor().getSelection();
497
+
498
+ if ( selection.getType() == CKEDITOR.SELECTION_ELEMENT ) {
499
+ elem = selection.getSelectedElement();
500
+ } else {
501
+ var range = selection.getRanges( true )[ 0 ];
502
+ range.shrink( CKEDITOR.SHRINK_ELEMENT );
503
+
504
+ var root = range.getCommonAncestor();
505
+ if(root && (root.type == CKEDITOR.NODE_ELEMENT && root.is('div') || CKEDITOR.NODE_ELEMENT && root.is('td')))
506
+ elem = root;
507
+
508
+ if(elem == null){
509
+ range.shrink( CKEDITOR.SHRINK_TEXT );
510
+ root = range.getCommonAncestor();
511
+ if(root && root.type == CKEDITOR.NODE_ELEMENT && root.is('p'))
512
+ elem = root;
513
+ if(elem == null)
514
+ elem = root.getAscendant( 'a', true );
515
+ if(elem == null)
516
+ elem = root.getAscendant( 'span', true );
517
+
518
+ }
519
+ if (elem == null) {
520
+ var iterator = range.createIterator(),
521
+ enterMode = editor.config.enterMode;
522
+ iterator.enforceRealBlocks = true;
523
+ iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR;
524
+ var block;
525
+ elems = [];
526
+ while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) ) {
527
+ elems.push(block);
528
+ }
529
+ }
530
+
531
+ }
532
+
533
+ if (elem != null) {
534
+ //var prw = CKEDITOR.document.getById(imagePreviewBoxId);
535
+ //var prwH = this.getContentElement('page1', 'stylePreview');
536
+ //prwH.setValue(elem.$.style.cssText);
537
+ //prw.$.style.cssText = elem.$.style.cssText;
538
+ this._.selectedElement = elem;
539
+ distPreview(this, elem.$.style.cssText);
540
+ this.setupContent(elem.$.style);
541
+ } else if (elems != null) {
542
+ this._.selectedElements = elems;
543
+ distPreview(this, elems[0].$.style.cssText);
544
+ this.setupContent(elems[0].$.style);
545
+ }
546
+ },
547
+ onHide: onHide(),
548
+ onCancel: onCancel(),
549
+ resizable: 'none' /* none,width,height or both */,
550
+ contents: [{
551
+ id: 'page1',
552
+ label: editor.lang.CKCss.tabPage1,
553
+ accessKey: 'P',
554
+ elements: [{
555
+ type: 'vbox',
556
+ padding: 3,
557
+ children:
558
+ [{
559
+ id: 'fontFamily',
560
+ type: 'select',
561
+ labelLayout: 'horizontal',
562
+ widths: ['100px'],
563
+ label: 'font-family',
564
+ 'default': '',
565
+ items: _fontName,
566
+ onChange: function (event) {
567
+ selectOnChange(this, event);
568
+ },
569
+ setup: function (_style) {
570
+ elemSetup(this, _style);
571
+ }
572
+ }, {
573
+ type: 'hbox',
574
+ style: 'width:305px;float:left',
575
+ widths: ['200px', '50px'],
576
+ children: [{
577
+ id: 'fontSize',
578
+ type: 'select',
579
+ labelLayout: 'horizontal',
580
+ widths: ['100px'],
581
+ label: 'font-size',
582
+ 'default': '',
583
+ items: _fontSize,
584
+ onKeyDown: function (event) {
585
+ selectOnKeyDown(this, event);
586
+ },
587
+ onKeyUp: function (event) {
588
+ selectOnKeyUp(this, event);
589
+ },
590
+ onKeyPress: function (event) {
591
+ return selectOnKeyPress(this, event);
592
+ },
593
+ onChange: function (event) {
594
+ gestUm(this);
595
+ selectOnChange(this, event);
596
+ },
597
+ setup: function (_style) {
598
+ elemSetup(this, _style);
599
+ }
600
+ }, {
601
+ id: 'fontSizeUm',
602
+ type: 'select',
603
+ labelLayout: 'horizontal',
604
+ style: 'width:50px',
605
+ label: '',
606
+ 'default': 'px',
607
+ items: _um,
608
+ onChange: function () {
609
+ var dialog = this.getDialog();
610
+ var relElement = dialog.getContentElement('page1', this.id.substring(0, this.id.length - 2));
611
+ preview(relElement);
612
+ }
613
+ }]
614
+ }, {
615
+ id: 'fontWeight',
616
+ type: 'select',
617
+ labelLayout: 'horizontal',
618
+ widths: ['100px'],
619
+ label: 'font-weight',
620
+ 'default': '',
621
+ items: _fontWeight,
622
+ onChange: function () {
623
+ preview(this);
624
+ },
625
+ setup: function (_style) {
626
+ elemSetup(this, _style);
627
+ }
628
+ }, {
629
+ id: 'fontStyle',
630
+ type: 'select',
631
+ labelLayout: 'horizontal',
632
+ widths: ['100px'],
633
+ label: 'font-style',
634
+ 'default': '',
635
+ items: _fontStyle,
636
+ onChange: function () {
637
+ preview(this);
638
+ },
639
+ setup: function (_style) {
640
+ elemSetup(this, _style);
641
+ }
642
+ }, {
643
+ id: 'fontVariant',
644
+ type: 'select',
645
+ labelLayout: 'horizontal',
646
+ widths: ['100px'],
647
+ label: 'font-variant',
648
+ 'default': '',
649
+ items: _fontVariant,
650
+ onChange: function () {
651
+ preview(this);
652
+ },
653
+ setup: function (_style) {
654
+ elemSetup(this, _style);
655
+ }
656
+ }, {
657
+ type: 'hbox',
658
+ padding: 0,
659
+ widths: ['60px', '50px'],
660
+ children:
661
+ [
662
+ {
663
+ type: 'text',
664
+ id: 'color',
665
+ label: 'color',
666
+ labelLayout: 'horizontal',
667
+ widths: ['100px'],
668
+ 'default': '',
669
+ setup: function (_style) {
670
+ elemSetup(this, _style);
671
+ },
672
+ onChange: function () {
673
+ preview(this);
674
+ }
675
+ },
676
+ {
677
+ type: 'button',
678
+ id: 'colorChoose',
679
+ label: editor.lang.CKCss.choose,
680
+ style: 'margin-left: 10px',
681
+ onClick: function () {
682
+ var self = this;
683
+ getDialogValue('colordialog', function (colorDialog) {
684
+ var destElem = self.getDialog().getContentElement('page1', 'color');
685
+ destElem.setValue(
686
+ colorDialog.getContentElement('picker', 'selectedColor').getValue()
687
+ );
688
+ preview(destElem);
689
+ });
690
+ }
691
+ }
692
+ ]
693
+ }, {
694
+ id: 'textTransform',
695
+ type: 'select',
696
+ labelLayout: 'horizontal',
697
+ widths: ['100px'],
698
+ label: 'text-transform',
699
+ 'default': '',
700
+ items: _textTransform,
701
+ onChange: function () {
702
+ preview(this);
703
+ },
704
+ setup: function (_style) {
705
+ elemSetup(this, _style);
706
+ }
707
+ }, {
708
+ id: 'textDecoration',
709
+ type: 'select',
710
+ labelLayout: 'horizontal',
711
+ widths: ['100px'],
712
+ label: 'text-decoration',
713
+ multiple: true,
714
+ size: 5,
715
+ items: _textDecoration,
716
+ onChange: function () {
717
+ preview(this);
718
+ },
719
+ setup: function (_style) {
720
+ elemSetup(this, _style);
721
+ }
722
+ }, {
723
+ type: 'html',
724
+ style: 'width:95%;',
725
+ html: CKEDITOR.tools.htmlEncode(editor.lang.CKCss.preview) + '<br><div style="text-align:center;border:1px solid #c0c0c0;background-color:#ffffff;height:50px;overflow:auto"><div id="' + imagePreviewBoxId + '">AaBbYyGgLlJj</div></div>'
726
+ }, {
727
+ id: 'stylePreview',
728
+ type: 'textarea',
729
+ style: 'width:100%;',
730
+ rows: 3
731
+
732
+ }]
733
+ }]
734
+ }, {
735
+ id: 'page2',
736
+ label: editor.lang.CKCss.tabPage2,
737
+ accessKey: 'B',
738
+ elements: [{
739
+ type: 'vbox',
740
+ padding: 3,
741
+ children:
742
+ [{
743
+ type: 'hbox',
744
+ style: 'width:305px;float:left',
745
+ widths: ['200px', '50px'],
746
+ children: [{
747
+ id: 'lineHeight',
748
+ type: 'select',
749
+ labelLayout: 'horizontal',
750
+ widths: ['100px'],
751
+ label: 'line-height',
752
+ 'default': '',
753
+ items: _common,
754
+ onKeyDown: function (event) {
755
+ selectOnKeyDown(this, event);
756
+ },
757
+ onKeyUp: function (event) {
758
+ selectOnKeyUp(this, event);
759
+ },
760
+ onKeyPress: function (event) {
761
+ return selectOnKeyPress(this, event);
762
+ },
763
+ onChange: function (event) {
764
+ gestUm(this);
765
+ selectOnChange(this, event);
766
+ },
767
+ setup: function (_style) {
768
+ elemSetup(this, _style);
769
+ }
770
+ }, {
771
+ id: 'lineHeightUm',
772
+ type: 'select',
773
+ labelLayout: 'horizontal',
774
+ style: 'width:50px',
775
+ label: '',
776
+ 'default': 'px',
777
+ items: _um,
778
+ onChange: function () {
779
+ var dialog = this.getDialog();
780
+ var relElement = dialog.getContentElement('page2', this.id.substring(0, this.id.length - 2));
781
+ preview(relElement);
782
+ }
783
+ }]
784
+ }, {
785
+ type: 'hbox',
786
+ style: 'width:305px;float:left',
787
+ widths: ['200px', '50px'],
788
+ children: [{
789
+ id: 'verticalAlign',
790
+ type: 'select',
791
+ labelLayout: 'horizontal',
792
+ widths: ['100px'],
793
+ label: 'vertical-align',
794
+ 'default': '',
795
+ items: _verticalAlign,
796
+ onKeyDown: function (event) {
797
+ selectOnKeyDown(this, event);
798
+ },
799
+ onKeyUp: function (event) {
800
+ selectOnKeyUp(this, event);
801
+ },
802
+ onKeyPress: function (event) {
803
+ return selectOnKeyPress(this, event);
804
+ },
805
+ onChange: function (event) {
806
+ gestUm(this);
807
+ selectOnChange(this, event);
808
+ },
809
+ setup: function (_style) {
810
+ elemSetup(this, _style);
811
+ }
812
+ }, {
813
+ id: 'verticalAlignUm',
814
+ type: 'select',
815
+ labelLayout: 'horizontal',
816
+ style: 'width:50px',
817
+ label: '',
818
+ 'default': '%',
819
+ items: _um,
820
+ onChange: function () {
821
+ var dialog = this.getDialog();
822
+ var relElement = dialog.getContentElement('page2', this.id.substring(0, this.id.length - 2));
823
+ preview(relElement);
824
+ }
825
+ }]
826
+ }, {
827
+ id: 'textAlign',
828
+ type: 'select',
829
+ labelLayout: 'horizontal',
830
+ widths: ['100px'],
831
+ label: 'text-align',
832
+ 'default': '',
833
+ items: _textAlign,
834
+ onChange: function () {
835
+ preview(this);
836
+ },
837
+ setup: function (_style) {
838
+ elemSetup(this, _style);
839
+ }
840
+ }, {
841
+ type: 'hbox',
842
+ style: 'width:305px;float:left',
843
+ widths: ['200px', '50px'],
844
+ children: [{
845
+ id: 'textIndent',
846
+ type: 'select',
847
+ labelLayout: 'horizontal',
848
+ widths: ['100px'],
849
+ label: 'text-indent',
850
+ 'default': '',
851
+ items: _common2,
852
+ onKeyDown: function (event) {
853
+ selectOnKeyDown(this, event);
854
+ },
855
+ onKeyUp: function (event) {
856
+ selectOnKeyUp(this, event);
857
+ },
858
+ onKeyPress: function (event) {
859
+ return selectOnKeyPress(this, event);
860
+ },
861
+ onChange: function (event) {
862
+ gestUm(this);
863
+ selectOnChange(this, event);
864
+ },
865
+ setup: function (_style) {
866
+ elemSetup(this, _style);
867
+ }
868
+ }, {
869
+ id: 'textIndentUm',
870
+ type: 'select',
871
+ labelLayout: 'horizontal',
872
+ style: 'width:50px',
873
+ label: '',
874
+ 'default': 'px',
875
+ items: _um,
876
+ onChange: function () {
877
+ var dialog = this.getDialog();
878
+ var relElement = dialog.getContentElement('page2', this.id.substring(0, this.id.length - 2));
879
+ preview(relElement);
880
+ }
881
+ }]
882
+ }, {
883
+ id: 'whiteSpace',
884
+ type: 'select',
885
+ labelLayout: 'horizontal',
886
+ widths: ['100px'],
887
+ label: 'white-space',
888
+ 'default': '',
889
+ items: _whiteSpace,
890
+ onChange: function () {
891
+ preview(this);
892
+ },
893
+ setup: function (_style) {
894
+ elemSetup(this, _style);
895
+ }
896
+ }, {
897
+ type: 'hbox',
898
+ style: 'width:305px;float:left',
899
+ widths: ['200px', '50px'],
900
+ children: [{
901
+ id: 'wordSpacing',
902
+ type: 'select',
903
+ labelLayout: 'horizontal',
904
+ widths: ['100px'],
905
+ label: 'word-spacing',
906
+ 'default': '',
907
+ items: _common,
908
+ onKeyDown: function (event) {
909
+ selectOnKeyDown(this, event);
910
+ },
911
+ onKeyUp: function (event) {
912
+ selectOnKeyUp(this, event);
913
+ },
914
+ onKeyPress: function (event) {
915
+ return selectOnKeyPress(this, event);
916
+ },
917
+ onChange: function (event) {
918
+ gestUm(this);
919
+ selectOnChange(this, event);
920
+ },
921
+ setup: function (_style) {
922
+ elemSetup(this, _style);
923
+ }
924
+ }, {
925
+ id: 'wordSpacingUm',
926
+ type: 'select',
927
+ labelLayout: 'horizontal',
928
+ style: 'width:50px',
929
+ label: '',
930
+ 'default': 'px',
931
+ items: _um,
932
+ onChange: function () {
933
+ var dialog = this.getDialog();
934
+ var relElement = dialog.getContentElement('page2', this.id.substring(0, this.id.length - 2));
935
+ preview(relElement);
936
+ }
937
+ }]
938
+ }, {
939
+ type: 'hbox',
940
+ style: 'width:305px;float:left',
941
+ widths: ['200px', '50px'],
942
+ children: [{
943
+ id: 'letterSpacing',
944
+ type: 'select',
945
+ labelLayout: 'horizontal',
946
+ widths: ['100px'],
947
+ label: 'letter-spacing',
948
+ 'default': '',
949
+ items: _common2,
950
+ onKeyDown: function (event) {
951
+ selectOnKeyDown(this, event);
952
+ },
953
+ onKeyUp: function (event) {
954
+ selectOnKeyUp(this, event);
955
+ },
956
+ onKeyPress: function (event) {
957
+ return selectOnKeyPress(this, event);
958
+ },
959
+ onChange: function (event) {
960
+ gestUm(this);
961
+ selectOnChange(this, event);
962
+ },
963
+ setup: function (_style) {
964
+ elemSetup(this, _style);
965
+ }
966
+ }, {
967
+ id: 'letterSpacingUm',
968
+ type: 'select',
969
+ labelLayout: 'horizontal',
970
+ style: 'width:50px',
971
+ label: '',
972
+ 'default': 'px',
973
+ items: _um,
974
+ onChange: function () {
975
+ var dialog = this.getDialog();
976
+ var relElement = dialog.getContentElement('page2', this.id.substring(0, this.id.length - 2));
977
+ preview(relElement);
978
+ }
979
+ }]
980
+ }, {
981
+ type: 'html',
982
+ style: 'width:95%;',
983
+ html: CKEDITOR.tools.htmlEncode(editor.lang.CKCss.preview) + '<br><div style="text-align:center;border:1px solid #c0c0c0;background-color:#ffffff;height:50px;overflow:auto"><div id="' + imagePreviewBoxId + '2">AaBbYyGgLlJj</div></div>'
984
+ }, {
985
+ id: 'stylePreview',
986
+ type: 'textarea',
987
+ style: 'width:100%;',
988
+ rows: 3
989
+
990
+ }]
991
+ }]
992
+ }, {
993
+ id: 'page3',
994
+ label: editor.lang.CKCss.tabPage3,
995
+ accessKey: 'S',
996
+ elements: [{
997
+ type: 'vbox',
998
+ padding: 3,
999
+ children:
1000
+ [{
1001
+ type: 'hbox',
1002
+ padding: 0,
1003
+ widths: ['60px', '50px'],
1004
+ children:
1005
+ [
1006
+ {
1007
+ type: 'text',
1008
+ id: 'backgroundColor',
1009
+ label: 'background-color',
1010
+ labelLayout: 'horizontal',
1011
+ widths: ['150px'],
1012
+ 'default': '',
1013
+ setup: function (_style) {
1014
+ elemSetup(this, _style);
1015
+ },
1016
+ onChange: function () {
1017
+ preview(this);
1018
+ }
1019
+ },
1020
+ {
1021
+ type: 'button',
1022
+ id: 'colorChoose',
1023
+ label: editor.lang.CKCss.choose,
1024
+ style: 'margin-left: 10px',
1025
+ onClick: function () {
1026
+ var self = this;
1027
+ getDialogValue('colordialog', function (colorDialog) {
1028
+ var destElem = self.getDialog().getContentElement('page3', 'backgroundColor');
1029
+ destElem.setValue(
1030
+ colorDialog.getContentElement('picker', 'selectedColor').getValue()
1031
+ );
1032
+ preview(destElem);
1033
+ });
1034
+ }
1035
+ }
1036
+ ]
1037
+ },
1038
+ {
1039
+ type: 'vbox',
1040
+ padding: 0,
1041
+ children:
1042
+ [
1043
+ {
1044
+ type: 'hbox',
1045
+ widths: ['250px', '110px'],
1046
+ align: 'right',
1047
+ children:
1048
+ [
1049
+ {
1050
+ id: 'backgroundImage',
1051
+ type: 'text',
1052
+ widths: ['150px'],
1053
+ labelLayout: 'horizontal',
1054
+ label: 'background-image',
1055
+ onChange: function () {
1056
+ //this.setValue('url(\'' + this.getValue() + '\')');
1057
+ preview(this);
1058
+ },
1059
+ setup: function (_style) {
1060
+ elemSetup(this, _style);
1061
+ }
1062
+ },
1063
+ {
1064
+ type: 'button',
1065
+ id: 'browse',
1066
+ // v-align with the 'txtUrl' field.
1067
+ // TODO: We need something better than a fixed size here.
1068
+ align: 'center',
1069
+ label: editor.lang.common.browseServer,
1070
+ hidden: true,
1071
+ filebrowser :
1072
+ {
1073
+ action : 'Browse',
1074
+ target: 'page3:backgroundImage',
1075
+ url: editor.config.filebrowserImageBrowseLinkUrl,
1076
+ params : //optional
1077
+ {
1078
+ type : 'Images',
1079
+ currentFolder : '/'
1080
+ }
1081
+ }
1082
+ }
1083
+ ]
1084
+ }
1085
+ ]
1086
+ }, {
1087
+ id: 'backgroundRepeat',
1088
+ type: 'select',
1089
+ labelLayout: 'horizontal',
1090
+ widths: ['150px'],
1091
+ label: 'background-repeat',
1092
+ 'default': '',
1093
+ items: _backgroundRepeat,
1094
+ onChange: function () {
1095
+ preview(this);
1096
+ },
1097
+ setup: function (_style) {
1098
+ elemSetup(this, _style);
1099
+ }
1100
+ }, {
1101
+ id: 'backgroundAttachment',
1102
+ type: 'select',
1103
+ labelLayout: 'horizontal',
1104
+ widths: ['150px'],
1105
+ label: 'background-attachment',
1106
+ 'default': '',
1107
+ items: _backgroundAttachment,
1108
+ onChange: function () {
1109
+ preview(this);
1110
+ },
1111
+ setup: function (_style) {
1112
+ elemSetup(this, _style);
1113
+ }
1114
+ }, {
1115
+ type: 'hbox',
1116
+ style: 'width:355px;float:left',
1117
+ widths: ['200px', '50px'],
1118
+ children: [{
1119
+ id: 'backgroundPositionX',
1120
+ type: 'select',
1121
+ labelLayout: 'horizontal',
1122
+ widths: ['150px'],
1123
+ label: 'background-position-x',
1124
+ 'default': '',
1125
+ items: _backgroundPositionX,
1126
+ onKeyDown: function (event) {
1127
+ selectOnKeyDown(this, event);
1128
+ },
1129
+ onKeyUp: function (event) {
1130
+ selectOnKeyUp(this, event);
1131
+ },
1132
+ onKeyPress: function (event) {
1133
+ return selectOnKeyPress(this, event);
1134
+ },
1135
+ onChange: function (event) {
1136
+ gestUm(this);
1137
+ selectOnChange(this, event);
1138
+ },
1139
+ setup: function (_style) {
1140
+ elemSetup(this, _style);
1141
+ }
1142
+ }, {
1143
+ id: 'backgroundPositionXUm',
1144
+ type: 'select',
1145
+ labelLayout: 'horizontal',
1146
+ style: 'width:50px',
1147
+ label: '',
1148
+ 'default': 'px',
1149
+ items: _um,
1150
+ onChange: function () {
1151
+ var dialog = this.getDialog();
1152
+ var relElement = dialog.getContentElement('page3', this.id.substring(0, this.id.length - 2));
1153
+ preview(relElement);
1154
+ }
1155
+ }]
1156
+ }, {
1157
+ type: 'hbox',
1158
+ style: 'width:355px;float:left',
1159
+ widths: ['200px', '50px'],
1160
+ children: [{
1161
+ id: 'backgroundPositionY',
1162
+ type: 'select',
1163
+ labelLayout: 'horizontal',
1164
+ widths: ['150px'],
1165
+ label: 'background-position-y',
1166
+ 'default': '',
1167
+ items: _backgroundPositionY,
1168
+ onKeyDown: function (event) {
1169
+ selectOnKeyDown(this, event);
1170
+ },
1171
+ onKeyUp: function (event) {
1172
+ selectOnKeyUp(this, event);
1173
+ },
1174
+ onKeyPress: function (event) {
1175
+ return selectOnKeyPress(this, event);
1176
+ },
1177
+ onChange: function (event) {
1178
+ gestUm(this);
1179
+ selectOnChange(this, event);
1180
+ },
1181
+ setup: function (_style) {
1182
+ elemSetup(this, _style);
1183
+ }
1184
+ }, {
1185
+ id: 'backgroundPositionYUm',
1186
+ type: 'select',
1187
+ labelLayout: 'horizontal',
1188
+ style: 'width:50px',
1189
+ label: '',
1190
+ 'default': 'px',
1191
+ items: _um,
1192
+ onChange: function () {
1193
+ var dialog = this.getDialog();
1194
+ var relElement = dialog.getContentElement('page3', this.id.substring(0, this.id.length - 2));
1195
+ preview(relElement);
1196
+ }
1197
+ }]
1198
+ }, {
1199
+ type: 'html',
1200
+ style: 'width:95%;',
1201
+ html: CKEDITOR.tools.htmlEncode(editor.lang.CKCss.preview) + '<br><div style="text-align:center;border:1px solid #c0c0c0;background-color:#ffffff;height:50px;overflow:auto"><div id="' + imagePreviewBoxId + '3">AaBbYyGgLlJj</div></div>'
1202
+ }, {
1203
+ id: 'stylePreview',
1204
+ type: 'textarea',
1205
+ style: 'width:100%;',
1206
+ rows: 3
1207
+
1208
+ }]
1209
+ }]
1210
+ }, {
1211
+ id: 'page4',
1212
+ label: editor.lang.CKCss.tabPage4,
1213
+ accessKey: 'S',
1214
+ elements: [{
1215
+ type: 'vbox',
1216
+ padding: 3,
1217
+ children:
1218
+ [{
1219
+ type: 'hbox',
1220
+ padding: 0,
1221
+ widths: ['60px', '122px', '182px', '182px'],
1222
+ children:
1223
+ [{
1224
+ type: 'html',
1225
+ html: '&nbsp;'
1226
+ }, {
1227
+ type: 'html',
1228
+ style: 'text-align:center',
1229
+ html: 'border-style'
1230
+ }, {
1231
+ type: 'html',
1232
+ style: 'text-align:center',
1233
+ html: 'border-width'
1234
+ }, {
1235
+ type: 'html',
1236
+ style: 'text-align:center',
1237
+ html: 'border-color'
1238
+ }]
1239
+ }, {
1240
+ type: 'hbox',
1241
+ padding: 0,
1242
+ widths: ['60px', '122px', '182px', '182px'],
1243
+ children:
1244
+ [{
1245
+ type: 'html',
1246
+ html: '&nbsp;'
1247
+ }, {
1248
+ type: 'checkbox',
1249
+ id: 'borderStyleAll',
1250
+ label: editor.lang.CKCss.sameForAll,
1251
+ style: 'text-align:center',
1252
+ labelLayout: 'right',
1253
+ setup: function () {
1254
+ this.setValue(true);
1255
+ },
1256
+ onChange: function () {
1257
+ setAll(this, 'border', 'Style', 'page4');
1258
+
1259
+ }
1260
+ }, {
1261
+ type: 'checkbox',
1262
+ id: 'borderWidthAll',
1263
+ label: editor.lang.CKCss.sameForAll,
1264
+ style: 'text-align:center',
1265
+ labelLayout: 'right',
1266
+ checked: true,
1267
+ setup: function () {
1268
+ this.setValue(true);
1269
+ },
1270
+ onChange: function () {
1271
+ setAll(this, 'border', 'Width', 'page4');
1272
+ setAll(this, 'border', 'WidthUm', 'page4');
1273
+ }
1274
+ }, {
1275
+ type: 'checkbox',
1276
+ id: 'borderColorAll',
1277
+ label: editor.lang.CKCss.sameForAll,
1278
+ labelLayout: 'right',
1279
+ style: 'text-align:center',
1280
+ checked: true,
1281
+ setup: function () {
1282
+ this.setValue(true);
1283
+ },
1284
+ onChange: function () {
1285
+ setAll(this, 'border', 'Color', 'page4')
1286
+ }
1287
+ }]
1288
+ }, {
1289
+ type: 'hbox',
1290
+ padding: 0,
1291
+ widths: ['182px', '182px', '182px'],
1292
+ children:
1293
+ [{
1294
+ id: 'borderTopStyle',
1295
+ type: 'select',
1296
+ labelLayout: 'horizontal',
1297
+ widths: ['60px'],
1298
+ label: 'Top:',
1299
+ 'default': '',
1300
+ items: _borderStyle,
1301
+ onChange: function () {
1302
+ preview(this);
1303
+ var dialog = this.getDialog();
1304
+ var elem = dialog.getContentElement('page4', 'borderStyleAll');
1305
+ if (elem.getValue()) elem.setValue(true);
1306
+ },
1307
+ setup: function (_style) {
1308
+ elemSetup(this, _style);
1309
+ }
1310
+ }, {
1311
+ type: 'hbox',
1312
+ style: 'width:150px;float:left',
1313
+ widths: ['80px', '45px'],
1314
+ children: [{
1315
+ id: 'borderTopWidth',
1316
+ type: 'select',
1317
+ labelLayout: 'horizontal',
1318
+ widths: ['0px'],
1319
+ label: '',
1320
+ 'default': '',
1321
+ items: _borderWidth,
1322
+ onKeyDown: function (event) {
1323
+ selectOnKeyDown(this, event);
1324
+ selectOnKeyDownAll(this, 'border', 'Width', 'page4', event);
1325
+ },
1326
+ onKeyUp: function (event) {
1327
+ selectOnKeyUp(this, event);
1328
+ selectOnKeyUpAll(this, 'border', 'Width', 'page4', event);
1329
+ },
1330
+ onKeyPress: function (event) {
1331
+ var rtn = selectOnKeyPress(this, event);
1332
+ selectOnKeyPressAll(this, 'border', 'Width', 'page4', event);
1333
+ return rtn;
1334
+ },
1335
+ onChange: function (event) {
1336
+ gestUm(this);
1337
+ selectOnChange(this, event);
1338
+ var dialog = this.getDialog();
1339
+ var elem = dialog.getContentElement('page4', 'borderWidthAll');
1340
+ if (elem.getValue()) elem.setValue(true);
1341
+ },
1342
+ setup: function (_style) {
1343
+ elemSetup(this, _style);
1344
+ }
1345
+ }, {
1346
+ id: 'borderTopWidthUm',
1347
+ type: 'select',
1348
+ labelLayout: 'horizontal',
1349
+ style: 'width:45px',
1350
+ label: '',
1351
+ 'default': 'px',
1352
+ items: _um,
1353
+ onChange: function () {
1354
+ var dialog = this.getDialog();
1355
+ var elem = dialog.getContentElement('page4', 'borderWidthAll');
1356
+ if (elem.getValue()) elem.setValue(true);
1357
+ var relElement = dialog.getContentElement('page4', this.id.substring(0, this.id.length - 2));
1358
+ preview(relElement);
1359
+ }
1360
+ }]
1361
+ }, {
1362
+ type: 'hbox',
1363
+ padding: 0,
1364
+ widths: ['60px', '50px'],
1365
+ children:
1366
+ [
1367
+ {
1368
+ type: 'text',
1369
+ id: 'borderTopColor',
1370
+ label: '',
1371
+ labelLayout: '',
1372
+ widths: ['0px'],
1373
+ 'default': '',
1374
+ setup: function (_style) {
1375
+ elemSetup(this, _style);
1376
+ },
1377
+ onChange: function () {
1378
+ preview(this);
1379
+ var dialog = this.getDialog();
1380
+ var elem = dialog.getContentElement('page4', 'borderColorAll');
1381
+ if (elem.getValue()) elem.setValue(true);
1382
+ }
1383
+ },
1384
+ {
1385
+ type: 'button',
1386
+ id: 'colorChoose',
1387
+ label: editor.lang.CKCss.choose,
1388
+ style: 'margin-left: 10px',
1389
+ onClick: function () {
1390
+ var self = this;
1391
+ getDialogValue('colordialog', function (colorDialog) {
1392
+ var destElem = self.getDialog().getContentElement('page4', 'borderTopColor');
1393
+ destElem.setValue(
1394
+ colorDialog.getContentElement('picker', 'selectedColor').getValue()
1395
+ );
1396
+ preview(destElem);
1397
+ var dialog = destElem.getDialog();
1398
+ var elem = dialog.getContentElement('page4', 'borderColorAll');
1399
+ if (elem.getValue()) elem.setValue(true);
1400
+ });
1401
+ }
1402
+ }
1403
+ ]
1404
+ }]
1405
+ }, {
1406
+ type: 'hbox',
1407
+ padding: 0,
1408
+ widths: ['182px', '182px', '182px'],
1409
+ children:
1410
+ [{
1411
+ id: 'borderRightStyle',
1412
+ type: 'select',
1413
+ labelLayout: 'horizontal',
1414
+ widths: ['60px'],
1415
+ label: 'Right:',
1416
+ 'default': '',
1417
+ items: _borderStyle,
1418
+ onChange: function () {
1419
+ preview(this);
1420
+ },
1421
+ setup: function (_style) {
1422
+ elemSetup(this, _style);
1423
+ }
1424
+ }, {
1425
+ type: 'hbox',
1426
+ style: 'width:150px;float:left',
1427
+ widths: ['80px', '45px'],
1428
+ children: [{
1429
+ id: 'borderRightWidth',
1430
+ type: 'select',
1431
+ labelLayout: 'horizontal',
1432
+ widths: ['0px'],
1433
+ label: '',
1434
+ 'default': '',
1435
+ items: _borderWidth,
1436
+ onKeyDown: function (event) {
1437
+ selectOnKeyDown(this, event);
1438
+ },
1439
+ onKeyUp: function (event) {
1440
+ selectOnKeyUp(this, event);
1441
+ },
1442
+ onKeyPress: function (event) {
1443
+ return selectOnKeyPress(this, event);
1444
+ },
1445
+ onChange: function (event) {
1446
+ gestUm(this);
1447
+ selectOnChange(this, event);
1448
+ },
1449
+ setup: function (_style) {
1450
+ elemSetup(this, _style);
1451
+ }
1452
+ }, {
1453
+ id: 'borderRightWidthUm',
1454
+ type: 'select',
1455
+ labelLayout: 'horizontal',
1456
+ style: 'width:45px',
1457
+ label: '',
1458
+ 'default': 'px',
1459
+ items: _um,
1460
+ onChange: function () {
1461
+ var dialog = this.getDialog();
1462
+ var relElement = dialog.getContentElement('page4', this.id.substring(0, this.id.length - 2));
1463
+ preview(relElement);
1464
+ }
1465
+ }]
1466
+ }, {
1467
+ type: 'hbox',
1468
+ padding: 0,
1469
+ widths: ['60px', '50px'],
1470
+ children:
1471
+ [
1472
+ {
1473
+ type: 'text',
1474
+ id: 'borderRightColor',
1475
+ label: '',
1476
+ labelLayout: '',
1477
+ widths: ['0px'],
1478
+ 'default': '',
1479
+ setup: function (_style) {
1480
+ elemSetup(this, _style);
1481
+ },
1482
+ onChange: function () {
1483
+ preview(this);
1484
+ }
1485
+ },
1486
+ {
1487
+ type: 'button',
1488
+ id: 'colorChoose',
1489
+ label: editor.lang.CKCss.choose,
1490
+ style: 'margin-left: 10px',
1491
+ onClick: function () {
1492
+ var self = this;
1493
+ getDialogValue('colordialog', function (colorDialog) {
1494
+ var destElem = self.getDialog().getContentElement('page4', 'borderRightColor');
1495
+ destElem.setValue(
1496
+ colorDialog.getContentElement('picker', 'selectedColor').getValue()
1497
+ );
1498
+ preview(destElem);
1499
+ });
1500
+ }
1501
+ }
1502
+ ]
1503
+ }]
1504
+ }, {
1505
+ type: 'hbox',
1506
+ padding: 0,
1507
+ widths: ['182px', '182px', '182px'],
1508
+ children:
1509
+ [{
1510
+ id: 'borderBottomStyle',
1511
+ type: 'select',
1512
+ labelLayout: 'horizontal',
1513
+ widths: ['60px'],
1514
+ label: 'Bottom:',
1515
+ 'default': '',
1516
+ items: _borderStyle,
1517
+ onChange: function () {
1518
+ preview(this);
1519
+ },
1520
+ setup: function (_style) {
1521
+ elemSetup(this, _style);
1522
+ }
1523
+ }, {
1524
+ type: 'hbox',
1525
+ style: 'width:150px;float:left',
1526
+ widths: ['80px', '45px'],
1527
+ children: [{
1528
+ id: 'borderBottomWidth',
1529
+ type: 'select',
1530
+ labelLayout: 'horizontal',
1531
+ widths: ['0px'],
1532
+ label: '',
1533
+ 'default': '',
1534
+ items: _borderWidth,
1535
+ onKeyDown: function (event) {
1536
+ selectOnKeyDown(this, event);
1537
+ },
1538
+ onKeyUp: function (event) {
1539
+ selectOnKeyUp(this, event);
1540
+ },
1541
+ onKeyPress: function (event) {
1542
+ return selectOnKeyPress(this, event);
1543
+ },
1544
+ onChange: function (event) {
1545
+ gestUm(this);
1546
+ selectOnChange(this, event);
1547
+ },
1548
+ setup: function (_style) {
1549
+ elemSetup(this, _style);
1550
+ }
1551
+ }, {
1552
+ id: 'borderBottomWidthUm',
1553
+ type: 'select',
1554
+ labelLayout: 'horizontal',
1555
+ style: 'width:45px',
1556
+ label: '',
1557
+ 'default': 'px',
1558
+ items: _um,
1559
+ onChange: function () {
1560
+ var dialog = this.getDialog();
1561
+ var relElement = dialog.getContentElement('page4', this.id.substring(0, this.id.length - 2));
1562
+ preview(relElement);
1563
+ }
1564
+ }]
1565
+ }, {
1566
+ type: 'hbox',
1567
+ padding: 0,
1568
+ widths: ['60px', '50px'],
1569
+ children:
1570
+ [
1571
+ {
1572
+ type: 'text',
1573
+ id: 'borderBottomColor',
1574
+ label: '',
1575
+ labelLayout: '',
1576
+ widths: ['0px'],
1577
+ 'default': '',
1578
+ setup: function (_style) {
1579
+ elemSetup(this, _style);
1580
+ },
1581
+ onChange: function () {
1582
+ preview(this);
1583
+ }
1584
+ },
1585
+ {
1586
+ type: 'button',
1587
+ id: 'colorChoose',
1588
+ label: editor.lang.CKCss.choose,
1589
+ style: 'margin-left: 10px',
1590
+ onClick: function () {
1591
+ var self = this;
1592
+ getDialogValue('colordialog', function (colorDialog) {
1593
+ var destElem = self.getDialog().getContentElement('page4', 'borderBottomColor');
1594
+ destElem.setValue(
1595
+ colorDialog.getContentElement('picker', 'selectedColor').getValue()
1596
+ );
1597
+ preview(destElem);
1598
+ });
1599
+ }
1600
+ }
1601
+ ]
1602
+ }]
1603
+ }, {
1604
+ type: 'hbox',
1605
+ padding: 0,
1606
+ widths: ['182px', '182px', '182px'],
1607
+ children:
1608
+ [{
1609
+ id: 'borderLeftStyle',
1610
+ type: 'select',
1611
+ labelLayout: 'horizontal',
1612
+ widths: ['60px'],
1613
+ label: 'Left:',
1614
+ 'default': '',
1615
+ items: _borderStyle,
1616
+ onChange: function () {
1617
+ preview(this);
1618
+ },
1619
+ setup: function (_style) {
1620
+ elemSetup(this, _style);
1621
+ }
1622
+ }, {
1623
+ type: 'hbox',
1624
+ style: 'width:150px;float:left',
1625
+ widths: ['80px', '45px'],
1626
+ children: [{
1627
+ id: 'borderLeftWidth',
1628
+ type: 'select',
1629
+ labelLayout: 'horizontal',
1630
+ widths: ['0px'],
1631
+ label: '',
1632
+ 'default': '',
1633
+ items: _borderWidth,
1634
+ onKeyDown: function (event) {
1635
+ selectOnKeyDown(this, event);
1636
+ },
1637
+ onKeyUp: function (event) {
1638
+ selectOnKeyUp(this, event);
1639
+ },
1640
+ onKeyPress: function (event) {
1641
+ return selectOnKeyPress(this, event);
1642
+ },
1643
+ onChange: function (event) {
1644
+ gestUm(this);
1645
+ selectOnChange(this, event);
1646
+ },
1647
+ setup: function (_style) {
1648
+ elemSetup(this, _style);
1649
+ }
1650
+ }, {
1651
+ id: 'borderLeftWidthUm',
1652
+ type: 'select',
1653
+ labelLayout: 'horizontal',
1654
+ style: 'width:45px',
1655
+ label: '',
1656
+ 'default': 'px',
1657
+ items: _um,
1658
+ onChange: function () {
1659
+ var dialog = this.getDialog();
1660
+ var relElement = dialog.getContentElement('page4', this.id.substring(0, this.id.length - 2));
1661
+ preview(relElement);
1662
+ }
1663
+ }]
1664
+ }, {
1665
+ type: 'hbox',
1666
+ padding: 0,
1667
+ widths: ['60px', '50px'],
1668
+ children:
1669
+ [
1670
+ {
1671
+ type: 'text',
1672
+ id: 'borderLeftColor',
1673
+ label: '',
1674
+ labelLayout: '',
1675
+ widths: ['0px'],
1676
+ 'default': '',
1677
+ setup: function (_style) {
1678
+ elemSetup(this, _style);
1679
+ },
1680
+ onChange: function () {
1681
+ preview(this);
1682
+ }
1683
+ },
1684
+ {
1685
+ type: 'button',
1686
+ id: 'colorChoose',
1687
+ label: editor.lang.CKCss.choose,
1688
+ style: 'margin-left: 10px',
1689
+ onClick: function () {
1690
+ var self = this;
1691
+ getDialogValue('colordialog', function (colorDialog) {
1692
+ var destElem = self.getDialog().getContentElement('page4', 'borderLeftColor');
1693
+ destElem.setValue(
1694
+ colorDialog.getContentElement('picker', 'selectedColor').getValue()
1695
+ );
1696
+ preview(destElem);
1697
+ });
1698
+ }
1699
+ }
1700
+ ]
1701
+ }]
1702
+ }, {
1703
+ type: 'html',
1704
+ style: 'width:95%;',
1705
+ html: CKEDITOR.tools.htmlEncode(editor.lang.CKCss.preview) + '<br><div style="text-align:center;border:1px solid #c0c0c0;background-color:#ffffff;height:50px;overflow:auto"><div id="' + imagePreviewBoxId + '4">AaBbYyGgLlJj</div></div>'
1706
+ }, {
1707
+ id: 'stylePreview',
1708
+ type: 'textarea',
1709
+ style: 'width:100%;',
1710
+ rows: 3
1711
+
1712
+ }]
1713
+ }]
1714
+
1715
+ }, {
1716
+ id: 'page5',
1717
+ label: editor.lang.CKCss.tabPage5,
1718
+ accessKey: 'S',
1719
+ elements: [{
1720
+ type: 'vbox',
1721
+ padding: 3,
1722
+ children:
1723
+ [{
1724
+ type: 'hbox',
1725
+ padding: 0,
1726
+ widths: ['60px', '213px', '60px', '213px'],
1727
+ children:
1728
+ [{
1729
+ type: 'html',
1730
+ style: 'text-align:center',
1731
+ html: 'padding'
1732
+ }, {
1733
+ type: 'checkbox',
1734
+ id: 'paddingAll',
1735
+ label: editor.lang.CKCss.sameForAll,
1736
+ style: 'text-align:center',
1737
+ labelLayout: 'Right:',
1738
+ setup: function () {
1739
+ this.setValue(true);
1740
+ },
1741
+ onChange: function () {
1742
+ setAll(this, 'padding', '', 'page5')
1743
+ setAll(this, 'padding', 'Um', 'page5');
1744
+ }
1745
+ }, {
1746
+ type: 'html',
1747
+ style: 'text-align:center',
1748
+ html: 'margin'
1749
+ }, {
1750
+ type: 'checkbox',
1751
+ id: 'marginAll',
1752
+ label: editor.lang.CKCss.sameForAll,
1753
+ style: 'text-align:center',
1754
+ labelLayout: 'right',
1755
+ checked: true,
1756
+ setup: function () {
1757
+ this.setValue(true);
1758
+ },
1759
+ onChange: function () {
1760
+ setAll(this, 'margin', '', 'page5')
1761
+ setAll(this, 'margin', 'Um', 'page5');
1762
+ }
1763
+ }]
1764
+ }, {
1765
+ type: 'hbox',
1766
+ padding: 0,
1767
+ widths: ['60px', '213px', '60px', '213px'],
1768
+ children:
1769
+ [{
1770
+ type: 'html',
1771
+ style: 'text-align:center',
1772
+ html: 'Top:'
1773
+ },
1774
+
1775
+ {
1776
+ type: 'hbox',
1777
+ style: 'width:150px;float:left',
1778
+ widths: ['80px', '45px'],
1779
+ children: [{
1780
+ id: 'paddingTop',
1781
+ type: 'select',
1782
+ labelLayout: 'horizontal',
1783
+ widths: ['0px'],
1784
+ label: '',
1785
+ 'default': '',
1786
+ items: _common2,
1787
+ onKeyDown: function (event) {
1788
+ selectOnKeyDown(this, event);
1789
+ selectOnKeyDownAll(this, 'padding', '', 'page5', event);
1790
+ },
1791
+ onKeyUp: function (event) {
1792
+ selectOnKeyUp(this, event);
1793
+ selectOnKeyUpAll(this, 'padding', '', 'page5', event);
1794
+ },
1795
+ onKeyPress: function (event) {
1796
+ var rtn = selectOnKeyPress(this, event);
1797
+ selectOnKeyPressAll(this, 'padding', '', 'page5', event);
1798
+ return rtn;
1799
+ },
1800
+ onChange: function (event) {
1801
+ gestUm(this);
1802
+ selectOnChange(this, event);
1803
+ var dialog = this.getDialog();
1804
+ var elem = dialog.getContentElement('page5', 'paddingAll');
1805
+ if (elem.getValue()) elem.setValue(true);
1806
+ },
1807
+ setup: function (_style) {
1808
+ elemSetup(this, _style);
1809
+ }
1810
+ }, {
1811
+ id: 'paddingTopUm',
1812
+ type: 'select',
1813
+ labelLayout: 'horizontal',
1814
+ style: 'width:45px',
1815
+ label: '',
1816
+ 'default': 'px',
1817
+ items: _um,
1818
+ onChange: function () {
1819
+ var dialog = this.getDialog();
1820
+ var elem = dialog.getContentElement('page5', 'paddingAll');
1821
+ if (elem.getValue()) elem.setValue(true);
1822
+ var relElement = dialog.getContentElement('page5', this.id.substring(0, this.id.length - 2));
1823
+ preview(relElement);
1824
+ }
1825
+ }]
1826
+ },
1827
+ {
1828
+ type: 'html',
1829
+ style: 'text-align:center',
1830
+ html: 'Top:'
1831
+ }, {
1832
+ type: 'hbox',
1833
+ style: 'width:150px;float:left',
1834
+ widths: ['80px', '45px'],
1835
+ children: [{
1836
+ id: 'marginTop',
1837
+ type: 'select',
1838
+ labelLayout: 'horizontal',
1839
+ widths: ['0px'],
1840
+ label: '',
1841
+ 'default': '',
1842
+ items: _common2,
1843
+ onKeyDown: function (event) {
1844
+ selectOnKeyDown(this, event);
1845
+ selectOnKeyDownAll(this, 'margin', '', 'page5', event);
1846
+ },
1847
+ onKeyUp: function (event) {
1848
+ selectOnKeyUp(this, event);
1849
+ selectOnKeyUpAll(this, 'margin', '', 'page5', event);
1850
+ },
1851
+ onKeyPress: function (event) {
1852
+ var rtn = selectOnKeyPress(this, event);
1853
+ selectOnKeyPressAll(this, 'margin', '', 'page5', event);
1854
+ return rtn;
1855
+ },
1856
+ onChange: function (event) {
1857
+ gestUm(this);
1858
+ selectOnChange(this, event);
1859
+ var dialog = this.getDialog();
1860
+ var elem = dialog.getContentElement('page5', 'marginAll');
1861
+ if (elem.getValue()) elem.setValue(true);
1862
+ },
1863
+ setup: function (_style) {
1864
+ elemSetup(this, _style);
1865
+ }
1866
+ }, {
1867
+ id: 'marginTopUm',
1868
+ type: 'select',
1869
+ labelLayout: 'horizontal',
1870
+ style: 'width:45px',
1871
+ label: '',
1872
+ 'default': 'px',
1873
+ items: _um,
1874
+ onChange: function () {
1875
+ var dialog = this.getDialog();
1876
+ var elem = dialog.getContentElement('page5', 'marginAll');
1877
+ if (elem.getValue()) elem.setValue(true);
1878
+ var relElement = dialog.getContentElement('page5', this.id.substring(0, this.id.length - 2));
1879
+ preview(relElement);
1880
+ }
1881
+ }]
1882
+ }]
1883
+ }, {
1884
+ type: 'hbox',
1885
+ padding: 0,
1886
+ widths: ['60px', '213px', '60px', '213px'],
1887
+ children:
1888
+ [{
1889
+ type: 'html',
1890
+ style: 'text-align:center',
1891
+ html: 'right'
1892
+ },
1893
+
1894
+ {
1895
+ type: 'hbox',
1896
+ style: 'width:150px;float:left',
1897
+ widths: ['80px', '45px'],
1898
+ children: [{
1899
+ id: 'paddingRight',
1900
+ type: 'select',
1901
+ labelLayout: 'horizontal',
1902
+ widths: ['0px'],
1903
+ label: '',
1904
+ 'default': '',
1905
+ items: _common2,
1906
+ onKeyDown: function (event) {
1907
+ selectOnKeyDown(this, event);
1908
+ },
1909
+ onKeyUp: function (event) {
1910
+ selectOnKeyUp(this, event);
1911
+ },
1912
+ onKeyPress: function (event) {
1913
+ return selectOnKeyPress(this, event);
1914
+ },
1915
+ onChange: function (event) {
1916
+ gestUm(this);
1917
+ selectOnChange(this, event);
1918
+ },
1919
+ setup: function (_style) {
1920
+ elemSetup(this, _style);
1921
+ }
1922
+ }, {
1923
+ id: 'paddingRightUm',
1924
+ type: 'select',
1925
+ labelLayout: 'horizontal',
1926
+ style: 'width:45px',
1927
+ label: '',
1928
+ 'default': 'px',
1929
+ items: _um,
1930
+ onChange: function () {
1931
+ var dialog = this.getDialog();
1932
+ var relElement = dialog.getContentElement('page5', this.id.substring(0, this.id.length - 2));
1933
+ preview(relElement);
1934
+ }
1935
+ }]
1936
+ },
1937
+ {
1938
+ type: 'html',
1939
+ style: 'text-align:center',
1940
+ html: 'right'
1941
+ }, {
1942
+ type: 'hbox',
1943
+ style: 'width:150px;float:left',
1944
+ widths: ['80px', '45px'],
1945
+ children: [{
1946
+ id: 'marginRight',
1947
+ type: 'select',
1948
+ labelLayout: 'horizontal',
1949
+ widths: ['0px'],
1950
+ label: '',
1951
+ 'default': '',
1952
+ items: _common2,
1953
+ onKeyDown: function (event) {
1954
+ selectOnKeyDown(this, event);
1955
+ },
1956
+ onKeyUp: function (event) {
1957
+ selectOnKeyUp(this, event);
1958
+ },
1959
+ onKeyPress: function (event) {
1960
+ return selectOnKeyPress(this, event);
1961
+ },
1962
+ onChange: function (event) {
1963
+ gestUm(this);
1964
+ selectOnChange(this, event);
1965
+ },
1966
+ setup: function (_style) {
1967
+ elemSetup(this, _style);
1968
+ }
1969
+ }, {
1970
+ id: 'marginRightUm',
1971
+ type: 'select',
1972
+ labelLayout: 'horizontal',
1973
+ style: 'width:45px',
1974
+ label: '',
1975
+ 'default': 'px',
1976
+ items: _um,
1977
+ onChange: function () {
1978
+ var dialog = this.getDialog();
1979
+ var relElement = dialog.getContentElement('page5', this.id.substring(0, this.id.length - 2));
1980
+ preview(relElement);
1981
+ }
1982
+ }]
1983
+ }]
1984
+ }, {
1985
+ type: 'hbox',
1986
+ padding: 0,
1987
+ widths: ['60px', '213px', '60px', '213px'],
1988
+ children:
1989
+ [{
1990
+ type: 'html',
1991
+ style: 'text-align:center',
1992
+ html: 'Bottom:'
1993
+ },
1994
+
1995
+ {
1996
+ type: 'hbox',
1997
+ style: 'width:150px;float:left',
1998
+ widths: ['80px', '45px'],
1999
+ children: [{
2000
+ id: 'paddingBottom',
2001
+ type: 'select',
2002
+ labelLayout: 'horizontal',
2003
+ widths: ['0px'],
2004
+ label: '',
2005
+ 'default': '',
2006
+ items: _common2,
2007
+ onKeyDown: function (event) {
2008
+ selectOnKeyDown(this, event);
2009
+ },
2010
+ onKeyUp: function (event) {
2011
+ selectOnKeyUp(this, event);
2012
+ },
2013
+ onKeyPress: function (event) {
2014
+ return selectOnKeyPress(this, event);
2015
+ },
2016
+ onChange: function (event) {
2017
+ gestUm(this);
2018
+ selectOnChange(this, event);
2019
+ },
2020
+ setup: function (_style) {
2021
+ elemSetup(this, _style);
2022
+ }
2023
+ }, {
2024
+ id: 'paddingBottomUm',
2025
+ type: 'select',
2026
+ labelLayout: 'horizontal',
2027
+ style: 'width:45px',
2028
+ label: '',
2029
+ 'default': 'px',
2030
+ items: _um,
2031
+ onChange: function () {
2032
+ var dialog = this.getDialog();
2033
+ var relElement = dialog.getContentElement('page5', this.id.substring(0, this.id.length - 2));
2034
+ preview(relElement);
2035
+ }
2036
+ }]
2037
+ },
2038
+ {
2039
+ type: 'html',
2040
+ style: 'text-align:center',
2041
+ html: 'Bottom:'
2042
+ }, {
2043
+ type: 'hbox',
2044
+ style: 'width:150px;float:left',
2045
+ widths: ['80px', '45px'],
2046
+ children: [{
2047
+ id: 'marginBottom',
2048
+ type: 'select',
2049
+ labelLayout: 'horizontal',
2050
+ widths: ['0px'],
2051
+ label: '',
2052
+ 'default': '',
2053
+ items: _common2,
2054
+ onKeyDown: function (event) {
2055
+ selectOnKeyDown(this, event);
2056
+ },
2057
+ onKeyUp: function (event) {
2058
+ selectOnKeyUp(this, event);
2059
+ },
2060
+ onKeyPress: function (event) {
2061
+ return selectOnKeyPress(this, event);
2062
+ },
2063
+ onChange: function (event) {
2064
+ gestUm(this);
2065
+ selectOnChange(this, event);
2066
+ },
2067
+ setup: function (_style) {
2068
+ elemSetup(this, _style);
2069
+ }
2070
+ }, {
2071
+ id: 'marginBottomUm',
2072
+ type: 'select',
2073
+ labelLayout: 'horizontal',
2074
+ style: 'width:45px',
2075
+ label: '',
2076
+ 'default': 'px',
2077
+ items: _um,
2078
+ onChange: function () {
2079
+ var dialog = this.getDialog();
2080
+ var relElement = dialog.getContentElement('page5', this.id.substring(0, this.id.length - 2));
2081
+ preview(relElement);
2082
+ }
2083
+ }]
2084
+ }]
2085
+ }, {
2086
+ type: 'hbox',
2087
+ padding: 0,
2088
+ widths: ['60px', '213px', '60px', '213px'],
2089
+ children:
2090
+ [{
2091
+ type: 'html',
2092
+ style: 'text-align:center',
2093
+ html: 'Left:'
2094
+ },
2095
+
2096
+ {
2097
+ type: 'hbox',
2098
+ style: 'width:150px;float:left',
2099
+ widths: ['80px', '45px'],
2100
+ children: [{
2101
+ id: 'paddingLeft',
2102
+ type: 'select',
2103
+ labelLayout: 'horizontal',
2104
+ widths: ['0px'],
2105
+ label: '',
2106
+ 'default': '',
2107
+ items: _common2,
2108
+ onKeyDown: function (event) {
2109
+ selectOnKeyDown(this, event);
2110
+ },
2111
+ onKeyUp: function (event) {
2112
+ selectOnKeyUp(this, event);
2113
+ },
2114
+ onKeyPress: function (event) {
2115
+ return selectOnKeyPress(this, event);
2116
+ },
2117
+ onChange: function (event) {
2118
+ gestUm(this);
2119
+ selectOnChange(this, event);
2120
+ },
2121
+ setup: function (_style) {
2122
+ elemSetup(this, _style);
2123
+ }
2124
+ }, {
2125
+ id: 'paddingLeftUm',
2126
+ type: 'select',
2127
+ labelLayout: 'horizontal',
2128
+ style: 'width:45px',
2129
+ label: '',
2130
+ 'default': 'px',
2131
+ items: _um,
2132
+ onChange: function () {
2133
+ var dialog = this.getDialog();
2134
+ var relElement = dialog.getContentElement('page5', this.id.substring(0, this.id.length - 2));
2135
+ preview(relElement);
2136
+ }
2137
+ }]
2138
+ },
2139
+ {
2140
+ type: 'html',
2141
+ style: 'text-align:center',
2142
+ html: 'Left:'
2143
+ }, {
2144
+ type: 'hbox',
2145
+ style: 'width:150px;float:left',
2146
+ widths: ['80px', '45px'],
2147
+ children: [{
2148
+ id: 'marginLeft',
2149
+ type: 'select',
2150
+ labelLayout: 'horizontal',
2151
+ widths: ['0px'],
2152
+ label: '',
2153
+ 'default': '',
2154
+ items: _common2,
2155
+ onKeyDown: function (event) {
2156
+ selectOnKeyDown(this, event);
2157
+ },
2158
+ onKeyUp: function (event) {
2159
+ selectOnKeyUp(this, event);
2160
+ },
2161
+ onKeyPress: function (event) {
2162
+ return selectOnKeyPress(this, event);
2163
+ },
2164
+ onChange: function (event) {
2165
+ gestUm(this);
2166
+ selectOnChange(this, event);
2167
+ },
2168
+ setup: function (_style) {
2169
+ elemSetup(this, _style);
2170
+ }
2171
+ }, {
2172
+ id: 'marginLeftUm',
2173
+ type: 'select',
2174
+ labelLayout: 'horizontal',
2175
+ style: 'width:45px',
2176
+ label: '',
2177
+ 'default': 'px',
2178
+ items: _um,
2179
+ onChange: function () {
2180
+ var dialog = this.getDialog();
2181
+ var relElement = dialog.getContentElement('page5', this.id.substring(0, this.id.length - 2));
2182
+ preview(relElement);
2183
+ }
2184
+ }]
2185
+ }]
2186
+ }, {
2187
+ type: 'html',
2188
+ style: 'width:95%;',
2189
+ html: CKEDITOR.tools.htmlEncode(editor.lang.CKCss.preview) + '<br><div style="text-align:center;border:1px solid #c0c0c0;background-color:#ffffff;height:50px;overflow:auto"><div id="' + imagePreviewBoxId + '5">AaBbYyGgLlJj</div></div>'
2190
+ }, {
2191
+ id: 'stylePreview',
2192
+ type: 'textarea',
2193
+ style: 'width:100%;',
2194
+ rows: 3
2195
+
2196
+ }]
2197
+ }]
2198
+
2199
+ }, {
2200
+ id: 'page6',
2201
+ label: editor.lang.CKCss.tabPage6,
2202
+ accessKey: 'S',
2203
+ elements: [{
2204
+ type: 'vbox',
2205
+ padding: 3,
2206
+ children:
2207
+ [{
2208
+ type: 'hbox',
2209
+ padding: 0,
2210
+ widths: ['273px', '273px'],
2211
+ children:
2212
+ [{
2213
+ id: 'position',
2214
+ type: 'select',
2215
+ labelLayout: 'horizontal',
2216
+ widths: ['80px'],
2217
+ label: 'position',
2218
+ 'default': '',
2219
+ items: _position,
2220
+ onChange: function () {
2221
+ preview(this);
2222
+ },
2223
+ setup: function (_style) {
2224
+ elemSetup(this, _style);
2225
+ }
2226
+ }, {
2227
+ type: 'hbox',
2228
+ style: 'width:273px;float:left',
2229
+ widths: ['160px', '45px'],
2230
+ children: [{
2231
+ id: 'width',
2232
+ type: 'select',
2233
+ labelLayout: 'horizontal',
2234
+ widths: ['80px'],
2235
+ label: 'width',
2236
+ 'default': '',
2237
+ items: _common3,
2238
+ onKeyDown: function (event) {
2239
+ selectOnKeyDown(this, event);
2240
+ },
2241
+ onKeyUp: function (event) {
2242
+ selectOnKeyUp(this, event);
2243
+ },
2244
+ onKeyPress: function (event) {
2245
+ return selectOnKeyPress(this, event);
2246
+ },
2247
+ onChange: function (event) {
2248
+ gestUm(this);
2249
+ selectOnChange(this, event);
2250
+ },
2251
+ setup: function (_style) {
2252
+ elemSetup(this, _style);
2253
+ }
2254
+ }, {
2255
+ id: 'widthUm',
2256
+ type: 'select',
2257
+ labelLayout: 'horizontal',
2258
+ style: 'width:45px',
2259
+ label: '',
2260
+ 'default': 'px',
2261
+ items: _um,
2262
+ onChange: function () {
2263
+ var dialog = this.getDialog();
2264
+ var relElement = dialog.getContentElement('page6', this.id.substring(0, this.id.length - 2));
2265
+ preview(relElement);
2266
+ }
2267
+ }]
2268
+ }]
2269
+ }, {
2270
+ type: 'hbox',
2271
+ padding: 0,
2272
+ widths: ['273px', '273px'],
2273
+ children:
2274
+ [{
2275
+ id: 'zIndex',
2276
+ type: 'select',
2277
+ labelLayout: 'horizontal',
2278
+ widths: ['80px'],
2279
+ label: 'z-index',
2280
+ 'default': '',
2281
+ items: _common3,
2282
+ onChange: function () {
2283
+ preview(this);
2284
+ },
2285
+ setup: function (_style) {
2286
+ elemSetup(this, _style);
2287
+ }
2288
+ }, {
2289
+ type: 'hbox',
2290
+ style: 'width:273px;float:left',
2291
+ widths: ['160px', '45px'],
2292
+ children: [{
2293
+ id: 'height',
2294
+ type: 'select',
2295
+ labelLayout: 'horizontal',
2296
+ widths: ['80px'],
2297
+ label: 'height',
2298
+ 'default': '',
2299
+ items: _common3,
2300
+ onKeyDown: function (event) {
2301
+ selectOnKeyDown(this, event);
2302
+ },
2303
+ onKeyUp: function (event) {
2304
+ selectOnKeyUp(this, event);
2305
+ },
2306
+ onKeyPress: function (event) {
2307
+ return selectOnKeyPress(this, event);
2308
+ },
2309
+ onChange: function (event) {
2310
+ gestUm(this);
2311
+ selectOnChange(this, event);
2312
+ },
2313
+ setup: function (_style) {
2314
+ elemSetup(this, _style);
2315
+ }
2316
+ }, {
2317
+ id: 'heightUm',
2318
+ type: 'select',
2319
+ labelLayout: 'horizontal',
2320
+ style: 'width:45px',
2321
+ label: '',
2322
+ 'default': 'px',
2323
+ items: _um,
2324
+ onChange: function () {
2325
+ var dialog = this.getDialog();
2326
+ var relElement = dialog.getContentElement('page6', this.id.substring(0, this.id.length - 2));
2327
+ preview(relElement);
2328
+ }
2329
+ }]
2330
+ }]
2331
+ }, {
2332
+ type: 'hbox',
2333
+ padding: 0,
2334
+ widths: ['273px', '273px'],
2335
+ children:
2336
+ [{
2337
+ type: 'html',
2338
+ html: '&nbsp;'
2339
+ }, {
2340
+ type: 'hbox',
2341
+ style: 'width:273px;float:left',
2342
+ widths: ['160px', '45px'],
2343
+ children: [{
2344
+ id: 'top',
2345
+ type: 'select',
2346
+ labelLayout: 'horizontal',
2347
+ widths: ['80px'],
2348
+ label: 'top',
2349
+ 'default': '',
2350
+ items: _common3,
2351
+ onKeyDown: function (event) {
2352
+ selectOnKeyDown(this, event);
2353
+ },
2354
+ onKeyUp: function (event) {
2355
+ selectOnKeyUp(this, event);
2356
+ },
2357
+ onKeyPress: function (event) {
2358
+ return selectOnKeyPress(this, event);
2359
+ },
2360
+ onChange: function (event) {
2361
+ gestUm(this);
2362
+ selectOnChange(this, event);
2363
+ },
2364
+ setup: function (_style) {
2365
+ elemSetup(this, _style);
2366
+ }
2367
+ }, {
2368
+ id: 'topUm',
2369
+ type: 'select',
2370
+ labelLayout: 'horizontal',
2371
+ style: 'width:45px',
2372
+ label: '',
2373
+ 'default': 'px',
2374
+ items: _um,
2375
+ onChange: function () {
2376
+ var dialog = this.getDialog();
2377
+ var relElement = dialog.getContentElement('page6', this.id.substring(0, this.id.length - 2));
2378
+ preview(relElement);
2379
+ }
2380
+ }]
2381
+ }]
2382
+ }, {
2383
+ type: 'hbox',
2384
+ padding: 0,
2385
+ widths: ['273px', '273px'],
2386
+ children:
2387
+ [{
2388
+ type: 'html',
2389
+ html: '&nbsp;'
2390
+ }, {
2391
+ type: 'hbox',
2392
+ style: 'width:273px;float:left',
2393
+ widths: ['160px', '45px'],
2394
+ children: [{
2395
+ id: 'right',
2396
+ type: 'select',
2397
+ labelLayout: 'horizontal',
2398
+ widths: ['80px'],
2399
+ label: 'right',
2400
+ 'default': '',
2401
+ items: _common3,
2402
+ onKeyDown: function (event) {
2403
+ selectOnKeyDown(this, event);
2404
+ },
2405
+ onKeyUp: function (event) {
2406
+ selectOnKeyUp(this, event);
2407
+ },
2408
+ onKeyPress: function (event) {
2409
+ return selectOnKeyPress(this, event);
2410
+ },
2411
+ onChange: function (event) {
2412
+ gestUm(this);
2413
+ selectOnChange(this, event);
2414
+ },
2415
+ setup: function (_style) {
2416
+ elemSetup(this, _style);
2417
+ }
2418
+ }, {
2419
+ id: 'rightUm',
2420
+ type: 'select',
2421
+ labelLayout: 'horizontal',
2422
+ style: 'width:45px',
2423
+ label: '',
2424
+ 'default': 'px',
2425
+ items: _um,
2426
+ onChange: function () {
2427
+ var dialog = this.getDialog();
2428
+ var relElement = dialog.getContentElement('page6', this.id.substring(0, this.id.length - 2));
2429
+ preview(relElement);
2430
+ }
2431
+ }]
2432
+ }]
2433
+ }, {
2434
+ type: 'hbox',
2435
+ padding: 0,
2436
+ widths: ['273px', '273px'],
2437
+ children:
2438
+ [{
2439
+ type: 'html',
2440
+ html: '&nbsp;'
2441
+ }, {
2442
+ type: 'hbox',
2443
+ style: 'width:273px;float:left',
2444
+ widths: ['160px', '45px'],
2445
+ children: [{
2446
+ id: 'bottom',
2447
+ type: 'select',
2448
+ labelLayout: 'horizontal',
2449
+ widths: ['80px'],
2450
+ label: 'bottom',
2451
+ 'default': '',
2452
+ items: _common3,
2453
+ onKeyDown: function (event) {
2454
+ selectOnKeyDown(this, event);
2455
+ },
2456
+ onKeyUp: function (event) {
2457
+ selectOnKeyUp(this, event);
2458
+ },
2459
+ onKeyPress: function (event) {
2460
+ return selectOnKeyPress(this, event);
2461
+ },
2462
+ onChange: function (event) {
2463
+ gestUm(this);
2464
+ selectOnChange(this, event);
2465
+ },
2466
+ setup: function (_style) {
2467
+ elemSetup(this, _style);
2468
+ }
2469
+ }, {
2470
+ id: 'bottomUm',
2471
+ type: 'select',
2472
+ labelLayout: 'horizontal',
2473
+ style: 'width:45px',
2474
+ label: '',
2475
+ 'default': 'px',
2476
+ items: _um,
2477
+ onChange: function () {
2478
+ var dialog = this.getDialog();
2479
+ var relElement = dialog.getContentElement('page6', this.id.substring(0, this.id.length - 2));
2480
+ preview(relElement);
2481
+ }
2482
+ }]
2483
+ }]
2484
+ }, {
2485
+ type: 'hbox',
2486
+ padding: 0,
2487
+ widths: ['273px', '273px'],
2488
+ children:
2489
+ [{
2490
+ type: 'html',
2491
+ html: '&nbsp;'
2492
+ }, {
2493
+ type: 'hbox',
2494
+ style: 'width:273px;float:left',
2495
+ widths: ['160px', '45px'],
2496
+ children: [{
2497
+ id: 'left',
2498
+ type: 'select',
2499
+ labelLayout: 'horizontal',
2500
+ widths: ['80px'],
2501
+ label: 'left',
2502
+ 'default': '',
2503
+ items: _common3,
2504
+ onKeyDown: function (event) {
2505
+ selectOnKeyDown(this, event);
2506
+ },
2507
+ onKeyUp: function (event) {
2508
+ selectOnKeyUp(this, event);
2509
+ },
2510
+ onKeyPress: function (event) {
2511
+ return selectOnKeyPress(this, event);
2512
+ },
2513
+ onChange: function (event) {
2514
+ gestUm(this);
2515
+ selectOnChange(this, event);
2516
+ },
2517
+ setup: function (_style) {
2518
+ elemSetup(this, _style);
2519
+ }
2520
+ }, {
2521
+ id: 'leftUm',
2522
+ type: 'select',
2523
+ labelLayout: 'horizontal',
2524
+ style: 'width:45px',
2525
+ label: '',
2526
+ 'default': 'px',
2527
+ items: _um,
2528
+ onChange: function () {
2529
+ var dialog = this.getDialog();
2530
+ var relElement = dialog.getContentElement('page6', this.id.substring(0, this.id.length - 2));
2531
+ preview(relElement);
2532
+ }
2533
+ }]
2534
+ }]
2535
+ }, {
2536
+ type: 'html',
2537
+ style: 'width:95%;',
2538
+ html: CKEDITOR.tools.htmlEncode(editor.lang.common.preview) + '<br><div style="text-align:center;border:1px solid #c0c0c0;background-color:#ffffff;height:50px;overflow:auto"><div id="' + imagePreviewBoxId + '6">AaBbYyGgLlJj</div></div>'
2539
+ }, {
2540
+ id: 'stylePreview',
2541
+ type: 'textarea',
2542
+ style: 'width:100%;',
2543
+ rows: 3
2544
+
2545
+ }]
2546
+ }]
2547
+
2548
+ }, {
2549
+ id: 'page7',
2550
+ label: editor.lang.CKCss.tabPage7,
2551
+ accessKey: 'S',
2552
+ elements: [{
2553
+ type: 'vbox',
2554
+ padding: 3,
2555
+ children:
2556
+ [{
2557
+ type: 'hbox',
2558
+ padding: 0,
2559
+ widths: ['273px', '273px'],
2560
+ children:
2561
+ [{
2562
+ id: 'visibility',
2563
+ type: 'select',
2564
+ labelLayout: 'horizontal',
2565
+ widths: ['80px'],
2566
+ label: 'visibility',
2567
+ 'default': '',
2568
+ items: _visibility,
2569
+ onChange: function () {
2570
+ preview(this);
2571
+ },
2572
+ setup: function (_style) {
2573
+ elemSetup(this, _style);
2574
+ }
2575
+ }, {
2576
+
2577
+ id: 'overflow',
2578
+ type: 'select',
2579
+ labelLayout: 'horizontal',
2580
+ widths: ['80px'],
2581
+ label: 'overflow',
2582
+ 'default': '',
2583
+ items: _overflow,
2584
+ onChange: function () {
2585
+ preview(this);
2586
+ },
2587
+ setup: function (_style) {
2588
+ elemSetup(this, _style);
2589
+ }
2590
+ }]
2591
+
2592
+ }, {
2593
+ type: 'hbox',
2594
+ padding: 0,
2595
+ widths: ['273px', '273px'],
2596
+ children:
2597
+ [{
2598
+ id: 'display',
2599
+ type: 'select',
2600
+ labelLayout: 'horizontal',
2601
+ widths: ['80px'],
2602
+ label: 'display',
2603
+ 'default': '',
2604
+ items: _display,
2605
+ onChange: function () {
2606
+ preview(this);
2607
+ },
2608
+ setup: function (_style) {
2609
+ elemSetup(this, _style);
2610
+ }
2611
+ }, {
2612
+ type: 'html',
2613
+ html: 'clip:rect(...)'
2614
+ }]
2615
+ }, {
2616
+ type: 'hbox',
2617
+ padding: 0,
2618
+ widths: ['273px', '273px'],
2619
+ children:
2620
+ [{
2621
+ id: 'styleFloat',
2622
+ type: 'select',
2623
+ labelLayout: 'horizontal',
2624
+ widths: ['80px'],
2625
+ label: 'float',
2626
+ 'default': '',
2627
+ items: _float,
2628
+ onChange: function () {
2629
+ preview(this);
2630
+ },
2631
+ setup: function (_style) {
2632
+ elemSetup(this, _style);
2633
+ }
2634
+ }, {
2635
+ type: 'hbox',
2636
+ style: 'width:273px;float:left',
2637
+ widths: ['160px', '45px'],
2638
+ children: [{
2639
+ id: 'clipTop',
2640
+ type: 'select',
2641
+ labelLayout: 'horizontal',
2642
+ widths: ['80px'],
2643
+ label: 'top',
2644
+ 'default': '',
2645
+ items: _common3,
2646
+ onKeyDown: function (event) {
2647
+ selectOnKeyDown(this, event);
2648
+ },
2649
+ onKeyUp: function (event) {
2650
+ selectOnKeyUp(this, event);
2651
+ },
2652
+ onKeyPress: function (event) {
2653
+ return selectOnKeyPress(this, event);
2654
+ },
2655
+ onChange: function (event) {
2656
+ gestUm(this);
2657
+ selectOnChange(this, event);
2658
+ },
2659
+ setup: function (_style) {
2660
+ elemSetup(this, _style);
2661
+ }
2662
+ }, {
2663
+ id: 'clipTopUm',
2664
+ type: 'select',
2665
+ labelLayout: 'horizontal',
2666
+ style: 'width:45px',
2667
+ label: '',
2668
+ 'default': 'px',
2669
+ items: _um,
2670
+ onChange: function () {
2671
+ var dialog = this.getDialog();
2672
+ var relElement = dialog.getContentElement('page7', this.id.substring(0, this.id.length - 2));
2673
+ preview(relElement);
2674
+ }
2675
+ }]
2676
+ }]
2677
+ }, {
2678
+ type: 'hbox',
2679
+ padding: 0,
2680
+ widths: ['273px', '273px'],
2681
+ children:
2682
+ [{
2683
+ id: 'clear',
2684
+ type: 'select',
2685
+ labelLayout: 'horizontal',
2686
+ widths: ['80px'],
2687
+ label: 'clear',
2688
+ 'default': '',
2689
+ items: _clear,
2690
+ onChange: function () {
2691
+ preview(this);
2692
+ },
2693
+ setup: function (_style) {
2694
+ elemSetup(this, _style);
2695
+ }
2696
+ }, {
2697
+ type: 'hbox',
2698
+ style: 'width:273px;float:left',
2699
+ widths: ['160px', '45px'],
2700
+ children: [{
2701
+ id: 'clipRight',
2702
+ type: 'select',
2703
+ labelLayout: 'horizontal',
2704
+ widths: ['80px'],
2705
+ label: 'right',
2706
+ 'default': '',
2707
+ items: _common3,
2708
+ onKeyDown: function (event) {
2709
+ selectOnKeyDown(this, event);
2710
+ },
2711
+ onKeyUp: function (event) {
2712
+ selectOnKeyUp(this, event);
2713
+ },
2714
+ onKeyPress: function (event) {
2715
+ return selectOnKeyPress(this, event);
2716
+ },
2717
+ onChange: function (event) {
2718
+ gestUm(this);
2719
+ selectOnChange(this, event);
2720
+ }
2721
+ }, {
2722
+ id: 'clipRightUm',
2723
+ type: 'select',
2724
+ labelLayout: 'horizontal',
2725
+ style: 'width:45px',
2726
+ label: '',
2727
+ 'default': 'px',
2728
+ items: _um,
2729
+ onChange: function () {
2730
+ var dialog = this.getDialog();
2731
+ var relElement = dialog.getContentElement('page7', this.id.substring(0, this.id.length - 2));
2732
+ preview(relElement);
2733
+ }
2734
+ }]
2735
+ }]
2736
+ }, {
2737
+ type: 'hbox',
2738
+ padding: 0,
2739
+ widths: ['273px', '273px'],
2740
+ children:
2741
+ [{
2742
+ id: 'cursor',
2743
+ type: 'select',
2744
+ labelLayout: 'horizontal',
2745
+ widths: ['80px'],
2746
+ label: 'cursor',
2747
+ 'default': '',
2748
+ items: _cursor,
2749
+ onChange: function () {
2750
+ preview(this);
2751
+ },
2752
+ setup: function (_style) {
2753
+ elemSetup(this, _style);
2754
+ }
2755
+ }, {
2756
+ type: 'hbox',
2757
+ style: 'width:273px;float:left',
2758
+ widths: ['160px', '45px'],
2759
+ children: [{
2760
+ id: 'clipBottom',
2761
+ type: 'select',
2762
+ labelLayout: 'horizontal',
2763
+ widths: ['80px'],
2764
+ label: 'bottom',
2765
+ 'default': '',
2766
+ items: _common3,
2767
+ onKeyDown: function (event) {
2768
+ selectOnKeyDown(this, event);
2769
+ },
2770
+ onKeyUp: function (event) {
2771
+ selectOnKeyUp(this, event);
2772
+ },
2773
+ onKeyPress: function (event) {
2774
+ return selectOnKeyPress(this, event);
2775
+ },
2776
+ onChange: function (event) {
2777
+ gestUm(this);
2778
+ selectOnChange(this, event);
2779
+ }
2780
+ }, {
2781
+ id: 'clipBottomUm',
2782
+ type: 'select',
2783
+ labelLayout: 'horizontal',
2784
+ style: 'width:45px',
2785
+ label: '',
2786
+ 'default': 'px',
2787
+ items: _um,
2788
+ onChange: function () {
2789
+ var dialog = this.getDialog();
2790
+ var relElement = dialog.getContentElement('page7', this.id.substring(0, this.id.length - 2));
2791
+ preview(relElement);
2792
+ }
2793
+ }]
2794
+ }]
2795
+ }, {
2796
+ type: 'hbox',
2797
+ padding: 0,
2798
+ widths: ['273px', '273px'],
2799
+ children:
2800
+ [{
2801
+ type: 'html',
2802
+ html: '&nbsp;'
2803
+ }, {
2804
+ type: 'hbox',
2805
+ style: 'width:273px;float:left',
2806
+ widths: ['160px', '45px'],
2807
+ children: [{
2808
+ id: 'clipLeft',
2809
+ type: 'select',
2810
+ labelLayout: 'horizontal',
2811
+ widths: ['80px'],
2812
+ label: 'left',
2813
+ 'default': '',
2814
+ items: _common3,
2815
+ onKeyDown: function (event) {
2816
+ selectOnKeyDown(this, event);
2817
+ },
2818
+ onKeyUp: function (event) {
2819
+ selectOnKeyUp(this, event);
2820
+ },
2821
+ onKeyPress: function (event) {
2822
+ return selectOnKeyPress(this, event);
2823
+ },
2824
+ onChange: function (event) {
2825
+ gestUm(this);
2826
+ selectOnChange(this, event);
2827
+ }
2828
+ }, {
2829
+ id: 'clipLeftUm',
2830
+ type: 'select',
2831
+ labelLayout: 'horizontal',
2832
+ style: 'width:45px',
2833
+ label: '',
2834
+ 'default': 'px',
2835
+ items: _um,
2836
+ onChange: function () {
2837
+ var dialog = this.getDialog();
2838
+ var relElement = dialog.getContentElement('page7', this.id.substring(0, this.id.length - 2));
2839
+ preview(relElement);
2840
+ }
2841
+ }]
2842
+ }]
2843
+ }, {
2844
+ type: 'html',
2845
+ style: 'width:95%;',
2846
+ html: CKEDITOR.tools.htmlEncode(editor.lang.common.preview) + '<br><div style="text-align:center;border:1px solid #c0c0c0;background-color:#ffffff;height:50px;overflow:auto"><div id="' + imagePreviewBoxId + '7">AaBbYyGgLlJj</div></div>'
2847
+ }, {
2848
+ id: 'stylePreview',
2849
+ type: 'textarea',
2850
+ style: 'width:100%;',
2851
+ rows: 3
2852
+
2853
+ }]
2854
+ }]
2855
+
2856
+ }, {
2857
+ id: 'page8',
2858
+ label: editor.lang.CKCss.tabPage8,
2859
+ accessKey: 'S',
2860
+ elements: [{
2861
+ type: 'vbox',
2862
+ padding: 3,
2863
+ children:
2864
+ [{
2865
+ id: 'listStyleType',
2866
+ type: 'select',
2867
+ labelLayout: 'horizontal',
2868
+ widths: ['150px'],
2869
+ label: 'list-style-type',
2870
+ 'default': '',
2871
+ items: _listStyleType,
2872
+ onChange: function () {
2873
+ preview(this);
2874
+ },
2875
+ setup: function (_style) {
2876
+ elemSetup(this, _style);
2877
+ }
2878
+ }, {
2879
+ type: 'hbox',
2880
+ widths: ['250px', '110px'],
2881
+ align: 'right',
2882
+ children:
2883
+ [
2884
+ {
2885
+ id: 'listStyleImage',
2886
+ type: 'text',
2887
+ widths: ['150px'],
2888
+ labelLayout: 'horizontal',
2889
+ label: 'list-style-image',
2890
+ onChange: function () {
2891
+ //this.setValue('url(\'' + this.getValue() + '\')');
2892
+ preview(this);
2893
+ },
2894
+ setup: function (_style) {
2895
+ elemSetup(this, _style);
2896
+ }
2897
+ },
2898
+ {
2899
+ type: 'button',
2900
+ id: 'browse',
2901
+ // v-align with the 'txtUrl' field.
2902
+ // TODO: We need something better than a fixed size here.
2903
+ align: 'center',
2904
+ label: editor.lang.common.browseServer,
2905
+ hidden: true,
2906
+ filebrowser :
2907
+ {
2908
+ action : 'Browse',
2909
+ target: 'page8:listStyleImage',
2910
+ url: editor.config.filebrowserImageBrowseLinkUrl,
2911
+ params : //optional
2912
+ {
2913
+ type : 'Images',
2914
+ currentFolder : '/'
2915
+ }
2916
+ }
2917
+ }
2918
+ ]
2919
+ }, {
2920
+ id: 'listStylePosition',
2921
+ type: 'select',
2922
+ labelLayout: 'horizontal',
2923
+ widths: ['150px'],
2924
+ label: 'list-style-position',
2925
+ 'default': '',
2926
+ items: _listStylePosition,
2927
+ onChange: function () {
2928
+ preview(this);
2929
+ },
2930
+ setup: function (_style) {
2931
+ elemSetup(this, _style);
2932
+ }
2933
+ }, {
2934
+ type: 'html',
2935
+ style: 'width:95%;',
2936
+ html: CKEDITOR.tools.htmlEncode(editor.lang.common.preview) + '<br><div style="text-align:center;border:1px solid #c0c0c0;background-color:#ffffff;height:50px;overflow:auto"><div id="' + imagePreviewBoxId + '8">AaBbYyGgLlJj</div></div>'
2937
+ }, {
2938
+ id: 'stylePreview',
2939
+ type: 'textarea',
2940
+ style: 'width:100%;',
2941
+ rows: 3
2942
+
2943
+ }]
2944
+ }]
2945
+
2946
+ }, {
2947
+ id: 'page9',
2948
+ label: editor.lang.CKCss.tabPage9,
2949
+ accessKey: 'S',
2950
+ elements: [{
2951
+ type: 'vbox',
2952
+ padding: 3,
2953
+ children:
2954
+ [{
2955
+ id: 'tableLayout',
2956
+ type: 'select',
2957
+ labelLayout: 'horizontal',
2958
+ widths: ['150px'],
2959
+ label: 'table-layout',
2960
+ 'default': '',
2961
+ items: _tableLayout,
2962
+ onChange: function () {
2963
+ preview(this);
2964
+ },
2965
+ setup: function (_style) {
2966
+ elemSetup(this, _style);
2967
+ }
2968
+ }, {
2969
+ id: 'borderCollapse',
2970
+ type: 'select',
2971
+ labelLayout: 'horizontal',
2972
+ widths: ['150px'],
2973
+ label: 'borderCollapse',
2974
+ 'default': '',
2975
+ items: _borderCollapse,
2976
+ onChange: function () {
2977
+ preview(this);
2978
+ },
2979
+ setup: function (_style) {
2980
+ elemSetup(this, _style);
2981
+ }
2982
+ }, {
2983
+ type: 'hbox',
2984
+ style: 'width:273px;float:left',
2985
+ widths: ['160px', '45px'],
2986
+ children: [{
2987
+ id: 'borderSpacing',
2988
+ type: 'select',
2989
+ labelLayout: 'horizontal',
2990
+ widths: ['150px'],
2991
+ label: 'border-spacing',
2992
+ 'default': '',
2993
+ items: _common2,
2994
+ onKeyDown: function (event) {
2995
+ selectOnKeyDown(this, event);
2996
+ },
2997
+ onKeyUp: function (event) {
2998
+ selectOnKeyUp(this, event);
2999
+ },
3000
+ onKeyPress: function (event) {
3001
+ return selectOnKeyPress(this, event);
3002
+ },
3003
+ onChange: function (event) {
3004
+ gestUm(this);
3005
+ selectOnChange(this, event);
3006
+ },
3007
+ setup: function (_style) {
3008
+ elemSetup(this, _style);
3009
+ }
3010
+ }, {
3011
+ id: 'borderSpacingUm',
3012
+ type: 'select',
3013
+ labelLayout: 'horizontal',
3014
+ style: 'width:45px',
3015
+ label: '',
3016
+ 'default': 'px',
3017
+ items: _um,
3018
+ onChange: function () {
3019
+ var dialog = this.getDialog();
3020
+ var relElement = dialog.getContentElement('page9', this.id.substring(0, this.id.length - 2));
3021
+ preview(relElement);
3022
+ }
3023
+ }]
3024
+ }, {
3025
+ id: 'emptyCells',
3026
+ type: 'select',
3027
+ labelLayout: 'horizontal',
3028
+ widths: ['150px'],
3029
+ label: 'empty-cells',
3030
+ 'default': '',
3031
+ items: _emptyCells,
3032
+ onChange: function () {
3033
+ preview(this);
3034
+ },
3035
+ setup: function (_style) {
3036
+ elemSetup(this, _style);
3037
+ }
3038
+ }, {
3039
+ id: 'captionSide',
3040
+ type: 'select',
3041
+ labelLayout: 'horizontal',
3042
+ widths: ['150px'],
3043
+ label: 'captionSide',
3044
+ 'default': '',
3045
+ items: _captionSide,
3046
+ onChange: function () {
3047
+ preview(this);
3048
+ },
3049
+ setup: function (_style) {
3050
+ elemSetup(this, _style);
3051
+ }
3052
+ }, {
3053
+ type: 'html',
3054
+ style: 'width:95%;',
3055
+ html: CKEDITOR.tools.htmlEncode(editor.lang.common.preview) + '<br><div style="text-align:center;border:1px solid #c0c0c0;background-color:#ffffff;height:50px;overflow:auto"><div id="' + imagePreviewBoxId + '9">AaBbYyGgLlJj</div></div>'
3056
+ }, {
3057
+ id: 'stylePreview',
3058
+ type: 'textarea',
3059
+ style: 'width:100%;',
3060
+ rows: 3
3061
+
3062
+ }]
3063
+ }]
3064
+
3065
+ }]
3066
+ };
3067
+
3068
+ function onLoad() { }
3069
+ function onHide() { }
3070
+ function onCancel() { }
3071
+ };
3072
+ CKEDITOR.dialog.add('CKCss', function (editor) {
3073
+ return exampleDialog(editor);
3074
+ });
3075
+
3076
+
3077
+
3078
+ /*--------------------------------------------------------------
3079
+ http://chakrabarty.com/pp_editable_dropdown.html
3080
+ http://chakrabarty.com/combobox.html
3081
+ --------------------------------------------------------------*/
3082
+
3083
+ /*----------------------------------------------
3084
+ The Common functions used for all dropdowns are:
3085
+ -----------------------------------------------
3086
+
3087
+ -- function FindKeyCode(e)
3088
+ -- function FindKeyChar(e)
3089
+ -- function fnLeftToRight(getdropdown)
3090
+ -- function fnRightToLeft(getdropdown)
3091
+
3092
+ --------------------------- source: http://chakrabarty.com/pp_editable_dropdown.html */
3093
+
3094
+ function fnLeftToRight(getdropdown)
3095
+ {
3096
+ getdropdown.style.direction = "ltr";
3097
+ }
3098
+
3099
+ function fnRightToLeft(getdropdown)
3100
+ {
3101
+ getdropdown.style.direction = "rtl";
3102
+ }
3103
+
3104
+
3105
+ /*
3106
+ Since Internet Explorer and NetscapeFirefoxChrome have different
3107
+ ways of returning the key code, displaying keys
3108
+ browser-independently is a bit harder.
3109
+ However, you can create a script that displays keys
3110
+ for either browser.
3111
+ The following function will display each key
3112
+ in the status line:
3113
+
3114
+ The "FindKey.." function receives the "event" object
3115
+ from the event handler and stores it in the variable "e".
3116
+ It checks whether the "e.which" property exists (for NetscapeFirefoxChrome),
3117
+ and stores it in the "keycode" variable if present.
3118
+ Otherwise, it assumes the browser is Internet Explorer
3119
+ and assigns to keycode the "e.keyCode" property.
3120
+ */
3121
+
3122
+ function FindKeyCode(e)
3123
+ {
3124
+ if(e.which)
3125
+ {
3126
+ keycode=e.which; //NetscapeFirefoxChrome
3127
+ }
3128
+ else
3129
+ {
3130
+ keycode=e.keyCode; //Internet Explorer
3131
+ }
3132
+
3133
+ //alert("FindKeyCode"+ keycode);
3134
+ return keycode;
3135
+ }
3136
+
3137
+ function FindKeyChar(e)
3138
+ {
3139
+ keycode = FindKeyCode(e);
3140
+ if((keycode==8)||(keycode==127))
3141
+ {
3142
+ character="backspace"
3143
+ }
3144
+ else if((keycode==46))
3145
+ {
3146
+ character="delete"
3147
+ }
3148
+ else
3149
+ {
3150
+ character=String.fromCharCode(keycode);
3151
+ }
3152
+ //alert("FindKey"+ character);
3153
+ return character;
3154
+ }
3155
+
3156
+ /*----------------------------------------------
3157
+ Dropdown specific global variables are:
3158
+ -----------------------------------------------
3159
+ 1) vEditableOptionIndex_A --> this needs to be set by Programmer!! See explanation.
3160
+ 2) vEditableOptionText_A --> this needs to be set by Programmer!! See explanation.
3161
+ 3) vUseActualTexbox_A --> this needs to be set by Programmer!! See explanation.
3162
+ 4) vPreviousSelectIndex_A
3163
+ 5) vSelectIndex_A
3164
+ 6) vSelectChange_A
3165
+
3166
+ --------------------------- source: http://chakrabarty.com/pp_editable_dropdown.html */
3167
+
3168
+ /*----------------------------------------------
3169
+ Dropdown specific functions
3170
+ (which manipulate dropdown specific global variables)
3171
+ -----------------------------------------------
3172
+ 1) function fnChangeHandler_A(getdropdown)
3173
+ 2) function fnFocusHandler_A (getdropdown)
3174
+ 3) function fnKeyPressHandler_A(getdropdown, e)
3175
+ 4) function fnKeyUpHandler_A(getdropdown, e)
3176
+ 5) function fnKeyDownHandler_A(getdropdown, e)
3177
+
3178
+ --------------------------- source: http://chakrabarty.com/pp_editable_dropdown.html */
3179
+
3180
+ /*------------------------------------------------
3181
+ IMPORTANT: Global Variable required to be SET by programmer
3182
+ -------------------------- source: http://chakrabarty.com/pp_editable_dropdown.html */
3183
+
3184
+ var vEditableOptionIndex_A = 0;
3185
+
3186
+ // Give Index of Editable option in the dropdown.
3187
+ // For eg.
3188
+ // if first option is editable then vEditableOptionIndex_A = 0;
3189
+ // if second option is editable then vEditableOptionIndex_A = 1;
3190
+ // if third option is editable then vEditableOptionIndex_A = 2;
3191
+ // if last option is editable then vEditableOptionIndex_A = (length of dropdown - 1).
3192
+ // Note: the value of vEditableOptionIndex_A cannot be greater than (length of dropdown - 1)
3193
+
3194
+ var vEditableOptionText_A = "--?--";
3195
+
3196
+ // Give the default text of the Editable option in the dropdown.
3197
+ // For eg.
3198
+ // if the editable option is <option ...>--?--</option>,
3199
+ // then set vEditableOptionText_A = "--?--";
3200
+
3201
+ var vUseActualTexbox_A = "no";
3202
+ // = "no" ...
3203
+ // default is 'no' because there is no need to use an actual textbox if using a PC (with physical keyboard)
3204
+ // if using iPad/iPhone or Android device, which usually have a virtual soft keyboard, then textbox will automatically show up next to dropdown on those devices
3205
+ // = "yes" ...
3206
+ // set this to 'yes' if and only if you want an actual textbox to show up next to dropdown at all times (even on devices with physical keyboards)
3207
+
3208
+ /*------------------------------------------------
3209
+ Global Variables required for
3210
+ fnChangeHandler_A(), fnKeyPressHandler_A() and fnKeyUpHandler_A()
3211
+ for Editable Dropdowns
3212
+ -------------------------- source: http://chakrabarty.com/pp_editable_dropdown.html */
3213
+
3214
+ var vPreviousSelectIndex_A = 0;
3215
+ // Contains the Previously Selected Index, set to 0 by default
3216
+
3217
+ var vSelectIndex_A = 0;
3218
+ // Contains the Currently Selected Index, set to 0 by default
3219
+
3220
+ var vSelectChange_A = 'MANUAL_CLICK';
3221
+ // Indicates whether Change in dropdown selected option
3222
+ // was due to a Manual Click
3223
+ // or instead due to System properties of dropdown.
3224
+
3225
+ // vSelectChange_A = 'MANUAL_CLICK' indicates that
3226
+ // the jump to a non-editable option in the dropdown was due
3227
+ // to a Manual click (i.e.,changed on purpose by user).
3228
+
3229
+ // vSelectChange_A = 'AUTO_SYSTEM' indicates that
3230
+ // the jump to a non-editable option was due to System properties of dropdown
3231
+ // (i.e.,user did not change the option in the dropdown;
3232
+ // instead an automatic jump happened due to inbuilt
3233
+ // dropdown properties of browser on typing of a character )
3234
+
3235
+ /*------------------------------------------------
3236
+ Functions required for Editable Dropdowns
3237
+ -------------------------- source: http://chakrabarty.com/pp_editable_dropdown.html */
3238
+
3239
+ function fnSanityCheck_A(getdropdown)
3240
+ {
3241
+ if(vEditableOptionIndex_A>(getdropdown.options.length-1))
3242
+ {
3243
+ alert("PROGRAMMING ERROR: The value of variable vEditableOptionIndex_... cannot be greater than (length of dropdown - 1)");
3244
+ return false;
3245
+ }
3246
+ }
3247
+
3248
+ function fnKeyDownHandler_A(getdropdown, e)
3249
+ {
3250
+ fnSanityCheck_A(getdropdown);
3251
+
3252
+ // Press [ <- ] and [ -> ] arrow keys on the keyboard to change alignment/flow.
3253
+ // ...go to Start : Press [ <- ] Arrow Key
3254
+ // ...go to End : Press [ -> ] Arrow Key
3255
+ // (this is useful when the edited-text content exceeds the ListBox-fixed-width)
3256
+ // This works best on Internet Explorer, and not on NetscapeFirefoxChrome
3257
+
3258
+ var vEventKeyCode = FindKeyCode(e);
3259
+
3260
+ // Press left/right arrow keys
3261
+ if(vEventKeyCode == 37)
3262
+ {
3263
+ fnLeftToRight(getdropdown);
3264
+ }
3265
+ if(vEventKeyCode == 39)
3266
+ {
3267
+ fnRightToLeft(getdropdown);
3268
+ }
3269
+
3270
+ // Delete key pressed
3271
+ if(vEventKeyCode == 46)
3272
+ {
3273
+ if(getdropdown.options.length != 0)
3274
+ // if dropdown is not empty
3275
+ {
3276
+ if (getdropdown.options.selectedIndex == vEditableOptionIndex_A)
3277
+ // if option is the Editable field
3278
+ {
3279
+ getdropdown.options[getdropdown.options.selectedIndex].text = '';
3280
+ getdropdown.options[getdropdown.options.selectedIndex].value = '';
3281
+ }
3282
+ }
3283
+ }
3284
+
3285
+ // backspace key pressed
3286
+ if(vEventKeyCode == 8 || vEventKeyCode == 127)
3287
+ {
3288
+ if(getdropdown.options.length != 0)
3289
+ // if dropdown is not empty
3290
+ {
3291
+ if (getdropdown.options.selectedIndex == vEditableOptionIndex_A)
3292
+ // if option is the Editable field
3293
+ {
3294
+ // make Editable option Null if it is being edited for the first time
3295
+ if ((getdropdown[vEditableOptionIndex_A].text == vEditableOptionText_A)||(getdropdown[vEditableOptionIndex_A].value == vEditableOptionText_A))
3296
+ {
3297
+ getdropdown.options[getdropdown.options.selectedIndex].text = '';
3298
+ getdropdown.options[getdropdown.options.selectedIndex].value = '';
3299
+ }
3300
+ else
3301
+ {
3302
+ getdropdown.options[getdropdown.options.selectedIndex].text = getdropdown.options[getdropdown.options.selectedIndex].text.slice(0,-1);
3303
+ getdropdown.options[getdropdown.options.selectedIndex].value = getdropdown.options[getdropdown.options.selectedIndex].value.slice(0,-1);
3304
+ }
3305
+ }
3306
+ }
3307
+ if(e.which) //NetscapeFirefoxChrome
3308
+ {
3309
+ e.which = '';
3310
+ }
3311
+ else //Internet Explorer
3312
+ {
3313
+ e.keyCode = '';
3314
+ }
3315
+ if (e.cancelBubble) //Internet Explorer
3316
+ {
3317
+ e.cancelBubble = true;
3318
+ e.returnValue = false;
3319
+ }
3320
+ if (e.stopPropagation) //NetscapeFirefoxChrome
3321
+ {
3322
+ e.stopPropagation();
3323
+ }
3324
+ if (e.preventDefault) //NetscapeFirefoxChrome
3325
+ {
3326
+ e.preventDefault();
3327
+ }
3328
+ }
3329
+ }
3330
+
3331
+ function fnFocusHandler_A(getdropdown)
3332
+ {
3333
+ //use textbox for devices such as android and ipad that don't have a physical keyboard (textbox allows use of virtual soft keyboard)
3334
+ if ( (navigator.userAgent.toLowerCase().search(/android|ipad|iphone|ipod/) > -1) || (vUseActualTexbox_A == 'yes') )
3335
+ {
3336
+ if (getdropdown[(vEditableOptionIndex_A)].selected == true)
3337
+ {
3338
+ document.getElementById('textboxoption_A').style.visibility='';
3339
+ document.getElementById('textboxoption_A').style.display='';
3340
+ }
3341
+ else
3342
+ {
3343
+ document.getElementById('textboxoption_A').style.visibility='hidden';
3344
+ document.getElementById('textboxoption_A').style.display='none';
3345
+ }
3346
+ }
3347
+ }
3348
+
3349
+ function fnChangeHandler_A(getdropdown)
3350
+ {
3351
+ fnSanityCheck_A(getdropdown);
3352
+
3353
+ vPreviousSelectIndex_A = vSelectIndex_A;
3354
+ // Contains the Previously Selected Index
3355
+
3356
+ vSelectIndex_A = getdropdown.options.selectedIndex;
3357
+ // Contains the Currently Selected Index
3358
+
3359
+ if ((vPreviousSelectIndex_A == (vEditableOptionIndex_A)) && (vSelectIndex_A != (vEditableOptionIndex_A))&&(vSelectChange_A != 'MANUAL_CLICK'))
3360
+ // To Set value of Index variables - source: http://chakrabarty.com/pp_editable_dropdown.html
3361
+ {
3362
+ getdropdown[(vEditableOptionIndex_A)].selected=true;
3363
+ vPreviousSelectIndex_A = vSelectIndex_A;
3364
+ vSelectIndex_A = getdropdown.options.selectedIndex;
3365
+ vSelectChange_A = 'MANUAL_CLICK';
3366
+ // Indicates that the Change in dropdown selected
3367
+ // option was due to a Manual Click
3368
+ }
3369
+
3370
+ //use textbox for devices such as android and ipad that don't have a physical keyboard (textbox allows use of virtual soft keyboard)
3371
+ if ( (navigator.userAgent.toLowerCase().search(/android|ipad|iphone|ipod/) > -1) || (vUseActualTexbox_A == 'yes') )
3372
+ {
3373
+ fnFocusHandler_A(getdropdown);
3374
+ }
3375
+ }
3376
+
3377
+ function fnKeyPressHandler_A(getdropdown, e)
3378
+ {
3379
+ fnSanityCheck_A(getdropdown);
3380
+
3381
+ keycode = FindKeyCode(e);
3382
+ keychar = FindKeyChar(e);
3383
+
3384
+ // Check for allowable Characters
3385
+ // The various characters allowable for entry into Editable option..
3386
+ // may be customized by minor modifications in the code (if condition below)
3387
+ // (you need to know the keycode/ASCII value of the character to be allowed/disallowed.
3388
+ // - source: http://chakrabarty.com/pp_editable_dropdown.html
3389
+
3390
+ if ((keycode>47 && keycode<59)||(keycode>62 && keycode<127) ||(keycode==32))
3391
+ {
3392
+ var vAllowableCharacter = "yes";
3393
+ }
3394
+ else
3395
+ {
3396
+ var vAllowableCharacter = "no";
3397
+ }
3398
+
3399
+ //alert(window); alert(window.event);
3400
+
3401
+ if(getdropdown.options.length != 0)
3402
+ // if dropdown is not empty
3403
+ if (getdropdown.options.selectedIndex == (vEditableOptionIndex_A))
3404
+ // if selected option the Editable option of the dropdown
3405
+ {
3406
+
3407
+ // Empty space (ascii 32) is not captured by NetscapeFirefoxChrome when .text is used
3408
+ // NetscapeFirefoxChrome removes extra spaces at end of string when .text is used
3409
+ // NetscapeFirefoxChrome allows one empty space at end of string when .value is used
3410
+ // Hence, use .value insead of .text
3411
+ var vEditString = getdropdown[vEditableOptionIndex_A].value;
3412
+
3413
+ // make Editable option Null if it is being edited for the first time
3414
+ if(vAllowableCharacter == "yes")
3415
+ {
3416
+ if ((getdropdown[vEditableOptionIndex_A].text == vEditableOptionText_A)||(getdropdown[vEditableOptionIndex_A].value == vEditableOptionText_A))
3417
+ vEditString = "";
3418
+ }
3419
+
3420
+ if (vAllowableCharacter == "yes")
3421
+ // To handle addition of a character - source: http://chakrabarty.com/pp_editable_dropdown.html
3422
+ {
3423
+ vEditString+=String.fromCharCode(keycode);
3424
+ // Concatenate Enter character to Editable string
3425
+
3426
+ // The following portion handles the "automatic Jump" bug
3427
+ // The "automatic Jump" bug (Description):
3428
+ // If a alphabet is entered (while editing)
3429
+ // ...which is contained as a first character in one of the read-only options
3430
+ // ..the focus automatically "jumps" to the read-only option
3431
+ // (-- this is a common property of normal dropdowns
3432
+ // ..but..is undesirable while editing).
3433
+
3434
+ var i=0;
3435
+ var vEnteredChar = String.fromCharCode(keycode);
3436
+ var vUpperCaseEnteredChar = vEnteredChar;
3437
+ var vLowerCaseEnteredChar = vEnteredChar;
3438
+
3439
+
3440
+ if(((keycode)>=97)&&((keycode)<=122))
3441
+ // if vEnteredChar lowercase
3442
+ vUpperCaseEnteredChar = String.fromCharCode(keycode - 32);
3443
+ // This is UpperCase
3444
+
3445
+
3446
+ if(((keycode)>=65)&&((keycode)<=90))
3447
+ // if vEnteredChar is UpperCase
3448
+ vLowerCaseEnteredChar = String.fromCharCode(keycode + 32);
3449
+ // This is lowercase
3450
+
3451
+ if(e.which) //For NetscapeFirefoxChrome
3452
+ {
3453
+ // Compare the typed character (into the editable option)
3454
+ // with the first character of all the other
3455
+ // options (non-editable).
3456
+
3457
+ // To note if the jump to the non-editable option was due
3458
+ // to a Manual click (i.e.,changed on purpose by user)
3459
+ // or instead due to System properties of dropdown
3460
+ // (i.e.,user did not change the option in the dropdown;
3461
+ // instead an automatic jump happened due to inbuilt
3462
+ // dropdown properties of browser on typing of a character )
3463
+
3464
+ for (i=0;i<=(getdropdown.options.length-1);i++)
3465
+ {
3466
+ if(i!=vEditableOptionIndex_A)
3467
+ {
3468
+ var vEnteredDigitNumber = getdropdown[vEditableOptionIndex_A].text.length;
3469
+ var vFirstReadOnlyChar = getdropdown[i].text.substring(0,1);
3470
+ var vEquivalentReadOnlyChar = getdropdown[i].text.substring(vEnteredDigitNumber,vEnteredDigitNumber+1);
3471
+ if (vEnteredDigitNumber >= getdropdown[i].text.length)
3472
+ {
3473
+ vEquivalentReadOnlyChar = vFirstReadOnlyChar;
3474
+ }
3475
+ if( (vEquivalentReadOnlyChar == vUpperCaseEnteredChar)||(vEquivalentReadOnlyChar == vLowerCaseEnteredChar)
3476
+ ||(vFirstReadOnlyChar == vUpperCaseEnteredChar)||(vFirstReadOnlyChar == vLowerCaseEnteredChar) )
3477
+ {
3478
+ vSelectChange_A = 'AUTO_SYSTEM';
3479
+ // Indicates that the Change in dropdown selected
3480
+ // option was due to System properties of dropdown
3481
+ break;
3482
+ }
3483
+ else
3484
+ {
3485
+ vSelectChange_A = 'MANUAL_CLICK';
3486
+ // Indicates that the Change in dropdown selected
3487
+ // option was due to a Manual Click
3488
+ }
3489
+ }
3490
+ }
3491
+ }
3492
+ }
3493
+
3494
+ // Set the new edited string into the Editable option
3495
+ getdropdown.options[vEditableOptionIndex_A].text = vEditString;
3496
+ getdropdown.options[vEditableOptionIndex_A].value = vEditString;
3497
+
3498
+ return false;
3499
+ }
3500
+ return true;
3501
+ }
3502
+
3503
+ function fnKeyUpHandler_A(getdropdown, e)
3504
+ {
3505
+ fnSanityCheck_A(getdropdown);
3506
+
3507
+ if(e.which) // NetscapeFirefoxChrome
3508
+ {
3509
+ if(vSelectChange_A == 'AUTO_SYSTEM')
3510
+ {
3511
+ // if editable dropdown option jumped while editing
3512
+ // (due to typing of a character which is the first character of some other option)
3513
+ // then go back to the editable option.
3514
+ getdropdown[(vEditableOptionIndex_A)].selected=true;
3515
+ vSelectChange_A = 'MANUAL_CLICK';
3516
+ }
3517
+
3518
+ var vEventKeyCode = FindKeyCode(e);
3519
+ // if [ <- ] or [ -> ] arrow keys are pressed, select the editable option
3520
+ if((vEventKeyCode == 37)||(vEventKeyCode == 39))
3521
+ {
3522
+ getdropdown[vEditableOptionIndex_A].selected=true;
3523
+ }
3524
+ }
3525
+ }
3526
+
3527
+ /*-------------------------------------------------------------------------------------------- source: http://chakrabarty.com/pp_editable_dropdown.html */
3528
+
3529
+ /***************************************************************
3530
+
3531
+ http://chakrabarty.com/pp_editable_dropdown.html
3532
+ http://chakrabarty.com/combobox.html
3533
+
3534
+ ***************************************************************/
3535
+
3536
+ function Hash() {
3537
+ this.length = 0;
3538
+ this.items = new Array();
3539
+ for (var i = 0; i < arguments.length; i += 2) {
3540
+ if (typeof (arguments[i + 1]) != 'undefined') {
3541
+ this.items[arguments[i]] = arguments[i + 1];
3542
+ this.length++;
3543
+ }
3544
+ }
3545
+
3546
+ this.removeItem = function (in_key) {
3547
+ var tmp_previous;
3548
+ if (typeof (this.items[in_key]) != 'undefined') {
3549
+ this.length--;
3550
+ var tmp_previous = this.items[in_key];
3551
+ delete this.items[in_key];
3552
+ }
3553
+
3554
+ return tmp_previous;
3555
+ }
3556
+
3557
+ this.getItem = function (in_key) {
3558
+ return this.items[in_key];
3559
+ }
3560
+
3561
+ this.setItem = function (in_key, in_value) {
3562
+ var tmp_previous;
3563
+ if (typeof (in_value) != 'undefined') {
3564
+ if (typeof (this.items[in_key]) == 'undefined') {
3565
+ this.length++;
3566
+ }
3567
+ else {
3568
+ tmp_previous = this.items[in_key];
3569
+ }
3570
+
3571
+ this.items[in_key] = in_value;
3572
+ }
3573
+
3574
+ return tmp_previous;
3575
+ }
3576
+
3577
+ this.hasItem = function (in_key) {
3578
+ return typeof (this.items[in_key]) != 'undefined';
3579
+ }
3580
+
3581
+ this.clear = function () {
3582
+ for (var i in this.items) {
3583
+ delete this.items[i];
3584
+ }
3585
+
3586
+ this.length = 0;
3587
+ }
3588
+ }
3589
+ })();