constructor-cms 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (305) hide show
  1. data/.idea/.name +1 -0
  2. data/.idea/constructor.iml +62 -0
  3. data/.idea/encodings.xml +5 -0
  4. data/.idea/misc.xml +5 -0
  5. data/.idea/modules.xml +9 -0
  6. data/.idea/scopes/scope_settings.xml +5 -0
  7. data/.idea/vcs.xml +7 -0
  8. data/.idea/workspace.xml +873 -0
  9. data/.rspec +2 -0
  10. data/cap/app/assets/images/constructor_cap/cross.png +0 -0
  11. data/cap/app/assets/images/constructor_cap/page_white_edit.png +0 -0
  12. data/cap/app/controllers/constructor_cap/emails_controller.rb +71 -0
  13. data/cap/app/models/constructor_cap/email.rb +15 -0
  14. data/cap/app/views/constructor_cap/emails/_form.haml +17 -0
  15. data/cap/app/views/constructor_cap/emails/edit.haml +5 -0
  16. data/cap/app/views/constructor_cap/emails/index.haml +27 -0
  17. data/cap/app/views/constructor_cap/emails/new.haml +5 -0
  18. data/cap/app/views/constructor_cap/emails/show.haml +54 -0
  19. data/cap/config/initializers/admin_menu.rb +4 -0
  20. data/cap/config/locales/ru.yml +23 -0
  21. data/cap/config/routes.rb +9 -0
  22. data/cap/constructor-cap.gemspec +19 -0
  23. data/cap/db/migrate/20110510182404_create_emails.rb +12 -0
  24. data/cap/lib/constructor-cap.rb +2 -0
  25. data/cap/lib/constructor_cap/engine.rb +6 -0
  26. data/config/routes.rb +4 -0
  27. data/constructor-cms.gemspec +21 -0
  28. data/core/app/assets/images/constructor_core/glyphicons-halflings-white.png +0 -0
  29. data/core/app/assets/images/constructor_core/glyphicons-halflings.png +0 -0
  30. data/core/app/assets/images/constructor_core/minus.gif +0 -0
  31. data/core/app/assets/images/constructor_core/plus.gif +0 -0
  32. data/core/app/assets/images/constructor_core/rss.png +0 -0
  33. data/core/app/assets/images/constructor_core/treeview-black-line.gif +0 -0
  34. data/core/app/assets/images/constructor_core/treeview-black.gif +0 -0
  35. data/core/app/assets/images/constructor_core/treeview-default-line.gif +0 -0
  36. data/core/app/assets/images/constructor_core/treeview-default.gif +0 -0
  37. data/core/app/assets/images/constructor_core/treeview-famfamfam-line.gif +0 -0
  38. data/core/app/assets/images/constructor_core/treeview-famfamfam.gif +0 -0
  39. data/core/app/assets/images/constructor_core/treeview-gray-line.gif +0 -0
  40. data/core/app/assets/images/constructor_core/treeview-gray.gif +0 -0
  41. data/core/app/assets/images/constructor_core/treeview-red-line.gif +0 -0
  42. data/core/app/assets/images/constructor_core/treeview-red.gif +0 -0
  43. data/core/app/assets/images/constructor_core/twitter.png +0 -0
  44. data/core/app/assets/images/constructor_core/widgets.png +0 -0
  45. data/core/app/assets/javascripts/constructor_core/application.js.coffee +57 -0
  46. data/core/app/assets/javascripts/constructor_core/bootstrap.js +2276 -0
  47. data/core/app/assets/javascripts/constructor_core/jquery.cookie.js +92 -0
  48. data/core/app/assets/javascripts/constructor_core/jquery.treeview.js +256 -0
  49. data/core/app/assets/javascripts/constructor_core/jquery_bundle.js.coffee +4 -0
  50. data/core/app/assets/javascripts/constructor_core/urlify.js +82 -0
  51. data/core/app/assets/stylesheets/constructor_core/application.css.scss +57 -0
  52. data/core/app/assets/stylesheets/constructor_core/bootstrap-responsive.css +1109 -0
  53. data/core/app/assets/stylesheets/constructor_core/bootstrap.css +6158 -0
  54. data/core/app/assets/stylesheets/constructor_core/jquery.treeview.css +73 -0
  55. data/core/app/controllers/constructor_core/admin_controller.rb +6 -0
  56. data/core/app/controllers/constructor_core/sessions_controller.rb +15 -0
  57. data/core/app/helpers/constructor_core/devise_helper.rb +24 -0
  58. data/core/app/models/constructor_core/user.rb +10 -0
  59. data/core/app/views/constructor_core/devise/confirmations/new.html.haml +10 -0
  60. data/core/app/views/constructor_core/devise/mailer/confirmation_instructions.html.haml +5 -0
  61. data/core/app/views/constructor_core/devise/mailer/reset_password_instructions.html.haml +7 -0
  62. data/core/app/views/constructor_core/devise/mailer/unlock_instructions.html.haml +5 -0
  63. data/core/app/views/constructor_core/devise/passwords/edit.html.haml +21 -0
  64. data/core/app/views/constructor_core/devise/passwords/new.html.haml +13 -0
  65. data/core/app/views/constructor_core/devise/registrations/edit.html.haml +28 -0
  66. data/core/app/views/constructor_core/devise/registrations/new.html.haml +20 -0
  67. data/core/app/views/constructor_core/devise/shared/_links.html.haml +19 -0
  68. data/core/app/views/constructor_core/devise/unlocks/new.html.haml +9 -0
  69. data/core/app/views/constructor_core/sessions/new.html.haml +24 -0
  70. data/core/app/views/layouts/constructor_core/application_admin.haml +65 -0
  71. data/core/config/environments/production.rb +3 -0
  72. data/core/config/initializers/devise.rb +223 -0
  73. data/core/config/locales/devise.en.yml +56 -0
  74. data/core/config/locales/devise.ru.yml +52 -0
  75. data/core/config/locales/ru.yml +12 -0
  76. data/core/config/routes.rb +9 -0
  77. data/core/constructor-core.gemspec +16 -0
  78. data/core/db/migrate/1_devise_users.rb +56 -0
  79. data/core/db/migrate/2_add_default_user.rb +9 -0
  80. data/core/lib/constructor-core.rb +23 -0
  81. data/core/lib/constructor_core/engine.rb +6 -0
  82. data/core/spec/factories.rb +2 -0
  83. data/core/spec/lib/nav/group_spec.rb +61 -0
  84. data/core/spec/lib/nav/item_spec.rb +151 -0
  85. data/core/spec/lib/nav_lib_spec.rb +60 -0
  86. data/core/spec/spec_helper.rb +34 -0
  87. data/core/vendor/assets/javascripts/.gitkeep +0 -0
  88. data/core/vendor/assets/javascripts/ckeditor/ckeditor.js +913 -0
  89. data/core/vendor/assets/javascripts/ckeditor/config.js +38 -0
  90. data/core/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
  91. data/core/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
  92. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  93. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  94. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +9 -0
  95. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +9 -0
  96. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +9 -0
  97. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +10 -0
  98. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +9 -0
  99. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +9 -0
  100. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +10 -0
  101. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +10 -0
  102. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +9 -0
  103. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +10 -0
  104. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +10 -0
  105. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +9 -0
  106. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +9 -0
  107. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +10 -0
  108. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +10 -0
  109. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +9 -0
  110. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +9 -0
  111. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +9 -0
  112. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +9 -0
  113. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +9 -0
  114. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +10 -0
  115. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  116. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +9 -0
  117. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +10 -0
  118. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +9 -0
  119. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +10 -0
  120. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +9 -0
  121. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +9 -0
  122. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +9 -0
  123. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +10 -0
  124. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +9 -0
  125. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +10 -0
  126. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +9 -0
  127. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +9 -0
  128. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +9 -0
  129. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +9 -0
  130. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +10 -0
  131. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +9 -0
  132. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +10 -0
  133. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +9 -0
  134. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +10 -0
  135. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +9 -0
  136. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +9 -0
  137. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +9 -0
  138. data/core/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +7 -0
  139. data/core/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +6 -0
  140. data/core/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  141. data/core/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  142. data/core/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +13 -0
  143. data/core/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  144. data/core/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -0
  145. data/core/vendor/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
  146. data/core/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +24 -0
  147. data/core/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  148. data/core/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
  149. data/core/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  150. data/core/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
  151. data/core/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
  152. data/core/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  153. data/core/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +36 -0
  154. data/core/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
  155. data/core/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
  156. data/core/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
  157. data/core/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +31 -0
  158. data/core/vendor/assets/javascripts/ckeditor/plugins/preview/preview.html +10 -0
  159. data/core/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
  160. data/core/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  161. data/core/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +20 -0
  162. data/core/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  163. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  164. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  165. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  166. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  167. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  168. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  169. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  170. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  171. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  172. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  173. data/core/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  174. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  175. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +13 -0
  176. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  177. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  178. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  179. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  180. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  181. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  182. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  183. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  184. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  185. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
  186. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +13 -0
  187. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  188. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  189. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  190. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  191. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  192. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  193. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  194. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  195. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  196. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  197. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  198. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  199. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  200. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  201. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  202. data/core/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  203. data/core/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
  204. data/core/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -0
  205. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +84 -0
  206. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +10 -0
  207. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +6 -0
  208. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  209. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  210. data/core/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  211. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
  212. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
  213. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
  214. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  215. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  216. data/core/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +11 -0
  217. data/core/vendor/assets/javascripts/ckeditor/styles.js +111 -0
  218. data/core/vendor/assets/stylesheets/.gitkeep +0 -0
  219. data/core/vendor/assets/stylesheets/ckeditor/contents.css +103 -0
  220. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog.css +5 -0
  221. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog_ie.css +5 -0
  222. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog_ie7.css +5 -0
  223. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog_ie8.css +5 -0
  224. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/dialog_opera.css +5 -0
  225. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor.css +5 -0
  226. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor_gecko.css +5 -0
  227. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor_ie.css +5 -0
  228. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor_ie7.css +5 -0
  229. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/editor_ie8.css +5 -0
  230. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/icons.png +0 -0
  231. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/images/arrow.png +0 -0
  232. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/images/close.png +0 -0
  233. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/images/mini.png +0 -0
  234. data/core/vendor/assets/stylesheets/ckeditor/skins/moono/readme.md +51 -0
  235. data/lib/constructor/engine.rb +6 -0
  236. data/lib/constructor-cms.rb +3 -0
  237. data/pages/app/assets/images/constructor_pages/arrow_down.png +0 -0
  238. data/pages/app/assets/images/constructor_pages/arrow_up.png +0 -0
  239. data/pages/app/assets/images/constructor_pages/information.png +0 -0
  240. data/pages/app/assets/images/constructor_pages/page_white_edit.png +0 -0
  241. data/pages/app/assets/images/constructor_pages/photos.png +0 -0
  242. data/pages/app/controllers/constructor_pages/fields_controller.rb +60 -0
  243. data/pages/app/controllers/constructor_pages/pages_controller.rb +207 -0
  244. data/pages/app/controllers/constructor_pages/templates_controller.rb +71 -0
  245. data/pages/app/helpers/constructor_pages/fields_helper.rb +18 -0
  246. data/pages/app/helpers/constructor_pages/pages_helper.rb +15 -0
  247. data/pages/app/helpers/constructor_pages/templates_helper.rb +11 -0
  248. data/pages/app/models/constructor_pages/field.rb +60 -0
  249. data/pages/app/models/constructor_pages/page.rb +117 -0
  250. data/pages/app/models/constructor_pages/template.rb +30 -0
  251. data/pages/app/models/constructor_pages/types/boolean_type.rb +12 -0
  252. data/pages/app/models/constructor_pages/types/date_type.rb +16 -0
  253. data/pages/app/models/constructor_pages/types/float_type.rb +12 -0
  254. data/pages/app/models/constructor_pages/types/html_type.rb +12 -0
  255. data/pages/app/models/constructor_pages/types/image_type.rb +18 -0
  256. data/pages/app/models/constructor_pages/types/integer_type.rb +12 -0
  257. data/pages/app/models/constructor_pages/types/string_type.rb +12 -0
  258. data/pages/app/models/constructor_pages/types/text_type.rb +12 -0
  259. data/pages/app/views/constructor_pages/fields/_form.haml +28 -0
  260. data/pages/app/views/constructor_pages/fields/edit.haml +6 -0
  261. data/pages/app/views/constructor_pages/fields/new.haml +6 -0
  262. data/pages/app/views/constructor_pages/fields/types/_boolean.haml +1 -0
  263. data/pages/app/views/constructor_pages/fields/types/_date.haml +1 -0
  264. data/pages/app/views/constructor_pages/fields/types/_float.haml +1 -0
  265. data/pages/app/views/constructor_pages/fields/types/_html.haml +1 -0
  266. data/pages/app/views/constructor_pages/fields/types/_image.haml +4 -0
  267. data/pages/app/views/constructor_pages/fields/types/_integer.haml +1 -0
  268. data/pages/app/views/constructor_pages/fields/types/_string.haml +1 -0
  269. data/pages/app/views/constructor_pages/fields/types/_text.haml +1 -0
  270. data/pages/app/views/constructor_pages/pages/_breadcrumbs.haml +7 -0
  271. data/pages/app/views/constructor_pages/pages/_form.haml +98 -0
  272. data/pages/app/views/constructor_pages/pages/_menu.haml +8 -0
  273. data/pages/app/views/constructor_pages/pages/_submenu.haml +6 -0
  274. data/pages/app/views/constructor_pages/pages/edit.haml +6 -0
  275. data/pages/app/views/constructor_pages/pages/error_404.haml +23 -0
  276. data/pages/app/views/constructor_pages/pages/index.haml +50 -0
  277. data/pages/app/views/constructor_pages/pages/new.haml +6 -0
  278. data/pages/app/views/constructor_pages/pages/show.haml +5 -0
  279. data/pages/app/views/constructor_pages/pages/sitemap.haml +12 -0
  280. data/pages/app/views/constructor_pages/templates/_form.haml +48 -0
  281. data/pages/app/views/constructor_pages/templates/edit.haml +6 -0
  282. data/pages/app/views/constructor_pages/templates/index.haml +38 -0
  283. data/pages/app/views/constructor_pages/templates/new.haml +6 -0
  284. data/pages/config/initializers/dragonfly.rb +9 -0
  285. data/pages/config/locales/ru.yml +39 -0
  286. data/pages/config/routes.rb +34 -0
  287. data/pages/constructor-pages.gemspec +21 -0
  288. data/pages/db/migrate/10_create_html_types.rb +15 -0
  289. data/pages/db/migrate/11_create_image_types.rb +16 -0
  290. data/pages/db/migrate/12_add_default_template.rb +13 -0
  291. data/pages/db/migrate/1_create_pages.rb +27 -0
  292. data/pages/db/migrate/2_create_templates.rb +18 -0
  293. data/pages/db/migrate/3_create_fields.rb +17 -0
  294. data/pages/db/migrate/4_create_string_types.rb +15 -0
  295. data/pages/db/migrate/5_create_float_types.rb +15 -0
  296. data/pages/db/migrate/6_create_boolean_types.rb +15 -0
  297. data/pages/db/migrate/7_create_integer_types.rb +15 -0
  298. data/pages/db/migrate/8_create_text_types.rb +15 -0
  299. data/pages/db/migrate/9_create_date_types.rb +15 -0
  300. data/pages/lib/constructor-pages.rb +7 -0
  301. data/pages/lib/constructor_pages/engine.rb +6 -0
  302. data/pages/public/hello.txt +1 -0
  303. data/pages/spec/factories.rb +7 -0
  304. data/pages/spec/models/page_model_spec.rb +113 -0
  305. metadata +396 -0
@@ -0,0 +1,24 @@
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
+ (function(){function y(c){return c.type==CKEDITOR.NODE_TEXT&&0<c.getLength()&&(!o||!c.isReadOnly())}function s(c){return!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary(CKEDITOR.tools.extend({},CKEDITOR.dtd.$empty,CKEDITOR.dtd.$nonEditable)))}var o,t=function(){return{textNode:this.textNode,offset:this.offset,character:this.textNode?this.textNode.getText().charAt(this.offset):null,hitMatchBoundary:this._.matchBoundary}},u=["find","replace"],p=[["txtFindFind","txtFindReplace"],["txtFindCaseChk",
6
+ "txtReplaceCaseChk"],["txtFindWordChk","txtReplaceWordChk"],["txtFindCyclic","txtReplaceCyclic"]],n=function(c,g){function n(a,b){var d=c.createRange();d.setStart(a.textNode,b?a.offset:a.offset+1);d.setEndAt(c.editable(),CKEDITOR.POSITION_BEFORE_END);return d}function q(a){var b=c.getSelection(),d=c.editable();b&&!a?(a=b.getRanges()[0].clone(),a.collapse(!0)):(a=c.createRange(),a.setStartAt(d,CKEDITOR.POSITION_AFTER_START));a.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);return a}var v=new CKEDITOR.style(CKEDITOR.tools.extend({attributes:{"data-cke-highlight":1},
7
+ fullMatch:1,ignoreReadonly:1,childRule:function(){return 0}},c.config.find_highlight,!0)),l=function(a,b){var d=this,c=new CKEDITOR.dom.walker(a);c.guard=b?s:function(a){!s(a)&&(d._.matchBoundary=!0)};c.evaluator=y;c.breakOnFalse=1;a.startContainer.type==CKEDITOR.NODE_TEXT&&(this.textNode=a.startContainer,this.offset=a.startOffset-1);this._={matchWord:b,walker:c,matchBoundary:!1}};l.prototype={next:function(){return this.move()},back:function(){return this.move(!0)},move:function(a){var b=this.textNode;
8
+ if(null===b)return t.call(this);this._.matchBoundary=!1;if(b&&a&&0<this.offset)this.offset--;else if(b&&this.offset<b.getLength()-1)this.offset++;else{for(b=null;!b&&!(b=this._.walker[a?"previous":"next"].call(this._.walker),this._.matchWord&&!b||this._.walker._.end););this.offset=(this.textNode=b)?a?b.getLength()-1:0:0}return t.call(this)}};var r=function(a,b){this._={walker:a,cursors:[],rangeLength:b,highlightRange:null,isMatched:0}};r.prototype={toDomRange:function(){var a=c.createRange(),b=this._.cursors;
9
+ if(1>b.length){var d=this._.walker.textNode;if(d)a.setStartAfter(d);else return null}else d=b[0],b=b[b.length-1],a.setStart(d.textNode,d.offset),a.setEnd(b.textNode,b.offset+1);return a},updateFromDomRange:function(a){var b=new l(a);this._.cursors=[];do a=b.next(),a.character&&this._.cursors.push(a);while(a.character);this._.rangeLength=this._.cursors.length},setMatched:function(){this._.isMatched=!0},clearMatched:function(){this._.isMatched=!1},isMatched:function(){return this._.isMatched},highlight:function(){if(!(1>
10
+ this._.cursors.length)){this._.highlightRange&&this.removeHighlight();var a=this.toDomRange(),b=a.createBookmark();v.applyToRange(a);a.moveToBookmark(b);this._.highlightRange=a;b=a.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b.scrollIntoView();this.updateFromDomRange(a)}},removeHighlight:function(){if(this._.highlightRange){var a=this._.highlightRange.createBookmark();v.removeFromRange(this._.highlightRange);this._.highlightRange.moveToBookmark(a);this.updateFromDomRange(this._.highlightRange);
11
+ this._.highlightRange=null}},isReadOnly:function(){return!this._.highlightRange?0:this._.highlightRange.startContainer.isReadOnly()},moveBack:function(){var a=this._.walker.back(),b=this._.cursors;a.hitMatchBoundary&&(this._.cursors=b=[]);b.unshift(a);b.length>this._.rangeLength&&b.pop();return a},moveNext:function(){var a=this._.walker.next(),b=this._.cursors;a.hitMatchBoundary&&(this._.cursors=b=[]);b.push(a);b.length>this._.rangeLength&&b.shift();return a},getEndCharacter:function(){var a=this._.cursors;
12
+ return 1>a.length?null:a[a.length-1].character},getNextCharacterRange:function(a){var b,d;d=this._.cursors;d=(b=d[d.length-1])&&b.textNode?new l(n(b)):this._.walker;return new r(d,a)},getCursors:function(){return this._.cursors}};var w=function(a,b){var d=[-1];b&&(a=a.toLowerCase());for(var c=0;c<a.length;c++)for(d.push(d[c]+1);0<d[c+1]&&a.charAt(c)!=a.charAt(d[c+1]-1);)d[c+1]=d[d[c+1]-1]+1;this._={overlap:d,state:0,ignoreCase:!!b,pattern:a}};w.prototype={feedCharacter:function(a){for(this._.ignoreCase&&
13
+ (a=a.toLowerCase());;){if(a==this._.pattern.charAt(this._.state))return this._.state++,this._.state==this._.pattern.length?(this._.state=0,2):1;if(this._.state)this._.state=this._.overlap[this._.state];else return 0}return null},reset:function(){this._.state=0}};var z=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,x=function(a){if(!a)return!0;var b=a.charCodeAt(0);return 9<=b&&13>=b||8192<=b&&8202>=b||z.test(a)},e={searchRange:null,matchRange:null,find:function(a,b,d,f,e,A){this.matchRange?
14
+ (this.matchRange.removeHighlight(),this.matchRange=this.matchRange.getNextCharacterRange(a.length)):this.matchRange=new r(new l(this.searchRange),a.length);for(var i=new w(a,!b),j=0,k="%";null!==k;){for(this.matchRange.moveNext();k=this.matchRange.getEndCharacter();){j=i.feedCharacter(k);if(2==j)break;this.matchRange.moveNext().hitMatchBoundary&&i.reset()}if(2==j){if(d){var h=this.matchRange.getCursors(),m=h[h.length-1],h=h[0],g=c.createRange();g.setStartAt(c.editable(),CKEDITOR.POSITION_AFTER_START);
15
+ g.setEnd(h.textNode,h.offset);h=g;m=n(m);h.trim();m.trim();h=new l(h,!0);m=new l(m,!0);if(!x(h.back().character)||!x(m.next().character))continue}this.matchRange.setMatched();!1!==e&&this.matchRange.highlight();return!0}}this.matchRange.clearMatched();this.matchRange.removeHighlight();return f&&!A?(this.searchRange=q(1),this.matchRange=null,arguments.callee.apply(this,Array.prototype.slice.call(arguments).concat([!0]))):!1},replaceCounter:0,replace:function(a,b,d,f,e,g,i){o=1;a=0;if(this.matchRange&&
16
+ this.matchRange.isMatched()&&!this.matchRange._.isReplaced&&!this.matchRange.isReadOnly()){this.matchRange.removeHighlight();b=this.matchRange.toDomRange();d=c.document.createText(d);if(!i){var j=c.getSelection();j.selectRanges([b]);c.fire("saveSnapshot")}b.deleteContents();b.insertNode(d);i||(j.selectRanges([b]),c.fire("saveSnapshot"));this.matchRange.updateFromDomRange(b);i||this.matchRange.highlight();this.matchRange._.isReplaced=!0;this.replaceCounter++;a=1}else a=this.find(b,f,e,g,!i);o=0;return a}},
17
+ f=c.lang.find;return{title:f.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:170,buttons:[CKEDITOR.dialog.cancelButton],contents:[{id:"find",label:f.find,title:f.find,accessKey:"",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtFindFind",label:f.findWhat,isChanged:!1,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFind",align:"left",style:"width:100%",label:f.find,onClick:function(){var a=this.getDialog();e.find(a.getValueOf("find","txtFindFind"),
18
+ a.getValueOf("find","txtFindCaseChk"),a.getValueOf("find","txtFindWordChk"),a.getValueOf("find","txtFindCyclic"))||alert(f.notFoundMsg)}}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(f.findOptions),style:"margin-top:29px",children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtFindCaseChk",isChanged:!1,label:f.matchCase},{type:"checkbox",id:"txtFindWordChk",isChanged:!1,label:f.matchWord},{type:"checkbox",id:"txtFindCyclic",isChanged:!1,"default":!0,label:f.matchCyclic}]}]}]},{id:"replace",
19
+ label:f.replace,accessKey:"M",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtFindReplace",label:f.findWhat,isChanged:!1,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFindReplace",align:"left",style:"width:100%",label:f.replace,onClick:function(){var a=this.getDialog();e.replace(a,a.getValueOf("replace","txtFindReplace"),a.getValueOf("replace","txtReplace"),a.getValueOf("replace","txtReplaceCaseChk"),a.getValueOf("replace","txtReplaceWordChk"),a.getValueOf("replace",
20
+ "txtReplaceCyclic"))||alert(f.notFoundMsg)}}]},{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtReplace",label:f.replaceWith,isChanged:!1,labelLayout:"horizontal",accessKey:"R"},{type:"button",id:"btnReplaceAll",align:"left",style:"width:100%",label:f.replaceAll,isChanged:!1,onClick:function(){var a=this.getDialog();e.replaceCounter=0;e.searchRange=q(1);e.matchRange&&(e.matchRange.removeHighlight(),e.matchRange=null);for(c.fire("saveSnapshot");e.replace(a,a.getValueOf("replace",
21
+ "txtFindReplace"),a.getValueOf("replace","txtReplace"),a.getValueOf("replace","txtReplaceCaseChk"),a.getValueOf("replace","txtReplaceWordChk"),!1,!0););e.replaceCounter?(alert(f.replaceSuccessMsg.replace(/%1/,e.replaceCounter)),c.fire("saveSnapshot")):alert(f.notFoundMsg)}}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(f.findOptions),children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtReplaceCaseChk",isChanged:!1,label:f.matchCase},{type:"checkbox",id:"txtReplaceWordChk",isChanged:!1,
22
+ label:f.matchWord},{type:"checkbox",id:"txtReplaceCyclic",isChanged:!1,"default":!0,label:f.matchCyclic}]}]}]}],onLoad:function(){var a=this,b,c=0;this.on("hide",function(){c=0});this.on("show",function(){c=1});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(f){return function(e){f.call(a,e);var g=a._.tabs[e],i;i="find"===e?"txtFindWordChk":"txtReplaceWordChk";b=a.getContentElement(e,"find"===e?"txtFindFind":"txtFindReplace");a.getContentElement(e,i);g.initialized||(CKEDITOR.document.getById(b._.inputId),
23
+ g.initialized=!0);if(c){var j,e="find"===e?1:0,g=1-e,k,h=p.length;for(k=0;k<h;k++)i=this.getContentElement(u[e],p[k][e]),j=this.getContentElement(u[g],p[k][g]),j.setValue(i.getValue())}}})},onShow:function(){e.searchRange=q();var a=this.getParentEditor().getSelection().getSelectedText(),b=this.getContentElement(g,"find"==g?"txtFindFind":"txtFindReplace");b.setValue(a);b.select();this.selectPage(g);this[("find"==g&&this._.editor.readOnly?"hide":"show")+"Page"]("replace")},onHide:function(){var a;e.matchRange&&
24
+ e.matchRange.isMatched()&&(e.matchRange.removeHighlight(),c.focus(),(a=e.matchRange.toDomRange())&&c.getSelection().selectRanges([a]));delete e.matchRange},onFocus:function(){return"replace"==g?this.getContentElement("replace","txtFindReplace"):this.getContentElement("find","txtFindFind")}}};CKEDITOR.dialog.add("find",function(c){return n(c,"find")});CKEDITOR.dialog.add("replace",function(c){return n(c,"replace")})})();
@@ -0,0 +1,10 @@
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
+ (function(){function c(b){var c=this instanceof CKEDITOR.ui.dialog.checkbox;b.hasAttribute(this.id)&&(b=b.getAttribute(this.id),c?this.setValue(e[this.id]["true"]==b.toLowerCase()):this.setValue(b))}function d(b){var c=""===this.getValue(),a=this instanceof CKEDITOR.ui.dialog.checkbox,d=this.getValue();c?b.removeAttribute(this.att||this.id):a?b.setAttribute(this.id,e[this.id][d]):b.setAttribute(this.att||this.id,d)}var e={scrolling:{"true":"yes","false":"no"},frameborder:{"true":"1","false":"0"}};
6
+ CKEDITOR.dialog.add("iframe",function(b){var f=b.lang.iframe,a=b.lang.common,e=b.plugins.dialogadvtab;return{title:f.title,minWidth:350,minHeight:260,onShow:function(){this.fakeImage=this.iframeNode=null;var a=this.getSelectedElement();a&&(a.data("cke-real-element-type")&&"iframe"==a.data("cke-real-element-type"))&&(this.fakeImage=a,this.iframeNode=a=b.restoreRealElement(a),this.setupContent(a))},onOk:function(){var a;a=this.fakeImage?this.iframeNode:new CKEDITOR.dom.element("iframe");var c={},d=
7
+ {};this.commitContent(a,c,d);a=b.createFakeElement(a,"cke_iframe","iframe",!0);a.setAttributes(d);a.setStyles(c);this.fakeImage?(a.replace(this.fakeImage),b.getSelection().selectElement(a)):b.insertElement(a)},contents:[{id:"info",label:a.generalTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{id:"src",type:"text",label:a.url,required:!0,validate:CKEDITOR.dialog.validate.notEmpty(f.noUrl),setup:c,commit:d}]},{type:"hbox",children:[{id:"width",type:"text",requiredContent:"iframe[width]",
8
+ style:"width:100%",labelLayout:"vertical",label:a.width,validate:CKEDITOR.dialog.validate.htmlLength(a.invalidHtmlLength.replace("%1",a.width)),setup:c,commit:d},{id:"height",type:"text",requiredContent:"iframe[height]",style:"width:100%",labelLayout:"vertical",label:a.height,validate:CKEDITOR.dialog.validate.htmlLength(a.invalidHtmlLength.replace("%1",a.height)),setup:c,commit:d},{id:"align",type:"select",requiredContent:"iframe[align]","default":"",items:[[a.notSet,""],[a.alignLeft,"left"],[a.alignRight,
9
+ "right"],[a.alignTop,"top"],[a.alignMiddle,"middle"],[a.alignBottom,"bottom"]],style:"width:100%",labelLayout:"vertical",label:a.align,setup:function(a,b){c.apply(this,arguments);if(b){var d=b.getAttribute("align");this.setValue(d&&d.toLowerCase()||"")}},commit:function(a,b,c){d.apply(this,arguments);this.getValue()&&(c.align=this.getValue())}}]},{type:"hbox",widths:["50%","50%"],children:[{id:"scrolling",type:"checkbox",requiredContent:"iframe[scrolling]",label:f.scrolling,setup:c,commit:d},{id:"frameborder",
10
+ type:"checkbox",requiredContent:"iframe[frameborder]",label:f.border,setup:c,commit:d}]},{type:"hbox",widths:["50%","50%"],children:[{id:"name",type:"text",requiredContent:"iframe[name]",label:a.name,setup:c,commit:d},{id:"title",type:"text",requiredContent:"iframe[title]",label:a.advisoryTitle,setup:c,commit:d}]},{id:"longdesc",type:"text",requiredContent:"iframe[longdesc]",label:a.longDescr,setup:c,commit:d}]},e&&e.createAdvancedTab(b,{id:1,classes:1,styles:1},"iframe")]}})})();
@@ -0,0 +1,43 @@
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
+ (function(){var r=function(c,j){function r(){var a=arguments,b=this.getContentElement("advanced","txtdlgGenStyle");b&&b.commit.apply(b,a);this.foreach(function(b){b.commit&&"txtdlgGenStyle"!=b.id&&b.commit.apply(b,a)})}function i(a){if(!s){s=1;var b=this.getDialog(),d=b.imageElement;if(d){this.commit(f,d);for(var a=[].concat(a),e=a.length,c,g=0;g<e;g++)(c=b.getContentElement.apply(b,a[g].split(":")))&&c.setup(f,d)}s=0}}var f=1,k=/^\s*(\d+)((px)|\%)?\s*$/i,v=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,o=/^\d+px$/,
6
+ w=function(){var a=this.getValue(),b=this.getDialog(),d=a.match(k);d&&("%"==d[2]&&l(b,!1),a=d[1]);b.lockRatio&&(d=b.originalElement,"true"==d.getCustomData("isReady")&&("txtHeight"==this.id?(a&&"0"!=a&&(a=Math.round(d.$.width*(a/d.$.height))),isNaN(a)||b.setValueOf("info","txtWidth",a)):(a&&"0"!=a&&(a=Math.round(d.$.height*(a/d.$.width))),isNaN(a)||b.setValueOf("info","txtHeight",a))));g(b)},g=function(a){if(!a.originalElement||!a.preview)return 1;a.commitContent(4,a.preview);return 0},s,l=function(a,
7
+ b){if(!a.getContentElement("info","ratioLock"))return null;var d=a.originalElement;if(!d)return null;if("check"==b){if(!a.userlockRatio&&"true"==d.getCustomData("isReady")){var e=a.getValueOf("info","txtWidth"),c=a.getValueOf("info","txtHeight"),d=1E3*d.$.width/d.$.height,f=1E3*e/c;a.lockRatio=!1;!e&&!c?a.lockRatio=!0:!isNaN(d)&&!isNaN(f)&&Math.round(d)==Math.round(f)&&(a.lockRatio=!0)}}else void 0!=b?a.lockRatio=b:(a.userlockRatio=1,a.lockRatio=!a.lockRatio);e=CKEDITOR.document.getById(p);a.lockRatio?
8
+ e.removeClass("cke_btn_unlocked"):e.addClass("cke_btn_unlocked");e.setAttribute("aria-checked",a.lockRatio);CKEDITOR.env.hc&&e.getChild(0).setHtml(a.lockRatio?CKEDITOR.env.ie?"■":"▣":CKEDITOR.env.ie?"□":"▢");return a.lockRatio},x=function(a){var b=a.originalElement;if("true"==b.getCustomData("isReady")){var d=a.getContentElement("info","txtWidth"),e=a.getContentElement("info","txtHeight");d&&d.setValue(b.$.width);e&&e.setValue(b.$.height)}g(a)},y=function(a,b){function d(a,b){var d=a.match(k);return d?
9
+ ("%"==d[2]&&(d[1]+="%",l(e,!1)),d[1]):b}if(a==f){var e=this.getDialog(),c="",g="txtWidth"==this.id?"width":"height",h=b.getAttribute(g);h&&(c=d(h,c));c=d(b.getStyle(g),c);this.setValue(c)}},t,q=function(){var a=this.originalElement;a.setCustomData("isReady","true");a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);CKEDITOR.document.getById(m).setStyle("display","none");this.dontResetSize||x(this);this.firstLoad&&CKEDITOR.tools.setTimeout(function(){l(this,"check")},
10
+ 0,this);this.dontResetSize=this.firstLoad=!1},h=function(){var a=this.originalElement;a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);a=CKEDITOR.getUrl(CKEDITOR.plugins.get("image").path+"images/noimage.png");this.preview&&this.preview.setAttribute("src",a);CKEDITOR.document.getById(m).setStyle("display","none");l(this,!1)},n=function(a){return CKEDITOR.tools.getNextId()+"_"+a},p=n("btnLockSizes"),u=n("btnResetSize"),m=n("ImagePreviewLoader"),A=n("previewLink"),
11
+ z=n("previewImage");return{title:c.lang.image["image"==j?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.linkEditMode=this.imageEditMode=this.linkElement=this.imageElement=!1;this.lockRatio=!0;this.userlockRatio=0;this.dontResetSize=!1;this.firstLoad=!0;this.addLink=!1;var a=this.getParentEditor(),b=a.getSelection(),d=(b=b&&b.getSelectedElement())&&a.elementPath(b).contains("a",1);CKEDITOR.document.getById(m).setStyle("display","none");t=new CKEDITOR.dom.element("img",a.document);
12
+ this.preview=CKEDITOR.document.getById(z);this.originalElement=a.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");if(d){this.linkElement=d;this.linkEditMode=!0;var c=d.getChildren();if(1==c.count()){var g=c.getItem(0).getName();if("img"==g||"input"==g)this.imageElement=c.getItem(0),"img"==this.imageElement.getName()?this.imageEditMode="img":"input"==this.imageElement.getName()&&(this.imageEditMode="input")}"image"==j&&
13
+ this.setupContent(2,d)}if(b&&"img"==b.getName()&&!b.data("cke-realelement")||b&&"input"==b.getName()&&"image"==b.getAttribute("type"))this.imageEditMode=b.getName(),this.imageElement=b;this.imageEditMode?(this.cleanImageElement=this.imageElement,this.imageElement=this.cleanImageElement.clone(!0,!0),this.setupContent(f,this.imageElement)):this.imageElement=a.document.createElement("img");l(this,!0);CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))||(this.preview.removeAttribute("src"),this.preview.setStyle("display",
14
+ "none"))},onOk:function(){if(this.imageEditMode){var a=this.imageEditMode;"image"==j&&"input"==a&&confirm(c.lang.image.button2Img)?(this.imageElement=c.document.createElement("img"),this.imageElement.setAttribute("alt",""),c.insertElement(this.imageElement)):"image"!=j&&"img"==a&&confirm(c.lang.image.img2Button)?(this.imageElement=c.document.createElement("input"),this.imageElement.setAttributes({type:"image",alt:""}),c.insertElement(this.imageElement)):(this.imageElement=this.cleanImageElement,delete this.cleanImageElement)}else"image"==
15
+ j?this.imageElement=c.document.createElement("img"):(this.imageElement=c.document.createElement("input"),this.imageElement.setAttribute("type","image")),this.imageElement.setAttribute("alt","");this.linkEditMode||(this.linkElement=c.document.createElement("a"));this.commitContent(f,this.imageElement);this.commitContent(2,this.linkElement);this.imageElement.getAttribute("style")||this.imageElement.removeAttribute("style");this.imageEditMode?!this.linkEditMode&&this.addLink?(c.insertElement(this.linkElement),
16
+ this.imageElement.appendTo(this.linkElement)):this.linkEditMode&&!this.addLink&&(c.getSelection().selectElement(this.linkElement),c.insertElement(this.imageElement)):this.addLink?this.linkEditMode?c.insertElement(this.imageElement):(c.insertElement(this.linkElement),this.linkElement.append(this.imageElement,!1)):c.insertElement(this.imageElement)},onLoad:function(){"image"!=j&&this.hidePage("Link");var a=this._.element.getDocument();this.getContentElement("info","ratioLock")&&(this.addFocusable(a.getById(u),
17
+ 5),this.addFocusable(a.getById(p),5));this.commitContent=r},onHide:function(){this.preview&&this.commitContent(8,this.preview);this.originalElement&&(this.originalElement.removeListener("load",q),this.originalElement.removeListener("error",h),this.originalElement.removeListener("abort",h),this.originalElement.remove(),this.originalElement=!1);delete this.imageElement},contents:[{id:"info",label:c.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["280px",
18
+ "110px"],align:"right",children:[{id:"txtUrl",type:"text",label:c.lang.common.url,required:!0,onChange:function(){var a=this.getDialog(),b=this.getValue();if(0<b.length){var a=this.getDialog(),d=a.originalElement;a.preview.removeStyle("display");d.setCustomData("isReady","false");var c=CKEDITOR.document.getById(m);c&&c.setStyle("display","");d.on("load",q,a);d.on("error",h,a);d.on("abort",h,a);d.setAttribute("src",b);t.setAttribute("src",b);a.preview.setAttribute("src",t.$.src);g(a)}else a.preview&&
19
+ (a.preview.removeAttribute("src"),a.preview.setStyle("display","none"))},setup:function(a,b){if(a==f){var d=b.data("cke-saved-src")||b.getAttribute("src");this.getDialog().dontResetSize=!0;this.setValue(d);this.setInitValue()}},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())?(b.data("cke-saved-src",this.getValue()),b.setAttribute("src",this.getValue())):8==a&&(b.setAttribute("src",""),b.removeAttribute("src"))},validate:CKEDITOR.dialog.validate.notEmpty(c.lang.image.urlMissing)},{type:"button",
20
+ id:"browse",style:"display:inline-block;margin-top:10px;",align:"center",label:c.lang.common.browseServer,hidden:!0,filebrowser:"info:txtUrl"}]}]},{id:"txtAlt",type:"text",label:c.lang.image.alt,accessKey:"T","default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==f&&this.setValue(b.getAttribute("alt"))},commit:function(a,b){a==f?(this.getValue()||this.isChanged())&&b.setAttribute("alt",this.getValue()):4==a?b.setAttribute("alt",this.getValue()):8==a&&b.removeAttribute("alt")}},
21
+ {type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",requiredContent:"img{width,height}",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"40px",id:"txtWidth",label:c.lang.common.width,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);(a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidWidth);return a},setup:y,commit:function(a,b,d){var c=this.getValue();a==f?(c?b.setStyle("width",
22
+ CKEDITOR.tools.cssLength(c)):b.removeStyle("width"),!d&&b.removeAttribute("width")):4==a?c.match(k)?b.setStyle("width",CKEDITOR.tools.cssLength(c)):(a=this.getDialog().originalElement,"true"==a.getCustomData("isReady")&&b.setStyle("width",a.$.width+"px")):8==a&&(b.removeAttribute("width"),b.removeStyle("width"))}},{type:"text",id:"txtHeight",width:"40px",label:c.lang.common.height,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);
23
+ (a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidHeight);return a},setup:y,commit:function(a,b,d){var c=this.getValue();a==f?(c?b.setStyle("height",CKEDITOR.tools.cssLength(c)):b.removeStyle("height"),!d&&b.removeAttribute("height")):4==a?c.match(k)?b.setStyle("height",CKEDITOR.tools.cssLength(c)):(a=this.getDialog().originalElement,"true"==a.getCustomData("isReady")&&b.setStyle("height",a.$.height+"px")):8==a&&(b.removeAttribute("height"),b.removeStyle("height"))}}]},{id:"ratioLock",
24
+ type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var a=CKEDITOR.document.getById(u),b=CKEDITOR.document.getById(p);a&&(a.on("click",function(a){x(this);a.data&&a.data.preventDefault()},this.getDialog()),a.on("mouseover",function(){this.addClass("cke_btn_over")},a),a.on("mouseout",function(){this.removeClass("cke_btn_over")},a));b&&(b.on("click",function(a){l(this);var b=this.originalElement,c=this.getValueOf("info","txtWidth");if(b.getCustomData("isReady")=="true"&&c){b=
25
+ b.$.height/b.$.width*c;if(!isNaN(b)){this.setValueOf("info","txtHeight",Math.round(b));g(this)}}a.data&&a.data.preventDefault()},this.getDialog()),b.on("mouseover",function(){this.addClass("cke_btn_over")},b),b.on("mouseout",function(){this.removeClass("cke_btn_over")},b))},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+c.lang.image.lockRatio+'" class="cke_btn_locked" id="'+p+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+c.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+
26
+ c.lang.image.resetSize+'" class="cke_btn_reset" id="'+u+'" role="button"><span class="cke_label">'+c.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",requiredContent:"img{border-width}",width:"60px",label:c.lang.image.border,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateBorder),setup:function(a,b){if(a==f){var d;d=
27
+ (d=(d=b.getStyle("border-width"))&&d.match(/^(\d+px)(?: \1 \1 \1)?$/))&&parseInt(d[1],10);isNaN(parseInt(d,10))&&(d=b.getAttribute("border"));this.setValue(d)}},commit:function(a,b,d){var c=parseInt(this.getValue(),10);a==f||4==a?(isNaN(c)?!c&&this.isChanged()&&b.removeStyle("border"):(b.setStyle("border-width",CKEDITOR.tools.cssLength(c)),b.setStyle("border-style","solid")),!d&&a==f&&b.removeAttribute("border")):8==a&&(b.removeAttribute("border"),b.removeStyle("border-width"),b.removeStyle("border-style"),
28
+ b.removeStyle("border-color"))}},{type:"text",id:"txtHSpace",requiredContent:"img{margin-left,margin-right}",width:"60px",label:c.lang.image.hSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateHSpace),setup:function(a,b){if(a==f){var d,c;d=b.getStyle("margin-left");c=b.getStyle("margin-right");d=d&&d.match(o);c=c&&c.match(o);d=parseInt(d,10);c=parseInt(c,10);d=d==c&&d;
29
+ isNaN(parseInt(d,10))&&(d=b.getAttribute("hspace"));this.setValue(d)}},commit:function(a,b,c){var e=parseInt(this.getValue(),10);a==f||4==a?(isNaN(e)?!e&&this.isChanged()&&(b.removeStyle("margin-left"),b.removeStyle("margin-right")):(b.setStyle("margin-left",CKEDITOR.tools.cssLength(e)),b.setStyle("margin-right",CKEDITOR.tools.cssLength(e))),!c&&a==f&&b.removeAttribute("hspace")):8==a&&(b.removeAttribute("hspace"),b.removeStyle("margin-left"),b.removeStyle("margin-right"))}},{type:"text",id:"txtVSpace",
30
+ requiredContent:"img{margin-top,margin-bottom}",width:"60px",label:c.lang.image.vSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateVSpace),setup:function(a,b){if(a==f){var c,e;c=b.getStyle("margin-top");e=b.getStyle("margin-bottom");c=c&&c.match(o);e=e&&e.match(o);c=parseInt(c,10);e=parseInt(e,10);c=c==e&&c;isNaN(parseInt(c,10))&&(c=b.getAttribute("vspace"));this.setValue(c)}},
31
+ commit:function(a,b,c){var e=parseInt(this.getValue(),10);a==f||4==a?(isNaN(e)?!e&&this.isChanged()&&(b.removeStyle("margin-top"),b.removeStyle("margin-bottom")):(b.setStyle("margin-top",CKEDITOR.tools.cssLength(e)),b.setStyle("margin-bottom",CKEDITOR.tools.cssLength(e))),!c&&a==f&&b.removeAttribute("vspace")):8==a&&(b.removeAttribute("vspace"),b.removeStyle("margin-top"),b.removeStyle("margin-bottom"))}},{id:"cmbAlign",requiredContent:"img{float}",type:"select",widths:["35%","65%"],style:"width:90px",
32
+ label:c.lang.common.align,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.alignLeft,"left"],[c.lang.common.alignRight,"right"]],onChange:function(){g(this.getDialog());i.call(this,"advanced:txtdlgGenStyle")},setup:function(a,b){if(a==f){var c=b.getStyle("float");switch(c){case "inherit":case "none":c=""}!c&&(c=(b.getAttribute("align")||"").toLowerCase());this.setValue(c)}},commit:function(a,b,c){var e=this.getValue();if(a==f||4==a){if(e?b.setStyle("float",e):b.removeStyle("float"),!c&&
33
+ a==f)switch(e=(b.getAttribute("align")||"").toLowerCase(),e){case "left":case "right":b.removeAttribute("align")}}else 8==a&&b.removeStyle("float")}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(c.lang.common.preview)+'<br><div id="'+m+'" class="ImagePreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div><div class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+
34
+ A+'"><img id="'+z+'" alt="" /></a>'+(c.config.image_previewText||"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.")+
35
+ "</td></tr></table></div></div>"}]}]}]},{id:"Link",requiredContent:"a[href]",label:c.lang.image.linkTab,padding:0,elements:[{id:"txtUrl",type:"text",label:c.lang.common.url,style:"width: 100%","default":"",setup:function(a,b){if(2==a){var c=b.data("cke-saved-href");c||(c=b.getAttribute("href"));this.setValue(c)}},commit:function(a,b){if(2==a&&(this.getValue()||this.isChanged())){var d=decodeURI(this.getValue());b.data("cke-saved-href",d);b.setAttribute("href",d);if(this.getValue()||!c.config.image_removeLinkByEmptyURL)this.getDialog().addLink=
36
+ !0}}},{type:"button",id:"browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:c.config.filebrowserImageBrowseLinkUrl},style:"float:right",hidden:!0,label:c.lang.common.browseServer},{id:"cmbTarget",type:"select",requiredContent:"a[target]",label:c.lang.common.target,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.targetNew,"_blank"],[c.lang.common.targetTop,"_top"],[c.lang.common.targetSelf,"_self"],[c.lang.common.targetParent,"_parent"]],setup:function(a,b){2==a&&this.setValue(b.getAttribute("target")||
37
+ "")},commit:function(a,b){2==a&&(this.getValue()||this.isChanged())&&b.setAttribute("target",this.getValue())}}]},{id:"Upload",hidden:!0,filebrowser:"uploadButton",label:c.lang.image.upload,elements:[{type:"file",id:"upload",label:c.lang.image.btnUpload,style:"height:40px",size:38},{type:"fileButton",id:"uploadButton",filebrowser:"info:txtUrl",label:c.lang.image.btnUpload,"for":["Upload","upload"]}]},{id:"advanced",label:c.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],
38
+ children:[{type:"text",id:"linkId",requiredContent:"img[id]",label:c.lang.common.id,setup:function(a,b){a==f&&this.setValue(b.getAttribute("id"))},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("id",this.getValue())}},{id:"cmbLangDir",type:"select",requiredContent:"img[dir]",style:"width : 100px;",label:c.lang.common.langDir,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.langDirLtr,"ltr"],[c.lang.common.langDirRtl,"rtl"]],setup:function(a,b){a==f&&this.setValue(b.getAttribute("dir"))},
39
+ commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("dir",this.getValue())}},{type:"text",id:"txtLangCode",requiredContent:"img[lang]",label:c.lang.common.langCode,"default":"",setup:function(a,b){a==f&&this.setValue(b.getAttribute("lang"))},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("lang",this.getValue())}}]},{type:"text",id:"txtGenLongDescr",requiredContent:"img[longdesc]",label:c.lang.common.longDescr,setup:function(a,b){a==f&&this.setValue(b.getAttribute("longDesc"))},
40
+ commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("longDesc",this.getValue())}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",requiredContent:"img(cke-xyz)",label:c.lang.common.cssClass,"default":"",setup:function(a,b){a==f&&this.setValue(b.getAttribute("class"))},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("class",this.getValue())}},{type:"text",id:"txtGenTitle",requiredContent:"img[title]",label:c.lang.common.advisoryTitle,
41
+ "default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==f&&this.setValue(b.getAttribute("title"))},commit:function(a,b){a==f?(this.getValue()||this.isChanged())&&b.setAttribute("title",this.getValue()):4==a?b.setAttribute("title",this.getValue()):8==a&&b.removeAttribute("title")}}]},{type:"text",id:"txtdlgGenStyle",requiredContent:"img{cke-xyz}",label:c.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(c.lang.common.invalidInlineStyle),"default":"",setup:function(a,
42
+ b){if(a==f){var c=b.getAttribute("style");!c&&b.$.style.cssText&&(c=b.$.style.cssText);this.setValue(c);var e=b.$.style.height,c=b.$.style.width,e=(e?e:"").match(k),c=(c?c:"").match(k);this.attributesInStyle={height:!!e,width:!!c}}},onChange:function(){i.call(this,"info:cmbFloat info:cmbAlign info:txtVSpace info:txtHSpace info:txtBorder info:txtWidth info:txtHeight".split(" "));g(this)},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("style",this.getValue())}}]}]}};
43
+ CKEDITOR.dialog.add("image",function(c){return r(c,"image")});CKEDITOR.dialog.add("imagebutton",function(c){return r(c,"imagebutton")})})();
@@ -0,0 +1,8 @@
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.dialog.add("anchor",function(c){var d=function(a){this._.selectedElement=a;this.setValueOf("info","txtName",a.data("cke-saved-name")||"")};return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var a=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:a,name:a,"data-cke-saved-name":a};if(this._.selectedElement)this._.selectedElement.data("cke-realelement")?(a=c.document.createElement("a",{attributes:a}),c.createFakeElement(a,"cke_anchor","anchor").replace(this._.selectedElement)):
6
+ this._.selectedElement.setAttributes(a);else{var b=c.getSelection(),b=b&&b.getRanges()[0];b.collapsed?(CKEDITOR.plugins.link.synAnchorSelector&&(a["class"]="cke_anchor_empty"),CKEDITOR.plugins.link.emptyAnchorFix&&(a.contenteditable="false",a["data-cke-editable"]=1),a=c.document.createElement("a",{attributes:a}),CKEDITOR.plugins.link.fakeAnchor&&(a=c.createFakeElement(a,"cke_anchor","anchor")),b.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",
7
+ attributes:a}),a.type=CKEDITOR.STYLE_INLINE,c.applyStyle(a))}},onHide:function(){delete this._.selectedElement},onShow:function(){var a=c.getSelection(),b=a.getSelectedElement();if(b)CKEDITOR.plugins.link.fakeAnchor?((a=CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,b))&&d.call(this,a),this._.selectedElement=b):b.is("a")&&b.hasAttribute("name")&&d.call(this,b);else if(b=CKEDITOR.plugins.link.getSelectedLink(c))d.call(this,b),a.selectElement(b);this.getContentElement("info","txtName").focus()},contents:[{id:"info",
8
+ label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){return!this.getValue()?(alert(c.lang.link.anchor.errorName),!1):!0}}]}]}});
@@ -0,0 +1,36 @@
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.dialog.add("link",function(n){var p,q;function r(a){return a.replace(/'/g,"\\$&")}function t(a){var g,c=p,d,e;g=[q,"("];for(var b=0;b<c.length;b++)d=c[b].toLowerCase(),e=a[d],0<b&&g.push(","),g.push("'",e?r(encodeURIComponent(a[d])):"","'");g.push(")");return g.join("")}function u(a){for(var g,c=a.length,d=[],e=0;e<c;e++)g=a.charCodeAt(e),d.push(g);return"String.fromCharCode("+d.join(",")+")"}function v(a){return(a=a.getAttribute("class"))?a.replace(/\s*(?:cke_anchor_empty|cke_anchor)(?:\s*$)?/g,
6
+ ""):""}var w=CKEDITOR.plugins.link,s=function(){var a=this.getDialog(),g=a.getContentElement("target","popupFeatures"),a=a.getContentElement("target","linkTargetName"),c=this.getValue();if(g&&a)switch(g=g.getElement(),g.hide(),a.setValue(""),c){case "frame":a.setLabel(n.lang.link.targetFrameName);a.getElement().show();break;case "popup":g.show();a.setLabel(n.lang.link.targetPopupName);a.getElement().show();break;default:a.setValue(c),a.getElement().hide()}},x=/^javascript:/,y=/^mailto:([^?]+)(?:\?(.+))?$/,
7
+ z=/subject=([^;?:@&=$,\/]*)/,A=/body=([^;?:@&=$,\/]*)/,B=/^#(.*)$/,C=/^((?:http|https|ftp|news):\/\/)?(.*)$/,D=/^(_(?:self|top|parent|blank))$/,E=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,F=/^javascript:([^(]+)\(([^)]+)\)$/,G=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,H=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,I=function(a,g){var c=g&&(g.data("cke-saved-href")||g.getAttribute("href"))||"",d,e,b=
8
+ {};c.match(x)&&("encode"==o?c=c.replace(E,function(a,c,b){return"mailto:"+String.fromCharCode.apply(String,c.split(","))+(b&&b.replace(/\\'/g,"'"))}):o&&c.replace(F,function(a,c,d){if(c==q){b.type="email";for(var a=b.email={},c=/(^')|('$)/g,d=d.match(/[^,\s]+/g),e=d.length,g,f,h=0;h<e;h++)g=decodeURIComponent,f=d[h].replace(c,"").replace(/\\'/g,"'"),f=g(f),g=p[h].toLowerCase(),a[g]=f;a.address=[a.name,a.domain].join("@")}}));if(!b.type)if(d=c.match(B))b.type="anchor",b.anchor={},b.anchor.name=b.anchor.id=
9
+ d[1];else if(d=c.match(y)){e=c.match(z);c=c.match(A);b.type="email";var f=b.email={};f.address=d[1];e&&(f.subject=decodeURIComponent(e[1]));c&&(f.body=decodeURIComponent(c[1]))}else c&&(e=c.match(C))?(b.type="url",b.url={},b.url.protocol=e[1],b.url.url=e[2]):b.type="url";if(g){d=g.getAttribute("target");b.target={};b.adv={};if(d)d.match(D)?b.target.type=b.target.name=d:(b.target.type="frame",b.target.name=d);else if(d=(d=g.data("cke-pa-onclick")||g.getAttribute("onclick"))&&d.match(G)){b.target.type=
10
+ "popup";for(b.target.name=d[1];c=H.exec(d[2]);)("yes"==c[2]||"1"==c[2])&&!(c[1]in{height:1,width:1,top:1,left:1})?b.target[c[1]]=!0:isFinite(c[2])&&(b.target[c[1]]=c[2])}d=function(a,c){var d=g.getAttribute(c);null!==d&&(b.adv[a]=d||"")};d("advId","id");d("advLangDir","dir");d("advAccessKey","accessKey");b.adv.advName=g.data("cke-saved-name")||g.getAttribute("name")||"";d("advLangCode","lang");d("advTabIndex","tabindex");d("advTitle","title");d("advContentType","type");CKEDITOR.plugins.link.synAnchorSelector?
11
+ b.adv.advCSSClasses=v(g):d("advCSSClasses","class");d("advCharset","charset");d("advStyles","style");d("advRel","rel")}d=b.anchors=[];var h;if(CKEDITOR.plugins.link.emptyAnchorFix){f=a.document.getElementsByTag("a");c=0;for(e=f.count();c<e;c++)if(h=f.getItem(c),h.data("cke-saved-name")||h.hasAttribute("name"))d.push({name:h.data("cke-saved-name")||h.getAttribute("name"),id:h.getAttribute("id")})}else{f=new CKEDITOR.dom.nodeList(a.document.$.anchors);c=0;for(e=f.count();c<e;c++)h=f.getItem(c),d[c]=
12
+ {name:h.getAttribute("name"),id:h.getAttribute("id")}}if(CKEDITOR.plugins.link.fakeAnchor){f=a.document.getElementsByTag("img");c=0;for(e=f.count();c<e;c++)(h=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,f.getItem(c)))&&d.push({name:h.getAttribute("name"),id:h.getAttribute("id")})}this._.selectedElement=g;return b},j=function(a){a.target&&this.setValue(a.target[this.id]||"")},k=function(a){a.adv&&this.setValue(a.adv[this.id]||"")},l=function(a){a.target||(a.target={});a.target[this.id]=this.getValue()||
13
+ ""},m=function(a){a.adv||(a.adv={});a.adv[this.id]=this.getValue()||""},o=n.config.emailProtection||"";o&&"encode"!=o&&(q=p=void 0,o.replace(/^([^(]+)\(([^)]+)\)$/,function(a,b,c){q=b;p=[];c.replace(/[^,\s]+/g,function(a){p.push(a)})}));var i=n.lang.common,b=n.lang.link;return{title:b.title,minWidth:350,minHeight:230,contents:[{id:"info",label:b.info,title:b.info,elements:[{id:"linkType",type:"select",label:b.type,"default":"url",items:[[b.toUrl,"url"],[b.toAnchor,"anchor"],[b.toEmail,"email"]],onChange:function(){var a=
14
+ this.getDialog(),b=["urlOptions","anchorOptions","emailOptions"],c=this.getValue(),d=a.definition.getContents("upload"),d=d&&d.hidden;if(c=="url"){n.config.linkShowTargetTab&&a.showPage("target");d||a.showPage("upload")}else{a.hidePage("target");d||a.hidePage("upload")}for(d=0;d<b.length;d++){var e=a.getContentElement("info",b[d]);if(e){e=e.getElement().getParent().getParent();b[d]==c+"Options"?e.show():e.hide()}}a.layout()},setup:function(a){a.type&&this.setValue(a.type)},commit:function(a){a.type=
15
+ this.getValue()}},{type:"vbox",id:"urlOptions",children:[{type:"hbox",widths:["25%","75%"],children:[{id:"protocol",type:"select",label:i.protocol,"default":"http://",items:[["http://‎","http://"],["https://‎","https://"],["ftp://‎","ftp://"],["news://‎","news://"],[b.other,""]],setup:function(a){a.url&&this.setValue(a.url.protocol||"")},commit:function(a){if(!a.url)a.url={};a.url.protocol=this.getValue()}},{type:"text",id:"url",label:i.url,required:!0,onLoad:function(){this.allowOnChange=true},onKeyUp:function(){this.allowOnChange=
16
+ false;var a=this.getDialog().getContentElement("info","protocol"),b=this.getValue(),c=/^((javascript:)|[#\/\.\?])/i,d=/^(http|https|ftp|news):\/\/(?=.)/i.exec(b);if(d){this.setValue(b.substr(d[0].length));a.setValue(d[0].toLowerCase())}else c.test(b)&&a.setValue("");this.allowOnChange=true},onChange:function(){if(this.allowOnChange)this.onKeyUp()},validate:function(){var a=this.getDialog();if(a.getContentElement("info","linkType")&&a.getValueOf("info","linkType")!="url")return true;if(/javascript\:/.test(this.getValue())){alert(i.invalidValue);
17
+ return false}return this.getDialog().fakeObj?true:CKEDITOR.dialog.validate.notEmpty(b.noUrl).apply(this)},setup:function(a){this.allowOnChange=false;a.url&&this.setValue(a.url.url);this.allowOnChange=true},commit:function(a){this.onChange();if(!a.url)a.url={};a.url.url=this.getValue();this.allowOnChange=false}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().show()}},{type:"button",id:"browse",hidden:"true",filebrowser:"info:url",label:i.browseServer}]},
18
+ {type:"vbox",id:"anchorOptions",width:260,align:"center",padding:0,children:[{type:"fieldset",id:"selectAnchorText",label:b.selectAnchor,setup:function(a){a.anchors.length>0?this.getElement().show():this.getElement().hide()},children:[{type:"hbox",id:"selectAnchor",children:[{type:"select",id:"anchorName","default":"",label:b.anchorName,style:"width: 100%;",items:[[""]],setup:function(a){this.clear();this.add("");for(var b=0;b<a.anchors.length;b++)a.anchors[b].name&&this.add(a.anchors[b].name);a.anchor&&
19
+ this.setValue(a.anchor.name);(a=this.getDialog().getContentElement("info","linkType"))&&a.getValue()=="email"&&this.focus()},commit:function(a){if(!a.anchor)a.anchor={};a.anchor.name=this.getValue()}},{type:"select",id:"anchorId","default":"",label:b.anchorId,style:"width: 100%;",items:[[""]],setup:function(a){this.clear();this.add("");for(var b=0;b<a.anchors.length;b++)a.anchors[b].id&&this.add(a.anchors[b].id);a.anchor&&this.setValue(a.anchor.id)},commit:function(a){if(!a.anchor)a.anchor={};a.anchor.id=
20
+ this.getValue()}}],setup:function(a){a.anchors.length>0?this.getElement().show():this.getElement().hide()}}]},{type:"html",id:"noAnchors",style:"text-align: center;",html:'<div role="note" tabIndex="-1">'+CKEDITOR.tools.htmlEncode(b.noAnchors)+"</div>",focus:!0,setup:function(a){a.anchors.length<1?this.getElement().show():this.getElement().hide()}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().hide()}},{type:"vbox",id:"emailOptions",padding:1,children:[{type:"text",
21
+ id:"emailAddress",label:b.emailAddress,required:!0,validate:function(){var a=this.getDialog();return!a.getContentElement("info","linkType")||a.getValueOf("info","linkType")!="email"?true:CKEDITOR.dialog.validate.notEmpty(b.noEmail).apply(this)},setup:function(a){a.email&&this.setValue(a.email.address);(a=this.getDialog().getContentElement("info","linkType"))&&a.getValue()=="email"&&this.select()},commit:function(a){if(!a.email)a.email={};a.email.address=this.getValue()}},{type:"text",id:"emailSubject",
22
+ label:b.emailSubject,setup:function(a){a.email&&this.setValue(a.email.subject)},commit:function(a){if(!a.email)a.email={};a.email.subject=this.getValue()}},{type:"textarea",id:"emailBody",label:b.emailBody,rows:3,"default":"",setup:function(a){a.email&&this.setValue(a.email.body)},commit:function(a){if(!a.email)a.email={};a.email.body=this.getValue()}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().hide()}}]},{id:"target",requiredContent:"a[target]",label:b.target,
23
+ title:b.target,elements:[{type:"hbox",widths:["50%","50%"],children:[{type:"select",id:"linkTargetType",label:i.target,"default":"notSet",style:"width : 100%;",items:[[i.notSet,"notSet"],[b.targetFrame,"frame"],[b.targetPopup,"popup"],[i.targetNew,"_blank"],[i.targetTop,"_top"],[i.targetSelf,"_self"],[i.targetParent,"_parent"]],onChange:s,setup:function(a){a.target&&this.setValue(a.target.type||"notSet");s.call(this)},commit:function(a){if(!a.target)a.target={};a.target.type=this.getValue()}},{type:"text",
24
+ id:"linkTargetName",label:b.targetFrameName,"default":"",setup:function(a){a.target&&this.setValue(a.target.name)},commit:function(a){if(!a.target)a.target={};a.target.name=this.getValue().replace(/\W/gi,"")}}]},{type:"vbox",width:"100%",align:"center",padding:2,id:"popupFeatures",children:[{type:"fieldset",label:b.popupFeatures,children:[{type:"hbox",children:[{type:"checkbox",id:"resizable",label:b.popupResizable,setup:j,commit:l},{type:"checkbox",id:"status",label:b.popupStatusBar,setup:j,commit:l}]},
25
+ {type:"hbox",children:[{type:"checkbox",id:"location",label:b.popupLocationBar,setup:j,commit:l},{type:"checkbox",id:"toolbar",label:b.popupToolbar,setup:j,commit:l}]},{type:"hbox",children:[{type:"checkbox",id:"menubar",label:b.popupMenuBar,setup:j,commit:l},{type:"checkbox",id:"fullscreen",label:b.popupFullScreen,setup:j,commit:l}]},{type:"hbox",children:[{type:"checkbox",id:"scrollbars",label:b.popupScrollBars,setup:j,commit:l},{type:"checkbox",id:"dependent",label:b.popupDependent,setup:j,commit:l}]},
26
+ {type:"hbox",children:[{type:"text",widths:["50%","50%"],labelLayout:"horizontal",label:i.width,id:"width",setup:j,commit:l},{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:b.popupLeft,id:"left",setup:j,commit:l}]},{type:"hbox",children:[{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:i.height,id:"height",setup:j,commit:l},{type:"text",labelLayout:"horizontal",label:b.popupTop,widths:["50%","50%"],id:"top",setup:j,commit:l}]}]}]}]},{id:"upload",label:b.upload,title:b.upload,
27
+ hidden:!0,filebrowser:"uploadButton",elements:[{type:"file",id:"upload",label:i.upload,style:"height:40px",size:29},{type:"fileButton",id:"uploadButton",label:i.uploadSubmit,filebrowser:"info:url","for":["upload","upload"]}]},{id:"advanced",label:b.advanced,title:b.advanced,elements:[{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",id:"advId",requiredContent:"a[id]",label:b.id,setup:k,commit:m},{type:"select",id:"advLangDir",requiredContent:"a[dir]",
28
+ label:b.langDir,"default":"",style:"width:110px",items:[[i.notSet,""],[b.langDirLTR,"ltr"],[b.langDirRTL,"rtl"]],setup:k,commit:m},{type:"text",id:"advAccessKey",requiredContent:"a[accesskey]",width:"80px",label:b.acccessKey,maxLength:1,setup:k,commit:m}]},{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",label:b.name,id:"advName",requiredContent:"a[name]",setup:k,commit:m},{type:"text",label:b.langCode,id:"advLangCode",requiredContent:"a[lang]",width:"110px","default":"",setup:k,commit:m},
29
+ {type:"text",label:b.tabIndex,id:"advTabIndex",requiredContent:"a[tabindex]",width:"80px",maxLength:5,setup:k,commit:m}]}]},{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.advisoryTitle,requiredContent:"a[title]","default":"",id:"advTitle",setup:k,commit:m},{type:"text",label:b.advisoryContentType,requiredContent:"a[type]","default":"",id:"advContentType",setup:k,commit:m}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.cssClasses,
30
+ requiredContent:"a(cke-xyz)","default":"",id:"advCSSClasses",setup:k,commit:m},{type:"text",label:b.charset,requiredContent:"a[charset]","default":"",id:"advCharset",setup:k,commit:m}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.rel,requiredContent:"a[rel]","default":"",id:"advRel",setup:k,commit:m},{type:"text",label:b.styles,requiredContent:"a{cke-xyz}","default":"",id:"advStyles",validate:CKEDITOR.dialog.validate.inlineStyle(n.lang.common.invalidInlineStyle),setup:k,commit:m}]}]}]}],
31
+ onShow:function(){var a=this.getParentEditor(),b=a.getSelection(),c=null;(c=w.getSelectedLink(a))&&c.hasAttribute("href")?b.selectElement(c):c=null;this.setupContent(I.apply(this,[a,c]))},onOk:function(){var a={},b=[],c={},d=this.getParentEditor();this.commitContent(c);switch(c.type||"url"){case "url":var e=c.url&&c.url.protocol!=void 0?c.url.protocol:"http://",i=c.url&&CKEDITOR.tools.trim(c.url.url)||"";a["data-cke-saved-href"]=i.indexOf("/")===0?i:e+i;break;case "anchor":e=c.anchor&&c.anchor.id;
32
+ a["data-cke-saved-href"]="#"+(c.anchor&&c.anchor.name||e||"");break;case "email":var f=c.email,e=f.address;switch(o){case "":case "encode":var i=encodeURIComponent(f.subject||""),h=encodeURIComponent(f.body||""),f=[];i&&f.push("subject="+i);h&&f.push("body="+h);f=f.length?"?"+f.join("&"):"";if(o=="encode"){e=["javascript:void(location.href='mailto:'+",u(e)];f&&e.push("+'",r(f),"'");e.push(")")}else e=["mailto:",e,f];break;default:e=e.split("@",2);f.name=e[0];f.domain=e[1];e=["javascript:",t(f)]}a["data-cke-saved-href"]=
33
+ e.join("")}if(c.target)if(c.target.type=="popup"){for(var e=["window.open(this.href, '",c.target.name||"","', '"],j=["resizable","status","location","toolbar","menubar","fullscreen","scrollbars","dependent"],i=j.length,f=function(a){c.target[a]&&j.push(a+"="+c.target[a])},h=0;h<i;h++)j[h]=j[h]+(c.target[j[h]]?"=yes":"=no");f("width");f("left");f("height");f("top");e.push(j.join(","),"'); return false;");a["data-cke-pa-onclick"]=e.join("");b.push("target")}else{c.target.type!="notSet"&&c.target.name?
34
+ a.target=c.target.name:b.push("target");b.push("data-cke-pa-onclick","onclick")}if(c.adv){e=function(d,e){var f=c.adv[d];f?a[e]=f:b.push(e)};e("advId","id");e("advLangDir","dir");e("advAccessKey","accessKey");c.adv.advName?a.name=a["data-cke-saved-name"]=c.adv.advName:b=b.concat(["data-cke-saved-name","name"]);e("advLangCode","lang");e("advTabIndex","tabindex");e("advTitle","title");e("advContentType","type");e("advCSSClasses","class");e("advCharset","charset");e("advStyles","style");e("advRel","rel")}e=
35
+ d.getSelection();a.href=a["data-cke-saved-href"];if(this._.selectedElement){d=this._.selectedElement;i=d.data("cke-saved-href");f=d.getHtml();d.setAttributes(a);d.removeAttributes(b);c.adv&&(c.adv.advName&&CKEDITOR.plugins.link.synAnchorSelector)&&d.addClass(d.getChildCount()?"cke_anchor":"cke_anchor_empty");if(i==f||c.type=="email"&&f.indexOf("@")!=-1)d.setHtml(c.type=="email"?c.email.address:a["data-cke-saved-href"]);e.selectElement(d);delete this._.selectedElement}else{e=e.getRanges(1)[0];if(e.collapsed){d=
36
+ new CKEDITOR.dom.text(c.type=="email"?c.email.address:a["data-cke-saved-href"],d.document);e.insertNode(d);e.selectNodeContents(d)}d=new CKEDITOR.style({element:"a",attributes:a});d.type=CKEDITOR.STYLE_INLINE;d.applyToRange(e);e.select()}},onLoad:function(){n.config.linkShowAdvancedTab||this.hidePage("advanced");n.config.linkShowTargetTab||this.hidePage("target")},onFocus:function(){var a=this.getContentElement("info","linkType");if(a&&a.getValue()=="url"){a=this.getContentElement("info","url");a.select()}}}});
@@ -0,0 +1,10 @@
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
+ (function(){function d(c,d){var b;try{b=c.getSelection().getRanges()[0]}catch(f){return null}b.shrink(CKEDITOR.SHRINK_TEXT);return c.elementPath(b.getCommonAncestor()).contains(d,1)}function e(c,e){var b=c.lang.liststyle;if("bulletedListStyle"==e)return{title:b.bulletedTitle,minWidth:300,minHeight:50,contents:[{id:"info",accessKey:"I",elements:[{type:"select",label:b.type,id:"type",align:"center",style:"width:150px",items:[[b.notset,""],[b.circle,"circle"],[b.disc,"disc"],[b.square,"square"]],setup:function(a){this.setValue(a.getStyle("list-style-type")||
6
+ h[a.getAttribute("type")]||a.getAttribute("type")||"")},commit:function(a){var b=this.getValue();b?a.setStyle("list-style-type",b):a.removeStyle("list-style-type")}}]}],onShow:function(){var a=this.getParentEditor();(a=d(a,"ul"))&&this.setupContent(a)},onOk:function(){var a=this.getParentEditor();(a=d(a,"ul"))&&this.commitContent(a)}};if("numberedListStyle"==e){var g=[[b.notset,""],[b.lowerRoman,"lower-roman"],[b.upperRoman,"upper-roman"],[b.lowerAlpha,"lower-alpha"],[b.upperAlpha,"upper-alpha"],
7
+ [b.decimal,"decimal"]];(!CKEDITOR.env.ie||7<CKEDITOR.env.version)&&g.concat([[b.armenian,"armenian"],[b.decimalLeadingZero,"decimal-leading-zero"],[b.georgian,"georgian"],[b.lowerGreek,"lower-greek"]]);return{title:b.numberedTitle,minWidth:300,minHeight:50,contents:[{id:"info",accessKey:"I",elements:[{type:"hbox",widths:["25%","75%"],children:[{label:b.start,type:"text",id:"start",validate:CKEDITOR.dialog.validate.integer(b.validateStartNumber),setup:function(a){this.setValue(a.getFirst(f).getAttribute("value")||
8
+ a.getAttribute("start")||1)},commit:function(a){var b=a.getFirst(f),c=b.getAttribute("value")||a.getAttribute("start")||1;a.getFirst(f).removeAttribute("value");var d=parseInt(this.getValue(),10);isNaN(d)?a.removeAttribute("start"):a.setAttribute("start",d);a=b;b=c;for(d=isNaN(d)?1:d;(a=a.getNext(f))&&b++;)a.getAttribute("value")==b&&a.setAttribute("value",d+b-c)}},{type:"select",label:b.type,id:"type",style:"width: 100%;",items:g,setup:function(a){this.setValue(a.getStyle("list-style-type")||h[a.getAttribute("type")]||
9
+ a.getAttribute("type")||"")},commit:function(a){var b=this.getValue();b?a.setStyle("list-style-type",b):a.removeStyle("list-style-type")}}]}]}],onShow:function(){var a=this.getParentEditor();(a=d(a,"ol"))&&this.setupContent(a)},onOk:function(){var a=this.getParentEditor();(a=d(a,"ol"))&&this.commitContent(a)}}}}var f=function(c){return c.type==CKEDITOR.NODE_ELEMENT&&c.is("li")},h={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman",1:"decimal",disc:"disc",circle:"circle",square:"square"};
10
+ CKEDITOR.dialog.add("numberedListStyle",function(c){return e(c,"numberedListStyle")});CKEDITOR.dialog.add("bulletedListStyle",function(c){return e(c,"bulletedListStyle")})})();
@@ -0,0 +1,31 @@
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
+ (function(){function y(a){for(var a=a.toUpperCase(),c=z.length,b=0,f=0;f<c;++f)for(var d=z[f],e=d[1].length;a.substr(0,e)==d[1];a=a.substr(e))b+=d[0];return b}function A(a){for(var a=a.toUpperCase(),c=B.length,b=1,f=1;0<a.length;f*=c)b+=B.indexOf(a.charAt(a.length-1))*f,a=a.substr(0,a.length-1);return b}var C=CKEDITOR.htmlParser.fragment.prototype,o=CKEDITOR.htmlParser.element.prototype;C.onlyChild=o.onlyChild=function(){var a=this.children;return 1==a.length&&a[0]||null};o.removeAnyChildWithName=
6
+ function(a){for(var c=this.children,b=[],f,d=0;d<c.length;d++)f=c[d],f.name&&(f.name==a&&(b.push(f),c.splice(d--,1)),b=b.concat(f.removeAnyChildWithName(a)));return b};o.getAncestor=function(a){for(var c=this.parent;c&&(!c.name||!c.name.match(a));)c=c.parent;return c};C.firstChild=o.firstChild=function(a){for(var c,b=0;b<this.children.length;b++)if(c=this.children[b],a(c)||c.name&&(c=c.firstChild(a)))return c;return null};o.addStyle=function(a,c,b){var f="";if("string"==typeof c)f+=a+":"+c+";";else{if("object"==
7
+ typeof a)for(var d in a)a.hasOwnProperty(d)&&(f+=d+":"+a[d]+";");else f+=a;b=c}this.attributes||(this.attributes={});a=this.attributes.style||"";a=(b?[f,a]:[a,f]).join(";");this.attributes.style=a.replace(/^;|;(?=;)/,"")};o.getStyle=function(a){var c=this.attributes.style;if(c)return c=CKEDITOR.tools.parseCssText(c,1),c[a]};CKEDITOR.dtd.parentOf=function(a){var c={},b;for(b in this)-1==b.indexOf("$")&&this[b][a]&&(c[b]=1);return c};var H=/^([.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i,
8
+ D=/^(?:\b0[^\s]*\s*){1,4}$/,x={ol:{decimal:/\d+/,"lower-roman":/^m{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})$/,"upper-roman":/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/,"lower-alpha":/^[a-z]+$/,"upper-alpha":/^[A-Z]+$/},ul:{disc:/[l\u00B7\u2002]/,circle:/[\u006F\u00D8]/,square:/[\u006E\u25C6]/}},z=[[1E3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],B="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s=0,t=null,w,E=CKEDITOR.plugins.pastefromword=
9
+ {utils:{createListBulletMarker:function(a,c){var b=new CKEDITOR.htmlParser.element("cke:listbullet");b.attributes={"cke:listsymbol":a[0]};b.add(new CKEDITOR.htmlParser.text(c));return b},isListBulletIndicator:function(a){if(/mso-list\s*:\s*Ignore/i.test(a.attributes&&a.attributes.style))return!0},isContainingOnlySpaces:function(a){var c;return(c=a.onlyChild())&&/^(:?\s|&nbsp;)+$/.test(c.value)},resolveList:function(a){var c=a.attributes,b;if((b=a.removeAnyChildWithName("cke:listbullet"))&&b.length&&
10
+ (b=b[0]))return a.name="cke:li",c.style&&(c.style=E.filters.stylesFilter([["text-indent"],["line-height"],[/^margin(:?-left)?$/,null,function(a){a=a.split(" ");a=CKEDITOR.tools.convertToPx(a[3]||a[1]||a[0]);!s&&(null!==t&&a>t)&&(s=a-t);t=a;c["cke:indent"]=s&&Math.ceil(a/s)+1||1}],[/^mso-list$/,null,function(a){var a=a.split(" "),b=Number(a[0].match(/\d+/)),a=Number(a[1].match(/\d+/));1==a&&(b!==w&&(c["cke:reset"]=1),w=b);c["cke:indent"]=a}]])(c.style,a)||""),c["cke:indent"]||(t=0,c["cke:indent"]=
11
+ 1),CKEDITOR.tools.extend(c,b.attributes),!0;w=t=s=null;return!1},getStyleComponents:function(){var a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a);return function(c,b,f){a.setStyle(c,b);for(var c={},b=f.length,d=0;d<b;d++)c[f[d]]=a.getStyle(f[d]);return c}}(),listDtdParents:CKEDITOR.dtd.parentOf("ol")},filters:{flattenList:function(a,c){var c="number"==typeof c?c:1,b=a.attributes,f;switch(b.type){case "a":f=
12
+ "lower-alpha";break;case "1":f="decimal"}for(var d=a.children,e,h=0;h<d.length;h++)if(e=d[h],e.name in CKEDITOR.dtd.$listItem){var j=e.attributes,g=e.children,m=g[g.length-1];m.name in CKEDITOR.dtd.$list&&(a.add(m,h+1),--g.length||d.splice(h--,1));e.name="cke:li";b.start&&!h&&(j.value=b.start);E.filters.stylesFilter([["tab-stops",null,function(a){(a=a.split(" ")[1].match(H))&&(t=CKEDITOR.tools.convertToPx(a[0]))}],1==c?["mso-list",null,function(a){a=a.split(" ");a=Number(a[0].match(/\d+/));a!==w&&
13
+ (j["cke:reset"]=1);w=a}]:null])(j.style);j["cke:indent"]=c;j["cke:listtype"]=a.name;j["cke:list-style-type"]=f}else if(e.name in CKEDITOR.dtd.$list){arguments.callee.apply(this,[e,c+1]);d=d.slice(0,h).concat(e.children).concat(d.slice(h+1));a.children=[];e=0;for(g=d.length;e<g;e++)a.add(d[e])}delete a.name;b["cke:list"]=1},assembleList:function(a){for(var c=a.children,b,f,d,e,h,j,a=[],g,m,i,l,k,p,n=0;n<c.length;n++)if(b=c[n],"cke:li"==b.name)if(b.name="li",f=b.attributes,i=(i=f["cke:listsymbol"])&&
14
+ i.match(/^(?:[(]?)([^\s]+?)([.)]?)$/),l=k=p=null,f["cke:ignored"])c.splice(n--,1);else{f["cke:reset"]&&(j=e=h=null);d=Number(f["cke:indent"]);d!=e&&(m=g=null);if(i){if(m&&x[m][g].test(i[1]))l=m,k=g;else for(var q in x)for(var u in x[q])if(x[q][u].test(i[1]))if("ol"==q&&/alpha|roman/.test(u)){if(g=/roman/.test(u)?y(i[1]):A(i[1]),!p||g<p)p=g,l=q,k=u}else{l=q;k=u;break}!l&&(l=i[2]?"ol":"ul")}else l=f["cke:listtype"]||"ol",k=f["cke:list-style-type"];m=l;g=k||("ol"==l?"decimal":"disc");k&&k!=("ol"==l?
15
+ "decimal":"disc")&&b.addStyle("list-style-type",k);if("ol"==l&&i){switch(k){case "decimal":p=Number(i[1]);break;case "lower-roman":case "upper-roman":p=y(i[1]);break;case "lower-alpha":case "upper-alpha":p=A(i[1])}b.attributes.value=p}if(j){if(d>e)a.push(j=new CKEDITOR.htmlParser.element(l)),j.add(b),h.add(j);else{if(d<e){e-=d;for(var r;e--&&(r=j.parent);)j=r.parent}j.add(b)}c.splice(n--,1)}else a.push(j=new CKEDITOR.htmlParser.element(l)),j.add(b),c[n]=j;h=b;e=d}else j&&(j=e=h=null);for(n=0;n<a.length;n++)if(j=
16
+ a[n],q=j.children,g=g=void 0,u=j.children.length,r=g=void 0,c=/list-style-type:(.*?)(?:;|$)/,e=CKEDITOR.plugins.pastefromword.filters.stylesFilter,g=j.attributes,!c.exec(g.style)){for(h=0;h<u;h++)if(g=q[h],g.attributes.value&&Number(g.attributes.value)==h+1&&delete g.attributes.value,g=c.exec(g.attributes.style))if(g[1]==r||!r)r=g[1];else{r=null;break}if(r){for(h=0;h<u;h++)g=q[h].attributes,g.style&&(g.style=e([["list-style-type"]])(g.style)||"");j.addStyle("list-style-type",r)}}w=t=s=null},falsyFilter:function(){return!1},
17
+ stylesFilter:function(a,c){return function(b,f){var d=[];(b||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(b,e,g){e=e.toLowerCase();"font-family"==e&&(g=g.replace(/["']/g,""));for(var m,i,l,k=0;k<a.length;k++)if(a[k]&&(b=a[k][0],m=a[k][1],i=a[k][2],l=a[k][3],e.match(b)&&(!m||g.match(m)))){e=l||e;c&&(i=i||g);"function"==typeof i&&(i=i(g,f,e));i&&i.push&&(e=i[0],i=i[1]);"string"==typeof i&&d.push([e,i]);return}!c&&d.push([e,g])});for(var e=0;e<d.length;e++)d[e]=
18
+ d[e].join(":");return d.length?d.join(";")+";":!1}},elementMigrateFilter:function(a,c){return a?function(b){var f=c?(new CKEDITOR.style(a,c))._.definition:a;b.name=f.element;CKEDITOR.tools.extend(b.attributes,CKEDITOR.tools.clone(f.attributes));b.addStyle(CKEDITOR.style.getStyleText(f))}:function(){}},styleMigrateFilter:function(a,c){var b=this.elementMigrateFilter;return a?function(f,d){var e=new CKEDITOR.htmlParser.element(null),h={};h[c]=f;b(a,h)(e);e.children=d.children;d.children=[e]}:function(){}},
19
+ bogusAttrFilter:function(a,c){if(-1==c.name.indexOf("cke:"))return!1},applyStyleFilter:null},getRules:function(a,c){var b=CKEDITOR.dtd,f=CKEDITOR.tools.extend({},b.$block,b.$listItem,b.$tableContent),d=a.config,e=this.filters,h=e.falsyFilter,j=e.stylesFilter,g=e.elementMigrateFilter,m=CKEDITOR.tools.bind(this.filters.styleMigrateFilter,this.filters),i=this.utils.createListBulletMarker,l=e.flattenList,k=e.assembleList,p=this.utils.isListBulletIndicator,n=this.utils.isContainingOnlySpaces,q=this.utils.resolveList,
20
+ u=function(a){a=CKEDITOR.tools.convertToPx(a);return isNaN(a)?a:a+"px"},r=this.utils.getStyleComponents,t=this.utils.listDtdParents,o=!1!==d.pasteFromWordRemoveFontStyles,s=!1!==d.pasteFromWordRemoveStyles;return{elementNames:[[/meta|link|script/,""]],root:function(a){a.filterChildren(c);k(a)},elements:{"^":function(a){var c;CKEDITOR.env.gecko&&(c=e.applyStyleFilter)&&c(a)},$:function(a){var v=a.name||"",e=a.attributes;v in f&&e.style&&(e.style=j([[/^(:?width|height)$/,null,u]])(e.style)||"");if(v.match(/h\d/)){a.filterChildren(c);
21
+ if(q(a))return;g(d["format_"+v])(a)}else if(v in b.$inline)a.filterChildren(c),n(a)&&delete a.name;else if(-1!=v.indexOf(":")&&-1==v.indexOf("cke")){a.filterChildren(c);if("v:imagedata"==v){if(v=a.attributes["o:href"])a.attributes.src=v;a.name="img";return}delete a.name}v in t&&(a.filterChildren(c),k(a))},style:function(a){if(CKEDITOR.env.gecko){var a=(a=a.onlyChild().value.match(/\/\* Style Definitions \*\/([\s\S]*?)\/\*/))&&a[1],c={};a&&(a.replace(/[\n\r]/g,"").replace(/(.+?)\{(.+?)\}/g,function(a,
22
+ b,F){for(var b=b.split(","),a=b.length,d=0;d<a;d++)CKEDITOR.tools.trim(b[d]).replace(/^(\w+)(\.[\w-]+)?$/g,function(a,b,d){b=b||"*";d=d.substring(1,d.length);d.match(/MsoNormal/)||(c[b]||(c[b]={}),d?c[b][d]=F:c[b]=F)})}),e.applyStyleFilter=function(a){var b=c["*"]?"*":a.name,d=a.attributes&&a.attributes["class"];b in c&&(b=c[b],"object"==typeof b&&(b=b[d]),b&&a.addStyle(b,!0))})}return!1},p:function(a){if(/MsoListParagraph/i.exec(a.attributes["class"])||a.getStyle("mso-list")){var b=a.firstChild(function(a){return a.type==
23
+ CKEDITOR.NODE_TEXT&&!n(a.parent)});(b=b&&b.parent)&&b.addStyle("mso-list","Ignore")}a.filterChildren(c);q(a)||(d.enterMode==CKEDITOR.ENTER_BR?(delete a.name,a.add(new CKEDITOR.htmlParser.element("br"))):g(d["format_"+(d.enterMode==CKEDITOR.ENTER_P?"p":"div")])(a))},div:function(a){var c=a.onlyChild();if(c&&"table"==c.name){var b=a.attributes;c.attributes=CKEDITOR.tools.extend(c.attributes,b);b.style&&c.addStyle(b.style);c=new CKEDITOR.htmlParser.element("div");c.addStyle("clear","both");a.add(c);
24
+ delete a.name}},td:function(a){a.getAncestor("thead")&&(a.name="th")},ol:l,ul:l,dl:l,font:function(a){if(p(a.parent))delete a.name;else{a.filterChildren(c);var b=a.attributes,d=b.style,e=a.parent;"font"==e.name?(CKEDITOR.tools.extend(e.attributes,a.attributes),d&&e.addStyle(d),delete a.name):(d=d||"",b.color&&("#000000"!=b.color&&(d+="color:"+b.color+";"),delete b.color),b.face&&(d+="font-family:"+b.face+";",delete b.face),b.size&&(d+="font-size:"+(3<b.size?"large":3>b.size?"small":"medium")+";",
25
+ delete b.size),a.name="span",a.addStyle(d))}},span:function(a){if(p(a.parent))return!1;a.filterChildren(c);if(n(a))return delete a.name,null;if(p(a)){var b=a.firstChild(function(a){return a.value||"img"==a.name}),e=(b=b&&(b.value||"l."))&&b.match(/^(?:[(]?)([^\s]+?)([.)]?)$/);if(e)return b=i(e,b),(a=a.getAncestor("span"))&&/ mso-hide:\s*all|display:\s*none /.test(a.attributes.style)&&(b.attributes["cke:ignored"]=1),b}if(e=(b=a.attributes)&&b.style)b.style=j([["line-height"],[/^font-family$/,null,
26
+ !o?m(d.font_style,"family"):null],[/^font-size$/,null,!o?m(d.fontSize_style,"size"):null],[/^color$/,null,!o?m(d.colorButton_foreStyle,"color"):null],[/^background-color$/,null,!o?m(d.colorButton_backStyle,"color"):null]])(e,a)||"";b.style||delete b.style;CKEDITOR.tools.isEmpty(b)&&delete a.name;return null},b:g(d.coreStyles_bold),i:g(d.coreStyles_italic),u:g(d.coreStyles_underline),s:g(d.coreStyles_strike),sup:g(d.coreStyles_superscript),sub:g(d.coreStyles_subscript),a:function(a){var b=a.attributes;
27
+ b&&!b.href&&b.name?delete a.name:CKEDITOR.env.webkit&&(b.href&&b.href.match(/file:\/\/\/[\S]+#/i))&&(b.href=b.href.replace(/file:\/\/\/[^#]+/i,""))},"cke:listbullet":function(a){a.getAncestor(/h\d/)&&!d.pasteFromWordNumberedHeadingToList&&delete a.name}},attributeNames:[[/^onmouse(:?out|over)/,""],[/^onload$/,""],[/(?:v|o):\w+/,""],[/^lang/,""]],attributes:{style:j(s?[[/^list-style-type$/,null],[/^margin$|^margin-(?!bottom|top)/,null,function(a,b,c){if(b.name in{p:1,div:1}){b="ltr"==d.contentsLangDirection?
28
+ "margin-left":"margin-right";if("margin"==c)a=r(c,a,[b])[b];else if(c!=b)return null;if(a&&!D.test(a))return[b,a]}return null}],[/^clear$/],[/^border.*|margin.*|vertical-align|float$/,null,function(a,b){if("img"==b.name)return a}],[/^width|height$/,null,function(a,b){if(b.name in{table:1,td:1,th:1,img:1})return a}]]:[[/^mso-/],[/-color$/,null,function(a){if("transparent"==a)return!1;if(CKEDITOR.env.gecko)return a.replace(/-moz-use-text-color/g,"transparent")}],[/^margin$/,D],["text-indent","0cm"],
29
+ ["page-break-before"],["tab-stops"],["display","none"],o?[/font-?/]:null],s),width:function(a,c){if(c.name in b.$tableContent)return!1},border:function(a,c){if(c.name in b.$tableContent)return!1},"class":h,bgcolor:h,valign:s?h:function(a,b){b.addStyle("vertical-align",a);return!1}},comment:!CKEDITOR.env.ie?function(a,b){var c=a.match(/<img.*?>/),d=a.match(/^\[if !supportLists\]([\s\S]*?)\[endif\]$/);return d?(d=(c=d[1]||c&&"l.")&&c.match(/>(?:[(]?)([^\s]+?)([.)]?)</),i(d,c)):CKEDITOR.env.gecko&&c?
30
+ (c=CKEDITOR.htmlParser.fragment.fromHtml(c[0]).children[0],(d=(d=(d=b.previous)&&d.value.match(/<v:imagedata[^>]*o:href=['"](.*?)['"]/))&&d[1])&&(c.attributes.src=d),c):!1}:h}}},G=function(){this.dataFilter=new CKEDITOR.htmlParser.filter};G.prototype={toHtml:function(a){var a=CKEDITOR.htmlParser.fragment.fromHtml(a),c=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(c,this.dataFilter);return c.getHtml(!0)}};CKEDITOR.cleanWord=function(a,c){CKEDITOR.env.gecko&&(a=a.replace(/(<\!--\[if[^<]*?\])--\>([\S\s]*?)<\!--(\[endif\]--\>)/gi,
31
+ "$1$2$3"));CKEDITOR.env.webkit&&(a=a.replace(/(class="MsoListParagraph[^>]+><\!--\[if !supportLists\]--\>)([^<]+<span[^<]+<\/span>)(<\!--\[endif\]--\>)/gi,"$1<span>$2</span>$3"));var b=new G,f=b.dataFilter;f.addRules(CKEDITOR.plugins.pastefromword.getRules(c,f));c.fire("beforeCleanWord",{filter:f});try{a=b.toHtml(a)}catch(d){alert(c.lang.pastefromword.error)}a=a.replace(/cke:.*?".*?"/g,"");a=a.replace(/style=""/g,"");return a=a.replace(/<span>/g,"")}})();
@@ -0,0 +1,10 @@
1
+ <script>
2
+
3
+ var doc = document;
4
+ doc.open();
5
+ doc.write( window.opener._cke_htmlToLoad );
6
+ doc.close();
7
+
8
+ delete window.opener._cke_htmlToLoad;
9
+
10
+ </script>
@@ -0,0 +1,28 @@
1
+ Software License Agreement
2
+ ==========================
3
+
4
+ **CKEditor SCAYT Plugin**
5
+ Copyright &copy; 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved.
6
+
7
+ Licensed under the terms of any of the following licenses at your choice:
8
+
9
+ * GNU General Public License Version 2 or later (the "GPL"):
10
+ http://www.gnu.org/licenses/gpl.html
11
+
12
+ * GNU Lesser General Public License Version 2.1 or later (the "LGPL"):
13
+ http://www.gnu.org/licenses/lgpl.html
14
+
15
+ * Mozilla Public License Version 1.1 or later (the "MPL"):
16
+ http://www.mozilla.org/MPL/MPL-1.1.html
17
+
18
+ You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice.
19
+
20
+ Sources of Intellectual Property Included in this plugin
21
+ --------------------------------------------------------
22
+
23
+ Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission.
24
+
25
+ Trademarks
26
+ ----------
27
+
28
+ CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
@@ -0,0 +1,25 @@
1
+ CKEditor SCAYT Plugin
2
+ =====================
3
+
4
+ This plugin brings Spell Check As You Type (SCAYT) into CKEditor.
5
+
6
+ SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution.
7
+
8
+ Installation
9
+ ------------
10
+
11
+ 1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation.
12
+ 2. Enable the "scayt" plugin in the CKEditor configuration file (config.js):
13
+
14
+ config.extraPlugins = 'scayt';
15
+
16
+ That's all. SCAYT will appear on the editor toolbar and will be ready to use.
17
+
18
+ License
19
+ -------
20
+
21
+ Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
22
+
23
+ See LICENSE.md for more information.
24
+
25
+ Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/).
@@ -0,0 +1,20 @@
1
+ /*
2
+ Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.dialog.add("scaytcheck",function(j){function w(){return"undefined"!=typeof document.forms["optionsbar_"+a]?document.forms["optionsbar_"+a].options:[]}function x(b,a){if(b){var e=b.length;if(void 0==e)b.checked=b.value==a.toString();else for(var d=0;d<e;d++)b[d].checked=!1,b[d].value==a.toString()&&(b[d].checked=!0)}}function n(b){f.getById("dic_message_"+a).setHtml('<span style="color:red;">'+b+"</span>")}function o(b){f.getById("dic_message_"+a).setHtml('<span style="color:blue;">'+b+"</span>")}
6
+ function p(b){for(var b=(""+b).split(","),a=0,e=b.length;a<e;a+=1)f.getById(b[a]).$.style.display="inline"}function q(b){for(var b=(""+b).split(","),a=0,e=b.length;a<e;a+=1)f.getById(b[a]).$.style.display="none"}function r(b){f.getById("dic_name_"+a).$.value=b}var s=!0,h,f=CKEDITOR.document,a=j.name,l=CKEDITOR.plugins.scayt.getUiTabs(j),g,t=[],u=0,m=["dic_create_"+a+",dic_restore_"+a,"dic_rename_"+a+",dic_delete_"+a],v=["mixedCase","mixedWithDigits","allCaps","ignoreDomainNames"];g=j.lang.scayt;var z=
7
+ [{id:"options",label:g.optionsTab,elements:[{type:"html",id:"options",html:'<form name="optionsbar_'+a+'"><div class="inner_options">\t<div class="messagebox"></div>\t<div style="display:none;">\t\t<input type="checkbox" name="options" id="allCaps_'+a+'" />\t\t<label style = "display: inline" for="allCaps" id="label_allCaps_'+a+'"></label>\t</div>\t<div style="display:none;">\t\t<input name="options" type="checkbox" id="ignoreDomainNames_'+a+'" />\t\t<label style = "display: inline" for="ignoreDomainNames" id="label_ignoreDomainNames_'+
8
+ a+'"></label>\t</div>\t<div style="display:none;">\t<input name="options" type="checkbox" id="mixedCase_'+a+'" />\t\t<label style = "display: inline" for="mixedCase" id="label_mixedCase_'+a+'"></label>\t</div>\t<div style="display:none;">\t\t<input name="options" type="checkbox" id="mixedWithDigits_'+a+'" />\t\t<label style = "display: inline" for="mixedWithDigits" id="label_mixedWithDigits_'+a+'"></label>\t</div></div></form>'}]},{id:"langs",label:g.languagesTab,elements:[{type:"html",id:"langs",
9
+ html:'<form name="languagesbar_'+a+'"><div class="inner_langs">\t<div class="messagebox"></div>\t <div style="float:left;width:45%;margin-left:5px;" id="scayt_lcol_'+a+'" ></div> <div style="float:left;width:45%;margin-left:15px;" id="scayt_rcol_'+a+'"></div></div></form>'}]},{id:"dictionaries",label:g.dictionariesTab,elements:[{type:"html",style:"",id:"dictionaries",html:'<form name="dictionarybar_'+a+'"><div class="inner_dictionary" style="text-align:left; white-space:normal; width:320px; overflow: hidden;">\t<div style="margin:5px auto; width:95%;white-space:normal; overflow:hidden;" id="dic_message_'+
10
+ a+'"> </div>\t<div style="margin:5px auto; width:95%;white-space:normal;"> <span class="cke_dialog_ui_labeled_label" >Dictionary name</span><br>\t\t<span class="cke_dialog_ui_labeled_content" >\t\t\t<div class="cke_dialog_ui_input_text">\t\t\t\t<input id="dic_name_'+a+'" type="text" class="cke_dialog_ui_input_text" style = "height: 25px; background: none; padding: 0;"/>\t\t</div></span></div>\t\t<div style="margin:5px auto; width:95%;white-space:normal;">\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_create_'+
11
+ a+'">\t\t\t\t</a>\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_delete_'+a+'">\t\t\t\t</a>\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_rename_'+a+'">\t\t\t\t</a>\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_restore_'+a+'">\t\t\t\t</a>\t\t</div>\t<div style="margin:5px auto; width:95%;white-space:normal;" id="dic_info_'+a+'"></div></div></form>'}]},{id:"about",
12
+ label:g.aboutTab,elements:[{type:"html",id:"about",style:"margin: 5px 5px;",html:'<div id="scayt_about_'+a+'"></div>'}]}],B={title:g.title,minWidth:360,minHeight:220,onShow:function(){var b=this;b.data=j.fire("scaytDialog",{});b.options=b.data.scayt_control.option();b.chosed_lang=b.sLang=b.data.scayt_control.sLang;if(!b.data||!b.data.scayt||!b.data.scayt_control)alert("Error loading application service"),b.hide();else{var a=0;s?b.data.scayt.getCaption(j.langCode||"en",function(e){0<a++||(h=e,A.apply(b),
13
+ y.apply(b),s=!1)}):y.apply(b);b.selectPage(b.data.tab)}},onOk:function(){var a=this.data.scayt_control;a.option(this.options);a.setLang(this.chosed_lang);a.refresh()},onCancel:function(){var b=w(),f;for(f in b)b[f].checked=!1;b="undefined"!=typeof document.forms["languagesbar_"+a]?document.forms["languagesbar_"+a].scayt_lang:[];x(b,"")},contents:t};CKEDITOR.plugins.scayt.getScayt(j);for(g=0;g<l.length;g++)1==l[g]&&(t[t.length]=z[g]);1==l[2]&&(u=1);var A=function(){function b(b){var c=f.getById("dic_name_"+
14
+ a).getValue();if(!c)return n(" Dictionary name should not be empty. "),!1;try{var d=b.data.getTarget().getParent(),e=/(dic_\w+)_[\w\d]+/.exec(d.getId())[1];j[e].apply(null,[d,c,m])}catch(C){n(" Dictionary error. ")}return!0}var k=this,e=k.data.scayt.getLangList(),d=["dic_create","dic_delete","dic_rename","dic_restore"],g=[],i=[],c;if(u){for(c=0;c<d.length;c++)g[c]=d[c]+"_"+a,f.getById(g[c]).setHtml('<span class="cke_dialog_ui_button">'+h["button_"+d[c]]+"</span>");f.getById("dic_info_"+a).setHtml(h.dic_info)}if(1==
15
+ l[0])for(c in v)d="label_"+v[c],g=f.getById(d+"_"+a),"undefined"!=typeof g&&("undefined"!=typeof h[d]&&"undefined"!=typeof k.options[v[c]])&&(g.setHtml(h[d]),g.getParent().$.style.display="block");d='<p><img src="'+window.scayt.getAboutInfo().logoURL+'" /></p><p>'+h.version+window.scayt.getAboutInfo().version.toString()+"</p><p>"+h.about_throwt_copy+"</p>";f.getById("scayt_about_"+a).setHtml(d);d=function(a,b){var c=f.createElement("label");c.setAttribute("for","cke_option"+a);c.setStyle("display",
16
+ "inline");c.setHtml(b[a]);k.sLang==a&&(k.chosed_lang=a);var d=f.createElement("div"),e=CKEDITOR.dom.element.createFromHtml('<input class = "cke_dialog_ui_radio_input" id="cke_option'+a+'" type="radio" '+(k.sLang==a?'checked="checked"':"")+' value="'+a+'" name="scayt_lang" />');e.on("click",function(){this.$.checked=true;k.chosed_lang=a});d.append(e);d.append(c);return{lang:b[a],code:a,radio:d}};if(1==l[1]){for(c in e.rtl)i[i.length]=d(c,e.ltr);for(c in e.ltr)i[i.length]=d(c,e.ltr);i.sort(function(a,
17
+ b){return b.lang>a.lang?-1:1});e=f.getById("scayt_lcol_"+a);d=f.getById("scayt_rcol_"+a);for(c=0;c<i.length;c++)(c<i.length/2?e:d).append(i[c].radio)}var j={dic_create:function(a,b,c){var d=c[0]+","+c[1],e=h.err_dic_create,f=h.succ_dic_create;window.scayt.createUserDictionary(b,function(a){q(d);p(c[1]);f=f.replace("%s",a.dname);o(f)},function(a){e=e.replace("%s",a.dname);n(e+"( "+(a.message||"")+")")})},dic_rename:function(a,b){var c=h.err_dic_rename||"",d=h.succ_dic_rename||"";window.scayt.renameUserDictionary(b,
18
+ function(a){d=d.replace("%s",a.dname);r(b);o(d)},function(a){c=c.replace("%s",a.dname);r(b);n(c+"( "+(a.message||"")+" )")})},dic_delete:function(a,b,c){var d=c[0]+","+c[1],e=h.err_dic_delete,f=h.succ_dic_delete;window.scayt.deleteUserDictionary(function(a){f=f.replace("%s",a.dname);q(d);p(c[0]);r("");o(f)},function(a){e=e.replace("%s",a.dname);n(e)})}};j.dic_restore=k.dic_restore||function(a,b,c){var d=c[0]+","+c[1],e=h.err_dic_restore,f=h.succ_dic_restore;window.scayt.restoreUserDictionary(b,function(a){f=
19
+ f.replace("%s",a.dname);q(d);p(c[1]);o(f)},function(a){e=e.replace("%s",a.dname);n(e)})};i=(m[0]+","+m[1]).split(",");c=0;for(e=i.length;c<e;c+=1)if(d=f.getById(i[c]))d.on("click",b,this)},y=function(){var b=this;if(1==l[0])for(var g=w(),e=0,d=g.length;e<d;e++){var h=g[e].id,i=f.getById(h);if(i&&(g[e].checked=!1,1==b.options[h.split("_")[0]]&&(g[e].checked=!0),s))i.on("click",function(){b.options[this.getId().split("_")[0]]=this.$.checked?1:0})}1==l[1]&&(g=f.getById("cke_option"+b.sLang),x(g.$,b.sLang));
20
+ u&&(window.scayt.getNameUserDictionary(function(b){b=b.dname;q(m[0]+","+m[1]);if(b){f.getById("dic_name_"+a).setValue(b);p(m[1])}else p(m[0])},function(){f.getById("dic_name_"+a).setValue("")}),o(""))};return B});
@@ -0,0 +1,71 @@
1
+ a
2
+ {
3
+ text-decoration:none;
4
+ padding: 2px 4px 4px 6px;
5
+ display : block;
6
+ border-width: 1px;
7
+ border-style: solid;
8
+ margin : 0px;
9
+ }
10
+
11
+ a.cke_scayt_toogle:hover,
12
+ a.cke_scayt_toogle:focus,
13
+ a.cke_scayt_toogle:active
14
+ {
15
+ border-color: #316ac5;
16
+ background-color: #dff1ff;
17
+ color : #000;
18
+ cursor: pointer;
19
+ margin : 0px;
20
+ }
21
+ a.cke_scayt_toogle {
22
+ color : #316ac5;
23
+ border-color: #fff;
24
+ }
25
+ .scayt_enabled a.cke_scayt_item {
26
+ color : #316ac5;
27
+ border-color: #fff;
28
+ margin : 0px;
29
+ }
30
+ .scayt_disabled a.cke_scayt_item {
31
+ color : gray;
32
+ border-color : #fff;
33
+ }
34
+ .scayt_enabled a.cke_scayt_item:hover,
35
+ .scayt_enabled a.cke_scayt_item:focus,
36
+ .scayt_enabled a.cke_scayt_item:active
37
+ {
38
+ border-color: #316ac5;
39
+ background-color: #dff1ff;
40
+ color : #000;
41
+ cursor: pointer;
42
+ }
43
+ .scayt_disabled a.cke_scayt_item:hover,
44
+ .scayt_disabled a.cke_scayt_item:focus,
45
+ .scayt_disabled a.cke_scayt_item:active
46
+ {
47
+ border-color: gray;
48
+ background-color: #dff1ff;
49
+ color : gray;
50
+ cursor: no-drop;
51
+ }
52
+ .cke_scayt_set_on, .cke_scayt_set_off
53
+ {
54
+ display: none;
55
+ }
56
+ .scayt_enabled .cke_scayt_set_on
57
+ {
58
+ display: none;
59
+ }
60
+ .scayt_disabled .cke_scayt_set_on
61
+ {
62
+ display: inline;
63
+ }
64
+ .scayt_disabled .cke_scayt_set_off
65
+ {
66
+ display: none;
67
+ }
68
+ .scayt_enabled .cke_scayt_set_off
69
+ {
70
+ display: inline;
71
+ }
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
2
+ For licensing, see LICENSE.html or http://ckeditor.com/license
3
+
4
+ cs.js Found: 118 Missing: 0
5
+ cy.js Found: 118 Missing: 0
6
+ de.js Found: 118 Missing: 0
7
+ el.js Found: 16 Missing: 102
8
+ eo.js Found: 118 Missing: 0
9
+ et.js Found: 31 Missing: 87
10
+ fa.js Found: 24 Missing: 94
11
+ fi.js Found: 23 Missing: 95
12
+ fr.js Found: 118 Missing: 0
13
+ hr.js Found: 23 Missing: 95
14
+ it.js Found: 118 Missing: 0
15
+ nb.js Found: 118 Missing: 0
16
+ nl.js Found: 118 Missing: 0
17
+ no.js Found: 118 Missing: 0
18
+ tr.js Found: 118 Missing: 0
19
+ ug.js Found: 39 Missing: 79
20
+ zh-cn.js Found: 118 Missing: 0
@@ -0,0 +1,13 @@
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.plugins.setLang("specialchar","ca",{euro:"Símbol d'euro",lsquo:"Signe de cometa simple esquerra",rsquo:"Signe de cometa simple dreta",ldquo:"Signe de cometa doble esquerra",rdquo:"Signe de cometa doble dreta",ndash:"Guió",mdash:"Guió baix",iexcl:"Signe d'exclamació inversa",cent:"Símbol de percentatge",pound:"Símbol de lliura",curren:"Símbol de moneda",yen:"Símbol de Yen",brvbar:"Broken bar",sect:"Section sign",uml:"Dièresi",copy:"Símbol de Copyright",ordf:"Feminine ordinal indicator",laquo:"Left-pointing double angle quotation mark",
6
+ not:"Not sign",reg:"Símbol registrat",macr:"Macron",deg:"Degree sign",sup2:"Superscript two",sup3:"Superscript three",acute:"Acute accent",micro:"Micro sign",para:"Pilcrow sign",middot:"Middle dot",cedil:"Cedilla",sup1:"Superscript one",ordm:"Masculine ordinal indicator",raquo:"Right-pointing double angle quotation mark",frac14:"Vulgar fraction one quarter",frac12:"Vulgar fraction one half",frac34:"Vulgar fraction three quarters",iquest:"Inverted question mark",Agrave:"Latin capital letter A with grave accent",
7
+ Aacute:"Latin capital letter A with acute accent",Acirc:"Latin capital letter A with circumflex",Atilde:"Latin capital letter A with tilde",Auml:"Latin capital letter A with diaeresis",Aring:"Latin capital letter A with ring above",AElig:"Latin Capital letter Æ",Ccedil:"Latin capital letter C with cedilla",Egrave:"Latin capital letter E with grave accent",Eacute:"Latin capital letter E with acute accent",Ecirc:"Latin capital letter E with circumflex",Euml:"Latin capital letter E with diaeresis",Igrave:"Latin capital letter I with grave accent",
8
+ Iacute:"Latin capital letter I with acute accent",Icirc:"Latin capital letter I with circumflex",Iuml:"Latin capital letter I with diaeresis",ETH:"Latin capital letter Eth",Ntilde:"Latin capital letter N with tilde",Ograve:"Latin capital letter O with grave accent",Oacute:"Latin capital letter O with acute accent",Ocirc:"Latin capital letter O with circumflex",Otilde:"Latin capital letter O with tilde",Ouml:"Latin capital letter O with diaeresis",times:"Multiplication sign",Oslash:"Latin capital letter O with stroke",
9
+ Ugrave:"Latin capital letter U with grave accent",Uacute:"Latin capital letter U with acute accent",Ucirc:"Latin capital letter U with circumflex",Uuml:"Latin capital letter U with diaeresis",Yacute:"Latin capital letter Y with acute accent",THORN:"Latin capital letter Thorn",szlig:"Latin small letter sharp s",agrave:"Latin small letter a with grave accent",aacute:"Latin small letter a with acute accent",acirc:"Latin small letter a with circumflex",atilde:"Latin small letter a with tilde",auml:"Latin small letter a with diaeresis",
10
+ aring:"Latin small letter a with ring above",aelig:"Latin small letter æ",ccedil:"Latin small letter c with cedilla",egrave:"Latin small letter e with grave accent",eacute:"Latin small letter e with acute accent",ecirc:"Latin small letter e with circumflex",euml:"Latin small letter e with diaeresis",igrave:"Latin small letter i with grave accent",iacute:"Latin small letter i with acute accent",icirc:"Latin small letter i with circumflex",iuml:"Latin small letter i with diaeresis",eth:"Latin small letter eth",
11
+ ntilde:"Latin small letter n with tilde",ograve:"Latin small letter o with grave accent",oacute:"Latin small letter o with acute accent",ocirc:"Latin small letter o with circumflex",otilde:"Latin small letter o with tilde",ouml:"Latin small letter o with diaeresis",divide:"Division sign",oslash:"Latin small letter o with stroke",ugrave:"Latin small letter u with grave accent",uacute:"Latin small letter u with acute accent",ucirc:"Latin small letter u with circumflex",uuml:"Latin small letter u with diaeresis",
12
+ yacute:"Latin small letter y with acute accent",thorn:"Latin small letter thorn",yuml:"Latin small letter y with diaeresis",OElig:"Latin capital ligature OE",oelig:"Latin small ligature oe",372:"Latin capital letter W with circumflex",374:"Latin capital letter Y with circumflex",373:"Latin small letter w with circumflex",375:"Latin small letter y with circumflex",sbquo:"Single low-9 quotation mark",8219:"Single high-reversed-9 quotation mark",bdquo:"Double low-9 quotation mark",hellip:"Horizontal ellipsis",
13
+ trade:"Trade mark sign",9658:"Black right-pointing pointer",bull:"Bullet",rarr:"Rightwards arrow",rArr:"Rightwards double arrow",hArr:"Left right double arrow",diams:"Black diamond suit",asymp:"Almost equal to"});