glebtv-ckeditor 4.4.7.4 → 4.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +38 -0
- data/MIT-LICENSE +1 -1
- data/README.md +124 -84
- data/Rakefile +1 -25
- data/app/assets/javascripts/ckeditor/application.js +0 -1
- data/app/assets/javascripts/ckeditor/config.js.erb +5 -59
- data/app/assets/javascripts/ckeditor/config_orig.js +58 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.jpg +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.png +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/gal_del.png +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/gal_more.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/preloader.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/avi.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/ckfnothumb.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/doc.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/docx.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/exe.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/gz.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/htm.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/jpg.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mp3.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mpg.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/pdf.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/psd.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/rar.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/swf.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/tar.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/txt.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/unknown.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/wmv.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xls.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xlsx.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/zip.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/application.js.erb +58 -56
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +12 -6
- data/app/assets/javascripts/ckeditor/init.js.erb +6 -1
- data/app/assets/stylesheets/ckcontent.css +0 -0
- data/app/assets/stylesheets/ckeditor/application.css +0 -0
- data/app/controllers/ckeditor/application_controller.rb +6 -17
- data/app/controllers/ckeditor/attachment_files_controller.rb +10 -3
- data/app/controllers/ckeditor/pictures_controller.rb +9 -2
- data/app/helpers/ckeditor/application_helper.rb +0 -0
- data/app/views/ckeditor/attachment_files/index.html.erb +3 -3
- data/app/views/ckeditor/pictures/index.html.erb +3 -3
- data/app/views/ckeditor/shared/_asset.html.erb +0 -0
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +0 -0
- data/app/views/layouts/ckeditor/application.html.erb +3 -2
- data/app/views/rails_admin/main/_form_ck_editor.html.haml +1 -1
- data/app/views/rails_admin/main/_form_ck_editorml.html.haml +1 -1
- data/config/locales/bg.ckeditor.yml +9 -0
- data/config/locales/cs.ckeditor.yml +0 -0
- data/config/locales/de.ckeditor.yml +0 -0
- data/config/locales/el-GR.cdkeditor.yml +0 -0
- data/config/locales/en.ckeditor.yml +0 -0
- data/config/locales/es.ckeditor.yml +0 -0
- data/config/locales/fr.ckeditor.yml +0 -0
- data/config/locales/hu.ckeditor.yml +0 -0
- data/config/locales/it.ckeditor.yml +0 -0
- data/config/locales/ja.ckeditor.yml +9 -0
- data/config/locales/nb.ckeditor.yml +9 -0
- data/config/locales/nl.ckeditor.yml +0 -0
- data/config/locales/pl.ckeditor.yml +0 -0
- data/config/locales/pt-BR.ckeditor.yml +0 -0
- data/config/locales/pt-PT.ckeditor.yml +0 -0
- data/config/locales/ru.ckeditor.yml +0 -0
- data/config/locales/sv-SE.ckeditor.yml +0 -0
- data/config/locales/tr.ckeditor.yml +9 -0
- data/config/locales/uk.ckeditor.yml +0 -0
- data/config/locales/zh-CN.ckeditor.yml +1 -1
- data/config/locales/zh-TW.ckeditor.yml +9 -0
- data/config/routes.rb +0 -0
- data/lib/ckeditor.rb +39 -5
- data/lib/ckeditor/asset_response.rb +59 -0
- data/lib/ckeditor/backend/carrierwave.rb +1 -8
- data/lib/ckeditor/backend/dragonfly.rb +8 -6
- data/lib/ckeditor/backend/paperclip.rb +7 -11
- data/lib/ckeditor/backend/refile.rb +37 -0
- data/lib/ckeditor/engine.rb +4 -0
- data/lib/ckeditor/helpers/controllers.rb +0 -0
- data/lib/ckeditor/helpers/form_builder.rb +0 -0
- data/lib/ckeditor/helpers/form_helper.rb +0 -0
- data/lib/ckeditor/helpers/view_helper.rb +0 -0
- data/lib/ckeditor/hooks/cancan.rb +4 -1
- data/lib/ckeditor/hooks/formtastic.rb +0 -0
- data/lib/ckeditor/hooks/pundit.rb +0 -0
- data/lib/ckeditor/hooks/simple_form.rb +1 -1
- data/lib/ckeditor/http.rb +1 -3
- data/lib/ckeditor/orm/active_record.rb +0 -0
- data/lib/ckeditor/orm/base.rb +0 -0
- data/lib/ckeditor/orm/mongoid.rb +0 -0
- data/lib/ckeditor/paginatable.rb +0 -0
- data/lib/ckeditor/text_area.rb +2 -1
- data/lib/ckeditor/utils.rb +26 -23
- data/lib/ckeditor/utils/content_type_detector.rb +41 -0
- data/lib/ckeditor/utils/javascript_code.rb +10 -0
- data/lib/ckeditor/version.rb +4 -2
- data/lib/generators/ckeditor/install_generator.rb +1 -1
- data/lib/generators/ckeditor/pundit_policy_generator.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +3 -5
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +3 -5
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +7 -7
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/asset.rb +4 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/attachment_file.rb +7 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +11 -0
- data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +28 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +2 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +0 -0
- data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +13 -19
- data/lib/generators/ckeditor/templates/ckeditor.rb +23 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +3 -6
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +3 -5
- data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +3 -3
- data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +3 -3
- data/lib/glebtv-ckeditor.rb +0 -0
- data/lib/tasks/ckeditor.rake +26 -0
- data/test/controllers/attachment_files_controller_test.rb +2 -2
- data/test/controllers/pictures_controller_test.rb +3 -4
- data/test/dummy/Rakefile +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -1
- data/test/dummy/app/assets/stylesheets/application.css +0 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +0 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -1
- data/test/dummy/app/controllers/posts_controller.rb +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -0
- data/test/dummy/app/helpers/posts_helper.rb +0 -0
- data/test/dummy/app/models/post.rb +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +2 -2
- data/test/dummy/app/views/posts/_form.html.erb +0 -0
- data/test/dummy/app/views/posts/edit.html.erb +0 -0
- data/test/dummy/app/views/posts/index.html.erb +0 -0
- data/test/dummy/app/views/posts/new.html.erb +0 -0
- data/test/dummy/app/views/posts/show.html.erb +0 -0
- data/test/dummy/config.ru +0 -0
- data/test/dummy/config/application.rb +15 -15
- data/test/dummy/config/boot.rb +0 -0
- data/test/dummy/config/database.yml +0 -0
- data/test/dummy/config/environment.rb +0 -0
- data/test/dummy/config/environments/development.rb +0 -0
- data/test/dummy/config/environments/production.rb +0 -0
- data/test/dummy/config/environments/test.rb +7 -5
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/test/dummy/config/initializers/ckeditor.rb +0 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/inflections.rb +0 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/session_store.rb +0 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/test/dummy/config/locales/en.yml +0 -0
- data/test/dummy/config/mongoid.yml +135 -1
- data/test/dummy/config/routes.rb +3 -3
- data/test/dummy/config/secrets.yml +8 -0
- data/test/dummy/db/migrate/20110623120047_create_posts.rb +1 -1
- data/test/dummy/public/404.html +0 -0
- data/test/dummy/public/422.html +0 -0
- data/test/dummy/public/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +0 -0
- data/test/dummy/test/fixtures/files/rails.png +0 -0
- data/test/dummy/test/fixtures/files/rails.tar.gz +0 -0
- data/test/functional/posts_controller_test.rb +6 -6
- data/test/generators/install_generator_test.rb +14 -0
- data/test/integration/navigation_test.rb +0 -0
- data/test/models/attachment_file_test.rb +2 -2
- data/test/{ckeditor_test.rb → models/ckeditor_test.rb} +35 -0
- data/test/models/picture_test.rb +6 -1
- data/test/models/utils_test.rb +6 -6
- data/test/orm/active_record.rb +0 -0
- data/test/orm/mongoid.rb +0 -0
- data/test/support/helpers.rb +0 -0
- data/test/support/integration_case.rb +0 -0
- data/test/support/raw_post.rb +0 -0
- data/test/support/routes.txt +0 -0
- data/test/test_helper.rb +3 -5
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +159 -3
- data/vendor/assets/javascripts/ckeditor/README.md +39 -0
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +7 -7
- data/vendor/assets/javascripts/ckeditor/build-config.js +4 -3
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +1028 -964
- data/vendor/assets/javascripts/ckeditor/config.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autocomplete.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/commentselectedrange.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +49 -29
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +7 -8
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +33 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +4 -2
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +95 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neo.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-bright.css +35 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +65 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/zenburn.css +37 -0
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +10 -10
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +8 -8
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +16 -16
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +14 -14
- data/vendor/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +15 -15
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +29 -34
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +41 -40
- data/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/LICENSE +22 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/README.md +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/en.js +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/plugin.js +81 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/readme.txt +30 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +20 -20
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/hidpi/loremipsum.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/loremipsum.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/en.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +131 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +923 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +29 -28
- data/vendor/assets/javascripts/ckeditor/plugins/preview/preview.html +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -28
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +19 -17
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +8 -7
- 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/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +10 -10
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +9 -3
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +17 -17
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +12 -12
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +4 -2
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +4 -2
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +286 -145
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +88 -70
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +388 -388
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/spinner.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +49 -0
- data/vendor/assets/javascripts/ckeditor/styles.js +1 -1
- metadata +105 -130
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.min.js +0 -4
- data/app/assets/javascripts/ckeditor/override.js.erb +0 -21
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/support/controller_hooks.rb +0 -27
- data/vendor/assets/javascripts/ckeditor/plugins/ipsum/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/ipsum/plugin.js +0 -63
- data/vendor/assets/javascripts/ckeditor/plugins/map/example_usage.js +0 -30
- data/vendor/assets/javascripts/ckeditor/plugins/map/map.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/map/plugin.js +0 -187
- data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +0 -64
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css.scss +0 -771
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css.scss +0 -812
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css.scss +0 -844
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css.scss +0 -825
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css.scss +0 -816
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css.scss +0 -2136
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css.scss +0 -2145
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css.scss +0 -2194
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css.scss +0 -2362
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css.scss +0 -2206
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css.scss +0 -2254
@@ -1,7 +1,7 @@
|
|
1
1
|
CKEDITOR.editorConfig = function( config ) {
|
2
2
|
// Define changes to default configuration here. For example:
|
3
3
|
config.language = 'ru';
|
4
|
-
|
4
|
+
|
5
5
|
// config.uiColor = '#AADC6E';
|
6
6
|
config.skin = 'moono';
|
7
7
|
|
@@ -28,7 +28,7 @@ CKEDITOR.editorConfig = function( config ) {
|
|
28
28
|
config.filebrowserUploadUrl = "/ckeditor/attachment_files";
|
29
29
|
|
30
30
|
config.stylesSet = [];
|
31
|
-
config.extraPlugins = "colorbutton,colordialog,font,magicline,codemirror,
|
31
|
+
config.extraPlugins = "colorbutton,colordialog,font,magicline,codemirror,stylesheetparser,loremipsum,CKCss,wordcount,youtube,lineheight";
|
32
32
|
config.contentsCss = "<%= stylesheet_path('ckcontent.css') %>";
|
33
33
|
|
34
34
|
config.tabSpaces = 2;
|
@@ -39,64 +39,10 @@ CKEDITOR.editorConfig = function( config ) {
|
|
39
39
|
['Styles','Format','Font','FontSize', 'TextColor', 'BGColor'], ['JustifyLeft','JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
40
40
|
'/',
|
41
41
|
['Bold','Italic','Underline'], ['NumberedList','BulletedList','Blockquote'],
|
42
|
-
['Link','Unlink'], ['Image', 'Flash'],
|
42
|
+
['Link','Unlink'], ['lineheight'], ['Image', 'Flash'],
|
43
43
|
['Table','HorizontalRule','SpecialChar'], ['Maximize', 'Subscript', 'Superscript'], ['Outdent','Indent', 'ShowBlocks'],
|
44
|
-
['
|
44
|
+
['loremipsum', 'CKCss', 'Youtube']
|
45
45
|
];
|
46
46
|
|
47
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
|
-
});
|
102
|
-
};
|
48
|
+
};
|
@@ -0,0 +1,58 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.editorConfig = function( config )
|
7
|
+
{
|
8
|
+
// Define changes to default configuration here. For example:
|
9
|
+
// config.language = 'fr';
|
10
|
+
// config.uiColor = '#AADC6E';
|
11
|
+
|
12
|
+
/* Filebrowser routes */
|
13
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed.
|
14
|
+
config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
|
15
|
+
|
16
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Flash dialog.
|
17
|
+
config.filebrowserFlashBrowseUrl = "/ckeditor/attachment_files";
|
18
|
+
|
19
|
+
// The location of a script that handles file uploads in the Flash dialog.
|
20
|
+
config.filebrowserFlashUploadUrl = "/ckeditor/attachment_files";
|
21
|
+
|
22
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Link tab of Image dialog.
|
23
|
+
config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
|
24
|
+
|
25
|
+
// The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Image dialog.
|
26
|
+
config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
|
27
|
+
|
28
|
+
// The location of a script that handles file uploads in the Image dialog.
|
29
|
+
config.filebrowserImageUploadUrl = "/ckeditor/pictures";
|
30
|
+
|
31
|
+
// The location of a script that handles file uploads.
|
32
|
+
config.filebrowserUploadUrl = "/ckeditor/attachment_files";
|
33
|
+
|
34
|
+
config.allowedContent = true;
|
35
|
+
|
36
|
+
// Toolbar groups configuration.
|
37
|
+
config.toolbar = [
|
38
|
+
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source'] },
|
39
|
+
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
|
40
|
+
// { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
|
41
|
+
// { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
|
42
|
+
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
|
43
|
+
{ name: 'insert', items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar' ] },
|
44
|
+
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
|
45
|
+
'/',
|
46
|
+
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
|
47
|
+
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
|
48
|
+
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }
|
49
|
+
];
|
50
|
+
|
51
|
+
config.toolbar_mini = [
|
52
|
+
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
|
53
|
+
{ name: 'styles', items: [ 'Font', 'FontSize' ] },
|
54
|
+
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
|
55
|
+
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
|
56
|
+
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] }
|
57
|
+
];
|
58
|
+
};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,20 +11,22 @@ $.QueryString = (function(a) {
|
|
11
11
|
})(window.location.search.substr(1).split('&'))
|
12
12
|
|
13
13
|
$(document).ready(function(){
|
14
|
-
|
15
|
-
|
14
|
+
var selector = "div.gal-item div.gal-inner-holder";
|
15
|
+
|
16
|
+
$(document)
|
17
|
+
.on('mouseover', selector, function(e){
|
16
18
|
$(this).addClass('hover');
|
17
19
|
})
|
18
|
-
.
|
20
|
+
.on('mouseout', selector, function(e){
|
19
21
|
$(this).removeClass('hover');
|
20
22
|
})
|
21
|
-
.
|
23
|
+
.on('click', selector, function(e){
|
22
24
|
var url = $(this).parents('div.gal-item').data('url');
|
23
25
|
CKEDITOR.tools.callFunction(CKEditorFuncNum, url);
|
24
26
|
window.close();
|
25
27
|
});
|
26
|
-
|
27
|
-
$("div.gal-item a.gal-del"
|
28
|
+
|
29
|
+
$(document).on('ajax:complete', "div.gal-item a.gal-del", function(xhr, status){
|
28
30
|
$(this).parents('div.gal-item').remove();
|
29
31
|
});
|
30
32
|
|
@@ -49,15 +51,15 @@ qq.FileUploader.instances = new Object();
|
|
49
51
|
qq.FileUploaderInput = function(o){
|
50
52
|
// call parent constructor
|
51
53
|
qq.FileUploaderBasic.apply(this, arguments);
|
52
|
-
|
53
|
-
// additional options
|
54
|
+
|
55
|
+
// additional options
|
54
56
|
qq.extend(this._options, {
|
55
57
|
element: null,
|
56
58
|
// if set, will be used instead of qq-upload-list in template
|
57
59
|
listElement: null,
|
58
|
-
|
59
|
-
template_id: '#fileupload_tmpl',
|
60
|
-
|
60
|
+
|
61
|
+
template_id: '#fileupload_tmpl',
|
62
|
+
|
61
63
|
classes: {
|
62
64
|
// used to get elements from templates
|
63
65
|
button: 'fileupload-button',
|
@@ -65,7 +67,7 @@ qq.FileUploaderInput = function(o){
|
|
65
67
|
dropActive: 'fileupload-drop-area-active',
|
66
68
|
list: 'fileupload-list',
|
67
69
|
preview: 'fileupload-preview',
|
68
|
-
|
70
|
+
|
69
71
|
file: 'fileupload-file',
|
70
72
|
spinner: 'fileupload-spinner',
|
71
73
|
size: 'fileupload-size',
|
@@ -77,18 +79,18 @@ qq.FileUploaderInput = function(o){
|
|
77
79
|
fail: 'fileupload-fail'
|
78
80
|
}
|
79
81
|
});
|
80
|
-
// overwrite options with user supplied
|
81
|
-
qq.extend(this._options, o);
|
82
|
+
// overwrite options with user supplied
|
83
|
+
qq.extend(this._options, o);
|
82
84
|
|
83
85
|
this._element = document.getElementById(this._options.element);
|
84
86
|
this._listElement = this._options.listElement || this._find(this._element, 'list');
|
85
|
-
|
87
|
+
|
86
88
|
this._classes = this._options.classes;
|
87
|
-
|
88
|
-
this._button = this._createUploadButton(this._find(this._element, 'button'));
|
89
|
-
|
89
|
+
|
90
|
+
this._button = this._createUploadButton(this._find(this._element, 'button'));
|
91
|
+
|
90
92
|
//this._setupDragDrop();
|
91
|
-
|
93
|
+
|
92
94
|
qq.FileUploader.instances[this._element.id] = this;
|
93
95
|
};
|
94
96
|
|
@@ -99,18 +101,18 @@ qq.extend(qq.FileUploaderInput.prototype, {
|
|
99
101
|
/**
|
100
102
|
* Gets one of the elements listed in this._options.classes
|
101
103
|
**/
|
102
|
-
_find: function(parent, type){
|
103
|
-
var element = qq.getByClass(parent, this._options.classes[type])[0];
|
104
|
+
_find: function(parent, type){
|
105
|
+
var element = qq.getByClass(parent, this._options.classes[type])[0];
|
104
106
|
if (!element){
|
105
107
|
alert(type);
|
106
108
|
throw new Error('element not found ' + type);
|
107
109
|
}
|
108
|
-
|
110
|
+
|
109
111
|
return element;
|
110
112
|
},
|
111
113
|
_setupDragDrop: function(){
|
112
114
|
var self = this,
|
113
|
-
dropArea = this._find(this._element, 'drop');
|
115
|
+
dropArea = this._find(this._element, 'drop');
|
114
116
|
|
115
117
|
var dz = new qq.UploadDropZone({
|
116
118
|
element: dropArea,
|
@@ -122,49 +124,49 @@ qq.extend(qq.FileUploaderInput.prototype, {
|
|
122
124
|
e.stopPropagation();
|
123
125
|
},
|
124
126
|
onLeaveNotDescendants: function(e){
|
125
|
-
qq.removeClass(dropArea, self._classes.dropActive);
|
127
|
+
qq.removeClass(dropArea, self._classes.dropActive);
|
126
128
|
},
|
127
129
|
onDrop: function(e){
|
128
130
|
dropArea.style.display = 'none';
|
129
131
|
qq.removeClass(dropArea, self._classes.dropActive);
|
130
|
-
self._uploadFileList(e.dataTransfer.files);
|
132
|
+
self._uploadFileList(e.dataTransfer.files);
|
131
133
|
}
|
132
134
|
});
|
133
|
-
|
135
|
+
|
134
136
|
dropArea.style.display = 'none';
|
135
137
|
|
136
|
-
qq.attach(document, 'dragenter', function(e){
|
137
|
-
if (!dz._isValidFileDrag(e)) return;
|
138
|
-
|
139
|
-
dropArea.style.display = 'block';
|
140
|
-
});
|
138
|
+
qq.attach(document, 'dragenter', function(e){
|
139
|
+
if (!dz._isValidFileDrag(e)) return;
|
140
|
+
|
141
|
+
dropArea.style.display = 'block';
|
142
|
+
});
|
141
143
|
qq.attach(document, 'dragleave', function(e){
|
142
|
-
if (!dz._isValidFileDrag(e)) return;
|
143
|
-
|
144
|
+
if (!dz._isValidFileDrag(e)) return;
|
145
|
+
|
144
146
|
var relatedTarget = document.elementFromPoint(e.clientX, e.clientY);
|
145
147
|
// only fire when leaving document out
|
146
|
-
if ( ! relatedTarget || relatedTarget.nodeName == "HTML"){
|
147
|
-
dropArea.style.display = 'none';
|
148
|
+
if ( ! relatedTarget || relatedTarget.nodeName == "HTML"){
|
149
|
+
dropArea.style.display = 'none';
|
148
150
|
}
|
149
|
-
});
|
151
|
+
});
|
150
152
|
},
|
151
153
|
_onSubmit: function(id, fileName){
|
152
154
|
qq.FileUploaderBasic.prototype._onSubmit.apply(this, arguments);
|
153
|
-
this._addToList(id, fileName);
|
155
|
+
this._addToList(id, fileName);
|
154
156
|
},
|
155
157
|
_onProgress: function(id, fileName, loaded, total){
|
156
158
|
qq.FileUploaderBasic.prototype._onProgress.apply(this, arguments);
|
157
159
|
|
158
160
|
var item = this._getItemByFileId(id);
|
159
161
|
var size = this._find(item, 'size');
|
160
|
-
|
161
|
-
var text;
|
162
|
+
|
163
|
+
var text;
|
162
164
|
if (loaded != total){
|
163
165
|
text = Math.round(loaded / total * 100) + '% from ' + this._formatSize(total);
|
164
|
-
} else {
|
166
|
+
} else {
|
165
167
|
text = this._formatSize(total);
|
166
|
-
}
|
167
|
-
|
168
|
+
}
|
169
|
+
|
168
170
|
qq.setText(size, text);
|
169
171
|
},
|
170
172
|
_onComplete: function(id, fileName, result){
|
@@ -172,13 +174,13 @@ qq.extend(qq.FileUploaderInput.prototype, {
|
|
172
174
|
|
173
175
|
var item = this._getItemByFileId(id);
|
174
176
|
var asset = result.asset ? result.asset : result;
|
175
|
-
|
177
|
+
|
176
178
|
if (asset && asset.id){
|
177
179
|
qq.addClass(item, this._classes.success);
|
178
|
-
|
180
|
+
|
179
181
|
asset.size = this._formatSize(asset.size);
|
180
|
-
asset.controller = (asset.type.toLowerCase() == "ckeditor::picture" ? "pictures" : "attachment_files");
|
181
|
-
|
182
|
+
asset.controller = (asset.type !== undefined && asset.type.toLowerCase() == "ckeditor::picture" ? "pictures" : "attachment_files");
|
183
|
+
|
182
184
|
$(item).replaceWith($(this._options.template_id).tmpl(asset));
|
183
185
|
} else {
|
184
186
|
qq.addClass(item, this._classes.fail);
|
@@ -189,37 +191,37 @@ qq.extend(qq.FileUploaderInput.prototype, {
|
|
189
191
|
if (this._options.multiple === false) {
|
190
192
|
$(this._listElement).empty();
|
191
193
|
}
|
192
|
-
|
194
|
+
|
193
195
|
var asset = {
|
194
|
-
id: 0,
|
195
|
-
filename: this._formatFileName(fileName),
|
196
|
+
id: 0,
|
197
|
+
filename: this._formatFileName(fileName),
|
196
198
|
size: 0,
|
197
199
|
format_created_at: '',
|
198
200
|
url_content: "#",
|
199
201
|
controller: "assets",
|
200
202
|
url_thumb: "<%= asset_path('ckeditor/filebrowser/images/preloader.gif') %>"
|
201
203
|
};
|
202
|
-
|
204
|
+
|
203
205
|
var item = $(this._options.template_id)
|
204
206
|
.tmpl(asset)
|
205
207
|
.attr('qqfileid', id)
|
206
208
|
.prependTo( this._listElement );
|
207
|
-
|
209
|
+
|
208
210
|
item.find('div.img').addClass('preloader');
|
209
|
-
|
211
|
+
|
210
212
|
this._bindCancelEvent(item);
|
211
213
|
}
|
212
214
|
},
|
213
215
|
_getItemByFileId: function(id){
|
214
|
-
return $(this._listElement).find('div[qqfileid=' + id +']').get(0);
|
216
|
+
return $(this._listElement).find('div[qqfileid=' + id +']').get(0);
|
215
217
|
},
|
216
218
|
/**
|
217
|
-
* delegate click event for cancel link
|
219
|
+
* delegate click event for cancel link
|
218
220
|
**/
|
219
221
|
_bindCancelEvent: function(element){
|
220
222
|
var self = this,
|
221
|
-
item = $(element);
|
222
|
-
|
223
|
+
item = $(element);
|
224
|
+
|
223
225
|
item.find('a.' + this._classes.cancel).bind('click', function(e){
|
224
226
|
self._handler.cancel( item.attr('qqfileid') );
|
225
227
|
item.remove();
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,10 +11,12 @@ img {
|
|
11
11
|
overflow: hidden;
|
12
12
|
padding: 20px;
|
13
13
|
}
|
14
|
+
.gal-holder .gal-item:first-child {
|
15
|
+
float: left;
|
16
|
+
}
|
14
17
|
.gal-holder .gal-item {
|
15
|
-
|
16
|
-
|
17
|
-
width: 150px;
|
18
|
+
display: inline-block;
|
19
|
+
width: 150px;
|
18
20
|
overflow: hidden;
|
19
21
|
position: relative;
|
20
22
|
margin: 0 12px 12px 0;
|
@@ -26,7 +28,7 @@ img {
|
|
26
28
|
top: 0;
|
27
29
|
}
|
28
30
|
.gal-holder .gal-item .gal-del:hover {
|
29
|
-
-moz-opacity: 0.7;
|
31
|
+
-moz-opacity: 0.7;
|
30
32
|
-khtml-opacity: 0.7;
|
31
33
|
opacity: 0.7;
|
32
34
|
}
|
@@ -85,6 +87,10 @@ img {
|
|
85
87
|
overflow: hidden;
|
86
88
|
width: 500px;
|
87
89
|
}
|
90
|
+
.img-name {
|
91
|
+
word-wrap: break-word;
|
92
|
+
width: auto !important;
|
93
|
+
}
|
88
94
|
.gal-holder .gal-item .gal-inner-holder .img-data .time-size {
|
89
95
|
display: block;
|
90
96
|
overflow: hidden;
|
@@ -118,5 +124,5 @@ img {
|
|
118
124
|
}
|
119
125
|
|
120
126
|
.pagination, .pagination a {
|
121
|
-
|
122
|
-
}
|
127
|
+
text-decoration: none;
|
128
|
+
}
|