├── test
├── dummy
│ ├── app
│ │ ├── mailers
│ │ │ └── .gitkeep
│ │ ├── helpers
│ │ │ ├── posts_helper.rb
│ │ │ └── application_helper.rb
│ │ ├── views
│ │ │ ├── posts
│ │ │ │ ├── new.html.erb
│ │ │ │ ├── edit.html.erb
│ │ │ │ ├── show.html.erb
│ │ │ │ ├── index.html.erb
│ │ │ │ └── _form.html.erb
│ │ │ └── layouts
│ │ │ │ └── application.html.erb
│ │ ├── controllers
│ │ │ ├── application_controller.rb
│ │ │ └── posts_controller.rb
│ │ ├── models
│ │ │ └── post.rb
│ │ └── assets
│ │ │ ├── stylesheets
│ │ │ ├── application.css
│ │ │ └── scaffold.css
│ │ │ └── javascripts
│ │ │ └── application.js
│ ├── lib
│ │ └── assets
│ │ │ └── .gitkeep
│ ├── public
│ │ ├── favicon.ico
│ │ ├── 422.html
│ │ ├── 404.html
│ │ └── 500.html
│ ├── config
│ │ ├── mongoid.yml
│ │ ├── routes.rb
│ │ ├── environment.rb
│ │ ├── locales
│ │ │ └── en.yml
│ │ ├── initializers
│ │ │ ├── mime_types.rb
│ │ │ ├── backtrace_silencers.rb
│ │ │ ├── session_store.rb
│ │ │ ├── ckeditor.rb
│ │ │ ├── secret_token.rb
│ │ │ ├── wrap_parameters.rb
│ │ │ └── inflections.rb
│ │ ├── boot.rb
│ │ ├── database.yml
│ │ └── environments
│ │ │ ├── development.rb
│ │ │ ├── test.rb
│ │ │ └── production.rb
│ ├── test
│ │ └── fixtures
│ │ │ └── files
│ │ │ ├── rails.png
│ │ │ └── rails.tar.gz
│ ├── config.ru
│ ├── Rakefile
│ ├── script
│ │ └── rails
│ └── db
│ │ └── migrate
│ │ └── 20110623120047_create_posts.rb
├── orm
│ ├── active_record.rb
│ └── mongoid.rb
├── support
│ ├── routes.txt
│ ├── integration_case.rb
│ ├── raw_post.rb
│ ├── helpers.rb
│ └── controller_hooks.rb
├── integration
│ └── navigation_test.rb
├── ckeditor_test.rb
├── models
│ ├── picture_test.rb
│ ├── attachment_file_test.rb
│ └── utils_test.rb
├── test_helper.rb
├── functional
│ └── posts_controller_test.rb
└── controllers
│ ├── pictures_controller_test.rb
│ └── attachment_files_controller_test.rb
├── lib
├── ckeditor
│ ├── version.rb
│ ├── hooks
│ │ ├── formtastic.rb
│ │ ├── simple_form.rb
│ │ └── cancan.rb
│ ├── helpers
│ │ ├── form_builder.rb
│ │ ├── view_helper.rb
│ │ ├── form_helper.rb
│ │ └── controllers.rb
│ ├── orm
│ │ ├── active_record.rb
│ │ ├── base.rb
│ │ └── mongoid.rb
│ ├── engine.rb
│ ├── backend
│ │ ├── dragonfly.rb
│ │ ├── carrierwave.rb
│ │ └── paperclip.rb
│ └── http.rb
└── generators
│ └── ckeditor
│ └── templates
│ ├── active_record
│ ├── paperclip
│ │ ├── ckeditor
│ │ │ ├── asset.rb
│ │ │ ├── attachment_file.rb
│ │ │ └── picture.rb
│ │ └── migration.rb
│ ├── carrierwave
│ │ ├── ckeditor
│ │ │ ├── picture.rb
│ │ │ ├── asset.rb
│ │ │ └── attachment_file.rb
│ │ └── migration.rb
│ └── dragonfly
│ │ ├── ckeditor
│ │ ├── asset.rb
│ │ ├── attachment_file.rb
│ │ └── picture.rb
│ │ └── migration.rb
│ ├── mongoid
│ ├── paperclip
│ │ └── ckeditor
│ │ │ ├── asset.rb
│ │ │ ├── attachment_file.rb
│ │ │ └── picture.rb
│ └── carrierwave
│ │ └── ckeditor
│ │ ├── picture.rb
│ │ ├── asset.rb
│ │ └── attachment_file.rb
│ ├── ckeditor.rb
│ └── base
│ ├── dragonfly
│ └── initializer.rb
│ └── carrierwave
│ └── uploaders
│ ├── ckeditor_attachment_file_uploader.rb
│ └── ckeditor_picture_uploader.rb
├── vendor
└── assets
│ └── javascripts
│ └── ckeditor
│ ├── plugins
│ ├── icons.png
│ ├── image
│ │ └── images
│ │ │ └── noimage.png
│ ├── link
│ │ ├── images
│ │ │ └── anchor.png
│ │ └── dialogs
│ │ │ └── anchor.js
│ ├── smiley
│ │ └── images
│ │ │ ├── heart.gif
│ │ │ ├── kiss.gif
│ │ │ ├── envelope.gif
│ │ │ ├── angel_smile.gif
│ │ │ ├── angry_smile.gif
│ │ │ ├── cry_smile.gif
│ │ │ ├── devil_smile.gif
│ │ │ ├── lightbulb.gif
│ │ │ ├── omg_smile.gif
│ │ │ ├── sad_smile.gif
│ │ │ ├── teeth_smile.gif
│ │ │ ├── thumbs_down.gif
│ │ │ ├── thumbs_up.gif
│ │ │ ├── wink_smile.gif
│ │ │ ├── broken_heart.gif
│ │ │ ├── regular_smile.gif
│ │ │ ├── shades_smile.gif
│ │ │ ├── tongue_smile.gif
│ │ │ ├── tounge_smile.gif
│ │ │ ├── confused_smile.gif
│ │ │ ├── embaressed_smile.gif
│ │ │ ├── embarrassed_smile.gif
│ │ │ └── whatchutalkingabout_smile.gif
│ ├── magicline
│ │ └── images
│ │ │ └── icon.png
│ ├── fakeobjects
│ │ └── images
│ │ │ └── spacer.gif
│ ├── flash
│ │ └── images
│ │ │ └── placeholder.png
│ ├── forms
│ │ ├── images
│ │ │ └── hiddenfield.gif
│ │ └── dialogs
│ │ │ ├── hiddenfield.js
│ │ │ ├── button.js
│ │ │ ├── textarea.js
│ │ │ ├── radio.js
│ │ │ ├── form.js
│ │ │ └── checkbox.js
│ ├── iframe
│ │ └── images
│ │ │ └── placeholder.png
│ ├── showblocks
│ │ └── images
│ │ │ ├── block_p.png
│ │ │ ├── block_div.png
│ │ │ ├── block_h1.png
│ │ │ ├── block_h2.png
│ │ │ ├── block_h3.png
│ │ │ ├── block_h4.png
│ │ │ ├── block_h5.png
│ │ │ ├── block_h6.png
│ │ │ ├── block_pre.png
│ │ │ ├── block_address.png
│ │ │ └── block_blockquote.png
│ ├── about
│ │ └── dialogs
│ │ │ ├── logo_ckeditor.png
│ │ │ └── about.js
│ ├── pagebreak
│ │ └── images
│ │ │ └── pagebreak.gif
│ ├── templates
│ │ ├── templates
│ │ │ ├── images
│ │ │ │ ├── template1.gif
│ │ │ │ ├── template2.gif
│ │ │ │ └── template3.gif
│ │ │ └── default.js
│ │ └── dialogs
│ │ │ └── templates.css
│ ├── dialog
│ │ └── dialogDefinition.js
│ ├── preview
│ │ └── preview.html
│ ├── specialchar
│ │ └── dialogs
│ │ │ └── lang
│ │ │ ├── _translationstatus.txt
│ │ │ └── zh-cn.js
│ ├── a11yhelp
│ │ └── dialogs
│ │ │ ├── lang
│ │ │ ├── _translationstatus.txt
│ │ │ ├── zh-cn.js
│ │ │ ├── he.js
│ │ │ ├── gu.js
│ │ │ ├── ar.js
│ │ │ ├── bg.js
│ │ │ ├── ja.js
│ │ │ ├── en.js
│ │ │ ├── et.js
│ │ │ ├── hi.js
│ │ │ ├── hr.js
│ │ │ ├── hu.js
│ │ │ ├── mn.js
│ │ │ ├── pl.js
│ │ │ ├── pt.js
│ │ │ ├── ru.js
│ │ │ ├── sl.js
│ │ │ ├── uk.js
│ │ │ ├── da.js
│ │ │ └── lt.js
│ │ │ └── a11yhelp.js
│ ├── wsc
│ │ ├── README.md
│ │ ├── dialogs
│ │ │ ├── ciframe.html
│ │ │ ├── wsc.css
│ │ │ └── tmpFrameset.html
│ │ └── LICENSE.md
│ └── scayt
│ │ ├── README.md
│ │ ├── LICENSE.md
│ │ └── dialogs
│ │ └── toolbar.css
│ ├── skins
│ └── moono
│ │ ├── icons.png
│ │ ├── images
│ │ ├── mini.png
│ │ ├── arrow.png
│ │ └── close.png
│ │ └── readme.md
│ ├── config.js
│ ├── README.md
│ └── contents.css
├── app
├── assets
│ ├── javascripts
│ │ └── ckeditor
│ │ │ ├── filebrowser
│ │ │ └── images
│ │ │ │ ├── gal_add.jpg
│ │ │ │ ├── gal_add.png
│ │ │ │ ├── gal_del.png
│ │ │ │ ├── gal_more.gif
│ │ │ │ ├── preloader.gif
│ │ │ │ └── thumbs
│ │ │ │ ├── gz.gif
│ │ │ │ ├── avi.gif
│ │ │ │ ├── doc.gif
│ │ │ │ ├── docx.gif
│ │ │ │ ├── exe.gif
│ │ │ │ ├── htm.gif
│ │ │ │ ├── jpg.gif
│ │ │ │ ├── mp3.gif
│ │ │ │ ├── mpg.gif
│ │ │ │ ├── pdf.gif
│ │ │ │ ├── psd.gif
│ │ │ │ ├── rar.gif
│ │ │ │ ├── swf.gif
│ │ │ │ ├── tar.gif
│ │ │ │ ├── txt.gif
│ │ │ │ ├── wmv.gif
│ │ │ │ ├── xls.gif
│ │ │ │ ├── xlsx.gif
│ │ │ │ ├── zip.gif
│ │ │ │ ├── unknown.gif
│ │ │ │ └── ckfnothumb.gif
│ │ │ ├── init.js.erb
│ │ │ └── application.js
│ └── stylesheets
│ │ └── ckeditor
│ │ └── application.css
├── views
│ ├── ckeditor
│ │ ├── pictures
│ │ │ └── index.html.erb
│ │ ├── attachment_files
│ │ │ └── index.html.erb
│ │ └── shared
│ │ │ ├── _asset.html.erb
│ │ │ └── _asset_tmpl.html.erb
│ └── layouts
│ │ └── ckeditor
│ │ └── application.html.erb
└── controllers
│ └── ckeditor
│ ├── pictures_controller.rb
│ ├── attachment_files_controller.rb
│ └── application_controller.rb
├── config
├── routes.rb
└── locales
│ ├── zh-CN.ckeditor.yml
│ ├── nl.ckeditor.yml
│ ├── en.ckeditor.yml
│ ├── pl.ckeditor.yml
│ ├── cs.ckeditor.yml
│ ├── ru.ckeditor.yml
│ ├── de.ckeditor.yml
│ ├── it.ckeditor.yml
│ ├── sv-SE.ckeditor.yml
│ ├── es.ckeditor.yml
│ ├── uk.ckeditor.yml
│ ├── el-GR.cdkeditor.yml
│ ├── pt-BR.ckeditor.yml
│ └── fr.ckeditor.yml
├── .gitignore
├── Gemfile
├── ckeditor.gemspec
├── MIT-LICENSE
└── Rakefile
/test/dummy/app/mailers/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/dummy/lib/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/dummy/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/dummy/app/helpers/posts_helper.rb:
--------------------------------------------------------------------------------
1 | module PostsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/test/dummy/config/mongoid.yml:
--------------------------------------------------------------------------------
1 | test:
2 | database: ckeditor-test-suite
3 |
--------------------------------------------------------------------------------
/test/dummy/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/test/orm/active_record.rb:
--------------------------------------------------------------------------------
1 | ActiveRecord::Migrator.migrate(File.expand_path("../../dummy/db/migrate/", __FILE__))
2 |
--------------------------------------------------------------------------------
/test/support/routes.txt:
--------------------------------------------------------------------------------
1 | Dummy::Application.routes.draw do
2 | resources :posts
3 | root :to => "posts#index"
4 | end
5 |
--------------------------------------------------------------------------------
/test/dummy/app/views/posts/new.html.erb:
--------------------------------------------------------------------------------
1 |
New post
2 |
3 | <%= render 'form' %>
4 |
5 | <%= link_to 'Back', posts_path %>
6 |
--------------------------------------------------------------------------------
/test/dummy/test/fixtures/files/rails.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/test/dummy/test/fixtures/files/rails.png
--------------------------------------------------------------------------------
/lib/ckeditor/version.rb:
--------------------------------------------------------------------------------
1 | module Ckeditor
2 | module Version
3 | GEM = "4.0.2".freeze
4 | EDITOR = "4.0.1".freeze
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/test/dummy/test/fixtures/files/rails.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/test/dummy/test/fixtures/files/rails.tar.gz
--------------------------------------------------------------------------------
/test/orm/mongoid.rb:
--------------------------------------------------------------------------------
1 | class ActiveSupport::TestCase
2 | setup do
3 | Post.delete_all
4 | Ckeditor::Asset.delete_all
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/icons.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/skins/moono/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/skins/moono/icons.png
--------------------------------------------------------------------------------
/test/dummy/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | protect_from_forgery
3 | respond_to :html, :xml
4 | end
5 |
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.jpg
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.png
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/gal_del.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/gal_del.png
--------------------------------------------------------------------------------
/test/dummy/app/views/posts/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing post
2 |
3 | <%= render 'form' %>
4 |
5 | <%= link_to 'Show', @post %> |
6 | <%= link_to 'Back', posts_path %>
7 |
--------------------------------------------------------------------------------
/test/dummy/app/views/posts/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | <%= link_to 'Edit', edit_post_path(@post) %> |
5 | <%= link_to 'Back', posts_path %>
6 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/skins/moono/images/mini.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/skins/moono/images/mini.png
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/gal_more.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/gal_more.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/preloader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/preloader.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/gz.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/gz.gif
--------------------------------------------------------------------------------
/test/dummy/config/routes.rb:
--------------------------------------------------------------------------------
1 | Dummy::Application.routes.draw do
2 | resources :posts
3 | root :to => "posts#index"
4 |
5 | mount Ckeditor::Engine => '/ckeditor'
6 | end
7 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/avi.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/avi.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/doc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/doc.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/docx.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/docx.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/exe.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/exe.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/htm.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/htm.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/jpg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/jpg.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mp3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mp3.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mpg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mpg.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/pdf.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/pdf.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/psd.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/psd.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/rar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/rar.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/swf.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/swf.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/tar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/tar.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/txt.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/txt.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/wmv.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/wmv.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xls.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xls.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xlsx.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xlsx.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/zip.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/zip.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/unknown.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/unknown.gif
--------------------------------------------------------------------------------
/test/dummy/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Dummy::Application
5 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/ckfnothumb.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/ckfnothumb.gif
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | Ckeditor::Engine.routes.draw do
2 | resources :pictures, :only => [:index, :create, :destroy]
3 | resources :attachment_files, :only => [:index, :create, :destroy]
4 | end
5 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif
--------------------------------------------------------------------------------
/test/dummy/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the rails application
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the rails application
5 | Dummy::Application.initialize!
6 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif
--------------------------------------------------------------------------------
/config/locales/zh-CN.ckeditor.yml:
--------------------------------------------------------------------------------
1 | zh-CN:
2 | ckeditor:
3 | page_title: "CKEditor - 文件管理"
4 | confirm_delete: "删除文件?"
5 | buttons:
6 | cancel: "取消"
7 | upload: "上传"
8 | delete: "删除"
9 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Asset < ActiveRecord::Base
2 | include Ckeditor::Orm::ActiveRecord::AssetBase
3 | include Ckeditor::Backend::Paperclip
4 | end
5 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Asset
2 | include Ckeditor::Orm::Mongoid::AssetBase
3 | include Mongoid::Paperclip
4 | include Ckeditor::Backend::Paperclip
5 | end
6 |
--------------------------------------------------------------------------------
/test/integration/navigation_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class NavigationTest < ActiveSupport::IntegrationCase
4 | test "truth" do
5 | assert_kind_of Dummy::Application, Rails.application
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/diasks2/ckeditor/master/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif
--------------------------------------------------------------------------------
/config/locales/nl.ckeditor.yml:
--------------------------------------------------------------------------------
1 | nl:
2 | ckeditor:
3 | page_title: "CKEditor Files Manager"
4 | confirm_delete: "Delete file?"
5 | buttons:
6 | cancel: "Cancel"
7 | upload: "Upload"
8 | delete: "Delete"
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 |
--------------------------------------------------------------------------------
/config/locales/en.ckeditor.yml:
--------------------------------------------------------------------------------
1 | en:
2 | ckeditor:
3 | page_title: "CKEditor Files Manager"
4 | confirm_delete: "Delete file?"
5 | buttons:
6 | cancel: "Cancel"
7 | upload: "Upload"
8 | delete: "Delete"
9 |
--------------------------------------------------------------------------------
/config/locales/pl.ckeditor.yml:
--------------------------------------------------------------------------------
1 | pl:
2 | ckeditor:
3 | page_title: "CKEditor Menadżer Plików"
4 | confirm_delete: "Usunąć plik?"
5 | buttons:
6 | cancel: "Anuluj"
7 | upload: "Wyślij"
8 | delete: "Skasuj"
9 |
--------------------------------------------------------------------------------
/test/support/integration_case.rb:
--------------------------------------------------------------------------------
1 | # Define a bare test case to use with Capybara
2 | class ActiveSupport::IntegrationCase < ActiveSupport::TestCase
3 | include Capybara::DSL
4 | include Rails.application.routes.url_helpers
5 | end
6 |
--------------------------------------------------------------------------------
/config/locales/cs.ckeditor.yml:
--------------------------------------------------------------------------------
1 | cs:
2 | ckeditor:
3 | page_title: "CKEditor Správce souborů"
4 | confirm_delete: "Smazat soubor ?"
5 | buttons:
6 | cancel: "Zrušit"
7 | upload: "Nahrát"
8 | delete: "Smazat"
9 |
--------------------------------------------------------------------------------
/config/locales/ru.ckeditor.yml:
--------------------------------------------------------------------------------
1 | ru:
2 | ckeditor:
3 | page_title: "CKEditor Загрузка файлов"
4 | confirm_delete: "Удалить файл?"
5 | buttons:
6 | cancel: "Отмена"
7 | upload: "Загрузить"
8 | delete: "Удалить"
9 |
--------------------------------------------------------------------------------
/config/locales/de.ckeditor.yml:
--------------------------------------------------------------------------------
1 | de:
2 | ckeditor:
3 | page_title: "CKEditor Dateimanager"
4 | confirm_delete: "Datei löschen?"
5 | buttons:
6 | cancel: "Abbrechen"
7 | upload: "Hochladen"
8 | delete: "Löschen"
9 |
--------------------------------------------------------------------------------
/config/locales/it.ckeditor.yml:
--------------------------------------------------------------------------------
1 | it:
2 | ckeditor:
3 | page_title: "CKEditor Files Manager"
4 | confirm_delete: "Cancellare il file?"
5 | buttons:
6 | cancel: "Annulla"
7 | upload: "Carica"
8 | delete: "Elimina"
9 |
--------------------------------------------------------------------------------
/config/locales/sv-SE.ckeditor.yml:
--------------------------------------------------------------------------------
1 | "sv-SE":
2 | ckeditor:
3 | page_title: "CKEditor filhanterare"
4 | confirm_delete: "Ta bort fil?"
5 | buttons:
6 | cancel: "Avbryt"
7 | upload: "Ladda upp"
8 | delete: "Ta bort"
9 |
--------------------------------------------------------------------------------
/config/locales/es.ckeditor.yml:
--------------------------------------------------------------------------------
1 | es:
2 | ckeditor:
3 | page_title: "Administrador de Archivos CKEditor"
4 | confirm_delete: "¿Borrar archivo?"
5 | buttons:
6 | cancel: "Cancelar"
7 | upload: "Subir"
8 | delete: "Borrar"
9 |
--------------------------------------------------------------------------------
/config/locales/uk.ckeditor.yml:
--------------------------------------------------------------------------------
1 | uk:
2 | ckeditor:
3 | page_title: "CKEditor Завантаження файлів"
4 | confirm_delete: "Видалити файл?"
5 | buttons:
6 | cancel: "Відміна"
7 | upload: "Завантажити"
8 | delete: "Видалити"
9 |
--------------------------------------------------------------------------------
/config/locales/el-GR.cdkeditor.yml:
--------------------------------------------------------------------------------
1 | "el-GR":
2 | ckeditor:
3 | page_title: "CKEditor Διαχείρηση Αρχείων"
4 | confirm_delete: "Διαγραφή αρχείου;"
5 | buttons:
6 | cancel: "Ακύρωση"
7 | upload: "Μεταφόρτωση"
8 | delete: "Διαγραφή"
--------------------------------------------------------------------------------
/config/locales/pt-BR.ckeditor.yml:
--------------------------------------------------------------------------------
1 | "pt-BR":
2 | ckeditor:
3 | page_title: "Gerenciador de arquivos do CKEditor"
4 | confirm_delete: "Apagar arquivo?"
5 | buttons:
6 | cancel: "Cancelar"
7 | upload: "Enviar"
8 | delete: "Apagar"
--------------------------------------------------------------------------------
/config/locales/fr.ckeditor.yml:
--------------------------------------------------------------------------------
1 | fr:
2 | ckeditor:
3 | page_title: "CKEditor - Gestionnaire de fichiers"
4 | confirm_delete: "Supprimer le fichier ?"
5 | buttons:
6 | cancel: "Annuler"
7 | upload: "Ajouter"
8 | delete: "Supprimer"
9 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Picture < Ckeditor::Asset
2 | mount_uploader :data, CkeditorPictureUploader, :mount_on => :data_file_name
3 |
4 | def url_content
5 | url(:content)
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/test/dummy/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Sample localization file for English. Add more files in this directory for other locales.
2 | # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3 |
4 | en:
5 | hello: "Hello world"
6 |
--------------------------------------------------------------------------------
/test/dummy/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 | # Mime::Type.register_alias "text/html", :iphone
6 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/preview/preview.html:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Picture < Ckeditor::Asset
2 | mount_uploader :data, CkeditorPictureUploader, :mount_on => :data_file_name
3 |
4 | def url_content
5 | url(:content)
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Asset
2 | include Ckeditor::Orm::Mongoid::AssetBase
3 |
4 | delegate :url, :current_path, :size, :content_type, :filename, :to => :data
5 |
6 | validates_presence_of :data
7 | end
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .bundle/
2 | log/*.log
3 | pkg/
4 | test/dummy/db/*.sqlite3
5 | test/dummy/db/schema.rb
6 | test/dummy/log/*.log
7 | test/dummy/log/
8 | test/dummy/public/ckeditor_assets/
9 | test/dummy/tmp/
10 | test/tmp
11 | test/dummy/public/uploads/*
12 | *.swp
13 | .idea
14 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Asset < ActiveRecord::Base
2 | include Ckeditor::Orm::ActiveRecord::AssetBase
3 |
4 | delegate :url, :current_path, :content_type, :to => :data
5 |
6 | validates_presence_of :data
7 | end
8 |
--------------------------------------------------------------------------------
/lib/ckeditor/hooks/formtastic.rb:
--------------------------------------------------------------------------------
1 | require "formtastic"
2 |
3 | class CkeditorInput
4 | include ::Formtastic::Inputs::Base
5 |
6 | def to_html
7 | input_wrapping do
8 | label_html <<
9 | builder.cktext_area(method, input_html_options)
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Asset < ActiveRecord::Base
2 | include Ckeditor::Orm::ActiveRecord::AssetBase
3 | include Ckeditor::Backend::Dragonfly
4 |
5 | ckeditor_file_accessor :data
6 | validates_presence_of :data
7 | end
8 |
--------------------------------------------------------------------------------
/test/dummy/config/boot.rb:
--------------------------------------------------------------------------------
1 | require 'rubygems'
2 | gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3 |
4 | if File.exist?(gemfile)
5 | ENV['BUNDLE_GEMFILE'] = gemfile
6 | require 'bundler'
7 | Bundler.setup
8 | end
9 |
10 | $:.unshift File.expand_path('../../../../lib', __FILE__)
11 |
--------------------------------------------------------------------------------
/test/dummy/Rakefile:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rake
2 | # Add your own tasks in files placed in lib/tasks ending in .rake,
3 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4 |
5 | require File.expand_path('../config/application', __FILE__)
6 |
7 | Dummy::Application.load_tasks
8 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::AttachmentFile < Ckeditor::Asset
2 | mount_uploader :data, CkeditorAttachmentFileUploader, :mount_on => :data_file_name
3 |
4 | def url_thumb
5 | @url_thumb ||= Ckeditor::Utils.filethumb(filename)
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::AttachmentFile < Ckeditor::Asset
2 | mount_uploader :data, CkeditorAttachmentFileUploader, :mount_on => :data_file_name
3 |
4 | def url_thumb
5 | @url_thumb ||= Ckeditor::Utils.filethumb(filename)
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/test/support/raw_post.rb:
--------------------------------------------------------------------------------
1 | module RawPost
2 | def raw_post(action, params, body, content_type = nil)
3 | @request.env['RAW_POST_DATA'] = body
4 | @request.env['CONTENT_TYPE'] = content_type
5 | response = post(action, params)
6 | @request.env.delete('RAW_POST_DATA')
7 | response
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::AttachmentFile < Ckeditor::Asset
2 | validates_property :format, :of => :data, :in => attachment_file_types unless attachment_file_types.empty?
3 |
4 | def url_thumb
5 | Ckeditor::Utils.filethumb(filename)
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/test/dummy/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Dummy
5 | <%= stylesheet_link_tag "application" %>
6 | <%= javascript_include_tag "application" %>
7 | <%= csrf_meta_tags %>
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/init.js.erb:
--------------------------------------------------------------------------------
1 | //= require_self
2 | //= require ckeditor/ckeditor
3 |
4 | (function() {
5 | if (typeof window['CKEDITOR_BASEPATH'] === "undefined" || window['CKEDITOR_BASEPATH'] === null) {
6 | window['CKEDITOR_BASEPATH'] = "<%= config.relative_url_root %>/assets/ckeditor/";
7 | }
8 | }).call(this);
9 |
--------------------------------------------------------------------------------
/test/ckeditor_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class CkeditorTest < ActiveSupport::TestCase
4 | test "truth" do
5 | assert_kind_of Module, Ckeditor
6 | end
7 |
8 | test 'setup block yields self' do
9 | Ckeditor.setup do |config|
10 | assert_equal Ckeditor, config
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/test/dummy/script/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3 |
4 | APP_PATH = File.expand_path('../../config/application', __FILE__)
5 | require File.expand_path('../../config/boot', __FILE__)
6 | require 'rails/commands'
7 |
--------------------------------------------------------------------------------
/lib/ckeditor/helpers/form_builder.rb:
--------------------------------------------------------------------------------
1 | module Ckeditor
2 | module Helpers
3 | module FormBuilder
4 | extend ActiveSupport::Concern
5 |
6 | def cktext_area(method, options = {})
7 | @template.send("cktext_area", @object_name, method, objectify_options(options))
8 | end
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/test/dummy/db/migrate/20110623120047_create_posts.rb:
--------------------------------------------------------------------------------
1 | class CreatePosts < ActiveRecord::Migration
2 | def self.up
3 | create_table :posts do |t|
4 | t.string :title
5 | t.text :info
6 | t.text :content
7 | t.timestamps
8 | end
9 | end
10 |
11 | def self.down
12 | drop_table :posts
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/app/assets/javascripts/ckeditor/application.js:
--------------------------------------------------------------------------------
1 | //= require ckeditor/filebrowser/javascripts/jquery.min.js
2 | //= require ckeditor/filebrowser/javascripts/jquery.tmpl.min.js
3 | //= require ckeditor/filebrowser/javascripts/fileuploader.js
4 | //= require ckeditor/filebrowser/javascripts/rails.js
5 | //= require ckeditor/filebrowser/javascripts/application.js
6 |
--------------------------------------------------------------------------------
/test/dummy/app/models/post.rb:
--------------------------------------------------------------------------------
1 | case CKEDITOR_ORM
2 |
3 | when :active_record
4 | class Post < ActiveRecord::Base
5 | validates_presence_of :title, :info, :content
6 | end
7 |
8 | when :mongoid
9 | class Post
10 | include Mongoid::Document
11 | field :title
12 | field :info
13 | field :content
14 | validates_presence_of :title, :info, :content
15 | end
16 |
17 | end
18 |
--------------------------------------------------------------------------------
/test/dummy/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll automatically include all the stylesheets available in this directory
3 | * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4 | * the top of the compiled file, but it's generally better to create a new file per style scope.
5 | *= require_self
6 | *= require_tree .
7 | */
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @license Copyright (c) 2003-2012, 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 | // Define changes to default configuration here. For example:
8 | // config.language = 'fr';
9 | // config.uiColor = '#AADC6E';
10 | };
11 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/ckeditor/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll automatically include all the stylesheets available in this directory
3 | * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4 | * the top of the compiled file, but it's generally better to create a new file per style scope.
5 | *= require ckeditor/filebrowser/stylesheets/uploader.css
6 | */
7 |
--------------------------------------------------------------------------------
/test/dummy/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/test/dummy/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4 |
5 | # Use the database for sessions instead of the cookie-based default,
6 | # which shouldn't be used to store highly confidential information
7 | # (create the session table with "rails generate session_migration")
8 | # Dummy::Application.config.session_store :active_record_store
9 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Picture < Ckeditor::Asset
2 | validates_property :format, :of => :data, :in => image_file_types unless image_file_types.empty?
3 | validates_property :image?, :of => :data, :as => true, :message => :invalid
4 |
5 | def url_content
6 | data.thumb("800x800>").url
7 | end
8 |
9 | def url_thumb
10 | data.thumb("118x100#").url(url_thumb_options)
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/test/dummy/config/initializers/ckeditor.rb:
--------------------------------------------------------------------------------
1 | dir = File.join(Rails.root, "..", "..", "lib", "generators", "ckeditor", "templates")
2 |
3 | # Load the CKEditor initializer from the codebase.
4 | initializer = ERB.new(File.read(File.join(dir, "ckeditor.rb")))
5 | options = { :orm => CKEDITOR_ORM }
6 | eval initializer.result(binding)
7 |
8 | # Also load the specific initializer for the selected backend.
9 | initializer = File.join(dir, "base", CKEDITOR_BACKEND.to_s, "initializer.rb")
10 | require initializer if File.exist?(initializer)
11 |
--------------------------------------------------------------------------------
/test/dummy/config/initializers/secret_token.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 | # Make sure the secret is at least 30 characters and all random,
6 | # no regular words or you'll be exposed to dictionary attacks.
7 | Dummy::Application.config.secret_token = 'b2bff8519e4dc66209a692e860c982629cc69af9fc6ef22f31179a8e7cf2ebce51918eba177661201d3af5bcdc51c83fcfa5ab3ec77e5f8d23138a9c73c75d80'
8 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::AttachmentFile < Ckeditor::Asset
2 | has_attached_file :data,
3 | :url => "/ckeditor_assets/attachments/:id/:filename",
4 | :path => ":rails_root/public/ckeditor_assets/attachments/:id/:filename"
5 |
6 | validates_attachment_size :data, :less_than => 100.megabytes
7 | validates_attachment_presence :data
8 |
9 | def url_thumb
10 | @url_thumb ||= Ckeditor::Utils.filethumb(filename)
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/app/views/ckeditor/pictures/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= link_to I18n.t(:upload, :scope => [:ckeditor, :buttons]), 'javascript:void(0)', :class => "add" %>
5 |
6 |
7 |
8 |
9 | <%= render :partial => 'ckeditor/shared/asset', :collection => @pictures %>
10 |
11 |
12 |
13 |
16 |
--------------------------------------------------------------------------------
/test/dummy/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
11 | # Disable root element in JSON by default.
12 | ActiveSupport.on_load(:active_record) do
13 | self.include_root_in_json = false
14 | end
15 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::AttachmentFile < Ckeditor::Asset
2 | has_mongoid_attached_file :data,
3 | :url => "/ckeditor_assets/attachments/:id/:filename",
4 | :path => ":rails_root/public/ckeditor_assets/attachments/:id/:filename"
5 |
6 | validates_attachment_size :data, :less_than => 100.megabytes
7 | validates_attachment_presence :data
8 |
9 | def url_thumb
10 | @url_thumb ||= Ckeditor::Utils.filethumb(filename)
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/test/dummy/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into including all the files listed below.
2 | // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3 | // be included in the compiled file accessible from http://example.com/assets/application.js
4 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5 | // the compiled file.
6 | //
7 | //= require jquery
8 | //= require jquery_ujs
9 | //= require_tree .
10 |
11 | //= require ckeditor/init
12 |
--------------------------------------------------------------------------------
/app/views/ckeditor/attachment_files/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= link_to I18n.t(:upload, :scope => [:ckeditor, :buttons]), 'javascript:void(0)', :class => "add" %>
5 |
6 |
7 |
8 |
9 | <%= render :partial => 'ckeditor/shared/asset', :collection => @attachments %>
10 |
11 |
12 |
13 |
16 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Picture < Ckeditor::Asset
2 | has_attached_file :data,
3 | :url => "/ckeditor_assets/pictures/:id/:style_:basename.:extension",
4 | :path => ":rails_root/public/ckeditor_assets/pictures/:id/:style_:basename.:extension",
5 | :styles => { :content => '800>', :thumb => '118x100#' }
6 |
7 | validates_attachment_size :data, :less_than => 2.megabytes
8 | validates_attachment_presence :data
9 |
10 | def url_content
11 | url(:content)
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/test/dummy/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format
4 | # (all these examples are active by default):
5 | # ActiveSupport::Inflector.inflections do |inflect|
6 | # inflect.plural /^(ox)$/i, '\1en'
7 | # inflect.singular /^(ox)en/i, '\1'
8 | # inflect.irregular 'person', 'people'
9 | # inflect.uncountable %w( fish sheep )
10 | # end
11 | #
12 | # These inflection rules are supported but not enabled by default:
13 | # ActiveSupport::Inflector.inflections do |inflect|
14 | # inflect.acronym 'RESTful'
15 | # end
16 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::Picture < Ckeditor::Asset
2 | has_mongoid_attached_file :data,
3 | :url => "/ckeditor_assets/pictures/:id/:style_:basename.:extension",
4 | :path => ":rails_root/public/ckeditor_assets/pictures/:id/:style_:basename.:extension",
5 | :styles => { :content => '800>', :thumb => '118x100#' }
6 |
7 | validates_attachment_size :data, :less_than => 2.megabytes
8 | validates_attachment_presence :data
9 |
10 | def url_content
11 | url(:content)
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/test/models/picture_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class PictureTest < ActiveSupport::TestCase
4 | def teardown
5 | @picture.destroy rescue nil
6 | end
7 |
8 | test "Set file content_type and size" do
9 | @picture = create_picture
10 |
11 | assert_equal "image/png", @picture.data_content_type
12 | assert_equal "rails.png", @picture.data_file_name
13 | assert_equal 6646, @picture.data_file_size
14 | assert @picture.url_thumb.include?('thumb_rails.png')
15 |
16 | if @picture.has_dimensions?
17 | assert_equal 50, @picture.width
18 | assert_equal 64, @picture.height
19 | end
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/test/dummy/config/database.yml:
--------------------------------------------------------------------------------
1 | # SQLite version 3.x
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem 'sqlite3'
6 | development:
7 | adapter: sqlite3
8 | database: ":memory:"
9 | pool: 5
10 | timeout: 5000
11 |
12 | # Warning: The database defined as "test" will be erased and
13 | # re-generated from your development database when you run "rake".
14 | # Do not set this db to the same as development or production.
15 | test:
16 | adapter: sqlite3
17 | database: ":memory:"
18 | pool: 5
19 | timeout: 5000
20 |
21 | production:
22 | adapter: sqlite3
23 | database: ":memory:"
24 | pool: 5
25 | timeout: 5000
26 |
--------------------------------------------------------------------------------
/lib/ckeditor/orm/active_record.rb:
--------------------------------------------------------------------------------
1 | require 'ckeditor/orm/base'
2 |
3 | module Ckeditor
4 | module Orm
5 | module ActiveRecord
6 | module AssetBase
7 | def self.included(base)
8 | base.send(:include, Base::AssetBase::InstanceMethods)
9 | base.send(:extend, ClassMethods)
10 | end
11 |
12 | module ClassMethods
13 | def self.extended(base)
14 | base.class_eval do
15 | self.table_name = "ckeditor_assets"
16 |
17 | belongs_to :assetable, :polymorphic => true
18 | end
19 | end
20 | end
21 | end
22 | end
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/test/dummy/app/views/posts/index.html.erb:
--------------------------------------------------------------------------------
1 | Listing posts
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | <% @posts.each do |post| %>
11 |
12 | <%= link_to 'Show', post %>
13 | <%= link_to 'Edit', edit_post_path(post) %>
14 | <%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %>
15 |
16 | <% end %>
17 |
18 |
19 |
20 |
21 | <%= link_to 'New Post', new_post_path %>
22 |
23 | Text area test
24 | <%= cktext_area_tag("test_area", "Ckeditor") %>
25 |
26 | Text area test with options
27 | <%= cktext_area_tag("content", "Ckeditor", :input_html => {:cols => 10, :rows => 20}, :toolbar => 'Easy') %>
28 |
--------------------------------------------------------------------------------
/test/models/attachment_file_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class AttachmentFileTest < ActiveSupport::TestCase
4 | def teardown
5 | @attachment.destroy rescue nil
6 | end
7 |
8 | test "Set file content_type and size" do
9 | @attachment = create_attachment
10 |
11 | # TODO: fix filename parameterization
12 | if CKEDITOR_BACKEND == :paperclip
13 | assert_equal "rails_tar.gz", @attachment.data_file_name
14 | else
15 | assert_equal "rails.tar.gz", @attachment.data_file_name
16 | end
17 |
18 | assert_equal "application/x-gzip", @attachment.data_content_type
19 | assert_equal 6823, @attachment.data_file_size
20 | assert_equal "/assets/ckeditor/filebrowser/images/thumbs/gz.gif", @attachment.url_thumb
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/app/controllers/ckeditor/pictures_controller.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::PicturesController < Ckeditor::ApplicationController
2 |
3 | def index
4 | @pictures = Ckeditor.picture_model.find_all(ckeditor_pictures_scope)
5 | respond_with(@pictures)
6 | end
7 |
8 | def create
9 | @picture = Ckeditor::Picture.new
10 | respond_with_asset(@picture)
11 | end
12 |
13 | def destroy
14 | @picture.destroy
15 | respond_with(@picture, :location => pictures_path)
16 | end
17 |
18 | protected
19 |
20 | def find_asset
21 | @picture = Ckeditor.picture_model.get!(params[:id])
22 | end
23 |
24 | def authorize_resource
25 | model = (@picture || Ckeditor::Picture)
26 | @authorization_adapter.try(:authorize, params[:action], model)
27 | end
28 | end
29 |
--------------------------------------------------------------------------------
/test/dummy/public/422.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The change you wanted was rejected (422)
5 |
17 |
18 |
19 |
20 |
21 |
22 |
The change you wanted was rejected.
23 |
Maybe you tried to change something you didn't have access to.
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/ckeditor/hooks/simple_form.rb:
--------------------------------------------------------------------------------
1 | require 'simple_form'
2 |
3 | module Ckeditor::Hooks::SimpleForm
4 | class CkeditorInput < ::SimpleForm::Inputs::Base
5 | def input
6 | @builder.cktext_area(attribute_name, input_html_options)
7 | end
8 | end
9 | end
10 |
11 | ::SimpleForm::FormBuilder.map_type :ckeditor, :to => Ckeditor::Hooks::SimpleForm::CkeditorInput
12 |
13 | # TODO: remove this after a while, SimpleForm::FormBuilder#ckeditor is deprecated.
14 | class SimpleForm::FormBuilder
15 | def ckeditor(attribute_name, options={}, &block)
16 | warn "[DEPRECATION] calling f.ckeditor(:#{attribute_name}, ...) is deprecated, call f.input(:#{attribute_name}, :as => :ckeditor, #{options.to_s[1..-1]}) #{Kernel.caller.first}"
17 | options[:as] = :ckeditor
18 | self.input(attribute_name, options, &block)
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/test/support/helpers.rb:
--------------------------------------------------------------------------------
1 | require 'active_support/test_case'
2 | require 'action_dispatch/testing/test_process'
3 |
4 | class ActiveSupport::TestCase
5 | include ActionDispatch::TestProcess
6 |
7 | def new_attachment(data = nil)
8 | data ||= fixture_file_upload('files/rails.tar.gz', 'application/x-gzip')
9 |
10 | Ckeditor::AttachmentFile.new(:data => data)
11 | end
12 |
13 | def create_attachment(data = nil)
14 | attachment = new_attachment(data)
15 | attachment.save!
16 | attachment
17 | end
18 |
19 | def new_picture(data = nil)
20 | data ||= fixture_file_upload('files/rails.png', 'image/png')
21 |
22 | Ckeditor::Picture.new(:data => data)
23 | end
24 |
25 | def create_picture(data = nil)
26 | picture = new_picture(data)
27 | picture.save!
28 | picture
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/test/dummy/public/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The page you were looking for doesn't exist (404)
5 |
17 |
18 |
19 |
20 |
21 |
22 |
The page you were looking for doesn't exist.
23 |
You may have mistyped the address or the page may have moved.
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/test/dummy/public/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | We're sorry, but something went wrong (500)
5 |
17 |
18 |
19 |
20 |
21 |
22 |
We're sorry, but something went wrong.
23 |
We've been notified about this issue and we'll take a look at it shortly.
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "http://rubygems.org"
2 |
3 | gemspec
4 |
5 | gem "rails", "3.2.3"
6 |
7 | platforms :mri_18 do
8 | group :test do
9 | gem 'ruby-debug'
10 | gem 'SystemTimer'
11 | end
12 | end
13 |
14 | platforms :ruby do
15 | gem "sqlite3"
16 |
17 | group :development do
18 | gem "unicorn", "~> 4.0.1"
19 | end
20 |
21 | group :development, :test do
22 | gem "capybara", ">= 0.4.0"
23 | gem "mynyml-redgreen", "~> 0.7.1", :require => 'redgreen'
24 | end
25 |
26 | group :active_record do
27 | gem "paperclip", "~> 3.0.3"
28 | gem "carrierwave"
29 | gem "dragonfly"
30 | gem "mini_magick"
31 | end
32 |
33 | group :mongoid do
34 | gem "mongoid"
35 | gem "bson_ext"
36 | gem 'mongoid-paperclip', :require => 'mongoid_paperclip'
37 | gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
38 | end
39 | end
40 |
--------------------------------------------------------------------------------
/app/controllers/ckeditor/attachment_files_controller.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController
2 |
3 | def index
4 | @attachments = Ckeditor.attachment_file_model.find_all(ckeditor_attachment_files_scope)
5 | respond_with(@attachments)
6 | end
7 |
8 | def create
9 | @attachment = Ckeditor::AttachmentFile.new
10 | respond_with_asset(@attachment)
11 | end
12 |
13 | def destroy
14 | @attachment.destroy
15 | respond_with(@attachment, :location => attachment_files_path)
16 | end
17 |
18 | protected
19 |
20 | def find_asset
21 | @attachment = Ckeditor.attachment_file_model.get!(params[:id])
22 | end
23 |
24 | def authorize_resource
25 | model = (@attachment || Ckeditor::AttachmentFile)
26 | @authorization_adapter.try(:authorize, params[:action], model)
27 | end
28 | end
29 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
2 | For licensing, see LICENSE.html or http://ckeditor.com/license
3 |
4 | cs.js Found: 118 Missing: 0
5 | cy.js Found: 118 Missing: 0
6 | de.js Found: 118 Missing: 0
7 | el.js Found: 16 Missing: 102
8 | eo.js Found: 118 Missing: 0
9 | et.js Found: 31 Missing: 87
10 | fa.js Found: 24 Missing: 94
11 | fi.js Found: 23 Missing: 95
12 | fr.js Found: 118 Missing: 0
13 | hr.js Found: 23 Missing: 95
14 | it.js Found: 118 Missing: 0
15 | nb.js Found: 118 Missing: 0
16 | nl.js Found: 118 Missing: 0
17 | no.js Found: 118 Missing: 0
18 | tr.js Found: 118 Missing: 0
19 | ug.js Found: 39 Missing: 79
20 | zh-cn.js Found: 118 Missing: 0
21 |
--------------------------------------------------------------------------------
/lib/ckeditor/helpers/view_helper.rb:
--------------------------------------------------------------------------------
1 | module Ckeditor
2 | module Helpers
3 | module ViewHelper
4 | extend ActiveSupport::Concern
5 |
6 | def cktext_area_tag(name, content = nil, options = {})
7 | element_id = sanitize_to_id(options[:id] || name)
8 | options = { :language => I18n.locale.to_s }.merge(options)
9 | input_html = { :id => element_id }.merge( options.delete(:input_html) || {} )
10 | js_content_for_section = options.delete(:js_content_for)
11 |
12 | output_buffer = ActiveSupport::SafeBuffer.new
13 | output_buffer << text_area_tag(name, content, input_html)
14 |
15 | js = Utils.js_replace(element_id, options)
16 |
17 | output_buffer << (js_content_for_section ? content_for(js_content_for_section, js) : javascript_tag(js))
18 | output_buffer
19 | end
20 | end
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/ckeditor.gemspec:
--------------------------------------------------------------------------------
1 | # -*- encoding: utf-8 -*-
2 | $:.push File.expand_path("../lib", __FILE__)
3 | require "ckeditor/version"
4 |
5 | Gem::Specification.new do |s|
6 | s.name = "ckeditor"
7 | s.version = Ckeditor::Version::GEM.dup
8 | s.platform = Gem::Platform::RUBY
9 | s.summary = "Rails gem for easy integration ckeditor in your application"
10 | s.description = "CKEditor is a WYSIWYG editor to be used inside web pages"
11 | s.authors = ["Igor Galeta"]
12 | s.email = "galeta.igor@gmail.com"
13 | s.rubyforge_project = "ckeditor"
14 | s.homepage = "https://github.com/galetahub/ckeditor"
15 |
16 | s.files = Dir["{app,config,lib,vendor}/**/*"] + ["MIT-LICENSE", "Rakefile", "Gemfile", "README.rdoc"]
17 | s.test_files = Dir["{test}/**/*"]
18 | s.extra_rdoc_files = ["README.rdoc"]
19 | s.require_paths = ["lib"]
20 |
21 | s.add_dependency("mime-types")
22 | s.add_dependency("orm_adapter")
23 | end
24 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb:
--------------------------------------------------------------------------------
1 | class CreateCkeditorAssets < ActiveRecord::Migration
2 | def self.up
3 | create_table :ckeditor_assets do |t|
4 | t.string :data_file_name, :null => false
5 | t.string :data_content_type
6 | t.integer :data_file_size
7 |
8 | t.integer :assetable_id
9 | t.string :assetable_type, :limit => 30
10 | t.string :type, :limit => 30
11 |
12 | # Uncomment it to save images dimensions, if your need it
13 | t.integer :width
14 | t.integer :height
15 |
16 | t.timestamps
17 | end
18 |
19 | add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_ckeditor_assetable_type"
20 | add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "idx_ckeditor_assetable"
21 | end
22 |
23 | def self.down
24 | drop_table :ckeditor_assets
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb:
--------------------------------------------------------------------------------
1 | class CreateCkeditorAssets < ActiveRecord::Migration
2 | def self.up
3 | create_table :ckeditor_assets do |t|
4 | t.string :data_file_name, :null => false
5 | t.string :data_content_type
6 | t.integer :data_file_size
7 |
8 | t.integer :assetable_id
9 | t.string :assetable_type, :limit => 30
10 | t.string :type, :limit => 30
11 |
12 | # Uncomment it to save images dimensions, if your need it
13 | t.integer :width
14 | t.integer :height
15 |
16 | t.timestamps
17 | end
18 |
19 | add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_ckeditor_assetable_type"
20 | add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "idx_ckeditor_assetable"
21 | end
22 |
23 | def self.down
24 | drop_table :ckeditor_assets
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/lib/ckeditor/helpers/form_helper.rb:
--------------------------------------------------------------------------------
1 | module Ckeditor
2 | module Helpers
3 | module FormHelper
4 | extend ActiveSupport::Concern
5 |
6 | include ActionView::Helpers::TagHelper
7 | include ActionView::Helpers::JavaScriptHelper
8 |
9 | def cktext_area(object_name, method, options = {})
10 | options = (options || {}).stringify_keys
11 | ck_options = (options.delete('ckeditor') || {}).stringify_keys
12 |
13 | instance_tag = ActionView::Base::InstanceTag.new(object_name, method, self, options.delete('object'))
14 | instance_tag.send(:add_default_name_and_id, options) if options['id'].blank?
15 |
16 | output_buffer = ActiveSupport::SafeBuffer.new
17 | output_buffer << instance_tag.to_text_area_tag(options)
18 | output_buffer << javascript_tag(Utils.js_replace(options['id'], ck_options))
19 | output_buffer
20 | end
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/test/dummy/app/views/posts/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for(@post) do |f| %>
2 | <% if @post.errors.any? %>
3 |
4 |
<%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:
5 |
6 |
7 | <% @post.errors.full_messages.each do |msg| %>
8 | <%= msg %>
9 | <% end %>
10 |
11 |
12 | <% end %>
13 |
14 | <%= f.label :title %>
15 | <%= f.text_field :title %>
16 |
17 | <%= f.label :content %>
18 | <%= f.cktext_area :content, :ckeditor => { :width => 800, :height => 400 } %>
19 |
20 | <%= f.label :info %>
21 | <% if @post.new_record? %>
22 | <%= cktext_area :post, :info, :value => "Defaults info content", :id => "new_info_content" %>
23 | <% else %>
24 | <%= cktext_area :post, :info, :cols => 50, :rows => 70 %>
25 | <% end %>
26 |
27 |
28 | <%= f.submit %>
29 |
30 | <% end %>
31 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/ckeditor.rb:
--------------------------------------------------------------------------------
1 | # Use this hook to configure ckeditor
2 | if Object.const_defined?("Ckeditor")
3 | Ckeditor.setup do |config|
4 | # ==> ORM configuration
5 | # Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
6 | # :mongoid (bson_ext recommended) by default. Other ORMs may be
7 | # available as additional gems.
8 | require "ckeditor/orm/<%= options[:orm] %>"
9 |
10 | # Allowed image file types for upload.
11 | # Set to nil or [] (empty array) for all file types
12 | # config.image_file_types = ["jpg", "jpeg", "png", "gif", "tiff"]
13 |
14 | # Allowed attachment file types for upload.
15 | # Set to nil or [] (empty array) for all file types
16 | # config.attachment_file_types = ["doc", "docx", "xls", "odt", "ods", "pdf", "rar", "zip", "tar", "swf"]
17 |
18 | # Setup authorization to be run as a before filter
19 | # config.authorize_with :cancan
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb:
--------------------------------------------------------------------------------
1 | class CreateCkeditorAssets < ActiveRecord::Migration
2 | def self.up
3 | create_table :ckeditor_assets do |t|
4 | t.string :data_uid, :null => false
5 | t.string :data_name, :null => false
6 | t.string :data_mime_type
7 | t.integer :data_size
8 |
9 | t.integer :assetable_id
10 | t.string :assetable_type, :limit => 30
11 | t.string :type, :limit => 30
12 |
13 | # Uncomment these to save image dimensions, if your need them.
14 | t.integer :data_width
15 | t.integer :data_height
16 |
17 | t.timestamps
18 | end
19 |
20 | add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_ckeditor_assetable_type"
21 | add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "idx_ckeditor_assetable"
22 | end
23 |
24 | def self.down
25 | drop_table :ckeditor_assets
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/app/views/ckeditor/shared/_asset.html.erb:
--------------------------------------------------------------------------------
1 | <%= content_tag(:div, :id => dom_id(asset), :class => "gal-item", :"data-url" => image_path(asset.url_content)) do %>
2 | <%= link_to image_tag("/assets/ckeditor/filebrowser/images/gal_del.png",
3 | :title => I18n.t('ckeditor.buttons.delete')),
4 | polymorphic_path(asset, :format => :json),
5 | :remote => true,
6 | :method => :delete,
7 | :confirm => t('ckeditor.confirm_delete'),
8 | :class => "fileupload-cancel gal-del" %>
9 |
10 |
11 |
<%= image_tag(asset.url_thumb, :title => asset.filename) %>
12 |
13 |
<%= asset.filename %>
14 |
15 |
<%= asset.format_created_at %>
16 |
<%= number_to_human_size(asset.size) if asset.size %>
17 |
18 |
19 |
20 | <% end %>
21 |
--------------------------------------------------------------------------------
/app/views/ckeditor/shared/_asset_tmpl.html.erb:
--------------------------------------------------------------------------------
1 |
23 |
--------------------------------------------------------------------------------
/lib/ckeditor/helpers/controllers.rb:
--------------------------------------------------------------------------------
1 | module Ckeditor
2 | module Helpers
3 | module Controllers
4 | extend ActiveSupport::Concern
5 |
6 | protected
7 |
8 | def ckeditor_current_user
9 | instance_eval &Ckeditor.current_user_method
10 | end
11 |
12 | def ckeditor_authorize!
13 | instance_eval &Ckeditor.authorize_with
14 | end
15 |
16 | def ckeditor_before_create_asset(asset)
17 | asset.assetable = ckeditor_current_user
18 | return true
19 | end
20 |
21 | def ckeditor_pictures_scope(options = {})
22 | ckeditor_filebrowser_scope(options)
23 | end
24 |
25 | def ckeditor_attachment_files_scope(options = {})
26 | ckeditor_filebrowser_scope(options)
27 | end
28 |
29 | def ckeditor_filebrowser_scope(options = {})
30 | { :order => [:id, :desc] }.merge(options)
31 | end
32 | end
33 | end
34 | end
35 |
--------------------------------------------------------------------------------
/app/controllers/ckeditor/application_controller.rb:
--------------------------------------------------------------------------------
1 | class Ckeditor::ApplicationController < ::ApplicationController
2 | respond_to :html, :json
3 |
4 | before_filter :find_asset, :only => [:destroy]
5 | before_filter :ckeditor_authorize!
6 | before_filter :authorize_resource
7 |
8 | protected
9 |
10 | def respond_with_asset(asset)
11 | file = params[:CKEditor].blank? ? params[:qqfile] : params[:upload]
12 | asset.data = Ckeditor::Http.normalize_param(file, request)
13 |
14 | callback = ckeditor_before_create_asset(asset)
15 |
16 | if callback && asset.save
17 | body = params[:CKEditor].blank? ? asset.to_json(:only=>[:id, :type]) : %Q""
20 |
21 | render :text => body
22 | else
23 | render :nothing => true
24 | end
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
2 | For licensing, see LICENSE.html or http://ckeditor.com/license
3 |
4 | cs.js Found: 30 Missing: 0
5 | cy.js Found: 30 Missing: 0
6 | da.js Found: 12 Missing: 18
7 | de.js Found: 30 Missing: 0
8 | el.js Found: 25 Missing: 5
9 | eo.js Found: 30 Missing: 0
10 | fa.js Found: 30 Missing: 0
11 | fi.js Found: 30 Missing: 0
12 | fr.js Found: 30 Missing: 0
13 | gu.js Found: 12 Missing: 18
14 | he.js Found: 30 Missing: 0
15 | it.js Found: 30 Missing: 0
16 | mk.js Found: 5 Missing: 25
17 | nb.js Found: 30 Missing: 0
18 | nl.js Found: 30 Missing: 0
19 | no.js Found: 30 Missing: 0
20 | pt-br.js Found: 30 Missing: 0
21 | ro.js Found: 6 Missing: 24
22 | tr.js Found: 30 Missing: 0
23 | ug.js Found: 27 Missing: 3
24 | vi.js Found: 6 Missing: 24
25 | zh-cn.js Found: 30 Missing: 0
26 |
--------------------------------------------------------------------------------
/test/models/utils_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class UtilsTest < ActiveSupport::TestCase
4 | test 'exists filethumb' do
5 | ["avi", "doc", "docx", "exe", "gz", "htm", "jpg", "mp3", "mpg", "pdf",
6 | "psd", "rar", "swf", "tar", "txt", "wmv", "xlsx", "zip"].each do |ext|
7 | assert_equal "/assets/ckeditor/filebrowser/images/thumbs/#{ext}.gif", Ckeditor::Utils.filethumb("somefile.#{ext}")
8 | end
9 |
10 | assert_equal "/assets/ckeditor/filebrowser/images/thumbs/unknown.gif", Ckeditor::Utils.filethumb("somefile.ddd")
11 | end
12 |
13 | test 'wrong filethumb' do
14 | assert_equal "/assets/ckeditor/filebrowser/images/thumbs/unknown.gif", Ckeditor::Utils.filethumb("somefile.ddd")
15 | assert_equal "/assets/ckeditor/filebrowser/images/thumbs/unknown.gif", Ckeditor::Utils.filethumb("somefile")
16 | assert_equal "/assets/ckeditor/filebrowser/images/thumbs/unknown.gif", Ckeditor::Utils.filethumb("")
17 | assert_equal "/assets/ckeditor/filebrowser/images/thumbs/unknown.gif", Ckeditor::Utils.filethumb(nil)
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md:
--------------------------------------------------------------------------------
1 | CKEditor WebSpellChecker Plugin
2 | ===============================
3 |
4 | This plugin brings Web Spell Checker (WSC) into CKEditor.
5 |
6 | WSC is "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution.
7 |
8 | Installation
9 | ------------
10 |
11 | 1. Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation.
12 | 2. Enable the "wsc" plugin in the CKEditor configuration file (config.js):
13 |
14 | config.extraPlugins = 'wsc';
15 |
16 | That's all. WSC will appear on the editor toolbar and will be ready to use.
17 |
18 | License
19 | -------
20 |
21 | Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
22 |
23 | See LICENSE.md for more information.
24 |
25 | Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/).
26 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md:
--------------------------------------------------------------------------------
1 | CKEditor SCAYT Plugin
2 | =====================
3 |
4 | This plugin brings Spell Check As You Type (SCAYT) into CKEditor.
5 |
6 | SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution.
7 |
8 | Installation
9 | ------------
10 |
11 | 1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation.
12 | 2. Enable the "scayt" plugin in the CKEditor configuration file (config.js):
13 |
14 | config.extraPlugins = 'scayt';
15 |
16 | That's all. SCAYT will appear on the editor toolbar and will be ready to use.
17 |
18 | License
19 | -------
20 |
21 | Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
22 |
23 | See LICENSE.md for more information.
24 |
25 | Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/).
26 |
--------------------------------------------------------------------------------
/MIT-LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2011 AIMBULANCE
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/test/support/controller_hooks.rb:
--------------------------------------------------------------------------------
1 | module ControllerHooks
2 | def get(action, parameters = nil, session = nil, flash = nil)
3 | process_action(action, parameters, session, flash, "GET")
4 | end
5 |
6 | # Executes a request simulating POST HTTP method and set/volley the response
7 | def post(action, parameters = nil, session = nil, flash = nil)
8 | process_action(action, parameters, session, flash, "POST")
9 | end
10 |
11 | # Executes a request simulating PUT HTTP method and set/volley the response
12 | def put(action, parameters = nil, session = nil, flash = nil)
13 | process_action(action, parameters, session, flash, "PUT")
14 | end
15 |
16 | # Executes a request simulating DELETE HTTP method and set/volley the response
17 | def delete(action, parameters = nil, session = nil, flash = nil)
18 | process_action(action, parameters, session, flash, "DELETE")
19 | end
20 |
21 | private
22 |
23 | def process_action(action, parameters = nil, session = nil, flash = nil, method = "GET")
24 | parameters ||= {}
25 | process(action, parameters.merge!(:use_route => Ckeditor::Engine.engine_name), session, flash, method)
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/test/dummy/app/assets/stylesheets/scaffold.css:
--------------------------------------------------------------------------------
1 | body { background-color: #fff; color: #333; }
2 |
3 | body, p, ol, ul, td {
4 | font-family: verdana, arial, helvetica, sans-serif;
5 | font-size: 13px;
6 | line-height: 18px;
7 | }
8 |
9 | pre {
10 | background-color: #eee;
11 | padding: 10px;
12 | font-size: 11px;
13 | }
14 |
15 | a { color: #000; }
16 | a:visited { color: #666; }
17 | a:hover { color: #fff; background-color:#000; }
18 |
19 | div.field, div.actions {
20 | margin-bottom: 10px;
21 | }
22 |
23 | #notice {
24 | color: green;
25 | }
26 |
27 | .field_with_errors {
28 | padding: 2px;
29 | background-color: red;
30 | display: table;
31 | }
32 |
33 | #error_explanation {
34 | width: 450px;
35 | border: 2px solid red;
36 | padding: 7px;
37 | padding-bottom: 0;
38 | margin-bottom: 20px;
39 | background-color: #f0f0f0;
40 | }
41 |
42 | #error_explanation h2 {
43 | text-align: left;
44 | font-weight: bold;
45 | padding: 5px 5px 5px 15px;
46 | font-size: 12px;
47 | margin: -7px;
48 | margin-bottom: 0px;
49 | background-color: #c00;
50 | color: #fff;
51 | }
52 |
53 | #error_explanation ul li {
54 | font-size: 12px;
55 | list-style: square;
56 | }
57 |
--------------------------------------------------------------------------------
/lib/ckeditor/engine.rb:
--------------------------------------------------------------------------------
1 | require 'rails'
2 | require 'ckeditor'
3 |
4 | module Ckeditor
5 | class Engine < ::Rails::Engine
6 | isolate_namespace Ckeditor
7 |
8 | initializer "ckeditor.assets_precompile", :group => :all do |app|
9 | app.config.assets.precompile += Ckeditor.assets
10 | end
11 |
12 | initializer "ckeditor.helpers" do
13 | ActiveSupport.on_load(:action_controller) do
14 | ActionController::Base.send :include, Ckeditor::Helpers::Controllers
15 | end
16 |
17 | ActiveSupport.on_load :action_view do
18 | ActionView::Base.send :include, Ckeditor::Helpers::ViewHelper
19 | ActionView::Base.send :include, Ckeditor::Helpers::FormHelper
20 | ActionView::Helpers::FormBuilder.send :include, Ckeditor::Helpers::FormBuilder
21 | end
22 | end
23 |
24 | initializer "ckeditor.hooks" do
25 | if Object.const_defined?("Formtastic")
26 | require "ckeditor/hooks/formtastic"
27 | end
28 |
29 | if Object.const_defined?("SimpleForm")
30 | require "ckeditor/hooks/simple_form"
31 | end
32 |
33 | if Object.const_defined?("CanCan")
34 | require "ckeditor/hooks/cancan"
35 | end
36 | end
37 | end
38 | end
39 |
--------------------------------------------------------------------------------
/lib/ckeditor/orm/base.rb:
--------------------------------------------------------------------------------
1 | module Ckeditor
2 | module Orm
3 | module Base
4 | module AssetBase
5 | module InstanceMethods
6 | def filename
7 | data_file_name
8 | end
9 |
10 | def size
11 | data_file_size
12 | end
13 |
14 | def has_dimensions?
15 | respond_to?(:width) && respond_to?(:height)
16 | end
17 |
18 | def image?
19 | Ckeditor::IMAGE_TYPES.include?(data_content_type)
20 | end
21 |
22 | def format_created_at
23 | self.created_at.strftime("%d.%m.%Y")
24 | end
25 |
26 | def url_content
27 | url
28 | end
29 |
30 | def url_thumb
31 | url(:thumb)
32 | end
33 |
34 | def as_json_methods
35 | [:url_content, :url_thumb, :size, :filename, :format_created_at]
36 | end
37 |
38 | def as_json(options = nil)
39 | options = {
40 | :methods => as_json_methods,
41 | :root => "asset"
42 | }.merge(options || {})
43 |
44 | super options
45 | end
46 | end
47 | end
48 | end
49 | end
50 | end
51 |
--------------------------------------------------------------------------------
/lib/ckeditor/orm/mongoid.rb:
--------------------------------------------------------------------------------
1 | require 'orm_adapter/adapters/mongoid'
2 | require 'ckeditor/orm/base'
3 |
4 | module Ckeditor
5 | module Orm
6 | module Mongoid
7 | module AssetBase
8 | def self.included(base)
9 | base.send(:include, ::Mongoid::Document)
10 | base.send(:include, ::Mongoid::Timestamps)
11 | base.send(:include, Base::AssetBase::InstanceMethods)
12 | base.send(:include, InstanceMethods)
13 | base.send(:extend, ClassMethods)
14 | end
15 |
16 | module InstanceMethods
17 | def type
18 | _type
19 | end
20 |
21 | def as_json_methods
22 | [:id, :type] + super
23 | end
24 | end
25 |
26 | module ClassMethods
27 | def self.extended(base)
28 | base.class_eval do
29 | field :data_content_type, :type => String
30 | field :data_file_size, :type => Integer
31 | field :width, :type => Integer
32 | field :height, :type => Integer
33 |
34 | belongs_to :assetable, :polymorphic => true
35 | end
36 | end
37 | end
38 | end
39 | end
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb:
--------------------------------------------------------------------------------
1 | # Load Dragonfly for Rails if it isn't loaded already.
2 | require "dragonfly/rails/images"
3 |
4 | # Use a separate Dragonfly "app" for CKEditor.
5 | app = Dragonfly[:ckeditor]
6 | app.configure_with(:rails)
7 | app.configure_with(:imagemagick)
8 |
9 | # Define the ckeditor_file_accessor macro.
10 | app.define_macro(ActiveRecord::Base, :ckeditor_file_accessor) if defined?(ActiveRecord::Base)
11 | app.define_macro_on_include(Mongoid::Document, :ckeditor_file_accessor) if defined?(Mongoid::Document)
12 |
13 | app.configure do |c|
14 | # Store files in public/uploads/ckeditor. This is not
15 | # mandatory and the files don't even have to be stored under
16 | # public. If not storing under public then set server_root to nil.
17 | c.datastore.root_path = Rails.root.join("public", "uploads", "ckeditor", Rails.env).to_s
18 | c.datastore.server_root = Rails.root.join("public").to_s
19 |
20 | # Accept asset requests on /ckeditor_assets. Again, this is not
21 | # mandatory. Just be sure to include :job somewhere.
22 | c.url_format = "/uploads/ckeditor/:job/:basename.:format"
23 | end
24 |
25 | # Insert our Dragonfly "app" into the stack.
26 | Rails.application.middleware.insert_after Rack::Cache, Dragonfly::Middleware, :ckeditor
27 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb:
--------------------------------------------------------------------------------
1 | # encoding: utf-8
2 | class CkeditorAttachmentFileUploader < CarrierWave::Uploader::Base
3 | include Ckeditor::Backend::CarrierWave
4 |
5 | # Include RMagick or ImageScience support:
6 | # include CarrierWave::RMagick
7 | # include CarrierWave::MiniMagick
8 | # include CarrierWave::ImageScience
9 |
10 | # Choose what kind of storage to use for this uploader:
11 | storage :file
12 |
13 | # Override the directory where uploaded files will be stored.
14 | # This is a sensible default for uploaders that are meant to be mounted:
15 | def store_dir
16 | "uploads/ckeditor/attachments/#{model.id}"
17 | end
18 |
19 | # Provide a default URL as a default if there hasn't been a file uploaded:
20 | # def default_url
21 | # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
22 | # end
23 |
24 | # Process files as they are uploaded:
25 | # process :scale => [200, 300]
26 | #
27 | # def scale(width, height)
28 | # # do something
29 | # end
30 |
31 | # Add a white list of extensions which are allowed to be uploaded.
32 | # For images you might use something like this:
33 | def extension_white_list
34 | Ckeditor.attachment_file_types
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.dialog.add("about",function(a){a=a.lang.about;return{title:CKEDITOR.env.ie?a.dlgTitle:a.title,minWidth:390,minHeight:230,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'"}]}],buttons:[CKEDITOR.dialog.cancelButton]}});
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | # Configure Rails Envinronment
2 | ENV["RAILS_ENV"] = "test"
3 | CKEDITOR_ORM = (ENV["CKEDITOR_ORM"] || :active_record).to_sym
4 | CKEDITOR_BACKEND = (ENV["CKEDITOR_BACKEND"] || :paperclip).to_sym
5 |
6 | puts "\n==> Ckeditor.orm = #{CKEDITOR_ORM.inspect}. CKEDITOR_ORM = (active_record|mongoid)"
7 | puts "\n==> Ckeditor.backend = #{CKEDITOR_BACKEND.inspect}. CKEDITOR_BACKEND = (paperclip|carrierwave|dragonfly)"
8 |
9 | require File.expand_path("../dummy/config/environment.rb", __FILE__)
10 | require "rails/test_help"
11 | require 'redgreen'
12 |
13 | ActionMailer::Base.delivery_method = :test
14 | ActionMailer::Base.perform_deliveries = true
15 | ActionMailer::Base.default_url_options[:host] = "test.com"
16 |
17 | Rails.backtrace_cleaner.remove_silencers!
18 |
19 | # Configure capybara for integration testing
20 | require "capybara/rails"
21 | Capybara.default_driver = :rack_test
22 | Capybara.default_selector = :css
23 |
24 | # Run specific orm operations
25 | require "orm/#{CKEDITOR_ORM}"
26 |
27 | # Load support files
28 | Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
29 |
30 | # For generators
31 | require "rails/generators/test_case"
32 | require "generators/ckeditor/install_generator"
33 |
34 | # Run template migration for the selected backend
35 | if CKEDITOR_ORM == :active_record
36 | require "generators/ckeditor/templates/active_record/#{CKEDITOR_BACKEND}/migration.rb"
37 | CreateCkeditorAssets.new.up
38 | end
39 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.addTemplates("default",{imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath("templates")+"templates/images/"),templates:[{title:"Image and Title",image:"template1.gif",description:"One main image with a title and text that surround the image.",html:' Type the title hereType the text here
'},{title:"Strange Template",image:"template2.gif",description:"A template that defines two colums, each one with a title, and some text.",
6 | html:'Title 1 Title 2 Text 1 Text 2
More text goes here.
'},{title:"Text and Table",image:"template3.gif",description:"A title with some text and a table.",html:'Title goes here Type the text here
'}]});
--------------------------------------------------------------------------------
/app/views/layouts/ckeditor/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <%= csrf_meta_tag %>
7 | <%= tag(:meta, :name => "ckeditor-path", :content => Ckeditor.relative_path) %>
8 | <%= I18n.t('page_title', :scope => [:ckeditor]) %>
9 |
10 | <% if Rails.application.config.assets.enabled %>
11 | <%= stylesheet_link_tag "ckeditor/application" %>
12 | <%= javascript_include_tag "ckeditor/application" %>
13 | <% else %>
14 |
15 | <% ["jquery.js", "jquery.tmpl.js", "fileuploader.js", "rails.js", "application.js"].each do |js| %>
16 |
17 | <% end %>
18 | <% end %>
19 |
20 |
26 |
27 |
28 | <%= yield %>
29 | <%= render :partial => 'ckeditor/shared/asset_tmpl' %>
30 |
31 |
32 |
--------------------------------------------------------------------------------
/lib/ckeditor/backend/dragonfly.rb:
--------------------------------------------------------------------------------
1 | module Ckeditor
2 | module Backend
3 | module Dragonfly
4 | def self.included(base)
5 | base.send(:include, InstanceMethods)
6 | base.send(:extend, ClassMethods)
7 | end
8 |
9 | module ClassMethods
10 | def attachment_file_types
11 | @attachment_file_types ||= Ckeditor.attachment_file_types.map(&:to_sym).tap do |formats|
12 | # This is not ideal but Dragonfly doesn't return double
13 | # extensions. Having said that, the other backends
14 | # currently don't use attachment_file_types at all.
15 | [ :bz2, :gz, :lzma, :xz ].each do |f|
16 | formats << f if formats.include?("tar.#{f}".to_sym)
17 | end
18 | end
19 | end
20 |
21 | def image_file_types
22 | @image_file_types ||= Ckeditor.image_file_types.map(&:to_sym)
23 | end
24 | end
25 |
26 | module InstanceMethods
27 | delegate :url, :path, :size, :image?, :width, :height, :to => :data
28 |
29 | alias_attribute :data_file_name, :data_name
30 | alias_attribute :data_content_type, :data_mime_type
31 | alias_attribute :data_file_size, :data_size
32 |
33 | private
34 |
35 | def url_thumb_options
36 | if data.basename.present?
37 | { :basename => "thumb_#{data.basename}" }
38 | else
39 | {}
40 | end
41 | end
42 | end
43 | end
44 | end
45 | end
46 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/README.md:
--------------------------------------------------------------------------------
1 | CKEditor 4
2 | ==========
3 |
4 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
5 | http://ckeditor.com - See LICENSE.md for license information.
6 |
7 | CKEditor is a text editor to be used inside web pages. It's not a replacement
8 | for desktop text editors like Word or OpenOffice, but a component to be used as
9 | part of web applications and websites.
10 |
11 | ## Documentation
12 |
13 | The full editor documentation is available online at the following address:
14 | http://docs.ckeditor.com
15 |
16 | ## Installation
17 |
18 | Installing CKEditor is an easy task. Just follow these simple steps:
19 |
20 | 1. **Download** the latest version from the CKEditor website:
21 | http://ckeditor.com. You should have already completed this step, but be
22 | sure you have the very latest version.
23 | 2. **Extract** (decompress) the downloaded file into the root of your website.
24 |
25 | **Note:** CKEditor is by default installed in the `ckeditor` folder. You can
26 | place the files in whichever you want though.
27 |
28 | ## Checking Your Installation
29 |
30 | The editor comes with a few sample pages that can be used to verify that
31 | installation proceeded properly. Take a look at the `samples` directory.
32 |
33 | To test your installation, just call the following page at your website:
34 |
35 | http:////samples/index.html
36 |
37 | For example:
38 |
39 | http://www.example.com/ckeditor/samples/index.html
40 |
--------------------------------------------------------------------------------
/test/dummy/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Dummy::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Log error messages when you accidentally call methods on nil.
10 | config.whiny_nils = true
11 |
12 | # Show full error reports and disable caching
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Print deprecation notices to the Rails logger
20 | config.active_support.deprecation = :log
21 |
22 | # Only use best-standards-support built into browsers
23 | config.action_dispatch.best_standards_support = :builtin
24 |
25 | # Raise exception on mass assignment protection for Active Record models
26 | config.active_record.mass_assignment_sanitizer = :strict
27 |
28 | # Log the query plan for queries taking more than this (works
29 | # with SQLite, MySQL, and PostgreSQL)
30 | config.active_record.auto_explain_threshold_in_seconds = 0.5
31 |
32 | # Do not compress assets
33 | config.assets.compress = false
34 |
35 | # Expands the lines which load the assets
36 | config.assets.debug = true
37 | end
38 |
--------------------------------------------------------------------------------
/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb:
--------------------------------------------------------------------------------
1 | # encoding: utf-8
2 | class CkeditorPictureUploader < CarrierWave::Uploader::Base
3 | include Ckeditor::Backend::CarrierWave
4 |
5 | # Include RMagick or ImageScience support:
6 | # include CarrierWave::RMagick
7 | include CarrierWave::MiniMagick
8 | # include CarrierWave::ImageScience
9 |
10 | # Choose what kind of storage to use for this uploader:
11 | storage :file
12 |
13 | # Override the directory where uploaded files will be stored.
14 | # This is a sensible default for uploaders that are meant to be mounted:
15 | def store_dir
16 | "uploads/ckeditor/pictures/#{model.id}"
17 | end
18 |
19 | # Provide a default URL as a default if there hasn't been a file uploaded:
20 | # def default_url
21 | # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
22 | # end
23 |
24 | # Process files as they are uploaded:
25 | # process :scale => [200, 300]
26 | #
27 | # def scale(width, height)
28 | # # do something
29 | # end
30 |
31 | process :read_dimensions
32 |
33 | # Create different versions of your uploaded files:
34 | version :thumb do
35 | process :resize_to_fill => [118, 100]
36 | end
37 |
38 | version :content do
39 | process :resize_to_limit => [800, 800]
40 | end
41 |
42 | # Add a white list of extensions which are allowed to be uploaded.
43 | # For images you might use something like this:
44 | def extension_white_list
45 | Ckeditor.image_file_types
46 | end
47 | end
48 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md:
--------------------------------------------------------------------------------
1 | Software License Agreement
2 | ==========================
3 |
4 | **CKEditor WSC Plugin**
5 | Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved.
6 |
7 | Licensed under the terms of any of the following licenses at your choice:
8 |
9 | * GNU General Public License Version 2 or later (the "GPL"):
10 | http://www.gnu.org/licenses/gpl.html
11 |
12 | * GNU Lesser General Public License Version 2.1 or later (the "LGPL"):
13 | http://www.gnu.org/licenses/lgpl.html
14 |
15 | * Mozilla Public License Version 1.1 or later (the "MPL"):
16 | http://www.mozilla.org/MPL/MPL-1.1.html
17 |
18 | You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice.
19 |
20 | Sources of Intellectual Property Included in this plugin
21 | --------------------------------------------------------
22 |
23 | Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission.
24 |
25 | Trademarks
26 | ----------
27 |
28 | CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
29 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | # encoding: UTF-8
2 | require 'rubygems'
3 | begin
4 | require 'bundler/setup'
5 | rescue LoadError
6 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7 | end
8 |
9 | require 'rake'
10 | require 'rdoc/task'
11 |
12 | require 'rake/testtask'
13 |
14 | Rake::TestTask.new(:test) do |t|
15 | t.libs << 'lib'
16 | t.libs << 'test'
17 | t.pattern = 'test/**/*_test.rb'
18 | t.verbose = false
19 | end
20 |
21 | Rake::TestTask.new("test:controllers") do |t|
22 | t.libs << 'lib'
23 | t.libs << 'test'
24 | t.pattern = 'test/controllers/*_test.rb'
25 | t.verbose = false
26 | end
27 |
28 | Rake::TestTask.new("test:generators") do |t|
29 | t.libs << 'lib'
30 | t.libs << 'test'
31 | t.pattern = 'test/generators/*_test.rb'
32 | t.verbose = false
33 | end
34 |
35 | Rake::TestTask.new("test:integration") do |t|
36 | t.libs << 'lib'
37 | t.libs << 'test'
38 | t.pattern = 'test/integration/*_test.rb'
39 | t.verbose = false
40 | end
41 |
42 | Rake::TestTask.new("test:models") do |t|
43 | t.libs << 'lib'
44 | t.libs << 'test'
45 | t.pattern = 'test/models/*_test.rb'
46 | t.verbose = false
47 | end
48 |
49 | Rake::TestTask.new("test:functional") do |t|
50 | t.libs << 'lib'
51 | t.libs << 'test'
52 | t.pattern = 'test/functional/*_test.rb'
53 | t.verbose = false
54 | end
55 |
56 | task :default => :test
57 |
58 | RDoc::Task.new do |rdoc|
59 | rdoc.rdoc_dir = 'rdoc'
60 | rdoc.title = 'Ckeditor'
61 | rdoc.options << '--line-numbers' << '--inline-source'
62 | rdoc.rdoc_files.include('README.rdoc')
63 | rdoc.rdoc_files.include('lib/**/*.rb')
64 | end
65 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md:
--------------------------------------------------------------------------------
1 | Software License Agreement
2 | ==========================
3 |
4 | **CKEditor SCAYT Plugin**
5 | Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved.
6 |
7 | Licensed under the terms of any of the following licenses at your choice:
8 |
9 | * GNU General Public License Version 2 or later (the "GPL"):
10 | http://www.gnu.org/licenses/gpl.html
11 |
12 | * GNU Lesser General Public License Version 2.1 or later (the "LGPL"):
13 | http://www.gnu.org/licenses/lgpl.html
14 |
15 | * Mozilla Public License Version 1.1 or later (the "MPL"):
16 | http://www.mozilla.org/MPL/MPL-1.1.html
17 |
18 | You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice.
19 |
20 | Sources of Intellectual Property Included in this plugin
21 | --------------------------------------------------------
22 |
23 | Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission.
24 |
25 | Trademarks
26 | ----------
27 |
28 | CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
29 |
--------------------------------------------------------------------------------
/test/functional/posts_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class PostsControllerTest < ActionController::TestCase
4 | def setup
5 | @post = Post.create!(:title => "test", :content => "content", :info => "info")
6 | end
7 |
8 | def teardown
9 | @post.destroy rescue nil
10 | end
11 |
12 | test "include javascripts" do
13 | get :index
14 |
15 | assert_select "script[src=/assets/application.js]"
16 | assert_select "script", Regexp.new(Regexp.escape(%q!CKEDITOR.replace('test_area', {"language":"en"});!))
17 | end
18 |
19 | test "pass text_area with options" do
20 | get :index
21 |
22 | assert_select "textarea#content[name=content][cols=10][rows=20]", "Ckeditor"
23 | assert_select "script", Regexp.new(Regexp.escape(%q!CKEDITOR.replace('content', {"language":"en","toolbar":"Easy"});!))
24 | end
25 |
26 | test "form builder helper" do
27 | get :new
28 |
29 | assert_select "textarea#post_content[name='post[content]'][cols=40][rows=20]", ""
30 | assert_select "script", Regexp.new(Regexp.escape(%q!CKEDITOR.replace('post_content', {"width":800,"height":400});!))
31 | assert_select "textarea#new_info_content[name='post[info]'][cols=40][rows=20]", "Defaults info content"
32 | assert_select "script", Regexp.new(Regexp.escape(%q!CKEDITOR.replace('new_info_content');!))
33 | end
34 |
35 | test "text_area value" do
36 | get :edit, :id => @post.id
37 |
38 | assert_select "textarea#post_content[name='post[content]'][cols=40][rows=20]", "content"
39 | assert_select "textarea#post_info[name='post[info]'][cols=50][rows=70]", "info"
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 |
6 | html, body
7 | {
8 | background-color: transparent;
9 | margin: 0px;
10 | padding: 0px;
11 | }
12 |
13 | body
14 | {
15 | padding: 10px;
16 | }
17 |
18 | body, td, input, select, textarea
19 | {
20 | font-size: 11px;
21 | font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana;
22 | }
23 |
24 | .midtext
25 | {
26 | padding:0px;
27 | margin:10px;
28 | }
29 |
30 | .midtext p
31 | {
32 | padding:0px;
33 | margin:10px;
34 | }
35 |
36 | .Button
37 | {
38 | border: #737357 1px solid;
39 | color: #3b3b1f;
40 | background-color: #c7c78f;
41 | }
42 |
43 | .PopupTabArea
44 | {
45 | color: #737357;
46 | background-color: #e3e3c7;
47 | }
48 |
49 | .PopupTitleBorder
50 | {
51 | border-bottom: #d5d59d 1px solid;
52 | }
53 | .PopupTabEmptyArea
54 | {
55 | padding-left: 10px;
56 | border-bottom: #d5d59d 1px solid;
57 | }
58 |
59 | .PopupTab, .PopupTabSelected
60 | {
61 | border-right: #d5d59d 1px solid;
62 | border-top: #d5d59d 1px solid;
63 | border-left: #d5d59d 1px solid;
64 | padding: 3px 5px 3px 5px;
65 | color: #737357;
66 | }
67 |
68 | .PopupTab
69 | {
70 | margin-top: 1px;
71 | border-bottom: #d5d59d 1px solid;
72 | cursor: pointer;
73 | }
74 |
75 | .PopupTabSelected
76 | {
77 | font-weight: bold;
78 | cursor: default;
79 | padding-top: 4px;
80 | border-bottom: #f1f1e3 1px solid;
81 | background-color: #f1f1e3;
82 | }
83 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css:
--------------------------------------------------------------------------------
1 | a
2 | {
3 | text-decoration:none;
4 | padding: 2px 4px 4px 6px;
5 | display : block;
6 | border-width: 1px;
7 | border-style: solid;
8 | margin : 0px;
9 | }
10 |
11 | a.cke_scayt_toogle:hover,
12 | a.cke_scayt_toogle:focus,
13 | a.cke_scayt_toogle:active
14 | {
15 | border-color: #316ac5;
16 | background-color: #dff1ff;
17 | color : #000;
18 | cursor: pointer;
19 | margin : 0px;
20 | }
21 | a.cke_scayt_toogle {
22 | color : #316ac5;
23 | border-color: #fff;
24 | }
25 | .scayt_enabled a.cke_scayt_item {
26 | color : #316ac5;
27 | border-color: #fff;
28 | margin : 0px;
29 | }
30 | .scayt_disabled a.cke_scayt_item {
31 | color : gray;
32 | border-color : #fff;
33 | }
34 | .scayt_enabled a.cke_scayt_item:hover,
35 | .scayt_enabled a.cke_scayt_item:focus,
36 | .scayt_enabled a.cke_scayt_item:active
37 | {
38 | border-color: #316ac5;
39 | background-color: #dff1ff;
40 | color : #000;
41 | cursor: pointer;
42 | }
43 | .scayt_disabled a.cke_scayt_item:hover,
44 | .scayt_disabled a.cke_scayt_item:focus,
45 | .scayt_disabled a.cke_scayt_item:active
46 | {
47 | border-color: gray;
48 | background-color: #dff1ff;
49 | color : gray;
50 | cursor: no-drop;
51 | }
52 | .cke_scayt_set_on, .cke_scayt_set_off
53 | {
54 | display: none;
55 | }
56 | .scayt_enabled .cke_scayt_set_on
57 | {
58 | display: none;
59 | }
60 | .scayt_disabled .cke_scayt_set_on
61 | {
62 | display: inline;
63 | }
64 | .scayt_disabled .cke_scayt_set_off
65 | {
66 | display: none;
67 | }
68 | .scayt_enabled .cke_scayt_set_off
69 | {
70 | display: inline;
71 | }
72 |
--------------------------------------------------------------------------------
/test/dummy/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Dummy::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Configure static asset server for tests with Cache-Control for performance
11 | config.serve_static_assets = true
12 | config.static_cache_control = "public, max-age=3600"
13 |
14 | # Log error messages when you accidentally call methods on nil
15 | config.whiny_nils = true
16 |
17 | # Show full error reports and disable caching
18 | config.consider_all_requests_local = true
19 | config.action_controller.perform_caching = false
20 |
21 | # Raise exceptions instead of rendering exception templates
22 | config.action_dispatch.show_exceptions = false
23 |
24 | # Disable request forgery protection in test environment
25 | config.action_controller.allow_forgery_protection = false
26 |
27 | # Tell Action Mailer not to deliver emails to the real world.
28 | # The :test delivery method accumulates sent emails in the
29 | # ActionMailer::Base.deliveries array.
30 | config.action_mailer.delivery_method = :test
31 |
32 | # Raise exception on mass assignment protection for Active Record models
33 | config.active_record.mass_assignment_sanitizer = :strict
34 |
35 | # Print deprecation notices to the stderr
36 | config.active_support.deprecation = :stderr
37 | end
38 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.dialog.add("hiddenfield",function(d){return{title:d.lang.forms.hidden.title,hiddenField:null,minWidth:350,minHeight:110,onShow:function(){delete this.hiddenField;var a=this.getParentEditor(),b=a.getSelection(),c=b.getSelectedElement();c&&(c.data("cke-real-element-type")&&"hiddenfield"==c.data("cke-real-element-type"))&&(this.hiddenField=c,c=a.restoreRealElement(this.hiddenField),this.setupContent(c),b.selectElement(this.hiddenField))},onOk:function(){var a=this.getValueOf("info","_cke_saved_name");
6 | this.getValueOf("info","value");var b=this.getParentEditor(),a=CKEDITOR.env.ie&&!(8<=CKEDITOR.document.$.documentMode)?b.document.createElement(' '):b.document.createElement("input");a.setAttribute("type","hidden");this.commitContent(a);a=b.createFakeElement(a,"cke_hidden","hiddenfield");this.hiddenField?(a.replace(this.hiddenField),b.getSelection().selectElement(a)):b.insertElement(a);return!0},contents:[{id:"info",label:d.lang.forms.hidden.title,title:d.lang.forms.hidden.title,
7 | elements:[{id:"_cke_saved_name",type:"text",label:d.lang.forms.hidden.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){this.getValue()?a.setAttribute("name",this.getValue()):a.removeAttribute("name")}},{id:"value",type:"text",label:d.lang.forms.hidden.value,"default":"",accessKey:"V",setup:function(a){this.setValue(a.getAttribute("value")||"")},commit:function(a){this.getValue()?a.setAttribute("value",this.getValue()):
8 | a.removeAttribute("value")}}]}]}});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.dialog.add("button",function(b){function d(a){var b=this.getValue();b?(a.attributes[this.id]=b,"name"==this.id&&(a.attributes["data-cke-saved-name"]=b)):(delete a.attributes[this.id],"name"==this.id&&delete a.attributes["data-cke-saved-name"])}return{title:b.lang.forms.button.title,minWidth:350,minHeight:150,onShow:function(){delete this.button;var a=this.getParentEditor().getSelection().getSelectedElement();a&&a.is("input")&&a.getAttribute("type")in{button:1,reset:1,submit:1}&&(this.button=
6 | a,this.setupContent(a))},onOk:function(){var a=this.getParentEditor(),b=this.button,d=!b,c=b?CKEDITOR.htmlParser.fragment.fromHtml(b.getOuterHtml()).children[0]:new CKEDITOR.htmlParser.element("input");this.commitContent(c);var e=new CKEDITOR.htmlParser.basicWriter;c.writeHtml(e);c=CKEDITOR.dom.element.createFromHtml(e.getHtml(),a.document);d?a.insertElement(c):(c.replace(b),a.getSelection().selectElement(c))},contents:[{id:"info",label:b.lang.forms.button.title,title:b.lang.forms.button.title,elements:[{id:"name",
7 | type:"text",label:b.lang.common.name,"default":"",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:d},{id:"value",type:"text",label:b.lang.forms.button.text,accessKey:"V","default":"",setup:function(a){this.setValue(a.getAttribute("value")||"")},commit:d},{id:"type",type:"select",label:b.lang.forms.button.type,"default":"button",accessKey:"T",items:[[b.lang.forms.button.typeBtn,"button"],[b.lang.forms.button.typeSbm,"submit"],[b.lang.forms.button.typeRst,
8 | "reset"]],setup:function(a){this.setValue(a.getAttribute("type")||"")},commit:d}]}]}});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","zh-cn",{title:"辅助说明",contents:"帮助内容。要关闭此对话框请按 ESC 键。",legend:[{name:"常规",items:[{name:"编辑器工具栏",legend:"按 ${toolbarFocus} 导航到工具栏,使用 TAB 键或 SHIFT+TAB 组合键选择工具栏组,使用左右箭头键选择按钮,按空格键或回车键以应用选中的按钮。"},{name:"编辑器对话框",legend:"在对话框内,TAB 键移动到下一个字段,SHIFT + TAB 组合键移动到上一个字段,ENTER 键提交对话框,ESC 键取消对话框。对于有多标签的对话框,用ALT + F10来移到标签列表。然后用 TAB 键或者向右箭头来移动到下一个标签;SHIFT + TAB 组合键或者向左箭头移动到上一个标签。用 SPACE 键或者 ENTER 键选择标签。"},{name:"编辑器上下文菜单",legend:"用 ${contextMenu}或者 应用程序键 打开上下文菜单。然后用 TAB 键或者下箭头键来移动到下一个菜单项;SHIFT + TAB 组合键或者上箭头键移动到上一个菜单项。用 SPACE 键或者 ENTER 键选择菜单项。用 SPACE 键,ENTER 键或者右箭头键打开子菜单。返回菜单用 ESC 键或者左箭头键。用 ESC 键关闭上下文菜单。"},
6 | {name:"编辑器列表框",legend:"在列表框中,移到下一列表项用 TAB 键或者下箭头键。移到上一列表项用SHIFT + TAB 组合键或者上箭头键,用 SPACE 键或者 ENTER 键选择列表项。用 ESC 键收起列表框。"},{name:"编辑器元素路径栏",legend:"按 ${elementsPathFocus} 以导航到元素路径栏,使用 TAB 键或右箭头键选择下一个元素,使用 SHIFT+TAB 组合键或左箭头键选择上一个元素,按空格键或回车键以选定编辑器里的元素。"}]},{name:"命令",items:[{name:" 撤消命令",legend:"按 ${undo}"},{name:" 重做命令",legend:"按 ${redo}"},{name:" 加粗命令",legend:"按 ${bold}"},{name:" 倾斜命令",legend:"按 ${italic}"},{name:" 下划线命令",legend:"按 ${underline}"},{name:" 链接命令",legend:"按 ${link}"},{name:" 工具栏折叠命令",legend:"按 ${toolbarCollapse}"},
7 | {name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" 无障碍设计说明",legend:"按 ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/test/controllers/pictures_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class PicturesControllerTest < ActionController::TestCase
4 | tests Ckeditor::PicturesController
5 |
6 | include RawPost
7 | include Ckeditor::Engine.routes.url_helpers
8 | include ControllerHooks
9 |
10 | def setup
11 | @image = fixture_file_upload('files/rails.png', 'image/png')
12 | end
13 |
14 | def teardown
15 | Ckeditor::Picture.destroy_all
16 | end
17 |
18 | test "index action" do
19 | get :index
20 |
21 | assert_equal 200, @response.status
22 | assert_template "ckeditor/pictures/index"
23 | end
24 |
25 | test "create action via filebrowser" do
26 | assert_difference 'Ckeditor::Picture.count' do
27 | post :create, :qqfile => @image
28 | end
29 |
30 | assert_equal 200, @response.status
31 | end
32 |
33 | test "create action via CKEditor upload form" do
34 | assert_difference 'Ckeditor::Picture.count' do
35 | post :create, :upload => @image, :CKEditor => 'ckeditor_field'
36 | end
37 |
38 | assert_equal 200, @response.status
39 | end
40 |
41 | test "create action via html5 upload" do
42 | assert_difference 'Ckeditor::Picture.count' do
43 | raw_post :create, { :qqfile => @image.original_filename }, @image.read, "image/png"
44 | end
45 |
46 | assert_equal 200, @response.status
47 | end
48 |
49 | test "invalid params for create action" do
50 | assert_no_difference 'Ckeditor::Picture.count' do
51 | post :create, :qqfile => nil
52 | end
53 | end
54 |
55 | test "destroy action via filebrowser" do
56 | @picture = Ckeditor::Picture.create :data => @image
57 |
58 | assert_difference 'Ckeditor::Picture.count', -1 do
59 | delete :destroy, :id => @picture.id
60 | end
61 |
62 | assert_equal 302, @response.status
63 | end
64 | end
65 |
--------------------------------------------------------------------------------
/lib/ckeditor/backend/carrierwave.rb:
--------------------------------------------------------------------------------
1 | require 'mime/types'
2 | require 'mini_magick'
3 |
4 | module Ckeditor
5 | module Backend
6 | module CarrierWave
7 | def self.included(base)
8 | base.send(:include, InstanceMethods)
9 | base.send(:extend, ClassMethods)
10 | end
11 |
12 | module ClassMethods
13 | def self.extended(base)
14 | base.class_eval do
15 | process :extract_content_type
16 | process :set_size
17 | end
18 | end
19 | end
20 |
21 | module InstanceMethods
22 | # process :strip
23 | def strip
24 | manipulate! do |img|
25 | img.strip
26 | img = yield(img) if block_given?
27 | img
28 | end
29 | end
30 |
31 | # process :quality => 85
32 | def quality(percentage)
33 | manipulate! do |img|
34 | img.quality(percentage)
35 | img = yield(img) if block_given?
36 | img
37 | end
38 | end
39 |
40 | def extract_content_type
41 | if file.content_type == 'application/octet-stream' || file.content_type.blank?
42 | content_type = MIME::Types.type_for(original_filename).first
43 | else
44 | content_type = file.content_type
45 | end
46 |
47 | model.data_content_type = content_type.to_s
48 | end
49 |
50 | def set_size
51 | model.data_file_size = file.size
52 | end
53 |
54 | def read_dimensions
55 | if model.image? && model.has_dimensions?
56 | magick = ::MiniMagick::Image.new(current_path)
57 | model.width, model.height = magick[:width], magick[:height]
58 | end
59 | end
60 |
61 | end
62 | end
63 | end
64 | end
65 |
--------------------------------------------------------------------------------
/lib/ckeditor/backend/paperclip.rb:
--------------------------------------------------------------------------------
1 | require 'mime/types'
2 |
3 | module Ckeditor
4 | module Backend
5 | module Paperclip
6 | def self.included(base)
7 | base.send(:include, InstanceMethods)
8 | base.send(:extend, ClassMethods)
9 | end
10 |
11 | module ClassMethods
12 | def self.extended(base)
13 | base.class_eval do
14 | before_validation :extract_content_type
15 | before_create :read_dimensions, :parameterize_filename
16 |
17 | delegate :url, :path, :styles, :size, :content_type, :to => :data
18 | end
19 | end
20 | end
21 |
22 | module InstanceMethods
23 | def geometry
24 | @geometry ||= begin
25 | file = data.respond_to?(:queued_for_write) ? data.queued_for_write[:original] : data.to_file
26 | ::Paperclip::Geometry.from_file(file)
27 | end
28 | end
29 |
30 | protected
31 |
32 | def parameterize_filename
33 | unless data_file_name.blank?
34 | filename = Ckeditor::Utils.parameterize_filename(data_file_name)
35 | self.data.instance_write(:file_name, filename)
36 | end
37 | end
38 |
39 | def read_dimensions
40 | if image? && has_dimensions?
41 | self.width = geometry.width
42 | self.height = geometry.height
43 | end
44 | end
45 |
46 | # Extract content_type from filename using mime/types gem
47 | def extract_content_type
48 | if data_content_type == "application/octet-stream" && !data_file_name.blank?
49 | content_types = MIME::Types.type_for(data_file_name)
50 | self.data_content_type = content_types.first.to_s unless content_types.empty?
51 | end
52 | end
53 | end
54 | end
55 | end
56 | end
57 |
--------------------------------------------------------------------------------
/test/controllers/attachment_files_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class AttachmentFilesControllerTest < ActionController::TestCase
4 | tests Ckeditor::AttachmentFilesController
5 |
6 | include RawPost
7 | include ControllerHooks
8 |
9 | def setup
10 | @attachment = fixture_file_upload('files/rails.tar.gz', 'application/x-gzip')
11 | end
12 |
13 | def teardown
14 | Ckeditor::AttachmentFile.destroy_all
15 | end
16 |
17 | test "index action" do
18 | get :index
19 |
20 | assert_equal 200, @response.status
21 | assert_template "ckeditor/attachment_files/index"
22 | end
23 |
24 | test "create action via filebrowser" do
25 | assert_difference 'Ckeditor::AttachmentFile.count' do
26 | post :create, :qqfile => @attachment
27 | end
28 |
29 | assert_equal 200, @response.status
30 | end
31 |
32 | test "create action via CKEditor upload form" do
33 | assert_difference 'Ckeditor::AttachmentFile.count' do
34 | post :create, :upload => @attachment, :CKEditor => 'ckeditor_field'
35 | end
36 |
37 | assert_equal 200, @response.status
38 | end
39 |
40 | test "create action via html5 upload" do
41 | assert_difference 'Ckeditor::AttachmentFile.count' do
42 | raw_post :create, { :qqfile => @attachment.original_filename }, @attachment.read
43 | end
44 |
45 | assert_equal 200, @response.status
46 | end
47 |
48 | test "invalid params for create action" do
49 | assert_no_difference 'Ckeditor::AttachmentFile.count' do
50 | post :create, :qqfile => nil
51 | end
52 | end
53 |
54 | test "destroy action via filebrowser" do
55 | @attachment_file = Ckeditor::AttachmentFile.create :data => @attachment
56 |
57 | assert_difference 'Ckeditor::AttachmentFile.count', -1 do
58 | delete :destroy, :id => @attachment_file.id
59 | end
60 |
61 | assert_equal 302, @response.status
62 | end
63 | end
64 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.dialog.add("anchor",function(c){var d=function(a){this._.selectedElement=a;this.setValueOf("info","txtName",a.data("cke-saved-name")||"")};return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var a=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:a,name:a,"data-cke-saved-name":a};if(this._.selectedElement)this._.selectedElement.data("cke-realelement")?(a=c.document.createElement("a",{attributes:a}),c.createFakeElement(a,"cke_anchor","anchor").replace(this._.selectedElement)):
6 | this._.selectedElement.setAttributes(a);else{var b=c.getSelection(),b=b&&b.getRanges()[0];b.collapsed?(CKEDITOR.plugins.link.synAnchorSelector&&(a["class"]="cke_anchor_empty"),CKEDITOR.plugins.link.emptyAnchorFix&&(a.contenteditable="false",a["data-cke-editable"]=1),a=c.document.createElement("a",{attributes:a}),CKEDITOR.plugins.link.fakeAnchor&&(a=c.createFakeElement(a,"cke_anchor","anchor")),b.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",
7 | attributes:a}),a.type=CKEDITOR.STYLE_INLINE,c.applyStyle(a))}},onHide:function(){delete this._.selectedElement},onShow:function(){var a=c.getSelection(),b=a.getSelectedElement();if(b)CKEDITOR.plugins.link.fakeAnchor?((a=CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,b))&&d.call(this,a),this._.selectedElement=b):b.is("a")&&b.hasAttribute("name")&&d.call(this,b);else if(b=CKEDITOR.plugins.link.getSelectedLink(c))d.call(this,b),a.selectElement(b);this.getContentElement("info","txtName").focus()},contents:[{id:"info",
8 | label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){return!this.getValue()?(alert(c.lang.link.anchor.errorName),!1):!0}}]}]}});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 |
6 | .cke_tpl_list
7 | {
8 | border: #dcdcdc 2px solid;
9 | background-color: #ffffff;
10 | overflow-y: auto;
11 | overflow-x: hidden;
12 | width: 100%;
13 | height: 220px;
14 | }
15 |
16 | .cke_tpl_item
17 | {
18 | margin: 5px;
19 | padding: 7px;
20 | border: #eeeeee 1px solid;
21 | *width: 88%;
22 | }
23 |
24 | .cke_tpl_preview
25 | {
26 | border-collapse: separate;
27 | text-indent:0;
28 | width: 100%;
29 | }
30 | .cke_tpl_preview td
31 | {
32 | padding: 2px;
33 | vertical-align: middle;
34 | }
35 | .cke_tpl_preview .cke_tpl_preview_img
36 | {
37 | width: 100px;
38 | }
39 | .cke_tpl_preview span
40 | {
41 | white-space: normal;
42 | }
43 |
44 | .cke_tpl_title
45 | {
46 | font-weight: bold;
47 | }
48 |
49 | .cke_tpl_list a:hover .cke_tpl_item,
50 | .cke_tpl_list a:focus .cke_tpl_item,
51 | .cke_tpl_list a:active .cke_tpl_item
52 | {
53 | border: #ff9933 1px solid;
54 | background-color: #fffacd;
55 | }
56 |
57 | .cke_tpl_list a:hover *,
58 | .cke_tpl_list a:focus *,
59 | .cke_tpl_list a:active *
60 | {
61 | cursor: pointer;
62 | }
63 |
64 | /* IE6 contextual selectors childs won't get :hover transition until,
65 | the hover style of the link itself contains certain CSS declarations.*/
66 | .cke_browser_ie6 .cke_tpl_list a:active,
67 | .cke_browser_ie6 .cke_tpl_list a:hover,
68 | .cke_browser_ie6 .cke_tpl_list a:focus
69 | {
70 | background-position: 0 0;
71 | }
72 |
73 | .cke_hc .cke_tpl_list a:hover .cke_tpl_item,
74 | .cke_hc .cke_tpl_list a:focus .cke_tpl_item,
75 | .cke_hc .cke_tpl_list a:active .cke_tpl_item
76 | {
77 | border-width: 3px;
78 | }
79 |
80 | .cke_tpl_empty, .cke_tpl_loading
81 | {
82 | text-align: center;
83 | padding: 5px;
84 | }
85 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.dialog.add("textarea",function(b){return{title:b.lang.forms.textarea.title,minWidth:350,minHeight:220,onShow:function(){delete this.textarea;var a=this.getParentEditor().getSelection().getSelectedElement();a&&"textarea"==a.getName()&&(this.textarea=a,this.setupContent(a))},onOk:function(){var a,b=this.textarea,c=!b;c&&(a=this.getParentEditor(),b=a.document.createElement("textarea"));this.commitContent(b);c&&a.insertElement(b)},contents:[{id:"info",label:b.lang.forms.textarea.title,title:b.lang.forms.textarea.title,
6 | elements:[{id:"_cke_saved_name",type:"text",label:b.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){this.getValue()?a.data("cke-saved-name",this.getValue()):(a.data("cke-saved-name",!1),a.removeAttribute("name"))}},{type:"hbox",widths:["50%","50%"],children:[{id:"cols",type:"text",label:b.lang.forms.textarea.cols,"default":"",accessKey:"C",style:"width:50px",validate:CKEDITOR.dialog.validate.integer(b.lang.common.validateNumberFailed),
7 | setup:function(a){this.setValue(a.hasAttribute("cols")&&a.getAttribute("cols")||"")},commit:function(a){this.getValue()?a.setAttribute("cols",this.getValue()):a.removeAttribute("cols")}},{id:"rows",type:"text",label:b.lang.forms.textarea.rows,"default":"",accessKey:"R",style:"width:50px",validate:CKEDITOR.dialog.validate.integer(b.lang.common.validateNumberFailed),setup:function(a){this.setValue(a.hasAttribute("rows")&&a.getAttribute("rows")||"")},commit:function(a){this.getValue()?a.setAttribute("rows",
8 | this.getValue()):a.removeAttribute("rows")}}]},{id:"value",type:"textarea",label:b.lang.forms.textfield.value,"default":"",setup:function(a){this.setValue(a.$.defaultValue)},commit:function(a){a.$.value=a.$.defaultValue=this.getValue()}}]}]}});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.dialog.add("radio",function(d){return{title:d.lang.forms.checkboxAndRadio.radioTitle,minWidth:350,minHeight:140,onShow:function(){delete this.radioButton;var a=this.getParentEditor().getSelection().getSelectedElement();a&&("input"==a.getName()&&"radio"==a.getAttribute("type"))&&(this.radioButton=a,this.setupContent(a))},onOk:function(){var a,b=this.radioButton,c=!b;c&&(a=this.getParentEditor(),b=a.document.createElement("input"),b.setAttribute("type","radio"));c&&a.insertElement(b);this.commitContent({element:b})},
6 | contents:[{id:"info",label:d.lang.forms.checkboxAndRadio.radioTitle,title:d.lang.forms.checkboxAndRadio.radioTitle,elements:[{id:"name",type:"text",label:d.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){a=a.element;this.getValue()?a.data("cke-saved-name",this.getValue()):(a.data("cke-saved-name",!1),a.removeAttribute("name"))}},{id:"value",type:"text",label:d.lang.forms.checkboxAndRadio.value,"default":"",
7 | accessKey:"V",setup:function(a){this.setValue(a.getAttribute("value")||"")},commit:function(a){a=a.element;this.getValue()?a.setAttribute("value",this.getValue()):a.removeAttribute("value")}},{id:"checked",type:"checkbox",label:d.lang.forms.checkboxAndRadio.selected,"default":"",accessKey:"S",value:"checked",setup:function(a){this.setValue(a.getAttribute("checked"))},commit:function(a){var b=a.element;if(!CKEDITOR.env.ie&&!CKEDITOR.env.opera)this.getValue()?b.setAttribute("checked","checked"):b.removeAttribute("checked");
8 | else{var c=b.getAttribute("checked"),e=!!this.getValue();c!=e&&(c=CKEDITOR.dom.element.createFromHtml(' ",d.document),b.copyAttributes(c,{type:1,checked:1}),c.replace(b),d.getSelection().selectElement(c),a.element=c)}}}]}]}});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.dialog.add("form",function(a){var d={action:1,id:1,method:1,enctype:1,target:1};return{title:a.lang.forms.form.title,minWidth:350,minHeight:200,onShow:function(){delete this.form;var b=this.getParentEditor().elementPath().contains("form",1);b&&(this.form=b,this.setupContent(b))},onOk:function(){var b,a=this.form,c=!a;c&&(b=this.getParentEditor(),a=b.document.createElement("form"),!CKEDITOR.env.ie&&a.append(b.document.createElement("br")));c&&b.insertElement(a);this.commitContent(a)},onLoad:function(){function a(b){this.setValue(b.getAttribute(this.id)||
6 | "")}function e(a){this.getValue()?a.setAttribute(this.id,this.getValue()):a.removeAttribute(this.id)}this.foreach(function(c){d[c.id]&&(c.setup=a,c.commit=e)})},contents:[{id:"info",label:a.lang.forms.form.title,title:a.lang.forms.form.title,elements:[{id:"txtName",type:"text",label:a.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){this.getValue()?a.data("cke-saved-name",this.getValue()):(a.data("cke-saved-name",
7 | !1),a.removeAttribute("name"))}},{id:"action",type:"text",label:a.lang.forms.form.action,"default":"",accessKey:"T"},{type:"hbox",widths:["45%","55%"],children:[{id:"id",type:"text",label:a.lang.common.id,"default":"",accessKey:"I"},{id:"enctype",type:"select",label:a.lang.forms.form.encoding,style:"width:100%",accessKey:"E","default":"",items:[[""],["text/plain"],["multipart/form-data"],["application/x-www-form-urlencoded"]]}]},{type:"hbox",widths:["45%","55%"],children:[{id:"target",type:"select",
8 | label:a.lang.common.target,style:"width:100%",accessKey:"M","default":"",items:[[a.lang.common.notSet,""],[a.lang.common.targetNew,"_blank"],[a.lang.common.targetTop,"_top"],[a.lang.common.targetSelf,"_self"],[a.lang.common.targetParent,"_parent"]]},{id:"method",type:"select",label:a.lang.forms.form.method,accessKey:"M","default":"GET",items:[["GET","get"],["POST","post"]]}]}]}]}});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/contents.css:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 |
6 | body
7 | {
8 | /* Font */
9 | font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
10 | font-size: 12px;
11 |
12 | /* Text color */
13 | color: #333;
14 |
15 | /* Remove the background color to make it transparent */
16 | background-color: #fff;
17 |
18 | margin: 20px;
19 | }
20 |
21 | .cke_editable
22 | {
23 | font-size: 13px;
24 | line-height: 1.6em;
25 | }
26 |
27 | blockquote
28 | {
29 | font-style: italic;
30 | font-family: Georgia, Times, "Times New Roman", serif;
31 | padding: 2px 0;
32 | border-style: solid;
33 | border-color: #ccc;
34 | border-width: 0;
35 | }
36 |
37 | .cke_contents_ltr blockquote
38 | {
39 | padding-left: 20px;
40 | padding-right: 8px;
41 | border-left-width: 5px;
42 | }
43 |
44 | .cke_contents_rtl blockquote
45 | {
46 | padding-left: 8px;
47 | padding-right: 20px;
48 | border-right-width: 5px;
49 | }
50 |
51 | a
52 | {
53 | color: #0782C1;
54 | }
55 |
56 | ol,ul,dl
57 | {
58 | /* IE7: reset rtl list margin. (#7334) */
59 | *margin-right: 0px;
60 | /* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
61 | padding: 0 40px;
62 | }
63 |
64 | h1,h2,h3,h4,h5,h6
65 | {
66 | font-weight: normal;
67 | line-height: 1.2em;
68 | }
69 |
70 | hr
71 | {
72 | border: 0px;
73 | border-top: 1px solid #ccc;
74 | }
75 |
76 | img.right {
77 | border: 1px solid #ccc;
78 | float: right;
79 | margin-left: 15px;
80 | padding: 5px;
81 | }
82 |
83 | img.left {
84 | border: 1px solid #ccc;
85 | float: left;
86 | margin-right: 15px;
87 | padding: 5px;
88 | }
89 |
90 | img:hover {
91 | opacity: .9;
92 | filter: alpha(opacity = 90);
93 | }
94 |
95 | pre
96 | {
97 | white-space: pre-wrap; /* CSS 2.1 */
98 | word-wrap: break-word; /* IE7 */
99 | }
100 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.dialog.add("checkbox",function(d){return{title:d.lang.forms.checkboxAndRadio.checkboxTitle,minWidth:350,minHeight:140,onShow:function(){delete this.checkbox;var a=this.getParentEditor().getSelection().getSelectedElement();a&&"checkbox"==a.getAttribute("type")&&(this.checkbox=a,this.setupContent(a))},onOk:function(){var a,b=this.checkbox;b||(a=this.getParentEditor(),b=a.document.createElement("input"),b.setAttribute("type","checkbox"),a.insertElement(b));this.commitContent({element:b})},contents:[{id:"info",
6 | label:d.lang.forms.checkboxAndRadio.checkboxTitle,title:d.lang.forms.checkboxAndRadio.checkboxTitle,startupFocus:"txtName",elements:[{id:"txtName",type:"text",label:d.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){a=a.element;this.getValue()?a.data("cke-saved-name",this.getValue()):(a.data("cke-saved-name",!1),a.removeAttribute("name"))}},{id:"txtValue",type:"text",label:d.lang.forms.checkboxAndRadio.value,
7 | "default":"",accessKey:"V",setup:function(a){a=a.getAttribute("value");this.setValue(CKEDITOR.env.ie&&"on"==a?"":a)},commit:function(a){var b=a.element,c=this.getValue();c&&!(CKEDITOR.env.ie&&"on"==c)?b.setAttribute("value",c):CKEDITOR.env.ie?(c=new CKEDITOR.dom.element("input",b.getDocument()),b.copyAttributes(c,{value:1}),c.replace(b),d.getSelection().selectElement(c),a.element=c):b.removeAttribute("value")}},{id:"cmbSelected",type:"checkbox",label:d.lang.forms.checkboxAndRadio.selected,"default":"",
8 | accessKey:"S",value:"checked",setup:function(a){this.setValue(a.getAttribute("checked"))},commit:function(a){var b=a.element;if(CKEDITOR.env.ie){var c=!!b.getAttribute("checked"),e=!!this.getValue();c!=e&&(c=CKEDITOR.dom.element.createFromHtml(' ",d.document),b.copyAttributes(c,{type:1,checked:1}),c.replace(b),d.getSelection().selectElement(c),a.element=c)}else this.getValue()?b.setAttribute("checked","checked"):b.removeAttribute("checked")}}]}]}});
--------------------------------------------------------------------------------
/lib/ckeditor/hooks/cancan.rb:
--------------------------------------------------------------------------------
1 | require 'cancan'
2 |
3 | module Ckeditor
4 | module Hooks
5 | # This adapter is for the CanCan[https://github.com/ryanb/cancan] authorization library.
6 | # You can create another adapter for different authorization behavior, just be certain it
7 | # responds to each of the public methods here.
8 | class CanCanAuthorization
9 | # See the +authorize_with+ config method for where the initialization happens.
10 | def initialize(controller, ability = ::Ability)
11 | @controller = controller
12 | @controller.instance_variable_set '@ability', ability
13 | @controller.extend ControllerExtension
14 | @controller.current_ability.authorize! :access, :ckeditor
15 | end
16 |
17 | # This method is called in every controller action and should raise an exception
18 | # when the authorization fails. The first argument is the name of the controller
19 | # action as a symbol (:create, :destroy, etc.). The second argument is the actual model
20 | # instance if it is available.
21 | def authorize(action, model_object = nil)
22 | @controller.current_ability.authorize!(action.to_sym, model_object) if action
23 | end
24 |
25 | # This method is called primarily from the view to determine whether the given user
26 | # has access to perform the action on a given model. It should return true when authorized.
27 | # This takes the same arguments as +authorize+. The difference is that this will
28 | # return a boolean whereas +authorize+ will raise an exception when not authorized.
29 | def authorized?(action, model_object = nil)
30 | @controller.current_ability.can?(action.to_sym, model_object) if action
31 | end
32 |
33 | private
34 |
35 | module ControllerExtension
36 | def current_ability
37 | # use ckeditor_current_user instead of default current_user so it works with
38 | # whatever current user method is defined with Ckeditor
39 | @current_ability ||= @ability.new(ckeditor_current_user)
40 | end
41 | end
42 | end
43 | end
44 | end
45 |
46 | Ckeditor::AUTHORIZATION_ADAPTERS[:cancan] = Ckeditor::Hooks::CanCanAuthorization
--------------------------------------------------------------------------------
/test/dummy/app/controllers/posts_controller.rb:
--------------------------------------------------------------------------------
1 | class PostsController < ApplicationController
2 | # GET /posts
3 | # GET /posts.xml
4 | def index
5 | @posts = Post.all
6 |
7 | respond_to do |format|
8 | format.html # index.html.erb
9 | format.xml { render :xml => @posts }
10 | end
11 | end
12 |
13 | # GET /posts/1
14 | # GET /posts/1.xml
15 | def show
16 | @post = Post.find(params[:id])
17 |
18 | respond_to do |format|
19 | format.html # show.html.erb
20 | format.xml { render :xml => @post }
21 | end
22 | end
23 |
24 | # GET /posts/new
25 | # GET /posts/new.xml
26 | def new
27 | @post = Post.new
28 |
29 | respond_to do |format|
30 | format.html # new.html.erb
31 | format.xml { render :xml => @post }
32 | end
33 | end
34 |
35 | # GET /posts/1/edit
36 | def edit
37 | @post = Post.find(params[:id])
38 | end
39 |
40 | # POST /posts
41 | # POST /posts.xml
42 | def create
43 | @post = Post.new(params[:post])
44 |
45 | respond_to do |format|
46 | if @post.save
47 | format.html { redirect_to(@post, :notice => 'Post was successfully created.') }
48 | format.xml { render :xml => @post, :status => :created, :location => @post }
49 | else
50 | format.html { render :action => "new" }
51 | format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
52 | end
53 | end
54 | end
55 |
56 | # PUT /posts/1
57 | # PUT /posts/1.xml
58 | def update
59 | @post = Post.find(params[:id])
60 |
61 | respond_to do |format|
62 | if @post.update_attributes(params[:post])
63 | format.html { redirect_to(@post, :notice => 'Post was successfully updated.') }
64 | format.xml { head :ok }
65 | else
66 | format.html { render :action => "edit" }
67 | format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
68 | end
69 | end
70 | end
71 |
72 | # DELETE /posts/1
73 | # DELETE /posts/1.xml
74 | def destroy
75 | @post = Post.find(params[:id])
76 | @post.destroy
77 |
78 | respond_to do |format|
79 | format.html { redirect_to(posts_url) }
80 | format.xml { head :ok }
81 | end
82 | end
83 | end
84 |
--------------------------------------------------------------------------------
/lib/ckeditor/http.rb:
--------------------------------------------------------------------------------
1 | # encoding: utf-8
2 | require 'digest/sha1'
3 | require 'mime/types'
4 |
5 | module Ckeditor
6 | module Http
7 | # Create tempfile from hash
8 | class UploadedFile
9 | attr_accessor :original_filename, :content_type, :tempfile, :headers
10 |
11 | def initialize(hash)
12 | @original_filename = hash[:filename]
13 | @content_type = hash[:type]
14 | @headers = hash[:head]
15 | @tempfile = hash[:tempfile]
16 | raise(ArgumentError, ':tempfile is required') unless @tempfile
17 | end
18 |
19 | def open
20 | @tempfile.open
21 | end
22 |
23 | def path
24 | @tempfile.path
25 | end
26 |
27 | def read(*args)
28 | @tempfile.read(*args)
29 | end
30 |
31 | def rewind
32 | @tempfile.rewind
33 | end
34 |
35 | def size
36 | @tempfile.size
37 | end
38 | end
39 |
40 | # Usage (paperclip example)
41 | # @asset.data = QqFile.new(params[:qqfile], request)
42 | class QqFile < ::Tempfile
43 |
44 | def initialize(filename, request, tmpdir = Dir::tmpdir)
45 | @original_filename = filename
46 | @request = request
47 |
48 | super Digest::SHA1.hexdigest(filename), tmpdir
49 | fetch
50 | end
51 |
52 | def fetch
53 | self.write(body)
54 | self.rewind
55 | self
56 | end
57 |
58 | def original_filename
59 | @original_filename
60 | end
61 |
62 | def content_type
63 | types = MIME::Types.type_for(original_filename)
64 | types.empty? ? @request.content_type : types.first.to_s
65 | end
66 |
67 | def body
68 | if @request.raw_post.respond_to?(:force_encoding)
69 | @request.raw_post.force_encoding("UTF-8")
70 | else
71 | @request.raw_post
72 | end
73 | end
74 | end
75 |
76 | # Convert nested Hash to HashWithIndifferentAccess and replace
77 | # file upload hash with UploadedFile objects
78 | def self.normalize_param(*args)
79 | value = args.first
80 | if Hash === value && value.has_key?(:tempfile)
81 | UploadedFile.new(value)
82 | elsif value.is_a?(String)
83 | QqFile.new(*args)
84 | else
85 | value
86 | end
87 | end
88 | end
89 | end
90 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("specialchar","zh-cn",{euro:"欧元符号",lsquo:"左单引号",rsquo:"右单引号",ldquo:"左双引号",rdquo:"右双引号",ndash:"短划线",mdash:"破折号",iexcl:"竖翻叹号",cent:"分币标记",pound:"英镑标记",curren:"货币标记",yen:"日元标记",brvbar:"间断条",sect:"节标记",uml:"分音符",copy:"版权所有标记",ordf:"阴性顺序指示符",laquo:"左指双尖引号",not:"非标记",reg:"注册标记",macr:"长音符",deg:"度标记",sup2:"上标二",sup3:"上标三",acute:"锐音符",micro:"微符",para:"段落标记",middot:"中间点",cedil:"下加符",sup1:"上标一",ordm:"阳性顺序指示符",raquo:"右指双尖引号",frac14:"普通分数四分之一",frac12:"普通分数二分之一",frac34:"普通分数四分之三",iquest:"竖翻问号",
6 | Agrave:"带抑音符的拉丁文大写字母 A",Aacute:"带锐音符的拉丁文大写字母 A",Acirc:"带扬抑符的拉丁文大写字母 A",Atilde:"带颚化符的拉丁文大写字母 A",Auml:"带分音符的拉丁文大写字母 A",Aring:"带上圆圈的拉丁文大写字母 A",AElig:"拉丁文大写字母 Ae",Ccedil:"带下加符的拉丁文大写字母 C",Egrave:"带抑音符的拉丁文大写字母 E",Eacute:"带锐音符的拉丁文大写字母 E",Ecirc:"带扬抑符的拉丁文大写字母 E",Euml:"带分音符的拉丁文大写字母 E",Igrave:"带抑音符的拉丁文大写字母 I",Iacute:"带锐音符的拉丁文大写字母 I",Icirc:"带扬抑符的拉丁文大写字母 I",Iuml:"带分音符的拉丁文大写字母 I",ETH:"拉丁文大写字母 Eth",Ntilde:"带颚化符的拉丁文大写字母 N",Ograve:"带抑音符的拉丁文大写字母 O",Oacute:"带锐音符的拉丁文大写字母 O",Ocirc:"带扬抑符的拉丁文大写字母 O",Otilde:"带颚化符的拉丁文大写字母 O",
7 | Ouml:"带分音符的拉丁文大写字母 O",times:"乘号",Oslash:"带粗线的拉丁文大写字母 O",Ugrave:"带抑音符的拉丁文大写字母 U",Uacute:"带锐音符的拉丁文大写字母 U",Ucirc:"带扬抑符的拉丁文大写字母 U",Uuml:"带分音符的拉丁文大写字母 U",Yacute:"带抑音符的拉丁文大写字母 Y",THORN:"拉丁文大写字母 Thorn",szlig:"拉丁文小写字母清音 S",agrave:"带抑音符的拉丁文小写字母 A",aacute:"带锐音符的拉丁文小写字母 A",acirc:"带扬抑符的拉丁文小写字母 A",atilde:"带颚化符的拉丁文小写字母 A",auml:"带分音符的拉丁文小写字母 A",aring:"带上圆圈的拉丁文小写字母 A",aelig:"拉丁文小写字母 Ae",ccedil:"带下加符的拉丁文小写字母 C",egrave:"带抑音符的拉丁文小写字母 E",eacute:"带锐音符的拉丁文小写字母 E",ecirc:"带扬抑符的拉丁文小写字母 E",euml:"带分音符的拉丁文小写字母 E",igrave:"带抑音符的拉丁文小写字母 I",
8 | iacute:"带锐音符的拉丁文小写字母 I",icirc:"带扬抑符的拉丁文小写字母 I",iuml:"带分音符的拉丁文小写字母 I",eth:"拉丁文小写字母 Eth",ntilde:"带颚化符的拉丁文小写字母 N",ograve:"带抑音符的拉丁文小写字母 O",oacute:"带锐音符的拉丁文小写字母 O",ocirc:"带扬抑符的拉丁文小写字母 O",otilde:"带颚化符的拉丁文小写字母 O",ouml:"带分音符的拉丁文小写字母 O",divide:"除号",oslash:"带粗线的拉丁文小写字母 O",ugrave:"带抑音符的拉丁文小写字母 U",uacute:"带锐音符的拉丁文小写字母 U",ucirc:"带扬抑符的拉丁文小写字母 U",uuml:"带分音符的拉丁文小写字母 U",yacute:"带抑音符的拉丁文小写字母 Y",thorn:"拉丁文小写字母 Thorn",yuml:"带分音符的拉丁文小写字母 Y",OElig:"拉丁文大写连字 Oe",oelig:"拉丁文小写连字 Oe",372:"带扬抑符的拉丁文大写字母 W",374:"带扬抑符的拉丁文大写字母 Y",
9 | 373:"带扬抑符的拉丁文小写字母 W",375:"带扬抑符的拉丁文小写字母 Y",sbquo:"单下 9 形引号",8219:"单高横翻 9 形引号",bdquo:"双下 9 形引号",hellip:"水平省略号",trade:"商标标志",9658:"实心右指指针",bull:"加重号",rarr:"向右箭头",rArr:"向右双线箭头",hArr:"左右双线箭头",diams:"实心方块纸牌",asymp:"约等于"});
--------------------------------------------------------------------------------
/test/dummy/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | Dummy::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # Code is not reloaded between requests
5 | config.cache_classes = true
6 |
7 | # Full error reports are disabled and caching is turned on
8 | config.consider_all_requests_local = false
9 | config.action_controller.perform_caching = true
10 |
11 | # Disable Rails's static asset server (Apache or nginx will already do this)
12 | config.serve_static_assets = false
13 |
14 | # Compress JavaScripts and CSS
15 | config.assets.compress = true
16 |
17 | # Don't fallback to assets pipeline if a precompiled asset is missed
18 | config.assets.compile = false
19 |
20 | # Generate digests for assets URLs
21 | config.assets.digest = true
22 |
23 | # Defaults to Rails.root.join("public/assets")
24 | # config.assets.manifest = YOUR_PATH
25 |
26 | # Specifies the header that your server uses for sending files
27 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29 |
30 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31 | # config.force_ssl = true
32 |
33 | # See everything in the log (default is :info)
34 | # config.log_level = :debug
35 |
36 | # Prepend all log lines with the following tags
37 | # config.log_tags = [ :subdomain, :uuid ]
38 |
39 | # Use a different logger for distributed setups
40 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41 |
42 | # Use a different cache store in production
43 | # config.cache_store = :mem_cache_store
44 |
45 | # Enable serving of images, stylesheets, and JavaScripts from an asset server
46 | # config.action_controller.asset_host = "http://assets.example.com"
47 |
48 | # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49 | # config.assets.precompile += %w( search.js )
50 |
51 | # Disable delivery errors, bad email addresses will be ignored
52 | # config.action_mailer.raise_delivery_errors = false
53 |
54 | # Enable threaded mode
55 | # config.threadsafe!
56 |
57 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58 | # the I18n.default_locale when a translation can not be found)
59 | config.i18n.fallbacks = true
60 |
61 | # Send deprecation notices to registered listeners
62 | config.active_support.deprecation = :notify
63 |
64 | # Log the query plan for queries taking more than this (works
65 | # with SQLite, MySQL, and PostgreSQL)
66 | # config.active_record.auto_explain_threshold_in_seconds = 0.5
67 | end
68 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/skins/moono/readme.md:
--------------------------------------------------------------------------------
1 | "Moono" Skin
2 | ====================
3 |
4 | This skin has been chosen for the **default skin** of CKEditor 4.x, elected from the CKEditor
5 | [skin contest](http://ckeditor.com/blog/new_ckeditor_4_skin) and further shaped by
6 | the CKEditor team. "Moono" is maintained by the core developers.
7 |
8 | For more information about skins, please check the [CKEditor Skin SDK](http://docs.cksource.com/CKEditor_4.x/Skin_SDK)
9 | documentation.
10 |
11 | Features
12 | -------------------
13 | "Moono" is a monochromatic skin, which offers a modern look coupled with gradients and transparency.
14 | It comes with the following features:
15 |
16 | - Chameleon feature with brightness,
17 | - high-contrast compatibility,
18 | - graphics source provided in SVG.
19 |
20 | Directory Structure
21 | -------------------
22 |
23 | CSS parts:
24 | - **editor.css**: the main CSS file. It's simply loading several other files, for easier maintenance,
25 | - **mainui.css**: the file contains styles of entire editor outline structures,
26 | - **toolbar.css**: the file contains styles of the editor toolbar space (top),
27 | - **richcombo.css**: the file contains styles of the rich combo ui elements on toolbar,
28 | - **panel.css**: the file contains styles of the rich combo drop-down, it's not loaded
29 | until the first panel open up,
30 | - **elementspath.css**: the file contains styles of the editor elements path bar (bottom),
31 | - **menu.css**: the file contains styles of all editor menus including context menu and button drop-down,
32 | it's not loaded until the first menu open up,
33 | - **dialog.css**: the CSS files for the dialog UI, it's not loaded until the first dialog open,
34 | - **reset.css**: the file defines the basis of style resets among all editor UI spaces,
35 | - **preset.css**: the file defines the default styles of some UI elements reflecting the skin preference,
36 | - **editor_XYZ.css** and **dialog_XYZ.css**: browser specific CSS hacks.
37 |
38 | Other parts:
39 | - **skin.js**: the only JavaScript part of the skin that registers the skin, its browser specific files and its icons and defines the Chameleon feature,
40 | - **icons/**: contains all skin defined icons,
41 | - **images/**: contains a fill general used images,
42 | - **dev/**: contains SVG source of the skin icons.
43 |
44 | License
45 | -------
46 |
47 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
48 |
49 | Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
50 |
51 | See LICENSE.md for more information.
52 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","he",{title:"הוראות נגישות",contents:"הוראות נגישות. לסגירה לחץ אסקייפ (ESC).",legend:[{name:"כללי",items:[{name:"סרגל הכלים",legend:"לחץ על ${toolbarFocus} כדי לנווט לסרגל הכלים. עבור לכפתור הבא עם מקש הטאב (TAB) או חץ שמאלי. עבור לכפתור הקודם עם מקש השיפט (SHIFT) + טאב (TAB) או חץ ימני. לחץ רווח או אנטר (ENTER) כדי להפעיל את הכפתור הנבחר."},{name:"דיאלוגים (חלונות תשאול)",legend:"בתוך דיאלוג, לחץ טאב (TAB) כדי לנווט לשדה הבא, לחץ שיפט (SHIFT) + טאב (TAB) כדי לנווט לשדה הקודם, לחץ אנטר (ENTER) כדי לשלוח את הדיאלוג, לחץ אסקייפ (ESC) כדי לבטל. בתוך דיאלוגים בעלי מספר טאבים (לשוניות), לחץ אלט (ALT) + F10 כדי לנווט לשורת הטאבים. נווט לטאב הבא עם טאב (TAB) או חץ שמאלי. עבור לטאב הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי להיכנס לטאב."},
6 | {name:"תפריט ההקשר (Context Menu)",legend:"לחץ ${contextMenu} או APPLICATION KEYכדי לפתוח את תפריט ההקשר. עבור לאפשרות הבאה עם טאב (TAB) או חץ למטה. עבור לאפשרות הקודמת עם שיפט (SHIFT) + טאב (TAB) או חץ למעלה. לחץ רווח או אנטר (ENTER) כדי לבחור את האפשרות. פתח את תת התפריט (Sub-menu) של האפשרות הנוכחית עם רווח או אנטר (ENTER) או חץ שמאלי. חזור לתפריט האב עם אסקייפ (ESC) או חץ שמאלי. סגור את תפריט ההקשר עם אסקייפ (ESC)."},{name:"תפריטים צפים (List boxes)",legend:"בתוך תפריט צף, עבור לפריט הבא עם טאב (TAB) או חץ למטה. עבור לתפריט הקודם עם שיפט (SHIFT) + טאב (TAB) or חץ עליון. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"עץ אלמנטים (Elements Path)",legend:"לחץ ${elementsPathFocus} כדי לנווט לעץ האלמנטים. עבור לפריט הבא עם טאב (TAB) או חץ ימני. עבור לפריט הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי לבחור את האלמנט בעורך."}]},{name:"פקודות",items:[{name:" ביטול צעד אחרון",legend:"לחץ ${undo}"},{name:" חזרה על צעד אחרון",legend:"לחץ ${redo}"},{name:" הדגשה",legend:"לחץ ${bold}"},{name:" הטייה",legend:"לחץ ${italic}"},{name:" הוספת קו תחתון",legend:"לחץ ${underline}"},{name:" הוספת לינק",
8 | legend:"לחץ ${link}"},{name:" כיווץ סרגל הכלים",legend:"לחץ ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" הוראות נגישות",legend:"לחץ ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","gu",{title:"એક્ક્ષેબિલિટી ની વિગતો",contents:"હેલ્પ. આ બંધ કરવા ESC દબાવો.",legend:[{name:"જનરલ",items:[{name:"એડિટર ટૂલબાર",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"એડિટર ડાયલોગ",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"કમાંડસ",items:[{name:"અન્ડું કમાંડ",legend:"$ દબાવો {undo}"},{name:"ફરી કરો કમાંડ",legend:"$ દબાવો {redo}"},{name:"બોલ્દનો કમાંડ",legend:"$ દબાવો {bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","ar",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"عام",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","bg",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Общо",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","ja",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"全般",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","en",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"General",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","et",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Üldine",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","hi",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"सामान्य",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","hr",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Općenito",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","hu",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Általános",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","mn",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Ерөнхий",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","pl",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Ogólne",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","pt",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Geral",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","ru",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Основное",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","sl",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Splošno",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","uk",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Основне",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.dialog.add("a11yHelp",function(j){var l=j.lang.a11yhelp,m=CKEDITOR.tools.getNextId(),d={8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSE",20:"CAPSLOCK",27:"ESCAPE",33:"PAGE UP",34:"PAGE DOWN",35:"END",36:"HOME",37:"LEFT ARROW",38:"UP ARROW",39:"RIGHT ARROW",40:"DOWN ARROW",45:"INSERT",46:"DELETE",91:"LEFT WINDOW KEY",92:"RIGHT WINDOW KEY",93:"SELECT KEY",96:"NUMPAD 0",97:"NUMPAD 1",98:"NUMPAD 2",99:"NUMPAD 3",100:"NUMPAD 4",101:"NUMPAD 5",102:"NUMPAD 6",103:"NUMPAD 7",
6 | 104:"NUMPAD 8",105:"NUMPAD 9",106:"MULTIPLY",107:"ADD",109:"SUBTRACT",110:"DECIMAL POINT",111:"DIVIDE",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUM LOCK",145:"SCROLL LOCK",186:"SEMI-COLON",187:"EQUAL SIGN",188:"COMMA",189:"DASH",190:"PERIOD",191:"FORWARD SLASH",192:"GRAVE ACCENT",219:"OPEN BRACKET",220:"BACK SLASH",221:"CLOSE BRAKET",222:"SINGLE QUOTE"};d[CKEDITOR.ALT]="ALT";d[CKEDITOR.SHIFT]="SHIFT";d[CKEDITOR.CTRL]="CTRL";
7 | var e=[CKEDITOR.ALT,CKEDITOR.SHIFT,CKEDITOR.CTRL],n=/\$\{(.*?)\}/g,q=function(){var o=j.keystrokeHandler.keystrokes,f={},b;for(b in o)f[o[b]]=b;return function(b,g){var a;if(f[g]){a=f[g];for(var h,i,k=[],c=0;c=h&&(a-=i,k.push(d[i]));k.push(d[a]||String.fromCharCode(a));a=k.join("+")}else a=b;return a}}();return{title:l.title,minWidth:600,minHeight:400,contents:[{id:"info",label:j.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",
8 | focus:function(){this.getElement().focus()},html:function(){for(var d='%1
'+l.contents+" ",f=[],b=l.legend,j=b.length,g=0;g%1%2 ".replace("%1",e.name).replace("%2",p))}f.push("%1 %2 ".replace("%1",
9 | a.name).replace("%2",h.join("")))}return d.replace("%1",f.join(""))}()+''}]}],
10 | buttons:[CKEDITOR.dialog.cancelButton]}});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","da",{title:"Tilgængelighedsinstrukser",contents:"Onlinehjælp. For at lukke dette vindue klik ESC",legend:[{name:"Generelt",items:[{name:"Editor værktøjslinje",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Kommandoer",items:[{name:"Fortryd kommando",legend:"Klik på ${undo}"},{name:"Gentag kommando",legend:"Klik ${redo}"},{name:" Bold command",legend:"Klik ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Klik ${underline}"},{name:" Link command",legend:"Klik ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Kilk ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------
/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3 | For licensing, see LICENSE.html or http://ckeditor.com/license
4 | */
5 | CKEDITOR.plugins.setLang("a11yhelp","lt",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"Bendros savybės",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
6 | {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
7 | {name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
8 | legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
9 | {name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]});
--------------------------------------------------------------------------------