coalla-cms 0.4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (300) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +81 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +168 -0
  5. data/Rakefile +29 -0
  6. data/app/assets/fonts/glyphicons/glyphicons-halflings-regular.eot +0 -0
  7. data/app/assets/fonts/glyphicons/glyphicons-halflings-regular.svg +229 -0
  8. data/app/assets/fonts/glyphicons/glyphicons-halflings-regular.ttf +0 -0
  9. data/app/assets/fonts/glyphicons/glyphicons-halflings-regular.woff +0 -0
  10. data/app/assets/images/ajax-loader.gif +0 -0
  11. data/app/assets/images/blank.gif +0 -0
  12. data/app/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
  13. data/app/assets/images/bootstrap/glyphicons-halflings.png +0 -0
  14. data/app/assets/javascripts/admin/admin.js +295 -0
  15. data/app/assets/javascripts/admin/custom_admin.js +0 -0
  16. data/app/assets/javascripts/admin/jquery-migrate.min.js +2 -0
  17. data/app/assets/javascripts/admin/photo_uploader.js +67 -0
  18. data/app/assets/javascripts/admin/vendor/bootstrap.min.js +7 -0
  19. data/app/assets/javascripts/admin/vendor/jquery-ui-timepicker-addon-ru.js +40 -0
  20. data/app/assets/javascripts/admin/vendor/jquery.tagsinput.js +365 -0
  21. data/app/assets/javascripts/admin/vendor/jquery.tokeninput.patched.js +875 -0
  22. data/app/assets/javascripts/admin/vendor/underscore-min.js +5 -0
  23. data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +209 -0
  24. data/app/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
  25. data/app/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
  26. data/app/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +64 -0
  27. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/LICENSE.txt +303 -0
  28. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad-gallery-css-diff.htm +831 -0
  29. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_next.png +0 -0
  30. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_prev.png +0 -0
  31. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_scroll_back.png +0 -0
  32. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_scroll_forward.png +0 -0
  33. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.css +185 -0
  34. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.js +984 -0
  35. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.min - ref.js +10 -0
  36. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.min.js +1 -0
  37. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/loader.gif +0 -0
  38. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/opa75.png +0 -0
  39. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/placeholder.png +0 -0
  40. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/ad-gallery/trans.gif +0 -0
  41. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/blank.gif +0 -0
  42. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_loading.gif +0 -0
  43. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_loading@2x.gif +0 -0
  44. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_overlay.png +0 -0
  45. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_sprite.png +0 -0
  46. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_sprite@2x.png +0 -0
  47. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/fancybox_buttons.png +0 -0
  48. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-buttons.css +97 -0
  49. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-buttons.js +122 -0
  50. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-media.js +199 -0
  51. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-thumbs.css +55 -0
  52. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-thumbs.js +162 -0
  53. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.css +274 -0
  54. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.js +2020 -0
  55. data/app/assets/javascripts/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.pack.js +46 -0
  56. data/app/assets/javascripts/ckeditor/plugins/slideshow/README.md +66 -0
  57. data/app/assets/javascripts/ckeditor/plugins/slideshow/dialogs/slideshow.js +1396 -0
  58. data/app/assets/javascripts/ckeditor/plugins/slideshow/dialogs/slideshow.min.js +1 -0
  59. data/app/assets/javascripts/ckeditor/plugins/slideshow/icons/placeholder.png +0 -0
  60. data/app/assets/javascripts/ckeditor/plugins/slideshow/icons/slideshow.png +0 -0
  61. data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/Serbian_translation.txt +9 -0
  62. data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/el.js +37 -0
  63. data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/en.js +35 -0
  64. data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/fr.js +35 -0
  65. data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/ru.js +35 -0
  66. data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/sr-latn.js +35 -0
  67. data/app/assets/javascripts/ckeditor/plugins/slideshow/lang/sr.js +35 -0
  68. data/app/assets/javascripts/ckeditor/plugins/slideshow/plugin.js +217 -0
  69. data/app/assets/stylesheets/admin/admin.scss +302 -0
  70. data/app/assets/stylesheets/admin/custom_admin.scss +1 -0
  71. data/app/assets/stylesheets/admin/vendor/bootstrap.min.css +14 -0
  72. data/app/assets/stylesheets/admin/vendor/jquery.tagsinput.css +99 -0
  73. data/app/assets/stylesheets/admin/vendor/token-input-facebook.patched.css +126 -0
  74. data/app/assets/stylesheets/admin/vendor/token-input.patched.css +116 -0
  75. data/app/controllers/admin/autocomplete_controller.rb +14 -0
  76. data/app/controllers/admin/image_upload_controller.rb +27 -0
  77. data/app/controllers/admin/lookups_controller.rb +47 -0
  78. data/app/controllers/admin/sortable_controller.rb +26 -0
  79. data/app/controllers/concerns/admin/path_history.rb +39 -0
  80. data/app/helpers/admin/search_helper.rb +59 -0
  81. data/app/helpers/admin_helper.rb +29 -0
  82. data/app/helpers/common_helper.rb +16 -0
  83. data/app/helpers/lookup_helper.rb +45 -0
  84. data/app/helpers/nested_fields_helper.rb +12 -0
  85. data/app/helpers/static_text_formatter.rb +25 -0
  86. data/app/helpers/twitter_builder_helper.rb +253 -0
  87. data/app/helpers/twitter_form_builder.rb +196 -0
  88. data/app/models/file_upload.rb +19 -0
  89. data/app/models/lookup.rb +6 -0
  90. data/app/uploaders/file_uploader.rb +10 -0
  91. data/app/uploaders/generic_image_uploader.rb +74 -0
  92. data/app/utils/admin_structure.rb +67 -0
  93. data/app/utils/bootstrap_link_renderer.rb +40 -0
  94. data/app/utils/table_helpers.rb +196 -0
  95. data/app/views/admin/base/_sort.haml +34 -0
  96. data/app/views/admin/common/_file_upload_template.haml +14 -0
  97. data/app/views/admin/common/_header.html.haml +27 -0
  98. data/app/views/admin/common/_image_upload_template.html.haml +40 -0
  99. data/app/views/admin/common/_menu.html.haml +2 -0
  100. data/app/views/admin/common/_menu_section.haml +10 -0
  101. data/app/views/admin/common/_menu_separator.haml +1 -0
  102. data/app/views/admin/common/_nested_fields_for.html.haml +5 -0
  103. data/app/views/admin/common/_nested_fields_for_element.html.haml +5 -0
  104. data/app/views/admin/common/_slide.haml +41 -0
  105. data/app/views/admin/common/_slides.html.haml +17 -0
  106. data/app/views/admin/common/_table_template.html.haml +14 -0
  107. data/app/views/admin/common/_upload_form.html.haml +5 -0
  108. data/app/views/admin/common/image_uploaded.js.haml +7 -0
  109. data/app/views/admin/common/upload_failed.js.erb +11 -0
  110. data/app/views/admin/common/upload_image.js.erb +6 -0
  111. data/app/views/admin/home/dashboard.html.haml +5 -0
  112. data/app/views/admin/lookups/_form.html.haml +16 -0
  113. data/app/views/admin/lookups/edit.html.haml +5 -0
  114. data/app/views/admin/lookups/index.html.haml +6 -0
  115. data/app/views/layouts/admin.html.haml +38 -0
  116. data/app/views/structure/_section.haml +16 -0
  117. data/coalla-cms.gemspec +39 -0
  118. data/config/locales/devise.ru.yml +59 -0
  119. data/config/locales/will_paginate.ru.yml +6 -0
  120. data/lib/coalla/cms/engine.rb +16 -0
  121. data/lib/coalla/cms/version.rb +5 -0
  122. data/lib/coalla/ext/mapper.rb +14 -0
  123. data/lib/coalla/orm/page_slider.rb +53 -0
  124. data/lib/coalla/orm/relation.rb +32 -0
  125. data/lib/coalla/orm/sanitized.rb +16 -0
  126. data/lib/coalla/sanitize/config/default.rb +526 -0
  127. data/lib/coalla-cms.rb +16 -0
  128. data/lib/generators/coalla/cms/create_admin_generator.rb +50 -0
  129. data/lib/generators/coalla/cms/create_admin_login_view_generator.rb +23 -0
  130. data/lib/generators/coalla/cms/file_uploads/install_generator.rb +35 -0
  131. data/lib/generators/coalla/cms/file_uploads/mount_generator.rb +34 -0
  132. data/lib/generators/coalla/cms/file_uploads/templates/add_column_migration.rb.erb +5 -0
  133. data/lib/generators/coalla/cms/file_uploads/templates/migration.rb +17 -0
  134. data/lib/generators/coalla/cms/image/install_generator.rb +39 -0
  135. data/lib/generators/coalla/cms/image/mount_generator.rb +50 -0
  136. data/lib/generators/coalla/cms/image/templates/migration.rb.erb +9 -0
  137. data/lib/generators/coalla/cms/image/templates/model.rb.erb +5 -0
  138. data/lib/generators/coalla/cms/image/templates/mount/migration.rb.erb +6 -0
  139. data/lib/generators/coalla/cms/image/templates/mount/uploader.rb.erb +3 -0
  140. data/lib/generators/coalla/cms/image/templates/uploader.rb.erb +3 -0
  141. data/lib/generators/coalla/cms/init_generator.rb +113 -0
  142. data/lib/generators/coalla/cms/lookups/install_generator.rb +43 -0
  143. data/lib/generators/coalla/cms/lookups/templates/migration.rb +13 -0
  144. data/lib/generators/coalla/cms/market/install_generator.rb +71 -0
  145. data/lib/generators/coalla/cms/market/templates/controllers/categories_controller.rb +47 -0
  146. data/lib/generators/coalla/cms/market/templates/controllers/products_controller.rb +50 -0
  147. data/lib/generators/coalla/cms/market/templates/controllers/properties_controller.rb +59 -0
  148. data/lib/generators/coalla/cms/market/templates/market.rb +5 -0
  149. data/lib/generators/coalla/cms/market/templates/market.ru.yml +53 -0
  150. data/lib/generators/coalla/cms/market/templates/migrations/create_categories.rb +15 -0
  151. data/lib/generators/coalla/cms/market/templates/migrations/create_product_properties.rb +18 -0
  152. data/lib/generators/coalla/cms/market/templates/migrations/create_products.rb +18 -0
  153. data/lib/generators/coalla/cms/market/templates/migrations/create_properties.rb +11 -0
  154. data/lib/generators/coalla/cms/market/templates/models/category.rb +36 -0
  155. data/lib/generators/coalla/cms/market/templates/models/product.rb +16 -0
  156. data/lib/generators/coalla/cms/market/templates/models/product_property.rb +14 -0
  157. data/lib/generators/coalla/cms/market/templates/models/property.rb +7 -0
  158. data/lib/generators/coalla/cms/market/templates/views/categories/_form.html.haml +10 -0
  159. data/lib/generators/coalla/cms/market/templates/views/categories/edit.html.haml +5 -0
  160. data/lib/generators/coalla/cms/market/templates/views/categories/index.html.haml +17 -0
  161. data/lib/generators/coalla/cms/market/templates/views/categories/new.html.haml +4 -0
  162. data/lib/generators/coalla/cms/market/templates/views/products/_form.html.haml +17 -0
  163. data/lib/generators/coalla/cms/market/templates/views/products/_product_property_fields.html.haml +13 -0
  164. data/lib/generators/coalla/cms/market/templates/views/products/edit.html.haml +5 -0
  165. data/lib/generators/coalla/cms/market/templates/views/products/index.html.haml +17 -0
  166. data/lib/generators/coalla/cms/market/templates/views/products/new.html.haml +4 -0
  167. data/lib/generators/coalla/cms/market/templates/views/properties/_form.html.haml +9 -0
  168. data/lib/generators/coalla/cms/market/templates/views/properties/edit.html.haml +5 -0
  169. data/lib/generators/coalla/cms/market/templates/views/properties/index.html.haml +15 -0
  170. data/lib/generators/coalla/cms/market/templates/views/properties/new.html.haml +4 -0
  171. data/lib/generators/coalla/cms/news/scaffold_generator.rb +50 -0
  172. data/lib/generators/coalla/cms/news/templates/entity.rb.erb +10 -0
  173. data/lib/generators/coalla/cms/news/templates/entity_controller_template.rb.erb +47 -0
  174. data/lib/generators/coalla/cms/news/templates/entity_image_uploader.rb.erb +7 -0
  175. data/lib/generators/coalla/cms/news/templates/migration.rb.erb +15 -0
  176. data/lib/generators/coalla/cms/news/templates/views/_form.haml.erb +16 -0
  177. data/lib/generators/coalla/cms/news/templates/views/edit.haml.erb +5 -0
  178. data/lib/generators/coalla/cms/news/templates/views/index.haml.erb +18 -0
  179. data/lib/generators/coalla/cms/news/templates/views/new.haml.erb +5 -0
  180. data/lib/generators/coalla/cms/orm_helpers.rb +31 -0
  181. data/lib/generators/coalla/cms/scaffold_generator.rb +53 -0
  182. data/lib/generators/coalla/cms/scaffold_helper.rb +11 -0
  183. data/lib/generators/coalla/cms/setup_admin_generator.rb +60 -0
  184. data/lib/generators/coalla/cms/setup_routes_generator.rb +28 -0
  185. data/lib/generators/coalla/cms/slider/init_generator.rb +41 -0
  186. data/lib/generators/coalla/cms/slider/templates/migration.rb.erb +25 -0
  187. data/lib/generators/coalla/cms/slider/templates/slider_image.rb.erb +10 -0
  188. data/lib/generators/coalla/cms/slider/templates/slider_image_uploader.rb.erb +7 -0
  189. data/lib/generators/coalla/cms/slider/templates/slider_upload_controller.rb.erb +19 -0
  190. data/lib/generators/coalla/cms/templates/.gitattributes +4 -0
  191. data/lib/generators/coalla/cms/templates/.gitignore +86 -0
  192. data/lib/generators/coalla/cms/templates/activerecord.ru.yml +13 -0
  193. data/lib/generators/coalla/cms/templates/assets.rb +13 -0
  194. data/lib/generators/coalla/cms/templates/controllers/admin/base_controller.rb.erb +35 -0
  195. data/lib/generators/coalla/cms/templates/controllers/admin/home_controller.rb.erb +6 -0
  196. data/lib/generators/coalla/cms/templates/controllers/admin/scaffold_controller_template.rb.erb +45 -0
  197. data/lib/generators/coalla/cms/templates/controllers/home_controller.rb.erb +6 -0
  198. data/lib/generators/coalla/cms/templates/database.yml.erb +35 -0
  199. data/lib/generators/coalla/cms/templates/devise.ru.yml +59 -0
  200. data/lib/generators/coalla/cms/templates/initializers/carrierwave.rb +51 -0
  201. data/lib/generators/coalla/cms/templates/migration.rb +11 -0
  202. data/lib/generators/coalla/cms/templates/migration_existing.rb +15 -0
  203. data/lib/generators/coalla/cms/templates/schedule.rb +3 -0
  204. data/lib/generators/coalla/cms/templates/structure.rb +0 -0
  205. data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/_form.html.haml.erb +14 -0
  206. data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/edit.html.haml.erb +5 -0
  207. data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/index.html.haml.erb +15 -0
  208. data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/new.html.haml.erb +4 -0
  209. data/lib/generators/coalla/cms/templates/views/administrators/sessions/new.html.haml +19 -0
  210. data/lib/generators/coalla/cms/templates/views/home/index.html.haml.erb +1 -0
  211. data/lib/generators/coalla/cms/wysiwyg/ckeditor_generator.rb +17 -0
  212. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
  213. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
  214. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/mediaembed/plugin.js +64 -0
  215. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/LICENSE.txt +303 -0
  216. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad-gallery-css-diff.htm +831 -0
  217. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_next.png +0 -0
  218. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_prev.png +0 -0
  219. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_scroll_back.png +0 -0
  220. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/ad_scroll_forward.png +0 -0
  221. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.css +185 -0
  222. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.js +984 -0
  223. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.min - ref.js +10 -0
  224. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/jquery.ad-gallery.min.js +1 -0
  225. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/loader.gif +0 -0
  226. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/opa75.png +0 -0
  227. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/placeholder.png +0 -0
  228. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/ad-gallery/trans.gif +0 -0
  229. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/blank.gif +0 -0
  230. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_loading.gif +0 -0
  231. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_loading@2x.gif +0 -0
  232. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_overlay.png +0 -0
  233. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_sprite.png +0 -0
  234. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/fancybox_sprite@2x.png +0 -0
  235. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/fancybox_buttons.png +0 -0
  236. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-buttons.css +97 -0
  237. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-buttons.js +122 -0
  238. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-media.js +199 -0
  239. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-thumbs.css +55 -0
  240. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/helpers/jquery.fancybox-thumbs.js +162 -0
  241. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.css +274 -0
  242. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.js +2020 -0
  243. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/3rdParty/fancybox2/jquery.fancybox.pack.js +46 -0
  244. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/README.md +66 -0
  245. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/dialogs/slideshow.js +1396 -0
  246. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/dialogs/slideshow.min.js +1 -0
  247. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/icons/placeholder.png +0 -0
  248. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/icons/slideshow.png +0 -0
  249. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/Serbian_translation.txt +9 -0
  250. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/el.js +37 -0
  251. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/en.js +35 -0
  252. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/fr.js +35 -0
  253. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/ru.js +35 -0
  254. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/sr-latn.js +35 -0
  255. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/lang/sr.js +35 -0
  256. data/lib/generators/coalla/cms/wysiwyg/templates/ckeditor/plugins/slideshow/plugin.js +217 -0
  257. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-blockquote.png +0 -0
  258. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h1.png +0 -0
  259. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h2.png +0 -0
  260. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h3.png +0 -0
  261. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h4.png +0 -0
  262. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h5.png +0 -0
  263. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h6.png +0 -0
  264. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-p.png +0 -0
  265. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-pre.png +0 -0
  266. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/wymiframe.css +276 -0
  267. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/wymiframe.html +26 -0
  268. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/jquery.wymeditor.js +4819 -0
  269. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/lang/en.js +45 -0
  270. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/lang/ru.js +55 -0
  271. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/imageupload/icons.png +0 -0
  272. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/imageupload/jquery.wymeditor.imageupload.js +150 -0
  273. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +91 -0
  274. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/resizable/readme.txt +124 -0
  275. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/compact/icons.png +0 -0
  276. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/compact/skin.css +134 -0
  277. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/compact/skin.js +35 -0
  278. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/default/icons.png +0 -0
  279. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/default/skin.css +341 -0
  280. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/default/skin.js +40 -0
  281. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/bg.header.gif +0 -0
  282. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
  283. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
  284. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
  285. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/skin.css +131 -0
  286. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/skin.js +30 -0
  287. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/COPYING +674 -0
  288. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/README +27 -0
  289. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/bg.header.gif +0 -0
  290. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
  291. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
  292. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/icons.silver.gif +0 -0
  293. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/skin.css +297 -0
  294. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/skin.js +61 -0
  295. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/twopanels/icons.png +0 -0
  296. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/twopanels/skin.css +134 -0
  297. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/twopanels/skin.js +39 -0
  298. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/wymeditor_icon.png +0 -0
  299. data/lib/generators/coalla/cms/wysiwyg/wymeditor_generator.rb +17 -0
  300. metadata +581 -0
@@ -0,0 +1,45 @@
1
+ WYMeditor.STRINGS['en'] = {
2
+ Strong: 'Strong',
3
+ Emphasis: 'Emphasis',
4
+ Superscript: 'Superscript',
5
+ Subscript: 'Subscript',
6
+ Ordered_List: 'Ordered List',
7
+ Unordered_List: 'Unordered List',
8
+ Indent: 'Indent',
9
+ Outdent: 'Outdent',
10
+ Undo: 'Undo',
11
+ Redo: 'Redo',
12
+ Link: 'Link',
13
+ Unlink: 'Unlink',
14
+ Image: 'Image',
15
+ Table: 'Table',
16
+ HTML: 'HTML',
17
+ Paragraph: 'Paragraph',
18
+ Heading_1: 'Heading 1',
19
+ Heading_2: 'Heading 2',
20
+ Heading_3: 'Heading 3',
21
+ Heading_4: 'Heading 4',
22
+ Heading_5: 'Heading 5',
23
+ Heading_6: 'Heading 6',
24
+ Preformatted: 'Preformatted',
25
+ Blockquote: 'Blockquote',
26
+ Table_Header: 'Table Header',
27
+ URL: 'URL',
28
+ Title: 'Title',
29
+ Alternative_Text: 'Alternative text',
30
+ Caption: 'Caption',
31
+ Summary: 'Summary',
32
+ Number_Of_Rows: 'Number of rows',
33
+ Number_Of_Cols: 'Number of cols',
34
+ Submit: 'Submit',
35
+ Cancel: 'Cancel',
36
+ Choose: 'Choose',
37
+ Preview: 'Preview',
38
+ Paste_From_Word: 'Paste from Word',
39
+ Tools: 'Tools',
40
+ Containers: 'Containers',
41
+ Classes: 'Classes',
42
+ Status: 'Status',
43
+ Source_Code: 'Source code'
44
+ };
45
+
@@ -0,0 +1,55 @@
1
+ WYMeditor.STRINGS['ru'] = {
2
+ Strong: 'Жирный',
3
+ Emphasis: 'Наклонный',
4
+ Superscript: 'Надстрочный',
5
+ Subscript: 'Подстрочный',
6
+ Ordered_List: 'Нумерованый список',
7
+ Unordered_List: 'Ненумерованый список',
8
+ Indent: 'Увеличить отступ',
9
+ Outdent: 'Уменьшить отступ',
10
+ Undo: 'Отменить',
11
+ Redo: 'Повторить',
12
+ Link: 'Ссылка',
13
+ Unlink: 'Удалить ссылку',
14
+ Image: 'Изображение',
15
+ Table: 'Таблица',
16
+ HTML: 'Править HTML',
17
+ Paragraph: 'Параграф',
18
+ Heading_1: 'Заголовок 1',
19
+ Heading_2: 'Заголовок 2',
20
+ Heading_3: 'Заголовок 3',
21
+ Heading_4: 'Заголовок 4',
22
+ Heading_5: 'Заголовок 5',
23
+ Heading_6: 'Заголовок 6',
24
+ Preformatted: 'Preformatted',
25
+ Blockquote: 'Цитата',
26
+ Table_Header: 'Заголовок таблицы',
27
+ URL: 'Укажите ссылку',
28
+ Upload: 'Загрузить',
29
+ Upload_Image: 'Вставить изображение',
30
+ Align: 'Разместить',
31
+ Align_Left: 'По левому краю',
32
+ Align_Right: 'По правому краю',
33
+ Title: 'Заголовок',
34
+ Alternative_Text: 'Альтернативный текст',
35
+ Caption: 'Надпись',
36
+ Summary: 'Summary',
37
+ Number_Of_Rows: 'Кол-во строк',
38
+ Number_Of_Cols: 'Кол-во столбцов',
39
+ Submit: 'Отправить',
40
+ Cancel: 'Отмена',
41
+ Choose: 'Выбор',
42
+ Preview: 'Просмотр',
43
+ Paste_From_Word: 'Вставить',
44
+ InsertBlockquote: 'Управление цитатами',
45
+ Tools: 'Инструменты',
46
+ Containers: 'Контейнеры',
47
+ Classes: 'Классы',
48
+ Status: 'Статус',
49
+ Source_Code: 'Исходный код',
50
+ Insert_video: 'Видео',
51
+ Paste: 'Вставить',
52
+ Description: 'Описание',
53
+ New_Window: 'В новом окне'
54
+ };
55
+
@@ -0,0 +1,150 @@
1
+ /*
2
+ To make this plugin work, you must:
3
+ 1) include <script type="text/javascript" src="plugins/imageupload/jquery.wymeditor.imageupload.js"></script>
4
+ 2) in postInit(), call: wym.imageupload_init('/path/to/your/upload/script.php', 'uploadedimage');
5
+ (the uploaded file will then be available to your script.php in $_FILES['uploadedimage'])
6
+ 3) make an upload script (not necessarily PHP), which should:
7
+ 1) validate (extensions, size,...), resize, watermark, save the image
8
+ 2) return this HTML:
9
+ <html>
10
+ <head><title></title></head>
11
+ <body>
12
+ <script language="JavaScript" type="text/javascript">
13
+ <!-- <![CDATA[
14
+
15
+ var wym_instance=0; // get it from $_REQUEST['wymindex']!
16
+ var url='http://www.example.org/path/to/newly/uploaded/image.png';
17
+
18
+ window.opener.WYMeditor.INSTANCES[wym_instance].imageinsert(url);
19
+ window.close();
20
+ // ]]> -->
21
+ </script>
22
+ </body>
23
+ </html>
24
+ (if the upload has failed for some reason you could put a link to some error image in "url" variable)
25
+
26
+ 4) include these CSS rules in the page where you want to display the entered html:
27
+ div.wym p:after, div.wym h1:after, div.wym h2:after, div.wym h3:after { content: "."; display: block; height: 0; clear: both; visibility: hidden;}
28
+ div.wym p, div.wym h1, div.wym h2, div.wym h3 { clear: both; margin-bottom: 10px; margin-top: 0px;}
29
+ div.wym img.floatleft { float: left; margin: 3px 10px 5px 0px; }
30
+ div.wym img.floatright { float: right !important; margin: 3px 0px 5px 10px; }
31
+
32
+ (assumption is that all the text is included inside <div class="wym">...</div> - make them fit your needs!)
33
+
34
+ These CSS rules make sure that:
35
+ - images are floated to the left/right (note: every image has 'floatleft' CSS class, but only those that have 'floatright' too are floated to the right)
36
+ - text in block containers that follow the images doesn't flow around them
37
+
38
+
39
+
40
+ */
41
+
42
+
43
+ window.jQuery && (function ($) {
44
+
45
+ $.extend(WYMeditor.editor.prototype, {
46
+ // Function to be called for initialisation in the skin init, or in postInit
47
+ imageupload_init:function (imageUploadUrl, imageFormName) {
48
+
49
+ var html = '<body class="wym_dialog wym_dialog_image"><div class="wym_dialog_not">'
50
+
51
+ + '<div style="padding: 0 15px;">'
52
+ + '<div class="page-header">'
53
+ + '<h3>{Upload_Image}</h3>'
54
+ + '</div>'
55
+
56
+ + '<form class="form-horizontal" action="' + imageUploadUrl + '" method="post" enctype="multipart/form-data" accept-charset="UTF-8">'
57
+ + '<fieldset style="padding: 0 15px;">'
58
+
59
+ + '<input type="hidden" name="wymindex" value="' + WYMeditor.INDEX + '"/>'
60
+
61
+ + '<div class="form-group">'
62
+ + '<input type="file" class="type-file" name="' + imageFormName + '"/>'
63
+ + '</div>'
64
+
65
+ + '<div class="form-group">'
66
+ + "<label>{Description}</label>"
67
+ + '<textarea class="form-control input-xlarge wym_text" rows="3" name="description"></textarea>'
68
+ + '</div>'
69
+
70
+ + '</fieldset>'
71
+
72
+ + "<div class='well'>"
73
+ + "<input class='btn btn-success wym_submit wymupdate' type='submit' value='{Submit}'>"
74
+ + "&nbsp;"
75
+ + "<a href='#' class='btn btn-danger wym_cancel' onClick='window.close();'>{Cancel}</a>"
76
+ + "</div>"
77
+
78
+ + '</form>'
79
+
80
+ + '</div></div></body>';
81
+
82
+ var dialog = (function (wym) {
83
+ return function () {
84
+ wym.dialog('Upload_Image', '', html);
85
+ return false;
86
+ };
87
+ })(this);
88
+
89
+ // Insert a button for uploading images:
90
+ jQuery(this._box).find('.wym_tools ul')
91
+ .append(jQuery("<li class='wym_tools_imageupload'><a name='Image' title='Вставить изображение' href='#'></a></li>").click(dialog)
92
+ );
93
+ // // Insert the buttons for aligning images left and right:
94
+ // var alignImageLeft = (function (wym) {
95
+ // return function () {
96
+ // if (wym._selected_image) {
97
+ // var container = wym._selected_image;
98
+ // // css class 'floatleft' is always set. We just toggle 'floatright'
99
+ // jQuery(container).removeClass('f-right').addClass('f-left');
100
+ // }
101
+ // return false;
102
+ // }
103
+ // })(this);
104
+ // var alignImageRight = (function (wym) {
105
+ // return function () {
106
+ // if (wym._selected_image) {
107
+ // var container = wym._selected_image;
108
+ // // css class 'floatleft' is always set. We just toggle 'floatright'
109
+ // jQuery(container).removeClass('f-left').addClass('f-right');
110
+ // }
111
+ // return false;
112
+ // }
113
+ // })(this);
114
+
115
+ // jQuery(this._box).find('.wym_tools ul').append(
116
+ // jQuery("<li class='wym_tools_imagealign align_image_left'><a name='ImageLeft' title='По левому краю' href='#'></a></li>")
117
+ // .click(alignImageLeft)
118
+ // ).append(
119
+ // jQuery("<li class='wym_tools_imagealign align_image_right'><a name='ImageLeft' title='По правому краю' href='#'></a></li>")
120
+ // .click(function (ev) {
121
+ // ev.preventDefault();
122
+ // alignImageRight();
123
+ // })
124
+ // );
125
+
126
+ // now take care of all the CSS styles we need:
127
+ var css = // clear floats in modern browsers:
128
+ 'p:after, h1:after, h2:after, h3:after { content: "."; display: block; height: 0; clear: both; visibility: hidden;}\n' +
129
+ // clear floats in IE too:
130
+ 'p, h1, h2, h3 { clear: both; }\n' +
131
+ // every image should float to left by default:
132
+ 'img { float: left; width: auto !important; height: auto !important;}\n' +
133
+ // .floatright should float to right:
134
+ 'img.f-right { float: right !important; width: auto !important; height: auto !important; }';
135
+ $(this._doc).find('head').append($("<style type='text/css'> " + css + " </style>"));
136
+ },
137
+ imageinsert:function (content) {
138
+ var container = this.selected();
139
+ var sData = content;
140
+ if (container && container.tagName.toLowerCase() != WYMeditor.BODY) {
141
+ // inside <p>:
142
+ jQuery(container).before('<p>' + sData + '</p>');
143
+ // jQuery(container).prepend('<p>' + sData + '</p>');
144
+ } else {
145
+ jQuery(this._doc.body).append('<p>' + sData + '</p>');
146
+ }
147
+ }
148
+
149
+ });
150
+ })(window.jQuery);
@@ -0,0 +1,91 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * jquery.wymeditor.resizable.js
12
+ * resize plugin for WYMeditor
13
+ *
14
+ * File Authors:
15
+ * Peter Eschler (peschler _at_ gmail.com)
16
+ * Jean-Francois Hovinne - http://www.hovinne.com/
17
+ *
18
+ * Version:
19
+ * 0.4
20
+ *
21
+ * Changelog:
22
+ *
23
+ * 0.4
24
+ * - Removed UI and UI.resizable scripts loading - see #167 (jfh).
25
+ *
26
+ * 0.3
27
+ * - Added 'iframeOriginalSize' and removed 'ui.instance' calls (jfh).
28
+ *
29
+ * 0.2
30
+ * - Added full support for all jQueryUI resizable plugin options.
31
+ * - Refactored and documented code.
32
+ * 0.1
33
+ * - Initial release.
34
+ */
35
+
36
+ /**
37
+ * The resizable plugin makes the wymeditor box vertically resizable.
38
+ * It it based on the ui.resizable.js plugin of the jQuery UI library.
39
+ *
40
+ * The WYMeditor resizable plugin supports all parameters of the jQueryUI
41
+ * resizable plugin. The parameters are passed like this:
42
+ *
43
+ * wym.resizable({ handles: "s,e",
44
+ * maxHeight: 600 });
45
+ *
46
+ * DEPENDENCIES: jQuery UI, jQuery UI resizable
47
+ *
48
+ * @param options options for the plugin
49
+ */
50
+ WYMeditor.editor.prototype.resizable = function(options) {
51
+
52
+ var wym = this;
53
+ var iframe = jQuery(wym._box).find('iframe');
54
+ var iframeOriginalSize = {};
55
+
56
+ // Define some default options
57
+ var default_options = {
58
+ start: function(e, ui) {
59
+ iframeOriginalSize = {
60
+ width: jQuery(iframe).width(),
61
+ height: jQuery(iframe).height()
62
+ }
63
+ },
64
+
65
+ // resize is called by the jQuery resizable plugin whenever the
66
+ // client area was resized.
67
+ resize: function(e, ui) {
68
+ var diff = ui.size.height - ui.originalSize.height;
69
+ jQuery(iframe).height( iframeOriginalSize.height + diff );
70
+
71
+ // If the plugin has horizontal resizing disabled we need to
72
+ // adjust the "width" attribute of the area css, because the
73
+ // resizing will set a fixed width (which breaks liquid layout
74
+ // of the wymeditor area).
75
+ if( !ui.options.handles['w'] && !ui.options.handles['e'] ) {
76
+ ui.size.width = "inherit";
77
+ }
78
+ },
79
+ handles: "s,e,se",
80
+ minHeight: 250,
81
+ maxHeight: 600
82
+ };
83
+
84
+ // Merge given options with default options. Given options override
85
+ // default ones.
86
+ var final_options = jQuery.extend(default_options, options);
87
+
88
+ if(jQuery.isFunction( jQuery.fn.resizable )) jQuery(wym._box).resizable(final_options);
89
+ else WYMeditor.console.error('Oops, jQuery UI.resizable unavailable.');
90
+
91
+ };
@@ -0,0 +1,124 @@
1
+
2
+
3
+ resizable plugin for WYMeditor
4
+ ##############################
5
+
6
+ The ``resizable`` plugin for WYMeditor_ enables vertical resizing of the
7
+ editor area. The plugin is based on the jQuery UI library.
8
+
9
+ Requirements
10
+ ============
11
+ The following packages are required for using the WYMeditor ``resizable``
12
+ plugin:
13
+
14
+ * jQuery (tested with jQuery ``jquery-1.2.4a.js`` from ``jquery.ui`` package)
15
+ * WYMeditor SVN trunk (Revision: 482)
16
+ * jQuery-UI (tested with ``jquery.ui-1.5b2``)
17
+
18
+ It should be possible to use this plugin with ``WYMeditor-0.4`` but I have not
19
+ tried.
20
+
21
+ Download
22
+ ========
23
+ You can download the WYMeditor ``resizable`` plugin here:
24
+
25
+ * wymeditor-resizable-plugin-0.2.tgz_
26
+ * wymeditor-resizable-plugin-0.1.tgz_
27
+
28
+ See the Changelog_ for more infos about the releases.
29
+
30
+ .. _wymeditor-resizable-plugin-0.2.tgz: http://pyjax.net/download/wymeditor-resizable-plugin-0.2.tgz
31
+ .. _wymeditor-resizable-plugin-0.1.tgz: http://pyjax.net/download/wymeditor-resizable-plugin-0.1.tgz
32
+
33
+ Installation
34
+ ============
35
+ Just extract the downloaded archive into your WYMeditor's ``plugin``
36
+ directory.
37
+
38
+ Usage
39
+ =====
40
+ For general instructions on WYMeditor plugins please refer to the `WYMeditor
41
+ plugin page`_.
42
+
43
+ To use the ``resizable`` plugin simply include the plugin's JavaScript file in
44
+ your code. You **do not** need to include the jQuery UI files - this is done
45
+ automatically by the plugin (see `Internals`_)::
46
+
47
+ <script type="text/javascript"
48
+ src="/js/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js">
49
+ </script>
50
+
51
+ Make sure to adjust the ``src`` attribute to your needs, then initialize the
52
+ plugin in WYMeditor's ``postInit`` function::
53
+
54
+ wymeditor({postInit: function(wym) {
55
+ wym.hovertools(); // other plugins...
56
+ wym.resizable({handles: "s,e",
57
+ maxHeight: 600});
58
+ }
59
+ })
60
+
61
+ The ``resizable`` plugin takes exactly one parameter, which is an object literal
62
+ containing the options of the plugin. The WYMeditor ``resizable`` plugin
63
+ supports all options of the jQuery UI ``resizable`` plugin. These are the
64
+ default values used by the plugin::
65
+
66
+ handles: "s,e,se",
67
+ minHeight: 250,
68
+ maxHeight: 600
69
+
70
+ See the `jQuery UI resizable plugin docs`_ for a list of all options.
71
+
72
+ That's it! You are now able to resize the WYMeditor vertically, horizontally or
73
+ both, depending on your options.
74
+
75
+ .. _jQuery UI resizable plugin docs: http://docs.jquery.com/UI/Resizables
76
+
77
+ Internals
78
+ =========
79
+ The plugin takes care of loading the necessary jQuery UI files (``base`` and
80
+ ``resizable``) from the same path the jQuery library was loaded. Here's how
81
+ it's done::
82
+
83
+ // Get the jQuery path from the editor, stripping away the jQuery file.
84
+ // see http://www.oreilly.com/catalog/regex/chapter/ch04.html
85
+ // The match result array contains the path and the filename.
86
+ var jQueryPath = wym.computeJqueryPath().match(/^(.*)\/(.*)$/)[1];
87
+
88
+ // Make an array of the external JavaScript files required by the plugin.
89
+ var jQueryPlugins = [jQueryPath + '/ui.base.js',
90
+ jQueryPath + '/ui.resizable.js'];
91
+
92
+ // First get the jQuery UI base file
93
+ $.getScript(jQueryPlugins[0]);
94
+
95
+ // Get the jQuery UI resizeable plugin and then init the wymeditor resizable
96
+ // plugin. It is import to do the initialisation after loading the
97
+ // necessary jQuery UI files has finished, otherwise the "resizable" method
98
+ // would not be available.
99
+ $.getScript(jQueryPlugins[1], function() {
100
+ jQuery(wym._box).resizable(final_options);
101
+ });
102
+
103
+ An alternative approach would be to use an AJAX queue when getting the script
104
+ files to ensure that all jQuery files are loaded before the initialisation code
105
+ of the plugin is executed. There is an `jQuery AJAX queue plugin`_ which does
106
+ that.
107
+
108
+ .. _jQuery AJAX queue plugin: http://plugins.jquery.com/project/ajaxqueue
109
+
110
+ Changelog
111
+ =========
112
+
113
+ 0.2
114
+ ---
115
+ - Added full support for all jQuery UI resizable plugin options.
116
+ - Refactored and documented code.
117
+ - Now contains a packed version (775 bytes).
118
+
119
+ 0.1
120
+ ---
121
+ - Initial release.
122
+
123
+ .. _WYMeditor: http://www.wymeditor.org/
124
+ .. _WYMeditor plugin page: http://trac.wymeditor.org/trac/wiki/0.4/Plugins
@@ -0,0 +1,134 @@
1
+ /*
2
+ * WYMeditor : what you see is What You Mean web-based editor
3
+ * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
4
+ * Dual licensed under the MIT (MIT-license.txt)
5
+ * and GPL (GPL-license.txt) licenses.
6
+ *
7
+ * For further information visit:
8
+ * http://www.wymeditor.org/
9
+ *
10
+ * File Name:
11
+ * screen.css
12
+ * main stylesheet for the WYMeditor skin
13
+ * See the documentation for more info.
14
+ *
15
+ * File Authors:
16
+ * Daniel Reszka (d.reszka a-t wymeditor dotorg)
17
+ * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)
18
+ */
19
+
20
+ /*TRYING TO RESET STYLES THAT MAY INTERFERE WITH WYMEDITOR*/
21
+ .wym_skin_compact p, .wym_skin_compact h2, .wym_skin_compact h3,
22
+ .wym_skin_compact ul, .wym_skin_compact li { background: transparent url(); margin: 0; padding: 0; border-width:0; list-style: none; }
23
+
24
+
25
+ /*HIDDEN BY DEFAULT*/
26
+ .wym_skin_compact .wym_area_left { display: none; }
27
+ .wym_skin_compact .wym_area_right { display: none; }
28
+
29
+
30
+ /*TYPO*/
31
+ .wym_skin_compact { font-size: 10px; font-family: Verdana, Arial, sans-serif; }
32
+ .wym_skin_compact h2 { font-size: 110%; /* = 11px */}
33
+ .wym_skin_compact h3 { font-size: 100%; /* = 10px */}
34
+ .wym_skin_compact li { font-size: 100%; /* = 10px */}
35
+
36
+
37
+ /*WYM_BOX*/
38
+ .wym_skin_compact { border: 1px solid gray; padding: 5px}
39
+
40
+ /*auto-clear the wym_box*/
41
+ .wym_skin_compact:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
42
+ * html .wym_skin_compact { height: 1%;}
43
+
44
+
45
+ /*WYM_HTML*/
46
+ .wym_skin_compact .wym_html { width: 98%;}
47
+ .wym_skin_compact .wym_html textarea { font-size: 120%; width: 100%; height: 200px; border: 1px solid gray; background: white; }
48
+
49
+
50
+ /*WYM_IFRAME*/
51
+ .wym_skin_compact .wym_iframe { width: 98%;}
52
+ .wym_skin_compact .wym_iframe iframe { width: 100%; height: 200px; border: 1px solid gray; background: white }
53
+
54
+
55
+ /*AREAS*/
56
+ .wym_skin_compact .wym_area_left { width: 100px; float: left;}
57
+ .wym_skin_compact .wym_area_right { width: 150px; float: right;}
58
+ .wym_skin_compact .wym_area_bottom { height: 1%; clear: both;}
59
+ * html .wym_skin_compact .wym_area_main { height: 1%;}
60
+ * html .wym_skin_compact .wym_area_top { height: 1%;}
61
+ *+html .wym_skin_compact .wym_area_top { height: 1%;}
62
+
63
+ /*SECTIONS SYSTEM*/
64
+
65
+ /*common defaults for all sections*/
66
+ .wym_skin_compact .wym_section { margin-bottom: 5px; }
67
+ .wym_skin_compact .wym_section h2,
68
+ .wym_skin_compact .wym_section h3 { padding: 1px 3px; margin: 0; }
69
+ .wym_skin_compact .wym_section a { padding: 0 3px; display: block; text-decoration: none; color: black; }
70
+ .wym_skin_compact .wym_section a:hover { background-color: yellow; }
71
+ /*hide section titles by default*/
72
+ .wym_skin_compact .wym_section h2 { display: none; }
73
+ /*disable any margin-collapse*/
74
+ .wym_skin_compact .wym_section { padding-top: 1px; padding-bottom: 1px; }
75
+ /*auto-clear sections*/
76
+ .wym_skin_compact .wym_section ul:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
77
+ * html .wym_skin_compact .wym_section ul { height: 1%;}
78
+
79
+ /*option: add this class to a section to make it render as a panel*/
80
+ .wym_skin_compact .wym_panel { }
81
+ .wym_skin_compact .wym_panel h2 { display: block; }
82
+
83
+ /*option: add this class to a section to make it render as a dropdown menu*/
84
+ .wym_skin_compact .wym_dropdown h2 { display: block; }
85
+ .wym_skin_compact .wym_dropdown ul { display: none; position: absolute; background: white; }
86
+ .wym_skin_compact .wym_dropdown:hover ul,
87
+ .wym_skin_compact .wym_dropdown.hover ul { display: block; }
88
+
89
+ /*option: add this class to a section to make its elements render buttons (icons are only available for the wym_tools section for now)*/
90
+ .wym_skin_compact .wym_buttons li { float:left;}
91
+ .wym_skin_compact .wym_buttons a { width: 20px; height: 20px; overflow: hidden; padding: 2px }
92
+ /*image replacements*/
93
+ .wym_skin_compact .wym_buttons li a { background: url(icons.png) no-repeat; text-indent: -9999px;}
94
+ .wym_skin_compact .wym_buttons li.wym_tools_strong a { background-position: 0 -382px;}
95
+ .wym_skin_compact .wym_buttons li.wym_tools_emphasis a { background-position: 0 -22px;}
96
+ .wym_skin_compact .wym_buttons li.wym_tools_superscript a { background-position: 0 -430px;}
97
+ .wym_skin_compact .wym_buttons li.wym_tools_subscript a { background-position: 0 -454px;}
98
+ .wym_skin_compact .wym_buttons li.wym_tools_ordered_list a { background-position: 0 -48px;}
99
+ .wym_skin_compact .wym_buttons li.wym_tools_unordered_list a{ background-position: 0 -72px;}
100
+ .wym_skin_compact .wym_buttons li.wym_tools_indent a { background-position: 0 -574px;}
101
+ .wym_skin_compact .wym_buttons li.wym_tools_outdent a { background-position: 0 -598px;}
102
+ .wym_skin_compact .wym_buttons li.wym_tools_undo a { background-position: 0 -502px;}
103
+ .wym_skin_compact .wym_buttons li.wym_tools_redo a { background-position: 0 -526px;}
104
+ .wym_skin_compact .wym_buttons li.wym_tools_link a { background-position: 0 -96px;}
105
+ .wym_skin_compact .wym_buttons li.wym_tools_unlink a { background-position: 0 -168px;}
106
+ .wym_skin_compact .wym_buttons li.wym_tools_image a { background-position: 0 -121px;}
107
+ .wym_skin_compact .wym_buttons li.wym_tools_table a { background-position: 0 -144px;}
108
+ .wym_skin_compact .wym_buttons li.wym_tools_paste a { background-position: 0 -552px;}
109
+ .wym_skin_compact .wym_buttons li.wym_tools_html a { background-position: 0 -193px;}
110
+ .wym_skin_compact .wym_buttons li.wym_tools_preview a { background-position: 0 -408px;}
111
+
112
+ /*DECORATION*/
113
+ .wym_skin_compact .wym_section h2 { background: #f0f0f0; border: solid gray; border-width: 0 0 1px;}
114
+ .wym_skin_compact .wym_section h2 span { color: gray;}
115
+ .wym_skin_compact .wym_panel { padding: 0; border: solid gray; border-width: 1px; background: white;}
116
+ .wym_skin_compact .wym_panel ul { margin: 2px 0 5px; }
117
+ .wym_skin_compact .wym_dropdown { padding: 0; border: solid gray; border-width: 1px 1px 0 1px; }
118
+ .wym_skin_compact .wym_dropdown ul { border: solid gray; border-width: 0 1px 1px 1px; margin-left: -1px; padding: 5px 10px 5px 3px;}
119
+
120
+ /*DIALOGS*/
121
+ .wym_dialog div.row { margin-bottom: 5px;}
122
+ .wym_dialog div.row input { margin-right: 5px;}
123
+ .wym_dialog div.row label { float: left; width: 150px; display: block; text-align: right; margin-right: 10px; }
124
+ .wym_dialog div.row-indent { padding-left: 160px; }
125
+ /*autoclearing*/
126
+ .wym_dialog div.row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
127
+ .wym_dialog div.row { display: inline-block; }
128
+ /* Hides from IE-mac \*/
129
+ * html .wym_dialog div.row { height: 1%; }
130
+ .wym_dialog div.row { display: block; }
131
+ /* End hide from IE-mac */
132
+
133
+ /*WYMEDITOR_LINK*/
134
+ a.wym_wymeditor_link { text-indent: -9999px; float: right; display: block; width: 50px; height: 15px; background: url(../wymeditor_icon.png); overflow: hidden; text-decoration: none; }
@@ -0,0 +1,35 @@
1
+ WYMeditor.SKINS['compact'] = {
2
+
3
+ init: function(wym) {
4
+
5
+ //move the containers panel to the top area
6
+ jQuery(wym._options.containersSelector + ', '
7
+ + wym._options.classesSelector, wym._box)
8
+ .appendTo( jQuery("div.wym_area_top", wym._box) )
9
+ .addClass("wym_dropdown")
10
+ .css({"margin-right": "10px", "width": "120px", "float": "left"});
11
+
12
+ //render following sections as buttons
13
+ jQuery(wym._options.toolsSelector, wym._box)
14
+ .addClass("wym_buttons")
15
+ .css({"margin-right": "10px", "float": "left"});
16
+
17
+ //make hover work under IE < 7
18
+ jQuery(".wym_section", wym._box).hover(function(){
19
+ jQuery(this).addClass("hover");
20
+ },function(){
21
+ jQuery(this).removeClass("hover");
22
+ });
23
+
24
+ var postInit = wym._options.postInit;
25
+ wym._options.postInit = function(wym) {
26
+
27
+ if(postInit) postInit.call(wym, wym);
28
+ var rule = {
29
+ name: 'body',
30
+ css: 'background-color: #f0f0f0;'
31
+ };
32
+ wym.addCssRule( wym._doc.styleSheets[0], rule);
33
+ };
34
+ }
35
+ };