glebtv-ckeditor 4.2.1.5 → 4.3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +37 -1
- data/README.md +286 -0
- data/Rakefile +76 -63
- data/app/assets/javascripts/ckeditor/application.js +1 -0
- data/app/assets/javascripts/ckeditor/config.js.erb +59 -20
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js → application.js.erb} +11 -2
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +300 -0
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/{uploader.css → uploader.css.erb} +6 -2
- data/app/assets/javascripts/ckeditor/init.js.erb +1 -6
- data/app/assets/javascripts/ckeditor/override.js.erb +22 -0
- data/app/assets/stylesheets/ckcontent.css +103 -0
- data/app/controllers/ckeditor/application_controller.rb +5 -4
- data/app/controllers/ckeditor/attachment_files_controller.rb +12 -10
- data/app/controllers/ckeditor/pictures_controller.rb +12 -10
- data/app/helpers/ckeditor/application_helper.rb +1 -1
- data/app/views/ckeditor/attachment_files/index.html.erb +11 -5
- data/app/views/ckeditor/pictures/index.html.erb +12 -6
- data/app/views/ckeditor/shared/_asset.html.erb +2 -2
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +3 -3
- data/app/views/layouts/ckeditor/application.html.erb +0 -1
- data/config/locales/cs.ckeditor.yml +1 -0
- data/config/locales/de.ckeditor.yml +9 -0
- data/config/locales/el-GR.cdkeditor.yml +9 -0
- data/config/locales/en.ckeditor.yml +1 -0
- data/config/locales/es.ckeditor.yml +1 -0
- data/config/locales/fr.ckeditor.yml +1 -0
- data/config/locales/hu.ckeditor.yml +9 -0
- data/config/locales/it.ckeditor.yml +1 -0
- data/config/locales/nl.ckeditor.yml +2 -1
- data/config/locales/pl.ckeditor.yml +1 -0
- data/config/locales/pt-BR.ckeditor.yml +2 -1
- data/config/locales/pt-PT.ckeditor.yml +9 -0
- data/config/locales/ru.ckeditor.yml +1 -0
- data/config/locales/sv-SE.ckeditor.yml +1 -0
- data/config/locales/uk.ckeditor.yml +1 -0
- data/config/locales/zh-CN.ckeditor.yml +1 -0
- data/lib/ckeditor.rb +63 -13
- data/lib/ckeditor/backend/carrierwave.rb +9 -9
- data/lib/ckeditor/backend/dragonfly.rb +2 -2
- data/lib/ckeditor/backend/paperclip.rb +4 -4
- data/lib/ckeditor/engine.rb +6 -6
- data/lib/ckeditor/helpers/controllers.rb +7 -7
- data/lib/ckeditor/helpers/form_builder.rb +1 -1
- data/lib/ckeditor/helpers/form_helper.rb +2 -21
- data/lib/ckeditor/helpers/view_helper.rb +2 -13
- data/lib/ckeditor/hooks/cancan.rb +2 -2
- data/lib/ckeditor/hooks/formtastic.rb +1 -1
- data/lib/ckeditor/hooks/pundit.rb +47 -0
- data/lib/ckeditor/http.rb +8 -7
- data/lib/ckeditor/orm/active_record.rb +3 -3
- data/lib/ckeditor/orm/base.rb +4 -6
- data/lib/ckeditor/orm/mongoid.rb +4 -4
- data/lib/ckeditor/paginatable.rb +56 -0
- data/lib/ckeditor/text_area.rb +52 -0
- data/lib/ckeditor/utils.rb +54 -36
- data/lib/ckeditor/version.rb +1 -4
- data/lib/generators/ckeditor/install_generator.rb +10 -10
- data/lib/generators/ckeditor/pundit_policy_generator.rb +22 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +4 -4
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +2 -2
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +1 -1
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +1 -1
- data/lib/generators/ckeditor/templates/ckeditor.rb +21 -16
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +20 -0
- data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +20 -0
- data/test/ckeditor_test.rb +54 -1
- data/test/controllers/attachment_files_controller_test.rb +15 -15
- data/test/controllers/pictures_controller_test.rb +15 -15
- data/test/dummy/app/views/posts/index.html.erb +1 -1
- data/test/dummy/config/routes.rb +1 -1
- data/test/dummy/log/test.log +301 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0ff571a66f03f4c98305b82fbc097934 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1c2a2034cd1d6490a47e1f2b22a328f3 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/233a499dd1009ab5b2a8040346715629 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2a79c1fcf4595c4bfb3a1e77a732b9e9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2bb1e656d1d1c20542dd47020608ce4b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/3c088129885aa2261da0ab21707aa851 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5296ab0e7196335ed50f33e398de0470 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/62133d9323b94de8b0cd2a3e490e0374 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/70f2d021b0f59639252116032aa12a5d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/73eff3be45044b7438486d533547c02c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7869bf4c6f26bcd697a78ffd20655de5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/88d81ff5585179f4acb7ba76bdcb1244 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/990c65e42e2a681340e62644dd07782b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/aaf14684bcb6dafb17154d27c3d5a5de +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b2141ea733727ae31693b5129d431629 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c1469bfe5d5645440961cc1e8fd48120 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c479f0465142b7c9c5a9c58a256335d7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c73d53992216d52410b542dce76742ad +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c7476f60577593bf79ca5b6334b86903 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cb4a5e7fc592c6023ed2acc5953b4685 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d7e7d3b3729ff516f81682711ea8a53a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d9b8613a01ff7c7d9fe1a6b7cd5497ff +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e4513c04c145290b038978a8f471d244 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e65823156ac3891c4779224e828d4877 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f20469686afebc55828d93a978e5ff20 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f24d6c64fd96102c27c1f10e82ebf864 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f33022711bcfc1cae3955a1de79fe280 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f69b1a9a1323d97109283e5bd378c23d +0 -0
- data/test/functional/posts_controller_test.rb +4 -4
- data/test/generators/install_generator_test.rb +7 -7
- data/test/models/attachment_file_test.rb +2 -2
- data/test/models/picture_test.rb +2 -2
- data/test/models/utils_test.rb +4 -5
- data/test/support/helpers.rb +8 -8
- data/test/tmp/app/models/ckeditor/asset.rb +5 -0
- data/test/tmp/app/models/ckeditor/attachment_file.rb +12 -0
- data/test/tmp/app/models/ckeditor/picture.rb +13 -0
- data/test/tmp/config/initializers/ckeditor.rb +26 -0
- data/test/tmp/config/routes.rb +5 -0
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +414 -0
- data/{app → vendor}/assets/javascripts/ckeditor/LICENSE.md +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/README.md +1 -1
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +10 -0
- data/vendor/assets/javascripts/ckeditor/build-config.js +165 -0
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +978 -0
- data/vendor/assets/javascripts/ckeditor/config.js +10 -0
- data/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/ckcss.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/lang/en.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/lang/ru.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +4 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +4 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoComplete.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoFormat.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/SearchCode.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +3 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +335 -90
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +5 -5
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +75 -75
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +28 -25
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +21 -18
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +23 -25
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +13 -10
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +30 -21
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +47 -44
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +37 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +43 -52
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +29 -28
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +12 -9
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +24 -21
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +23 -21
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +180 -207
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +26 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +28 -26
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +30 -27
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +49 -46
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +43 -43
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +5 -5
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +2 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/{app/assets/javascripts/ckeditor/skins/moono → vendor/assets/javascripts/ckeditor/plugins}/icons_hidpi.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +13 -13
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/ipsum/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/ipsum/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +8 -7
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/example_usage.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/map.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/preview/preview.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/README.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +20 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +6 -6
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +4 -4
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +11 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +72 -31
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmp.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +31 -31
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/lang/en.js +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/plugin.js +56 -15
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css.scss +768 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css.scss +809 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css.scss +841 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css.scss +822 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css.scss +813 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_opera.css.scss +781 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css.scss +2125 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css.scss +2134 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css.scss +2183 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css.scss +2351 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css.scss +2195 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css.scss +2243 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/{app/assets/javascripts/ckeditor/plugins → vendor/assets/javascripts/ckeditor/skins/moono}/icons_hidpi.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/readme.md +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/styles.js +2 -2
- metadata +445 -352
- data/README.rdoc +0 -12
- data/app/assets/javascripts/ckeditor/CHANGES.md +0 -233
- data/app/assets/javascripts/ckeditor/build-config.js +0 -103
- data/app/assets/javascripts/ckeditor/ckeditor.js +0 -929
- data/app/assets/javascripts/ckeditor/contents.css +0 -103
- data/app/assets/javascripts/ckeditor/lang/en.js +0 -5
- data/app/assets/javascripts/ckeditor/lang/ru.js +0 -5
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -10
- data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +0 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +0 -5637
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.modes.min.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.search-addons.min.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/font/lang/en.js +0 -14
- data/app/assets/javascripts/ckeditor/plugins/font/lang/ru.js +0 -14
- data/app/assets/javascripts/ckeditor/plugins/font/plugin.js +0 -225
- data/app/assets/javascripts/ckeditor/plugins/highslide/dialogs/hs.js +0 -73
- data/app/assets/javascripts/ckeditor/plugins/highslide/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/highslide/lang/en.js +0 -7
- data/app/assets/javascripts/ckeditor/plugins/highslide/lang/ru.js +0 -7
- data/app/assets/javascripts/ckeditor/plugins/highslide/plugin.js +0 -26
- data/app/assets/javascripts/ckeditor/plugins/highslide/readme.txt +0 -55
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/install.html +0 -93
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/styles.css +0 -59
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon1.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon2.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon3.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/icons/hidpi/iframe.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/icons/iframe.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/lang/en.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/iframe/lang/ru.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/iframe/plugin.js +0 -83
- data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -43
- data/app/assets/javascripts/ckeditor/plugins/oembed/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/images/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.js +0 -70
- data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.min.js +0 -71
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/images/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/lang/en.js +0 -23
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/lang/ru.js +0 -23
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/libs/jquery.oembed.js +0 -971
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/libs/jquery.oembed.min.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/plugin.js +0 -373
- data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -20
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/assets/sample.css +0 -70
- data/app/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +0 -82
- data/app/assets/javascripts/ckeditor/plugins/symbol/dialogs/lang/en.js +0 -181
- data/app/assets/javascripts/ckeditor/plugins/symbol/dialogs/symbol.js +0 -18
- data/app/assets/javascripts/ckeditor/plugins/symbol/icons/symbol.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/symbol/lang/en.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/symbol/plugin.js +0 -15
- data/app/assets/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -9
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -15
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/yui.js +0 -225
- data/app/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/skins/moono/dialog.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_opera.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/lib/ckeditor/tasks.rake +0 -11
@@ -1,5 +1,6 @@
|
|
1
1
|
//= require ckeditor/filebrowser/javascripts/jquery.min.js
|
2
2
|
//= require ckeditor/filebrowser/javascripts/jquery.tmpl.min.js
|
3
3
|
//= require ckeditor/filebrowser/javascripts/fileuploader.js
|
4
|
+
//= require ckeditor/filebrowser/javascripts/jquery.endless-scroll.js
|
4
5
|
//= require ckeditor/filebrowser/javascripts/rails.js
|
5
6
|
//= require ckeditor/filebrowser/javascripts/application.js
|
@@ -1,8 +1,8 @@
|
|
1
|
-
CKEDITOR.editorConfig = function( config )
|
2
|
-
|
3
|
-
// Define changes to default configuration here. For example:
|
1
|
+
CKEDITOR.editorConfig = function( config ) {
|
2
|
+
// Define changes to default configuration here. For example:
|
4
3
|
config.language = 'ru';
|
5
|
-
|
4
|
+
|
5
|
+
// config.uiColor = '#AADC6E';
|
6
6
|
config.skin = 'moono';
|
7
7
|
|
8
8
|
/* Filebrowser routes */
|
@@ -31,23 +31,8 @@ CKEDITOR.editorConfig = function( config )
|
|
31
31
|
config.extraPlugins = "colorbutton,colordialog,font,magicline,codemirror,mediaembed,stylesheetparser,ipsum,CKCss,wordcount,youtube,map";
|
32
32
|
config.contentsCss = "<%= stylesheet_path('ckcontent.css') %>";
|
33
33
|
|
34
|
-
// Rails CSRF token
|
35
|
-
config.filebrowserParams = function(){
|
36
|
-
var csrf_token = jQuery('meta[name=csrf-token]').attr('content'),
|
37
|
-
csrf_param = jQuery('meta[name=csrf-param]').attr('content'),
|
38
|
-
params = new Object();
|
39
|
-
|
40
|
-
if (csrf_param !== undefined && csrf_token !== undefined) {
|
41
|
-
params[csrf_param] = csrf_token;
|
42
|
-
}
|
43
|
-
|
44
|
-
return params;
|
45
|
-
};
|
46
|
-
|
47
34
|
config.tabSpaces = 2;
|
48
|
-
|
49
35
|
config.toolbar = 'CMS';
|
50
|
-
|
51
36
|
config.toolbar_CMS =
|
52
37
|
[
|
53
38
|
['Source'], ['RemoveFormat'], ['PasteText','PasteFromWord'], ['Undo','Redo'],
|
@@ -59,5 +44,59 @@ CKEDITOR.editorConfig = function( config )
|
|
59
44
|
['ipsum', 'CKCss', 'Youtube', 'map']
|
60
45
|
];
|
61
46
|
|
62
|
-
|
47
|
+
config.font_names = 'Arial/Arial, Helvetica, sans-serif;Times New Roman/Times New Roman, Times, serif;Verdana;TrebuchetMS';
|
48
|
+
|
49
|
+
// Rails CSRF token
|
50
|
+
config.filebrowserParams = function(){
|
51
|
+
var csrf_token, csrf_param, meta,
|
52
|
+
metas = document.getElementsByTagName('meta'),
|
53
|
+
params = new Object();
|
54
|
+
|
55
|
+
for ( var i = 0 ; i < metas.length ; i++ ){
|
56
|
+
meta = metas[i];
|
57
|
+
|
58
|
+
if (meta.name == "csrf-token") {
|
59
|
+
csrf_token = meta.content;
|
60
|
+
} else if (meta.name == "csrf-param") {
|
61
|
+
csrf_param = meta.content;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
if (csrf_param !== undefined && csrf_token !== undefined) {
|
66
|
+
params[csrf_param] = csrf_token;
|
67
|
+
}
|
68
|
+
|
69
|
+
return params;
|
70
|
+
};
|
71
|
+
|
72
|
+
config.addQueryString = function( url, params ) {
|
73
|
+
var queryString = [];
|
74
|
+
|
75
|
+
if ( !params ) {
|
76
|
+
return url;
|
77
|
+
} else {
|
78
|
+
for ( var i in params )
|
79
|
+
queryString.push( i + "=" + encodeURIComponent( params[ i ] ) );
|
80
|
+
}
|
81
|
+
|
82
|
+
return url + ( ( url.indexOf( "?" ) != -1 ) ? "&" : "?" ) + queryString.join( "&" );
|
83
|
+
};
|
84
|
+
|
85
|
+
// Integrate Rails CSRF token into file upload dialogs (link, image, attachment and flash)
|
86
|
+
CKEDITOR.on('dialogDefinition', function(ev) {
|
87
|
+
// Take the dialog name and its definition from the event data.
|
88
|
+
var dialogName = ev.data.name;
|
89
|
+
var dialogDefinition = ev.data.definition;
|
90
|
+
var content, upload;
|
91
|
+
|
92
|
+
if (CKEDITOR.tools.indexOf(['link', 'image', 'attachment', 'flash'], dialogName) > -1) {
|
93
|
+
content = (dialogDefinition.getContents('Upload') || dialogDefinition.getContents('upload'));
|
94
|
+
upload = (content == null ? null : content.get('upload'));
|
95
|
+
|
96
|
+
if (upload && upload.filebrowser && upload.filebrowser['params'] === undefined) {
|
97
|
+
upload.filebrowser['params'] = config.filebrowserParams();
|
98
|
+
upload.action = config.addQueryString(upload.action, upload.filebrowser['params']);
|
99
|
+
}
|
100
|
+
}
|
101
|
+
});
|
63
102
|
};
|
data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js → application.js.erb}
RENAMED
@@ -27,6 +27,16 @@ $(document).ready(function(){
|
|
27
27
|
$("div.gal-item a.gal-del").live('ajax:complete', function(xhr, status){
|
28
28
|
$(this).parents('div.gal-item').remove();
|
29
29
|
});
|
30
|
+
|
31
|
+
var endlessScroll = $.endlessScroll({
|
32
|
+
container: ".fileupload-list",
|
33
|
+
entity: ".gal-item",
|
34
|
+
scrollPadding: 100
|
35
|
+
});
|
36
|
+
|
37
|
+
// Don't listen events first second
|
38
|
+
endlessScroll.scrollModule.unbind();
|
39
|
+
window.setTimeout(function() { endlessScroll.scrollModule.bind();}, 1000);
|
30
40
|
});
|
31
41
|
|
32
42
|
// Collection of all instances on page
|
@@ -76,7 +86,6 @@ qq.FileUploaderInput = function(o){
|
|
76
86
|
this._classes = this._options.classes;
|
77
87
|
|
78
88
|
this._button = this._createUploadButton(this._find(this._element, 'button'));
|
79
|
-
this._path = $('meta[name="ckeditor-path"]').attr('content');
|
80
89
|
|
81
90
|
//this._setupDragDrop();
|
82
91
|
|
@@ -188,7 +197,7 @@ qq.extend(qq.FileUploaderInput.prototype, {
|
|
188
197
|
format_created_at: '',
|
189
198
|
url_content: "#",
|
190
199
|
controller: "assets",
|
191
|
-
url_thumb:
|
200
|
+
url_thumb: "<%= asset_path('ckeditor/filebrowser/images/preloader.gif') %>"
|
192
201
|
};
|
193
202
|
|
194
203
|
var item = $(this._options.template_id)
|
@@ -0,0 +1,300 @@
|
|
1
|
+
/**
|
2
|
+
* Author: Sergey Kukunin
|
3
|
+
* See: https://github.com/Kukunin/jquery-endless-scroll
|
4
|
+
*/
|
5
|
+
(function($) {
|
6
|
+
'use strict';
|
7
|
+
|
8
|
+
// Is pushState supported by this browser?
|
9
|
+
$.support.pushState =
|
10
|
+
window.history && window.history.pushState && window.history.replaceState &&
|
11
|
+
// pushState isn't reliable on iOS until 5.
|
12
|
+
!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/)
|
13
|
+
|
14
|
+
//Declaration of modules
|
15
|
+
var scrollModule = {
|
16
|
+
init: function(options, obj) {
|
17
|
+
obj.options = $.extend({
|
18
|
+
scrollContainer: window,
|
19
|
+
scrollPadding: 100,
|
20
|
+
scrollEventDelay: 300
|
21
|
+
}, options);
|
22
|
+
this.options = obj.options;
|
23
|
+
this.container = obj.container;
|
24
|
+
obj.scrollModule = this;
|
25
|
+
|
26
|
+
this._toplock = true;
|
27
|
+
this._bottomlock = true;
|
28
|
+
|
29
|
+
this.scrollContainer = $(this.options.scrollContainer);
|
30
|
+
|
31
|
+
this.updateEntities();
|
32
|
+
this.sortMarkers();
|
33
|
+
|
34
|
+
this.currentPage = null;
|
35
|
+
|
36
|
+
this.container.on("jes:afterPageLoad", $.proxy(function(event, url, placement) {
|
37
|
+
this.updateEntities();
|
38
|
+
this.sortMarkers();
|
39
|
+
this.checkMarker();
|
40
|
+
|
41
|
+
if ( placement == "top" ) {
|
42
|
+
//Get offset between first and second pages
|
43
|
+
var offset = this.markers[1].top,
|
44
|
+
scrollTop = this.scrollContainer.scrollTop();
|
45
|
+
|
46
|
+
this.scrollContainer.scrollTop(scrollTop + offset);
|
47
|
+
}
|
48
|
+
}, this));
|
49
|
+
|
50
|
+
this.bind();
|
51
|
+
},
|
52
|
+
updateEntities: function() {
|
53
|
+
this.entities = $(this.options.entity, this.container);
|
54
|
+
},
|
55
|
+
sortMarkers: function() {
|
56
|
+
var markers = [];
|
57
|
+
$(".jes-marker", this.container).each(function() {
|
58
|
+
markers.push({ top: $(this).position().top, url: $(this).data("jesUrl") });
|
59
|
+
});
|
60
|
+
this.markers = markers;
|
61
|
+
},
|
62
|
+
//Check, whether user scrolled to another page
|
63
|
+
checkMarker: function() {
|
64
|
+
var newPage = this.markers[0],
|
65
|
+
scrollTop = this.scrollContainer.scrollTop();
|
66
|
+
|
67
|
+
//Determine, what is current page
|
68
|
+
for ( var i = 1; i < this.markers.length; i++ ) {
|
69
|
+
if ( scrollTop > this.markers[i].top ) {
|
70
|
+
newPage = this.markers[i];
|
71
|
+
} else {
|
72
|
+
break;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
if ( newPage.url != this.currentPage ) {
|
76
|
+
this.currentPage = newPage.url;
|
77
|
+
$(this.container).trigger("jes:scrollToPage", newPage.url);
|
78
|
+
}
|
79
|
+
},
|
80
|
+
bind: function() {
|
81
|
+
this.scrollContainer.on("scroll.jes", $.proxy(function(event) {
|
82
|
+
if ( this._tId ) { return; }
|
83
|
+
|
84
|
+
this.scrollHandler(event);
|
85
|
+
//Clean up mark
|
86
|
+
this._tId= setTimeout($.proxy(function(){
|
87
|
+
this._tId = null;
|
88
|
+
},this), this.options.scrollEventDelay);
|
89
|
+
|
90
|
+
}, this));
|
91
|
+
},
|
92
|
+
unbind: function() {
|
93
|
+
$(this.options.scrollContainer).off("scroll.jes");
|
94
|
+
},
|
95
|
+
scrollHandler: function(ev) {
|
96
|
+
var $scrollable = this.scrollContainer,
|
97
|
+
$entities = this.entities,
|
98
|
+
$firstEntity = $entities.first(),
|
99
|
+
$lastEntity = $entities.last();
|
100
|
+
|
101
|
+
var scrollTop = $scrollable.scrollTop(),
|
102
|
+
height = $scrollable.height(),
|
103
|
+
scrollBottom = scrollTop + height;
|
104
|
+
|
105
|
+
var topEntityPosition = $firstEntity.position().top,
|
106
|
+
topTarget = topEntityPosition + this.options.scrollPadding,
|
107
|
+
bottomEntityPosition = $lastEntity.outerHeight() + $lastEntity.position().top,
|
108
|
+
bottomTarget = bottomEntityPosition - this.options.scrollPadding;
|
109
|
+
|
110
|
+
//Don't trigger event again, if already fired
|
111
|
+
//Visitor have to leave the area and get back to fire event again
|
112
|
+
//Process top threshold
|
113
|
+
if ( scrollTop < topTarget ) {
|
114
|
+
if ( !this._toplock ) {
|
115
|
+
$(this.container).trigger("jes:topThreshold");
|
116
|
+
this._toplock = true;
|
117
|
+
}
|
118
|
+
} else {
|
119
|
+
this._toplock = false;
|
120
|
+
}
|
121
|
+
|
122
|
+
//Process bottom threshold
|
123
|
+
if ( scrollBottom > bottomTarget ) {
|
124
|
+
if ( !this._bottomlock ) {
|
125
|
+
$(this.container).trigger("jes:bottomThreshold");
|
126
|
+
this._bottomlock = true;
|
127
|
+
}
|
128
|
+
} else {
|
129
|
+
this._bottomlock = false;
|
130
|
+
}
|
131
|
+
|
132
|
+
this.checkMarker();
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
var ajaxModule = {
|
137
|
+
init: function(options, obj) {
|
138
|
+
obj.options = $.extend({
|
139
|
+
}, options);
|
140
|
+
|
141
|
+
this.options = obj.options;
|
142
|
+
this.container = obj.container;
|
143
|
+
|
144
|
+
//markers
|
145
|
+
this.setMarker($(this.options.entity, this.container).first(), location.href);
|
146
|
+
|
147
|
+
obj.ajaxModule = this;
|
148
|
+
},
|
149
|
+
loadPage: function(url, placement, callback) {
|
150
|
+
//The hash with methods list
|
151
|
+
//depends from placement
|
152
|
+
var actions = {
|
153
|
+
top: {
|
154
|
+
find: 'first',
|
155
|
+
inject: 'insertBefore'
|
156
|
+
},
|
157
|
+
bottom: {
|
158
|
+
find: 'last',
|
159
|
+
inject: 'insertAfter'
|
160
|
+
}
|
161
|
+
},
|
162
|
+
action = actions[placement];
|
163
|
+
|
164
|
+
this.container.trigger("jes:beforePageLoad", [url, placement]);
|
165
|
+
|
166
|
+
//Make AJAX query
|
167
|
+
$.get(url, null, $.proxy(function (_data) {
|
168
|
+
var data = $("<div>").html(_data),
|
169
|
+
containerSelector = this.options.container,
|
170
|
+
container = $(containerSelector, data).first();
|
171
|
+
|
172
|
+
if ( container.length ) {
|
173
|
+
//Find entities
|
174
|
+
var entities = container.find(this.options.entity);
|
175
|
+
|
176
|
+
if ( placement == "bottom" ) {
|
177
|
+
//Remove duplicated (staled) entities from page
|
178
|
+
entities.each(function(i) {
|
179
|
+
var id = $(this).attr("id");
|
180
|
+
if ( id ) {
|
181
|
+
$('#' + id, this.container).remove();
|
182
|
+
}
|
183
|
+
});
|
184
|
+
}
|
185
|
+
|
186
|
+
//Find the cursor
|
187
|
+
var cursor = $(this.options.entity, containerSelector)[action.find]();
|
188
|
+
|
189
|
+
//Find and insert entities
|
190
|
+
entities[action.inject](cursor);
|
191
|
+
this.setMarker(entities.first(), url);
|
192
|
+
}
|
193
|
+
|
194
|
+
if ( $.isFunction(callback) ) {
|
195
|
+
callback(data);
|
196
|
+
}
|
197
|
+
this.container.trigger("jes:afterPageLoad", [url, placement, data, entities]);
|
198
|
+
}, this), 'html');
|
199
|
+
},
|
200
|
+
setMarker: function(entity, url) {
|
201
|
+
entity.addClass("jes-marker").data("jesUrl", url);
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
205
|
+
var navigationModule = {
|
206
|
+
init: function(options, obj) {
|
207
|
+
obj.options = $.extend({
|
208
|
+
nextPage: ".pagination a[rel=next]",
|
209
|
+
previousPage: ".pagination a[rel=previous]"
|
210
|
+
}, options);
|
211
|
+
|
212
|
+
this.options = obj.options;
|
213
|
+
this.container = obj.container;
|
214
|
+
|
215
|
+
$.each([{
|
216
|
+
selector: this.options.nextPage,
|
217
|
+
event: "jes:bottomThreshold.navigation",
|
218
|
+
placement: 'bottom'
|
219
|
+
}, {
|
220
|
+
selector: this.options.previousPage,
|
221
|
+
event: "jes:topThreshold.navigation",
|
222
|
+
placement: 'top'
|
223
|
+
}], $.proxy(function(i, v) {
|
224
|
+
v.element = $(v.selector);
|
225
|
+
if ( v.element.length ) {
|
226
|
+
var url = v.element.prop("href"),
|
227
|
+
lock = false;
|
228
|
+
|
229
|
+
var handler = function() {
|
230
|
+
//this object is container
|
231
|
+
if ( lock || !url ) return;
|
232
|
+
|
233
|
+
lock = true;
|
234
|
+
obj.ajaxModule.loadPage(url, v.placement, $.proxy(function( data ) {
|
235
|
+
//Search new next link
|
236
|
+
var newElement = $(v.selector, $(data));
|
237
|
+
if ( newElement.length ) {
|
238
|
+
//Update URL and remove lock
|
239
|
+
lock = false;
|
240
|
+
url = newElement.prop("href");
|
241
|
+
v.element.attr("href", url);
|
242
|
+
} else {
|
243
|
+
//Remove event at all
|
244
|
+
$(this).off(v.event);
|
245
|
+
v.element.remove();
|
246
|
+
}
|
247
|
+
}, this));
|
248
|
+
};
|
249
|
+
|
250
|
+
$(this.container).on(v.event, handler);
|
251
|
+
$(v.element).on("click", $.proxy(function(ev) {
|
252
|
+
ev.preventDefault();
|
253
|
+
handler.apply(this.container)
|
254
|
+
}, this));
|
255
|
+
}
|
256
|
+
},this));
|
257
|
+
}
|
258
|
+
}
|
259
|
+
|
260
|
+
var pushStateHistory = {
|
261
|
+
init: function(options, obj) {
|
262
|
+
if ( !$.support.pushState ) {
|
263
|
+
return;
|
264
|
+
}
|
265
|
+
|
266
|
+
obj.container.on("jes:scrollToPage", function(event, url) {
|
267
|
+
history.replaceState({}, null, url);
|
268
|
+
});
|
269
|
+
}
|
270
|
+
}
|
271
|
+
|
272
|
+
$.endlessScroll = function(options) {
|
273
|
+
|
274
|
+
//Initialize modules
|
275
|
+
this.options = $.extend(true, {
|
276
|
+
container: "#container",
|
277
|
+
entity: ".entity",
|
278
|
+
_modules: [ ajaxModule, scrollModule, navigationModule, pushStateHistory ],
|
279
|
+
modules: []
|
280
|
+
}, options);
|
281
|
+
|
282
|
+
this.container = $(this.options.container);
|
283
|
+
if ( !this.container.length ) {
|
284
|
+
throw "Container for endless scroll isn't available on the page";
|
285
|
+
return;
|
286
|
+
}
|
287
|
+
|
288
|
+
|
289
|
+
//Merge custom options with default
|
290
|
+
$.merge(this.options.modules, this.options._modules);
|
291
|
+
//Init modules
|
292
|
+
this.options.modules.forEach($.proxy(function(module) {
|
293
|
+
module.init(this.options, this);
|
294
|
+
},this));
|
295
|
+
|
296
|
+
|
297
|
+
return this;
|
298
|
+
}
|
299
|
+
|
300
|
+
})(jQuery);
|
data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/{uploader.css → uploader.css.erb}
RENAMED
@@ -56,7 +56,7 @@ img {
|
|
56
56
|
.gal-holder .gal-item .gal-upload-holder .add {
|
57
57
|
display: block;
|
58
58
|
color: #2e5aff;
|
59
|
-
background: url(
|
59
|
+
background: url(<%= asset_path('ckeditor/filebrowser/images/gal_add.png') %>) no-repeat left center;
|
60
60
|
padding-left: 33px;
|
61
61
|
line-height: 25px;
|
62
62
|
text-decoration: none;
|
@@ -108,7 +108,7 @@ img {
|
|
108
108
|
}
|
109
109
|
.gal-more a {
|
110
110
|
color: #2e5aff;
|
111
|
-
background: url(
|
111
|
+
background: url(<%= asset_path('ckeditor/filebrowser/images/gal_more.gif') %>) no-repeat left center;
|
112
112
|
padding-left: 15px;
|
113
113
|
font-size: 14px;
|
114
114
|
text-decoration: none;
|
@@ -116,3 +116,7 @@ img {
|
|
116
116
|
.gal-more a:hover {
|
117
117
|
text-decoration: underline;
|
118
118
|
}
|
119
|
+
|
120
|
+
.pagination, .pagination a {
|
121
|
+
display: none;
|
122
|
+
}
|