polyblock 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/beautify-css.js +264 -0
- data/app/assets/javascripts/beautify-html.js +838 -0
- data/app/assets/javascripts/beautify.js +1632 -0
- data/app/assets/javascripts/ckeditor/config.js +81 -0
- data/app/assets/javascripts/ckeditor/lang/en.js +5 -0
- data/app/assets/javascripts/ckeditor/plugins/sourcedialog/dialogs/sourcedialog.js +78 -0
- data/app/assets/javascripts/ckeditor/plugins/sourcedialog/icons/hidpi/sourcedialog-rtl.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/sourcedialog/icons/hidpi/sourcedialog.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/sourcedialog/icons/sourcedialog-rtl.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/sourcedialog/icons/sourcedialog.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/sourcedialog/plugin.js +27 -0
- data/app/assets/javascripts/ckeditor/plugins/sourcedialog/samples/sourcedialog.html +118 -0
- data/app/assets/javascripts/clientside-haml.js +2302 -0
- data/app/assets/javascripts/polyblock/application.js +24 -0
- data/app/assets/javascripts/polyblock/polyblock.js.coffee +143 -0
- data/app/assets/javascripts/transit.js +9 -0
- data/app/assets/javascripts/underscore.string.js +600 -0
- data/app/assets/stylesheets/polyblock/application.css +13 -0
- data/app/assets/stylesheets/polyblock/polyblocks.css +4 -0
- data/app/controllers/polyblock/application_controller.rb +4 -0
- data/app/controllers/polyblock/polyblocks_controller.rb +41 -0
- data/app/helpers/polyblock/application_helper.rb +29 -0
- data/app/helpers/polyblock/polyblocks_helper.rb +4 -0
- data/app/models/ckeditor/asset.rb +4 -0
- data/app/models/ckeditor/attachment_file.rb +12 -0
- data/app/models/ckeditor/picture.rb +13 -0
- data/app/models/polyblock/block.rb +7 -0
- data/app/views/layouts/polyblock/application.html.erb +14 -0
- data/app/views/polyblock/_editor_bar.html.erb +26 -0
- data/config/initializers/ckeditor.rb +21 -0
- data/config/routes.rb +7 -0
- data/db/migrate/20131201144424_create_ckeditor_assets.rb +26 -0
- data/db/migrate/20131201194124_create_polyblock_blocks.rb +12 -0
- data/lib/polyblock/engine.rb +12 -0
- data/lib/polyblock/version.rb +3 -0
- data/lib/polyblock.rb +4 -0
- data/lib/tasks/polyblock_tasks.rake +4 -0
- data/test/controllers/polyblock/polyblocks_controller_test.rb +9 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +14 -0
- data/test/dummy/app/assets/javascripts/home.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/assets/stylesheets/home.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/home_controller.rb +7 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/home_helper.rb +2 -0
- data/test/dummy/app/views/home/index.html.erb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +15 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +50 -0
- data/test/dummy/log/development.log +8760 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/test/controllers/home_controller_test.rb +7 -0
- data/test/dummy/test/helpers/home_helper_test.rb +4 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/01d10ffd358eeb0b021cc9183f39ae68 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/020cd4251b379e7f2ec729509bca3e41 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0298cd9551a53c73ed306982bb488f21 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/033f9ad8b2cb2b403008de33db1e8b30 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/03759dc8759159b0cb33071eaa445eb0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/054e6644a2f22ee98494c2f140e3a1e4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0c77775fe25328089569a112cb862dd4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0e895aeb087b1fb9e26b4e2398dcd1bd +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0f975357b9b6fee1af11ec65211c80bf +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/12aa9b2820181ab345ef05ee8396ba2b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/131c3cd884f330627e5f5eab9b908861 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1518dfe3536e63b395cefe2dc1e2b2be +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/161b71d479fc0fa4a60bf309f585d6c7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1825f57b27296afe7285b26c07446d43 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/183add279724180686cad2786c68835f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/18b273e17be07c99fb48b37938c1f91e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1926295578648cdc013840b112b4549a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/198ac8a69bf3249985d9888cbe072828 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1a2a68c52d72fd360df1534fb62d80e5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1ba6042344298db56baa871bda8def48 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1c3bf4812b7668021d8dbca7a8365f1a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1c9faaf28d05409b88ad3113374d613c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1dcf2f066cb7d1f61053762f665026f0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1eeb828973d38ac019484de910989d1a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1f9c2e5e8f8f4274f29c2db2392b7443 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1fb5c44086b9680362505e609ea1c3ba +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2032a9b15f933605f9e1348b938692ca +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/222ae44e85a1c2658302687309a33440 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/227fcecc68de591c070de5ee5383f6aa +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2822de3b22c28bd5e718c9bf500457b2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/284d60c07fb8c32b968c2bf0653a0c51 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/28a13e927d6f8c4f2df07ffa043a022d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2904d9c64f7dcf593dd93db977330071 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/293760eecba440378055bf9964e26ef5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2e8261e97a81367a52002c140e9d4d4c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2ef35d1c258b156746998a0e8bfb2512 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f98ed9544591a552d4a27e8d6fe52e7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/30372050d03c549f832d0a229f054a09 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3105a0833af87dbcd24616a1aa326624 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/31242785b0b30c2926a0a001ba15c37b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/346013835dd9a50f5c9e047b3c8c6036 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/355e62a84da5c2155a31fe4addaf3fab +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/35dc797930ef7be4efb807233bb4089a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/38034a7a583e8b4c116cd9427c6a65a6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/39bf3443ada31f4751a7d4f5992eabfa +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3aa98dd2b45d207a9fea94c6d3fc4c93 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3b9ed85ea6b3c17f3357272f88edec81 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/40fc2f3d2a468a00e463f1d313cb1683 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/41f903e59539965c348dbac12f651853 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/42079241bc34a6f7a1ea3d085e9e81a1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/469a23499ce29fb0b21239db80139b48 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/46e74a11aa3f8c919696fae111869929 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/483f8189cba7c0aee7a46a04febdc197 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/494fc186abfedc09409786fc8b2ba340 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4b886bd84e18901aa1bfbaafded1ea74 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4bac9705448d2568d956a6b580565d0e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4bf84fc546d1736be7f5e49f37d9e373 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4ce319d4627e6065afffeaec20f27c2c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/507329c12ad1da334c124a54ac840247 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5080e3e500303e0b993d3147ca0c0747 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/50e76ce60f5fc61ca3e70b70d8766d75 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/52a652f96849ad97a147a7d9fe45d374 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/52d05185fe8ef8d067c2ba8f196d9afb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5418c4cf54e69db24470c9dccd42b524 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/54e6936a11d8f5cdf5fa2f48475d2207 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/54f23a17d564a036a8942b34853d62af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5688d74639deb1904bb099823a2b9078 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5cf14a014ac60aeddff4e9dad4971824 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5d5d4bb119e1e543a75ebf4c1a795a64 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5e7c59533e1b5ef0c92e0d46f0848a2c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/60f1796bd046463c321db1046bc1c26a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/61dbe29abaf1d38eeeaed7fa9dce6ea3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/649a30c83a617bd43d47acf786140f34 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/64d65db775748acbf392e1eacf59032d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/65a5689d2de3f83bcc1531b0bd7918ce +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/66a715b5252355fae8785a848f07890c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/67068ab8480c236e15cc6d7507e52eec +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/67af580bfcbac793745a2bdc2344880a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/69f01b85f9dbad9d568e46c5a81d3cef +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6aa08eaf51a818834385dea1b64100f0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6beb01ae124bf2ebfb1a82617e2b6098 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6dabc2eb7494578b1bd175f001055ec8 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6f75f19c6e3573a6696df41ac5d31cca +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/71069975441a8fde10d210b51585a5a3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7276854d4022c2d37882818af409c467 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/73c99b0656c98ebf9f4f9a69565fa0b7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/749930e2a2cdc8a72fb497359f83181e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/75b1e158df9657689b214b7ccd2e4cf7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/75d065741331d0ad6ae16498b7108723 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/76ad604881ad72473bf07bd1d19c8494 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/773d7acc6545de12f1a86b77cef2e40e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/786af69fbff630e129664087cb879e57 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/78cf370d910b9a1721891b28a7c7fec0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7c72a7ab5a27c2ea4fe3a2d8ba0e1890 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7e8e0833a197f1f272edbd4c74d55c8c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8098a2ad06e177efc27a63d1ea20c17a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/80a9daa2db75d17e5e24d7442ccb41bc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/818c2000c1301a3f2f526dda13afe15c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/82bfcea3fa5e6c4fa34a2ebbb5d6f075 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8340810a445a06118e27eaaad32e862d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8631041495ef144973adaf1fba193a22 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/87f6abdf4627b5b8072bafbca388aa98 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/885519ac7f861d48be489733a6941bd0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8cea52541f58190ce0a4c5512c7355cb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8cfd23d116cf0a7c9e1d68c2b769add7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8e4aca87eaa40ed7cff1b11eba46e8d5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8f0e003323d409b4bea8e37f8e210b37 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8f4c36636517f6b49c072538a63a6d59 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/908b5ae11b8473493d1e9467124d1ee4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/98c83dce67cf84818203c6f995f4ba36 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9b261f00d3607a34f3df29dcc0beece1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a21978d1a823d6011c10799dd1fbb65c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a366043ecf7a23398dd9230018ae5ee3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a39be73154e19325e4f93210251924f4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a82a85e8fa40ed62eabb9818404726cb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a9f028f7a492b5907ed80268be8f50f4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/aa3eca8179472bb088a8474f35f6c5ce +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/aafb9cc161f1b35b684b6367c1d63373 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/abaf826b99cbedf45dd5304d096bdfaa +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ac34c01b1f09105c80ff6687bdc1493e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ac9510df8de841f1abc8c72c6fd0e295 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ad37bb314723ee3d230eb29326b47a46 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ae401c4518969dbd6ecab0274940df4d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b0a603111ad6abfe5bf08255eaf8573a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b7e3984da49e9c18ea6f4344b6ddedf1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b878faf942403e313a5b103e5d80488e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b8d45418a0dec849026e7832c6922595 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ba41d761ded85fc461ab0cabbeaef53e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ba83646bf2099832ad8ac75379b763df +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/bafcd897244753eeb0b64f544a77a19c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/bd8633c99ac4b7825a5cca6cf494d940 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/bdea69b9c406739ca4e7a36da20e7b53 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/be9eeaafba005e1d57455b8fef64f7c6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/bf5b075f964da07102907d7ce6811ed5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c22f6c78a77ef39e7e33f9b216b805f2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c4f8e04fa248664e0d9e375a092b5efe +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c58e57990b87dfd6f4bc915907ff45ea +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c805b4d29a0e91011768405e87f70817 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ca03d7c3a02b5b9c3223a83873f07581 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d2a5ab24b7b9dd1e4686b22bde66a4f4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d4175e149c21384fc6b3fb79c9d45c66 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d41b25d3ec25b4c3b2fe8eb9cf82d595 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/da1acabb815f02640e2aedd90a85df93 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/de51a9a54870e5d9f22775e2e3bedf38 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/df139027ce9ac098fd00f4ab7611bbac +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e03b3a3f08af68514f0a4224b38dc19a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e08a13a79de686909616cc3861bd2ff6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e0ca554821c153076d2dd8e72eb33cdb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e4cb660bbc6515fd08140519e66368fd +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e6968aa068b3fe46c56ea816e7d3c6cf +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e736ecc7279b661ef9d3ca9882196708 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/eae7257fcd4b160c2d782e66ba0c5438 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/edbef6e0d0a4742346cf479f2c522eb0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ef21be926e9fa6ad4e7dbdd19e0fc91a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ef79b2be98e4232ac86c5bd6dc8cf77f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f1087ef68b351492e06aa6cfd82d0438 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f22c23c07479937e88c5642915d72652 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f3c90764c8cfc0c04c179baeeb54f7d9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f4e04263f04511317e283b7afd5ac9fc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f999e530403d0f45b1fb283186785dc5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f99bfcf75bfe60e1e9c19f03fd1c476c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f9a99df6b5884accbebff708f1fa861d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fa2a1a439527d340ac07907157929b8d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fa735568b6074e46bd157a4391e6627f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fb2945554eacf0950f8c100ed8f07cb8 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fc543306aa02516980ce1817fc19d3d5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fd51120226fc9ccf01d5893be1032b5b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fdee4c39a777bb7c2f1c9f29cad9601a +0 -0
- data/test/fixtures/polyblock/blocks.yml +13 -0
- data/test/helpers/polyblock/polyblocks_helper_test.rb +6 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/models/polyblock/block_test.rb +9 -0
- data/test/polyblock_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +653 -0
@@ -0,0 +1,81 @@
|
|
1
|
+
//
|
2
|
+
// Optimal settings to edit preformatted HTML
|
3
|
+
//
|
4
|
+
|
5
|
+
CKEDITOR.config.allowedContent = true;
|
6
|
+
CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
|
7
|
+
|
8
|
+
//
|
9
|
+
// Toolbar setup
|
10
|
+
//
|
11
|
+
|
12
|
+
CKEDITOR.config.plugins += ',sourcedialog';
|
13
|
+
CKEDITOR.config.toolbar_mini = [
|
14
|
+
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
|
15
|
+
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
|
16
|
+
['NumberedList','BulletedList','-','Outdent','Indent'],
|
17
|
+
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
18
|
+
['Link','Unlink'],
|
19
|
+
['Image','Table','HorizontalRule'],
|
20
|
+
['Styles','Format','FontSize'],
|
21
|
+
['TextColor','BGColor'],
|
22
|
+
['Sourcedialog']
|
23
|
+
];
|
24
|
+
CKEDITOR.config.toolbar = 'mini';
|
25
|
+
|
26
|
+
//
|
27
|
+
// Image uploading
|
28
|
+
//
|
29
|
+
|
30
|
+
CKEDITOR.editorConfig = function(config) {
|
31
|
+
/* Filebrowser routes */
|
32
|
+
config.filebrowserBrowseUrl = "/ckeditor/attachment_files"; // The location of an external file browser, that should be launched when "Browse Server" button is pressed.
|
33
|
+
config.filebrowserFlashBrowseUrl = "/ckeditor/attachment_files"; // The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Flash dialog.
|
34
|
+
config.filebrowserFlashUploadUrl = "/ckeditor/attachment_files"; // The location of a script that handles file uploads in the Flash dialog.
|
35
|
+
config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures"; // The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Link tab of Image dialog.
|
36
|
+
config.filebrowserImageBrowseUrl = "/ckeditor/pictures"; // The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Image dialog.
|
37
|
+
config.filebrowserImageUploadUrl = "/ckeditor/pictures"; // The location of a script that handles file uploads in the Image dialog.
|
38
|
+
config.filebrowserUploadUrl = "/ckeditor/attachment_files"; // The location of a script that handles file uploads.
|
39
|
+
|
40
|
+
// Rails CSRF token
|
41
|
+
config.filebrowserParams = function(){
|
42
|
+
var csrf_token, csrf_param, meta, metas = document.getElementsByTagName('meta'), params = new Object();
|
43
|
+
for ( var i = 0 ; i < metas.length ; i++ ){
|
44
|
+
meta = metas[i];
|
45
|
+
switch(meta.name) {
|
46
|
+
case "csrf-token":
|
47
|
+
csrf_token = meta.content;
|
48
|
+
break;
|
49
|
+
case "csrf-param":
|
50
|
+
csrf_param = meta.content;
|
51
|
+
break;
|
52
|
+
default: continue;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
if (csrf_param !== undefined && csrf_token !== undefined) params[csrf_param] = csrf_token;
|
56
|
+
return params;
|
57
|
+
};
|
58
|
+
config.addQueryString = function(url, params){
|
59
|
+
var queryString = [];
|
60
|
+
if (!params) return url;
|
61
|
+
else for ( var i in params ) queryString.push( i + "=" + encodeURIComponent( params[ i ] ) );
|
62
|
+
return url + ( ( url.indexOf( "?" ) != -1 ) ? "&" : "?" ) + queryString.join( "&" );
|
63
|
+
};
|
64
|
+
|
65
|
+
// Integrate Rails CSRF token into file upload dialogs (link, image, attachment and flash)
|
66
|
+
CKEDITOR.on( 'dialogDefinition', function( ev ){
|
67
|
+
// Take the dialog name and its definition from the event data.
|
68
|
+
var dialogName = ev.data.name;
|
69
|
+
var dialogDefinition = ev.data.definition;
|
70
|
+
var content, upload;
|
71
|
+
|
72
|
+
if (CKEDITOR.tools.indexOf(['link', 'image', 'attachment', 'flash'], dialogName) > -1) {
|
73
|
+
content = (dialogDefinition.getContents('Upload') || dialogDefinition.getContents('upload'));
|
74
|
+
upload = (content == null ? null : content.get('upload'));
|
75
|
+
if (upload && upload.filebrowser && upload.filebrowser['params'] === undefined) {
|
76
|
+
upload.filebrowser['params'] = config.filebrowserParams();
|
77
|
+
upload.action = config.addQueryString(upload.action, upload.filebrowser['params']);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
});
|
81
|
+
};
|
@@ -0,0 +1,5 @@
|
|
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.lang['en']={"dir":"ltr","editor":"Rich Text Editor","common":{"editorHelp":"Press ALT 0 for help","browseServer":"Browse Server","url":"URL","protocol":"Protocol","upload":"Upload","uploadSubmit":"Send it to the Server","image":"Image","flash":"Flash","form":"Form","checkbox":"Checkbox","radio":"Radio Button","textField":"Text Field","textarea":"Textarea","hiddenField":"Hidden Field","button":"Button","select":"Selection Field","imageButton":"Image Button","notSet":"<not set>","id":"Id","name":"Name","langDir":"Language Direction","langDirLtr":"Left to Right (LTR)","langDirRtl":"Right to Left (RTL)","langCode":"Language Code","longDescr":"Long Description URL","cssClass":"Stylesheet Classes","advisoryTitle":"Advisory Title","cssStyle":"Style","ok":"OK","cancel":"Cancel","close":"Close","preview":"Preview","resize":"Resize","generalTab":"General","advancedTab":"Advanced","validateNumberFailed":"This value is not a number.","confirmNewPage":"Any unsaved changes to this content will be lost. Are you sure you want to load new page?","confirmCancel":"Some of the options have been changed. Are you sure to close the dialog?","options":"Options","target":"Target","targetNew":"New Window (_blank)","targetTop":"Topmost Window (_top)","targetSelf":"Same Window (_self)","targetParent":"Parent Window (_parent)","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","styles":"Style","cssClasses":"Stylesheet Classes","width":"Width","height":"Height","align":"Alignment","alignLeft":"Left","alignRight":"Right","alignCenter":"Center","alignTop":"Top","alignMiddle":"Middle","alignBottom":"Bottom","invalidValue":"Invalid value.","invalidHeight":"Height must be a number.","invalidWidth":"Width must be a number.","invalidCssLength":"Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).","invalidHtmlLength":"Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).","invalidInlineStyle":"Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.","cssLengthTooltip":"Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).","unavailable":"%1<span class=\"cke_accessibility\">, unavailable</span>"},"about":{"copy":"Copyright © $1. All rights reserved.","dlgTitle":"About CKEditor","help":"Check $1 for help.","moreInfo":"For licensing information please visit our web site:","title":"About CKEditor","userGuide":"CKEditor User's Guide"},"basicstyles":{"bold":"Bold","italic":"Italic","strike":"Strike Through","subscript":"Subscript","superscript":"Superscript","underline":"Underline"},"bidi":{"ltr":"Text direction from left to right","rtl":"Text direction from right to left"},"blockquote":{"toolbar":"Block Quote"},"clipboard":{"copy":"Copy","copyError":"Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).","cut":"Cut","cutError":"Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).","paste":"Paste","pasteArea":"Paste Area","pasteMsg":"Please paste inside the following box using the keyboard (<strong>Ctrl/Cmd+V</strong>) and hit OK","securityMsg":"Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.","title":"Paste"},"colorbutton":{"auto":"Automatic","bgColorTitle":"Background Color","colors":{"000":"Black","800000":"Maroon","8B4513":"Saddle Brown","2F4F4F":"Dark Slate Gray","008080":"Teal","000080":"Navy","4B0082":"Indigo","696969":"Dark Gray","B22222":"Fire Brick","A52A2A":"Brown","DAA520":"Golden Rod","006400":"Dark Green","40E0D0":"Turquoise","0000CD":"Medium Blue","800080":"Purple","808080":"Gray","F00":"Red","FF8C00":"Dark Orange","FFD700":"Gold","008000":"Green","0FF":"Cyan","00F":"Blue","EE82EE":"Violet","A9A9A9":"Dim Gray","FFA07A":"Light Salmon","FFA500":"Orange","FFFF00":"Yellow","00FF00":"Lime","AFEEEE":"Pale Turquoise","ADD8E6":"Light Blue","DDA0DD":"Plum","D3D3D3":"Light Grey","FFF0F5":"Lavender Blush","FAEBD7":"Antique White","FFFFE0":"Light Yellow","F0FFF0":"Honeydew","F0FFFF":"Azure","F0F8FF":"Alice Blue","E6E6FA":"Lavender","FFF":"White"},"more":"More Colors...","panelTitle":"Colors","textColorTitle":"Text Color"},"colordialog":{"clear":"Clear","highlight":"Highlight","options":"Color Options","selected":"Selected Color","title":"Select color"},"templates":{"button":"Templates","emptyListMsg":"(No templates defined)","insertOption":"Replace actual contents","options":"Template Options","selectPromptMsg":"Please select the template to open in the editor","title":"Content Templates"},"contextmenu":{"options":"Context Menu Options"},"div":{"IdInputLabel":"Id","advisoryTitleInputLabel":"Advisory Title","cssClassInputLabel":"Stylesheet Classes","edit":"Edit Div","inlineStyleInputLabel":"Inline Style","langDirLTRLabel":"Left to Right (LTR)","langDirLabel":"Language Direction","langDirRTLLabel":"Right to Left (RTL)","languageCodeInputLabel":" Language Code","remove":"Remove Div","styleSelectLabel":"Style","title":"Create Div Container","toolbar":"Create Div Container"},"toolbar":{"toolbarCollapse":"Collapse Toolbar","toolbarExpand":"Expand Toolbar","toolbarGroups":{"document":"Document","clipboard":"Clipboard/Undo","editing":"Editing","forms":"Forms","basicstyles":"Basic Styles","paragraph":"Paragraph","links":"Links","insert":"Insert","styles":"Styles","colors":"Colors","tools":"Tools"},"toolbars":"Editor toolbars"},"elementspath":{"eleLabel":"Elements path","eleTitle":"%1 element"},"find":{"find":"Find","findOptions":"Find Options","findWhat":"Find what:","matchCase":"Match case","matchCyclic":"Match cyclic","matchWord":"Match whole word","notFoundMsg":"The specified text was not found.","replace":"Replace","replaceAll":"Replace All","replaceSuccessMsg":"%1 occurrence(s) replaced.","replaceWith":"Replace with:","title":"Find and Replace"},"fakeobjects":{"anchor":"Anchor","flash":"Flash Animation","hiddenfield":"Hidden Field","iframe":"IFrame","unknown":"Unknown Object"},"flash":{"access":"Script Access","accessAlways":"Always","accessNever":"Never","accessSameDomain":"Same domain","alignAbsBottom":"Abs Bottom","alignAbsMiddle":"Abs Middle","alignBaseline":"Baseline","alignTextTop":"Text Top","bgcolor":"Background color","chkFull":"Allow Fullscreen","chkLoop":"Loop","chkMenu":"Enable Flash Menu","chkPlay":"Auto Play","flashvars":"Variables for Flash","hSpace":"HSpace","properties":"Flash Properties","propertiesTab":"Properties","quality":"Quality","qualityAutoHigh":"Auto High","qualityAutoLow":"Auto Low","qualityBest":"Best","qualityHigh":"High","qualityLow":"Low","qualityMedium":"Medium","scale":"Scale","scaleAll":"Show all","scaleFit":"Exact Fit","scaleNoBorder":"No Border","title":"Flash Properties","vSpace":"VSpace","validateHSpace":"HSpace must be a number.","validateSrc":"URL must not be empty.","validateVSpace":"VSpace must be a number.","windowMode":"Window mode","windowModeOpaque":"Opaque","windowModeTransparent":"Transparent","windowModeWindow":"Window"},"font":{"fontSize":{"label":"Size","voiceLabel":"Font Size","panelTitle":"Font Size"},"label":"Font","panelTitle":"Font Name","voiceLabel":"Font"},"forms":{"button":{"title":"Button Properties","text":"Text (Value)","type":"Type","typeBtn":"Button","typeSbm":"Submit","typeRst":"Reset"},"checkboxAndRadio":{"checkboxTitle":"Checkbox Properties","radioTitle":"Radio Button Properties","value":"Value","selected":"Selected"},"form":{"title":"Form Properties","menu":"Form Properties","action":"Action","method":"Method","encoding":"Encoding"},"hidden":{"title":"Hidden Field Properties","name":"Name","value":"Value"},"select":{"title":"Selection Field Properties","selectInfo":"Select Info","opAvail":"Available Options","value":"Value","size":"Size","lines":"lines","chkMulti":"Allow multiple selections","opText":"Text","opValue":"Value","btnAdd":"Add","btnModify":"Modify","btnUp":"Up","btnDown":"Down","btnSetValue":"Set as selected value","btnDelete":"Delete"},"textarea":{"title":"Textarea Properties","cols":"Columns","rows":"Rows"},"textfield":{"title":"Text Field Properties","name":"Name","value":"Value","charWidth":"Character Width","maxChars":"Maximum Characters","type":"Type","typeText":"Text","typePass":"Password","typeEmail":"Email","typeSearch":"Search","typeTel":"Telephone Number","typeUrl":"URL"}},"format":{"label":"Format","panelTitle":"Paragraph Format","tag_address":"Address","tag_div":"Normal (DIV)","tag_h1":"Heading 1","tag_h2":"Heading 2","tag_h3":"Heading 3","tag_h4":"Heading 4","tag_h5":"Heading 5","tag_h6":"Heading 6","tag_p":"Normal","tag_pre":"Formatted"},"horizontalrule":{"toolbar":"Insert Horizontal Line"},"iframe":{"border":"Show frame border","noUrl":"Please type the iframe URL","scrolling":"Enable scrollbars","title":"IFrame Properties","toolbar":"IFrame"},"image":{"alertUrl":"Please type the image URL","alt":"Alternative Text","border":"Border","btnUpload":"Send it to the Server","button2Img":"Do you want to transform the selected image button on a simple image?","hSpace":"HSpace","img2Button":"Do you want to transform the selected image on a image button?","infoTab":"Image Info","linkTab":"Link","lockRatio":"Lock Ratio","menu":"Image Properties","resetSize":"Reset Size","title":"Image Properties","titleButton":"Image Button Properties","upload":"Upload","urlMissing":"Image source URL is missing.","vSpace":"VSpace","validateBorder":"Border must be a whole number.","validateHSpace":"HSpace must be a whole number.","validateVSpace":"VSpace must be a whole number."},"indent":{"indent":"Increase Indent","outdent":"Decrease Indent"},"smiley":{"options":"Smiley Options","title":"Insert a Smiley","toolbar":"Smiley"},"justify":{"block":"Justify","center":"Center","left":"Align Left","right":"Align Right"},"link":{"acccessKey":"Access Key","advanced":"Advanced","advisoryContentType":"Advisory Content Type","advisoryTitle":"Advisory Title","anchor":{"toolbar":"Anchor","menu":"Edit Anchor","title":"Anchor Properties","name":"Anchor Name","errorName":"Please type the anchor name","remove":"Remove Anchor"},"anchorId":"By Element Id","anchorName":"By Anchor Name","charset":"Linked Resource Charset","cssClasses":"Stylesheet Classes","emailAddress":"E-Mail Address","emailBody":"Message Body","emailSubject":"Message Subject","id":"Id","info":"Link Info","langCode":"Language Code","langDir":"Language Direction","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","menu":"Edit Link","name":"Name","noAnchors":"(No anchors available in the document)","noEmail":"Please type the e-mail address","noUrl":"Please type the link URL","other":"<other>","popupDependent":"Dependent (Netscape)","popupFeatures":"Popup Window Features","popupFullScreen":"Full Screen (IE)","popupLeft":"Left Position","popupLocationBar":"Location Bar","popupMenuBar":"Menu Bar","popupResizable":"Resizable","popupScrollBars":"Scroll Bars","popupStatusBar":"Status Bar","popupToolbar":"Toolbar","popupTop":"Top Position","rel":"Relationship","selectAnchor":"Select an Anchor","styles":"Style","tabIndex":"Tab Index","target":"Target","targetFrame":"<frame>","targetFrameName":"Target Frame Name","targetPopup":"<popup window>","targetPopupName":"Popup Window Name","title":"Link","toAnchor":"Link to anchor in the text","toEmail":"E-mail","toUrl":"URL","toolbar":"Link","type":"Link Type","unlink":"Unlink","upload":"Upload"},"list":{"bulletedlist":"Insert/Remove Bulleted List","numberedlist":"Insert/Remove Numbered List"},"liststyle":{"armenian":"Armenian numbering","bulletedTitle":"Bulleted List Properties","circle":"Circle","decimal":"Decimal (1, 2, 3, etc.)","decimalLeadingZero":"Decimal leading zero (01, 02, 03, etc.)","disc":"Disc","georgian":"Georgian numbering (an, ban, gan, etc.)","lowerAlpha":"Lower Alpha (a, b, c, d, e, etc.)","lowerGreek":"Lower Greek (alpha, beta, gamma, etc.)","lowerRoman":"Lower Roman (i, ii, iii, iv, v, etc.)","none":"None","notset":"<not set>","numberedTitle":"Numbered List Properties","square":"Square","start":"Start","type":"Type","upperAlpha":"Upper Alpha (A, B, C, D, E, etc.)","upperRoman":"Upper Roman (I, II, III, IV, V, etc.)","validateStartNumber":"List start number must be a whole number."},"magicline":{"title":"Insert paragraph here"},"maximize":{"maximize":"Maximize","minimize":"Minimize"},"newpage":{"toolbar":"New Page"},"pagebreak":{"alt":"Page Break","toolbar":"Insert Page Break for Printing"},"pastetext":{"button":"Paste as plain text","title":"Paste as Plain Text"},"pastefromword":{"confirmCleanup":"The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?","error":"It was not possible to clean up the pasted data due to an internal error","title":"Paste from Word","toolbar":"Paste from Word"},"preview":{"preview":"Preview"},"print":{"toolbar":"Print"},"removeformat":{"toolbar":"Remove Format"},"save":{"toolbar":"Save"},"selectall":{"toolbar":"Select All"},"showblocks":{"toolbar":"Show Blocks"},"sourcearea":{"toolbar":"Source"},"specialchar":{"options":"Special Character Options","title":"Select Special Character","toolbar":"Insert Special Character"},"scayt":{"about":"About SCAYT","aboutTab":"About","addWord":"Add Word","allCaps":"Ignore All-Caps Words","dic_create":"Create","dic_delete":"Delete","dic_field_name":"Dictionary name","dic_info":"Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.","dic_rename":"Rename","dic_restore":"Restore","dictionariesTab":"Dictionaries","disable":"Disable SCAYT","emptyDic":"Dictionary name should not be empty.","enable":"Enable SCAYT","ignore":"Ignore","ignoreAll":"Ignore All","ignoreDomainNames":"Ignore Domain Names","langs":"Languages","languagesTab":"Languages","mixedCase":"Ignore Words with Mixed Case","mixedWithDigits":"Ignore Words with Numbers","moreSuggestions":"More suggestions","opera_title":"Not supported by Opera","options":"Options","optionsTab":"Options","title":"Spell Check As You Type","toggle":"Toggle SCAYT","noSuggestions":"No suggestion"},"stylescombo":{"label":"Styles","panelTitle":"Formatting Styles","panelTitle1":"Block Styles","panelTitle2":"Inline Styles","panelTitle3":"Object Styles"},"table":{"border":"Border size","caption":"Caption","cell":{"menu":"Cell","insertBefore":"Insert Cell Before","insertAfter":"Insert Cell After","deleteCell":"Delete Cells","merge":"Merge Cells","mergeRight":"Merge Right","mergeDown":"Merge Down","splitHorizontal":"Split Cell Horizontally","splitVertical":"Split Cell Vertically","title":"Cell Properties","cellType":"Cell Type","rowSpan":"Rows Span","colSpan":"Columns Span","wordWrap":"Word Wrap","hAlign":"Horizontal Alignment","vAlign":"Vertical Alignment","alignBaseline":"Baseline","bgColor":"Background Color","borderColor":"Border Color","data":"Data","header":"Header","yes":"Yes","no":"No","invalidWidth":"Cell width must be a number.","invalidHeight":"Cell height must be a number.","invalidRowSpan":"Rows span must be a whole number.","invalidColSpan":"Columns span must be a whole number.","chooseColor":"Choose"},"cellPad":"Cell padding","cellSpace":"Cell spacing","column":{"menu":"Column","insertBefore":"Insert Column Before","insertAfter":"Insert Column After","deleteColumn":"Delete Columns"},"columns":"Columns","deleteTable":"Delete Table","headers":"Headers","headersBoth":"Both","headersColumn":"First column","headersNone":"None","headersRow":"First Row","invalidBorder":"Border size must be a number.","invalidCellPadding":"Cell padding must be a positive number.","invalidCellSpacing":"Cell spacing must be a positive number.","invalidCols":"Number of columns must be a number greater than 0.","invalidHeight":"Table height must be a number.","invalidRows":"Number of rows must be a number greater than 0.","invalidWidth":"Table width must be a number.","menu":"Table Properties","row":{"menu":"Row","insertBefore":"Insert Row Before","insertAfter":"Insert Row After","deleteRow":"Delete Rows"},"rows":"Rows","summary":"Summary","title":"Table Properties","toolbar":"Table","widthPc":"percent","widthPx":"pixels","widthUnit":"width unit"},"undo":{"redo":"Redo","undo":"Undo"},"wsc":{"btnIgnore":"Ignore","btnIgnoreAll":"Ignore All","btnReplace":"Replace","btnReplaceAll":"Replace All","btnUndo":"Undo","changeTo":"Change to","errorLoading":"Error loading application service host: %s.","ieSpellDownload":"Spell checker not installed. Do you want to download it now?","manyChanges":"Spell check complete: %1 words changed","noChanges":"Spell check complete: No words changed","noMispell":"Spell check complete: No misspellings found","noSuggestions":"- No suggestions -","notAvailable":"Sorry, but service is unavailable now.","notInDic":"Not in dictionary","oneChange":"Spell check complete: One word changed","progress":"Spell check in progress...","title":"Spell Check","toolbar":"Check Spelling"}};
|
@@ -0,0 +1,78 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.dialog.add( 'sourcedialog', function( editor ) {
|
7
|
+
var size = CKEDITOR.document.getWindow().getViewPaneSize();
|
8
|
+
|
9
|
+
// Make it maximum 800px wide, but still fully visible in the viewport.
|
10
|
+
var width = Math.min( size.width - 70, 800);
|
11
|
+
|
12
|
+
// Make it use 2/3 of the viewport height.
|
13
|
+
var height = size.height / 1.5;
|
14
|
+
|
15
|
+
// Store old editor data to avoid unnecessary setData.
|
16
|
+
var oldData;
|
17
|
+
|
18
|
+
return {
|
19
|
+
title: "Source",
|
20
|
+
minWidth: 100,
|
21
|
+
minHeight: 100,
|
22
|
+
|
23
|
+
onShow: function() {
|
24
|
+
this.setValueOf( 'main', 'data', oldData = editor.getData() );
|
25
|
+
},
|
26
|
+
|
27
|
+
onOk: (function() {
|
28
|
+
function setData( newData ) {
|
29
|
+
var that = this;
|
30
|
+
|
31
|
+
editor.setData( newData, function() {
|
32
|
+
that.hide();
|
33
|
+
|
34
|
+
// Ensure correct selection.
|
35
|
+
var range = editor.createRange();
|
36
|
+
range.moveToElementEditStart( editor.editable() );
|
37
|
+
range.select();
|
38
|
+
} );
|
39
|
+
}
|
40
|
+
|
41
|
+
return function( event ) {
|
42
|
+
// Remove CR from input data for reliable comparison with editor data.
|
43
|
+
var newData = this.getValueOf( 'main', 'data' ).replace( /\r/g, '' );
|
44
|
+
|
45
|
+
// Avoid unnecessary setData. Also preserve selection
|
46
|
+
// when user changed his mind and goes back to wysiwyg editing.
|
47
|
+
if ( newData === oldData )
|
48
|
+
return true;
|
49
|
+
|
50
|
+
// Set data asynchronously to avoid errors in IE.
|
51
|
+
CKEDITOR.env.ie ?
|
52
|
+
CKEDITOR.tools.setTimeout( setData, 0, this, newData )
|
53
|
+
:
|
54
|
+
setData.call( this, newData );
|
55
|
+
|
56
|
+
// Don't let the dialog close before setData is over.
|
57
|
+
return false;
|
58
|
+
};
|
59
|
+
})(),
|
60
|
+
|
61
|
+
contents: [{
|
62
|
+
id: 'main',
|
63
|
+
label: "Source",
|
64
|
+
elements: [{
|
65
|
+
type: 'textarea',
|
66
|
+
type: 'textarea',
|
67
|
+
id: 'data',
|
68
|
+
dir: 'ltr',
|
69
|
+
inputStyle: 'cursor:auto;' +
|
70
|
+
'width:' + width + 'px;' +
|
71
|
+
'height:' + height + 'px;' +
|
72
|
+
'tab-size:4;' +
|
73
|
+
'text-align:left;',
|
74
|
+
'class': 'cke_source'
|
75
|
+
}]
|
76
|
+
}]
|
77
|
+
};
|
78
|
+
});
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.plugins.add( 'sourcedialog', {
|
7
|
+
// lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
|
8
|
+
icons: 'sourcedialog,sourcedialog-rtl', // %REMOVE_LINE_CORE%
|
9
|
+
hidpi: true, // %REMOVE_LINE_CORE%
|
10
|
+
|
11
|
+
init: function( editor ) {
|
12
|
+
// Register the "source" command, which simply opens the "source" dialog.
|
13
|
+
editor.addCommand( 'sourcedialog', new CKEDITOR.dialogCommand( 'sourcedialog' ) );
|
14
|
+
|
15
|
+
// Register the "source" dialog.
|
16
|
+
CKEDITOR.dialog.add( 'sourcedialog', this.path + 'dialogs/sourcedialog.js' );
|
17
|
+
|
18
|
+
// If the toolbar is available, create the "Source" button.
|
19
|
+
if ( editor.ui.addButton ) {
|
20
|
+
editor.ui.addButton( 'Sourcedialog', {
|
21
|
+
label: "Source", // editor.lang.sourcedialog.toolbar,
|
22
|
+
command: 'sourcedialog',
|
23
|
+
toolbar: 'mode,10'
|
24
|
+
});
|
25
|
+
}
|
26
|
+
}
|
27
|
+
});
|
@@ -0,0 +1,118 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!--
|
3
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
4
|
+
For licensing, see LICENSE.md or http://ckeditor.com/license
|
5
|
+
-->
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>Raw HTML editing with dialog-based source editor — CKEditor Sample</title>
|
9
|
+
<meta charset="utf-8">
|
10
|
+
<script src="../../../ckeditor.js"></script>
|
11
|
+
<link rel="stylesheet" href="../../../samples/sample.css">
|
12
|
+
<meta name="ckeditor-sample-name" content="Raw HTML editing with dialog-based source editor">
|
13
|
+
<meta name="ckeditor-sample-group" content="Plugins">
|
14
|
+
<meta name="ckeditor-sample-description" content="Editing HTML content of both inline and framed editor instances.">
|
15
|
+
<meta name="ckeditor-sample-isnew" content="1">
|
16
|
+
<style>
|
17
|
+
|
18
|
+
#editable
|
19
|
+
{
|
20
|
+
padding: 10px;
|
21
|
+
float: left;
|
22
|
+
}
|
23
|
+
|
24
|
+
</style>
|
25
|
+
</head>
|
26
|
+
<body>
|
27
|
+
<h1 class="samples">
|
28
|
+
<a href="../../../samples/index.html">CKEditor Samples</a> » Raw HTML editing with dialog-based source editor
|
29
|
+
</h1>
|
30
|
+
<div class="description">
|
31
|
+
<p>
|
32
|
+
<strong>Sourcedialog</strong> plugin provides an easy way to edit raw HTML content
|
33
|
+
of an editor, similarly to what is possible with <strong>Sourcearea</strong>
|
34
|
+
plugin for framed instances but using dialogs. Thanks to that, it's also possible
|
35
|
+
to manipulate raw content of inline editor instances.
|
36
|
+
</p>
|
37
|
+
<p>
|
38
|
+
This plugin extends the toolbar with a button,
|
39
|
+
which opens a dialog window with a source code editor. It works with both framed
|
40
|
+
and inline instances. To enable this
|
41
|
+
plugin, basically add <code>extraPlugins: 'sourcedialog'</code> to editor's
|
42
|
+
config:
|
43
|
+
</p>
|
44
|
+
<pre class="samples">
|
45
|
+
// Inline editor.
|
46
|
+
CKEDITOR.inline( 'editable', {
|
47
|
+
<strong>extraPlugins: 'sourcedialog'</strong>
|
48
|
+
});
|
49
|
+
|
50
|
+
// Framed editor.
|
51
|
+
CKEDITOR.replace( 'textarea_id', {
|
52
|
+
<strong>extraPlugins: 'sourcedialog'</strong>,
|
53
|
+
removePlugins: 'sourcearea'
|
54
|
+
});
|
55
|
+
</pre>
|
56
|
+
<p>
|
57
|
+
Note that you may want to include <code>removePlugins: 'sourcearea'</code>
|
58
|
+
in your config when using <strong>Sourcedialog</strong> in framed instances.
|
59
|
+
This prevents feature redundancy.
|
60
|
+
</p>
|
61
|
+
<p>
|
62
|
+
Note that <code>editable</code> in the code above is the <code>id</code>
|
63
|
+
attribute of the <code><div></code> element to be converted into an inline instance.
|
64
|
+
</p>
|
65
|
+
<p>
|
66
|
+
Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
|
67
|
+
the <code><textarea></code> element to be replaced with CKEditor.
|
68
|
+
</p>
|
69
|
+
</div>
|
70
|
+
<div>
|
71
|
+
<label for="editor1">
|
72
|
+
Inline editor:
|
73
|
+
</label>
|
74
|
+
<div id="editor1" contenteditable="true" style="padding: 5px 20px;">
|
75
|
+
<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
<br>
|
79
|
+
<div>
|
80
|
+
<label for="editor2">
|
81
|
+
Framed editor:
|
82
|
+
</label>
|
83
|
+
<textarea cols="80" id="editor2" name="editor2" rows="10">
|
84
|
+
This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.
|
85
|
+
</textarea>
|
86
|
+
</div>
|
87
|
+
<script>
|
88
|
+
|
89
|
+
// We need to turn off the automatic editor creation first.
|
90
|
+
CKEDITOR.disableAutoInline = true;
|
91
|
+
|
92
|
+
var config = {
|
93
|
+
toolbarGroups: [
|
94
|
+
{ name: 'mode' },
|
95
|
+
{ name: 'basicstyles' },
|
96
|
+
{ name: 'links' }
|
97
|
+
],
|
98
|
+
extraPlugins: 'sourcedialog',
|
99
|
+
removePlugins: 'sourcearea'
|
100
|
+
}
|
101
|
+
|
102
|
+
CKEDITOR.inline( 'editor1', config );
|
103
|
+
CKEDITOR.replace( 'editor2', config );
|
104
|
+
|
105
|
+
</script>
|
106
|
+
<div id="footer">
|
107
|
+
<hr>
|
108
|
+
<p>
|
109
|
+
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
|
110
|
+
http://ckeditor.com</a>
|
111
|
+
</p>
|
112
|
+
<p id="copy">
|
113
|
+
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a>
|
114
|
+
- Frederico Knabben. All rights reserved.
|
115
|
+
</p>
|
116
|
+
</div>
|
117
|
+
</body>
|
118
|
+
</html>
|