ueditor_rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.markdown +36 -0
- data/Rakefile +40 -0
- data/app/assets/javascripts/ueditor_rails/config.js.erb +207 -0
- data/app/assets/javascripts/ueditor_rails/init.js +12 -0
- data/app/controllers/ueditor_rails/application_controller.rb +5 -0
- data/app/controllers/ueditor_rails/dialogs_controller.rb +13 -0
- data/app/controllers/ueditor_rails/libs_controller.rb +20 -0
- data/app/helpers/ueditor_rails/application_helper.rb +4 -0
- data/app/views/ueditor_rails/dialogs/attachment.html.erb +128 -0
- data/app/views/ueditor_rails/dialogs/image.html.erb +205 -0
- data/config/routes.rb +11 -0
- data/lib/generators/ueditor_rails/USAGE +8 -0
- data/lib/generators/ueditor_rails/install_generator.rb +15 -0
- data/lib/generators/ueditor_rails/templates/ueditor_config.js.erb +204 -0
- data/lib/tasks/ueditor_rails_tasks.rake +4 -0
- data/lib/ueditor_rails.rb +25 -0
- data/lib/ueditor_rails/engine.rb +17 -0
- data/lib/ueditor_rails/helpers/form_builder.rb +11 -0
- data/lib/ueditor_rails/helpers/form_helper.rb +26 -0
- data/lib/ueditor_rails/helpers/view_helper.rb +21 -0
- data/lib/ueditor_rails/util.rb +32 -0
- data/lib/ueditor_rails/version.rb +3 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +17 -0
- data/test/dummy/app/assets/javascripts/posts.js +2 -0
- data/test/dummy/app/assets/javascripts/ueditor_config.js.erb +201 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/assets/stylesheets/posts.css +4 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/posts_controller.rb +83 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/posts_helper.rb +2 -0
- data/test/dummy/app/models/post.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/posts/_form.html.erb +25 -0
- data/test/dummy/app/views/posts/edit.html.erb +6 -0
- data/test/dummy/app/views/posts/index.html.erb +29 -0
- data/test/dummy/app/views/posts/new.html.erb +5 -0
- data/test/dummy/app/views/posts/show.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +8 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130327173045_create_posts.rb +10 -0
- data/test/dummy/db/schema.rb +23 -0
- data/test/dummy/log/development.log +12037 -0
- data/test/dummy/log/production.log +7 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/posts.yml +9 -0
- data/test/dummy/test/functional/posts_controller_test.rb +49 -0
- data/test/dummy/test/unit/helpers/posts_helper_test.rb +4 -0
- data/test/dummy/test/unit/post_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/BDF/630/sprockets%2F5614511158c119e0843a3290422f62c4 +0 -0
- data/test/dummy/tmp/cache/assets/C2B/2B0/sprockets%2F6197f74231bf6577350613931d3f68d2 +0 -0
- data/test/dummy/tmp/cache/assets/C45/6F0/sprockets%2F8d0029260fa306414726778ccc2114f5 +0 -0
- data/test/dummy/tmp/cache/assets/C54/700/sprockets%2Ff3a117b56f12646d477370198ef50526 +0 -0
- data/test/dummy/tmp/cache/assets/C5C/D10/sprockets%2F46f8f094709b1722d4b908743489c22b +0 -0
- data/test/dummy/tmp/cache/assets/C60/B40/sprockets%2F54d01774a089b4d6669dee7038085556 +0 -0
- data/test/dummy/tmp/cache/assets/C6D/9D0/sprockets%2F0c0b92de372485111abd31809d680064 +0 -0
- data/test/dummy/tmp/cache/assets/C72/EA0/sprockets%2Fe282c06e62457331c3b56d36c320615d +0 -0
- data/test/dummy/tmp/cache/assets/C7A/940/sprockets%2F5799f5e28166414991897d6f9127d5fc +0 -0
- data/test/dummy/tmp/cache/assets/C7A/9C0/sprockets%2F492d15f65b17b6cfa0b7351378602147 +0 -0
- data/test/dummy/tmp/cache/assets/C84/AA0/sprockets%2F98093181296cc04f03f7580efb00c973 +0 -0
- data/test/dummy/tmp/cache/assets/C89/310/sprockets%2Fd1d06f948d748a7068c0e146154d8229 +0 -0
- data/test/dummy/tmp/cache/assets/C8A/8E0/sprockets%2F646396c661345dcc625cc575bf061577 +0 -0
- data/test/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212 +0 -0
- data/test/dummy/tmp/cache/assets/C99/A70/sprockets%2F015fa15293ee9b3456140aa71fa44160 +0 -0
- data/test/dummy/tmp/cache/assets/CA7/4B0/sprockets%2Fa126b67ca393a693b7520818dc36c404 +0 -0
- data/test/dummy/tmp/cache/assets/CAC/3D0/sprockets%2F0839a13780ffe1bba453564492f04f70 +0 -0
- data/test/dummy/tmp/cache/assets/CAC/F50/sprockets%2Fd2c5808102c08c0f1626871aa59d796b +0 -0
- data/test/dummy/tmp/cache/assets/CC4/520/sprockets%2F985cf9f9b78b2869f70270770b134c3a +0 -0
- data/test/dummy/tmp/cache/assets/CC4/9A0/sprockets%2F2479c7a9ae4286405682d75dcb378d48 +0 -0
- data/test/dummy/tmp/cache/assets/CC7/220/sprockets%2Fd066c004d1fd26ae76a61303a7a18145 +0 -0
- data/test/dummy/tmp/cache/assets/CD1/E30/sprockets%2F07e2a3e7922a96e0bf582b3ed2160214 +0 -0
- data/test/dummy/tmp/cache/assets/CD4/5E0/sprockets%2F9bb402071b005bd61ca675149f1bf697 +0 -0
- data/test/dummy/tmp/cache/assets/CD5/B70/sprockets%2F416150dc3ac35079c94273cc46e90aa6 +0 -0
- data/test/dummy/tmp/cache/assets/CD6/630/sprockets%2Fe020a12eeaf2399ab542086e57d74056 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/4D0/sprockets%2Fa24d9ba34e6c16d99323053382f150df +0 -0
- data/test/dummy/tmp/cache/assets/CDC/F80/sprockets%2F7bd94371d531b3f85d02c7a9427841aa +0 -0
- data/test/dummy/tmp/cache/assets/CDE/4B0/sprockets%2F342f1d7b7ca0569074f9128b9bda7125 +0 -0
- data/test/dummy/tmp/cache/assets/CDE/550/sprockets%2F6a69b27076b361fd10f64874f2c1b46b +0 -0
- data/test/dummy/tmp/cache/assets/CDF/860/sprockets%2F8a563174551315a923fc9a78d22fcb7a +0 -0
- data/test/dummy/tmp/cache/assets/CE1/3B0/sprockets%2F11a824a4c96529c2912f753ecf8b506d +0 -0
- data/test/dummy/tmp/cache/assets/CE3/A20/sprockets%2F9154bb14d747165e7f19d8161d4d2e4b +0 -0
- data/test/dummy/tmp/cache/assets/CE4/5E0/sprockets%2F1d31011d7c1599edc54d31d597f856e3 +0 -0
- data/test/dummy/tmp/cache/assets/CE5/8C0/sprockets%2F5abcadff90738332520786578cf1733c +0 -0
- data/test/dummy/tmp/cache/assets/CE6/070/sprockets%2F85808d5f0458f045dea0e9036d7f53c1 +0 -0
- data/test/dummy/tmp/cache/assets/CE7/DB0/sprockets%2F8e9537e225fe8d0a543dbf320c949325 +0 -0
- data/test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/test/dummy/tmp/cache/assets/CF0/C10/sprockets%2Fba2886d474f933456975a52ed2f1c66d +0 -0
- data/test/dummy/tmp/cache/assets/CF4/050/sprockets%2F07e64101425f48db3e2b5a4a61d02cc3 +0 -0
- data/test/dummy/tmp/cache/assets/CF6/2D0/sprockets%2Ffeef88a45781660a21645e8fbe276297 +0 -0
- data/test/dummy/tmp/cache/assets/CF9/3D0/sprockets%2Fd3a2bd3092fe687b0687869fe956493b +0 -0
- data/test/dummy/tmp/cache/assets/CF9/970/sprockets%2Fca43c206a5f90a0505194d56e635a1da +0 -0
- data/test/dummy/tmp/cache/assets/D04/9C0/sprockets%2F826e5acfd685ead033361021fa9723c1 +0 -0
- data/test/dummy/tmp/cache/assets/D07/000/sprockets%2F31610287c7cc1435a7c99f3e132abdc7 +0 -0
- data/test/dummy/tmp/cache/assets/D07/BB0/sprockets%2Ff7bbd33ae141463d938437050ac3d5d8 +0 -0
- data/test/dummy/tmp/cache/assets/D09/590/sprockets%2F0f074320e9adb54e1f4f69cb6392e420 +0 -0
- data/test/dummy/tmp/cache/assets/D0A/5D0/sprockets%2F131bc060fc89d617bc9c9571d2537ab3 +0 -0
- data/test/dummy/tmp/cache/assets/D10/3A0/sprockets%2F158f48165ddb9cfa4518a02159a4ec19 +0 -0
- data/test/dummy/tmp/cache/assets/D11/3D0/sprockets%2F95e3f52aa53952013be443db8d395c7e +0 -0
- data/test/dummy/tmp/cache/assets/D11/A80/sprockets%2Fc2fb6624be686158b2401b4d4a885e7d +0 -0
- data/test/dummy/tmp/cache/assets/D11/E20/sprockets%2Fbdd46b652f74de0b46055c41948c2d84 +0 -0
- data/test/dummy/tmp/cache/assets/D12/0B0/sprockets%2F671f91009e9f5a07db9c719430ed02cf +0 -0
- data/test/dummy/tmp/cache/assets/D12/F90/sprockets%2F397710de23c0f7b3f6cc3ad8635f7812 +0 -0
- data/test/dummy/tmp/cache/assets/D1A/310/sprockets%2F5384ad85f52d3272dbc64d46ef3876a4 +0 -0
- data/test/dummy/tmp/cache/assets/D1B/EA0/sprockets%2F5110d4ac9e35fe6749c40d2f99bf9191 +0 -0
- data/test/dummy/tmp/cache/assets/D1C/910/sprockets%2F0fb26515c30c3b1656a3f4410afb1d2b +0 -0
- data/test/dummy/tmp/cache/assets/D1C/C30/sprockets%2F6c41af8340e06f9fd28928991fea3c42 +0 -0
- data/test/dummy/tmp/cache/assets/D21/A00/sprockets%2F3207bde101a4d88963b9df6e869e267f +0 -0
- data/test/dummy/tmp/cache/assets/D22/DA0/sprockets%2F8a5776bdd0a1e1690c2e7f8bd5798908 +0 -0
- data/test/dummy/tmp/cache/assets/D25/7D0/sprockets%2F560b2b61bc3cb739ccb701c2b657311c +0 -0
- data/test/dummy/tmp/cache/assets/D28/A40/sprockets%2Fbba251ea4d111ae85160c127f4ab8756 +0 -0
- data/test/dummy/tmp/cache/assets/D2A/A10/sprockets%2F0459c22963b25c20faa51ac6dad617d2 +0 -0
- data/test/dummy/tmp/cache/assets/D2A/B10/sprockets%2F84f48544cf0b378928b7d6f59e392ccc +0 -0
- data/test/dummy/tmp/cache/assets/D31/800/sprockets%2F1e3ed31b0bc5875c2b1557f20b169ad7 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A50/sprockets%2F11b9b104e2626ae5b506fd28b0b68af8 +0 -0
- data/test/dummy/tmp/cache/assets/D38/840/sprockets%2F12b5bf92ed12d821b47e92fa804855aa +0 -0
- data/test/dummy/tmp/cache/assets/D39/CF0/sprockets%2F8571123a9e73ccd7c112e35e39aca6a7 +0 -0
- data/test/dummy/tmp/cache/assets/D3A/F30/sprockets%2F15a0362cc0f96f824d2e192dc23c4fd9 +0 -0
- data/test/dummy/tmp/cache/assets/D3C/170/sprockets%2F916c8d4a702e456a3963151dcfd8bfa0 +0 -0
- data/test/dummy/tmp/cache/assets/D3C/9C0/sprockets%2Fab97a93e34581b3aa9fd71ac1f384019 +0 -0
- data/test/dummy/tmp/cache/assets/D3F/6C0/sprockets%2Ffb767a73ef0afcc0165723ec081903f9 +0 -0
- data/test/dummy/tmp/cache/assets/D3F/C90/sprockets%2F9da014b6c3ba9a861d11299abe96d476 +0 -0
- data/test/dummy/tmp/cache/assets/D3F/DC0/sprockets%2F82ef6bb4f2ec0237011ff08c692e429f +0 -0
- data/test/dummy/tmp/cache/assets/D41/4D0/sprockets%2F4b5e8493a27349a2c6b62acf462b58dd +0 -0
- data/test/dummy/tmp/cache/assets/D42/5C0/sprockets%2F054be4bebb7d59a4a747b3464e91f329 +0 -0
- data/test/dummy/tmp/cache/assets/D42/7C0/sprockets%2Ffcae5059b63412f6b286ddf1715e4b94 +0 -0
- data/test/dummy/tmp/cache/assets/D43/CF0/sprockets%2Fa8f40f4e4b38284009db82d3ee59a3c7 +0 -0
- data/test/dummy/tmp/cache/assets/D43/FB0/sprockets%2F400daf4968c6654111b9a7fd0a5f96fd +0 -0
- data/test/dummy/tmp/cache/assets/D44/400/sprockets%2F9f62068ab2f5e6f245e6090cbcda5845 +0 -0
- data/test/dummy/tmp/cache/assets/D45/A50/sprockets%2Fe86f7863ca9e1239c3a0cc78cc81209a +0 -0
- data/test/dummy/tmp/cache/assets/D4A/400/sprockets%2F9d22629fae12423fde39a8bc663796ea +0 -0
- data/test/dummy/tmp/cache/assets/D4B/710/sprockets%2Fe191069e1e69dbe5206ce3893d0fb6e8 +0 -0
- data/test/dummy/tmp/cache/assets/D4C/370/sprockets%2F9f8871ddc326d27fb2444e2b9e630c8e +0 -0
- data/test/dummy/tmp/cache/assets/D4C/730/sprockets%2F63a49b3364c4469aefe69ade635508fb +0 -0
- data/test/dummy/tmp/cache/assets/D4D/060/sprockets%2Fdf8071fd9e383d72ba1f17b5d5e98516 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D51/190/sprockets%2Fbde53d033a467778f7e5d2095d78fb4f +0 -0
- data/test/dummy/tmp/cache/assets/D52/080/sprockets%2Fbdb460a11eea94fd16071a7ea1f35210 +0 -0
- data/test/dummy/tmp/cache/assets/D52/890/sprockets%2Fbdd9c7f2d6d70b352f318578941ef9a7 +0 -0
- data/test/dummy/tmp/cache/assets/D53/E70/sprockets%2F856560debef90857ce907e1ae35fd079 +0 -0
- data/test/dummy/tmp/cache/assets/D57/580/sprockets%2Fc693d77ad959894ad2460c9eeb958a2a +0 -0
- data/test/dummy/tmp/cache/assets/D5A/630/sprockets%2F4ac0ab0666b16174df72ccb05c742ad7 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D5B/6E0/sprockets%2F01f2ef3b2303b7c39612f0755dcdda3c +0 -0
- data/test/dummy/tmp/cache/assets/D5E/C40/sprockets%2F3dd04e28364ca3b9aff00660e3028caf +0 -0
- data/test/dummy/tmp/cache/assets/D5E/E70/sprockets%2F85bf39edf8bd33f53b98060c75979cc9 +0 -0
- data/test/dummy/tmp/cache/assets/D63/E30/sprockets%2F8bb9b1b4042fa39f01e8b7a2d0388ca5 +0 -0
- data/test/dummy/tmp/cache/assets/D68/E70/sprockets%2F0d2ae672147c167b2c2f42d8cbe8c7b5 +0 -0
- data/test/dummy/tmp/cache/assets/D69/B40/sprockets%2F60528372c4d9ea38ee60b3fde0d0ba84 +0 -0
- data/test/dummy/tmp/cache/assets/D69/C00/sprockets%2Fb71f8a5e0942ae7d4b2b814238ff2e0c +0 -0
- data/test/dummy/tmp/cache/assets/D6A/660/sprockets%2F498dedb0ef6a80d452a4b07782d6b1a4 +0 -0
- data/test/dummy/tmp/cache/assets/D6C/0A0/sprockets%2F21ec0bf9b2152153f3942fcf8eba9f09 +0 -0
- data/test/dummy/tmp/cache/assets/D6D/570/sprockets%2Fb37f4aac840a59d278d8c57a338ccd20 +0 -0
- data/test/dummy/tmp/cache/assets/D6E/920/sprockets%2F9ebedf09390f21a580b35c937e24cb1f +0 -0
- data/test/dummy/tmp/cache/assets/D6E/AD0/sprockets%2F1dc84fc453b1ddb966271ae54d6b54d5 +0 -0
- data/test/dummy/tmp/cache/assets/D6E/F20/sprockets%2F2bb516def8c3a08b7174648da9dd40f3 +0 -0
- data/test/dummy/tmp/cache/assets/D70/B70/sprockets%2F6ebaed371aa715b95667e416378cba4d +0 -0
- data/test/dummy/tmp/cache/assets/D71/740/sprockets%2F1db90d964be0b67d1b79f5a5e5391ce1 +0 -0
- data/test/dummy/tmp/cache/assets/D75/860/sprockets%2Fe8fa1c4ebb9335f1fa16379c842fe750 +0 -0
- data/test/dummy/tmp/cache/assets/D75/EF0/sprockets%2F1d96674c67d405c6b50cddfd3b6c3e39 +0 -0
- data/test/dummy/tmp/cache/assets/D78/010/sprockets%2Faef73289dfbc84248a6aa0183feb8772 +0 -0
- data/test/dummy/tmp/cache/assets/D78/550/sprockets%2F0331b677d4885ee27b9c418f4fedaea4 +0 -0
- data/test/dummy/tmp/cache/assets/D7B/B50/sprockets%2F4685b399157deeddba90ea877df710b2 +0 -0
- data/test/dummy/tmp/cache/assets/D7C/2E0/sprockets%2Fbf5c619eecd922259e6b45e2f8e02b86 +0 -0
- data/test/dummy/tmp/cache/assets/D7C/8A0/sprockets%2Fcaf9df030f62b864de4e3944a9d477d4 +0 -0
- data/test/dummy/tmp/cache/assets/D7C/DE0/sprockets%2F4f4705ac7f29f60e99355fb3abf0af78 +0 -0
- data/test/dummy/tmp/cache/assets/D7D/510/sprockets%2Fee497e95e73cc27afe781b6bb90b5424 +0 -0
- data/test/dummy/tmp/cache/assets/D81/F00/sprockets%2Fac659dac860cb3646df9806f668ac39d +0 -0
- data/test/dummy/tmp/cache/assets/D86/620/sprockets%2F01395e5b7993cede6976336b9cfa9bbe +0 -0
- data/test/dummy/tmp/cache/assets/D86/6F0/sprockets%2F1526f063df1a7cc0e4fa0460cb6ba44d +0 -0
- data/test/dummy/tmp/cache/assets/D87/BB0/sprockets%2Fcd4ae785e2fdf9282a2f36c9543995de +0 -0
- data/test/dummy/tmp/cache/assets/D88/E00/sprockets%2Ff5b3e902fad33c44ff6a0e9db20501a0 +0 -0
- data/test/dummy/tmp/cache/assets/D8C/6D0/sprockets%2F0ead4d15ad8a9d31d33a14dc191da657 +0 -0
- data/test/dummy/tmp/cache/assets/D92/1B0/sprockets%2F1fa31cfb668a21f6d4bb0f6b2536e34e +0 -0
- data/test/dummy/tmp/cache/assets/D98/C50/sprockets%2Fcfa37bd769d589c2da1d3116a6db0b90 +0 -0
- data/test/dummy/tmp/cache/assets/D9C/790/sprockets%2Fc1bb1797c7e487ea4a940cfd3423da5c +0 -0
- data/test/dummy/tmp/cache/assets/D9C/CD0/sprockets%2Fc85016e7bbd4f3adbb7635d01f85d39b +0 -0
- data/test/dummy/tmp/cache/assets/D9D/0A0/sprockets%2Fcf40aaefd8ac6ea638790e4a2d367541 +0 -0
- data/test/dummy/tmp/cache/assets/D9D/930/sprockets%2F1229f6eab13c794c3ce94ad629d3bbb6 +0 -0
- data/test/dummy/tmp/cache/assets/D9D/CB0/sprockets%2F5ffa3729fab74e9b171334f933bbcd2a +0 -0
- data/test/dummy/tmp/cache/assets/D9D/D30/sprockets%2F7c202fe7098da9201fe66d37cc60eadd +0 -0
- data/test/dummy/tmp/cache/assets/D9E/1F0/sprockets%2Fb913f5de5b049aa041b8ad77ca576b9f +0 -0
- data/test/dummy/tmp/cache/assets/DA0/870/sprockets%2F92b550d7b5e47436b5d1db5b47daec8e +0 -0
- data/test/dummy/tmp/cache/assets/DA0/C70/sprockets%2Fd04dbacd60d1e2be636849d485b8d75b +0 -0
- data/test/dummy/tmp/cache/assets/DA1/C50/sprockets%2F2f73ec238cc2edfeecf185428d06435b +0 -0
- data/test/dummy/tmp/cache/assets/DA2/9C0/sprockets%2F5d2fe3ca5cf7ad9e2c5939a291f214a7 +0 -0
- data/test/dummy/tmp/cache/assets/DA4/390/sprockets%2F5cdc49a8aad8844bdc5b0a55b28666d8 +0 -0
- data/test/dummy/tmp/cache/assets/DA5/850/sprockets%2Ffedd0769ffb447639ab123e2db9a3c29 +0 -0
- data/test/dummy/tmp/cache/assets/DAE/160/sprockets%2F6cec68e7a5a848c93ade0e89e7c3501e +0 -0
- data/test/dummy/tmp/cache/assets/DAE/260/sprockets%2Fce5fe9569d7e18ea8a136cac298e3f12 +0 -0
- data/test/dummy/tmp/cache/assets/DB0/DB0/sprockets%2Fc39fd8a8e5ea5f6a1636c4707c9ef4a7 +0 -0
- data/test/dummy/tmp/cache/assets/DB3/C60/sprockets%2F0b0030d24fc428acb4c74c3edd0b94eb +0 -0
- data/test/dummy/tmp/cache/assets/DB8/F30/sprockets%2F91c7bb3a08ba6cd159d4b02313deaa7d +0 -0
- data/test/dummy/tmp/cache/assets/DC1/E50/sprockets%2F92af4d6d0bafa3ab109c5856ed14e34b +0 -0
- data/test/dummy/tmp/cache/assets/DC7/A30/sprockets%2Ff1eccc7f669f63b03bbb55750b50edc1 +0 -0
- data/test/dummy/tmp/cache/assets/DC8/B40/sprockets%2F9af180717bb0bacb7e27ce5d53fd1d74 +0 -0
- data/test/dummy/tmp/cache/assets/DC9/540/sprockets%2F608262feadebbf52a6d81168ab76b0fd +0 -0
- data/test/dummy/tmp/cache/assets/DC9/C10/sprockets%2Fa94c69d0007efe2ef0dbec32e82c942a +0 -0
- data/test/dummy/tmp/cache/assets/DCB/790/sprockets%2Ffa6e0afb98324ab70f6f2add80ab9546 +0 -0
- data/test/dummy/tmp/cache/assets/DCE/F10/sprockets%2Fa10ef3bf2ea4459a641b3fedfa78785b +0 -0
- data/test/dummy/tmp/cache/assets/DD5/A40/sprockets%2F773b57e8cbaba49a2858c9acd5ed930a +0 -0
- data/test/dummy/tmp/cache/assets/DD7/600/sprockets%2F0cec2cc545e1d3bd889d195f68dea4b7 +0 -0
- data/test/dummy/tmp/cache/assets/DDA/AC0/sprockets%2F8cce49d0b8e0a2de9cbc08fc2279865f +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DDE/500/sprockets%2Fcff617ff0b83b5a38c991e1a2bff589f +0 -0
- data/test/dummy/tmp/cache/assets/DE0/790/sprockets%2Fe508b8ce9b8ef49ab69cf5bbc3d09680 +0 -0
- data/test/dummy/tmp/cache/assets/DFA/3D0/sprockets%2F969dbba9b0b881d0fe3ead044ce6b6a4 +0 -0
- data/test/dummy/tmp/cache/assets/DFD/610/sprockets%2F5fa40e7fbec251546395f4adbb7aecf4 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E0C/D50/sprockets%2Fdd746cdf1870fea2d4fef3db2c96c694 +0 -0
- data/test/dummy/tmp/cache/assets/E0E/0D0/sprockets%2F9fab330147d57668f6aff14ccefbfe9e +0 -0
- data/test/dummy/tmp/cache/assets/E12/430/sprockets%2F83cde7e665d636ba5b5f98d2dec7fdc3 +0 -0
- data/test/dummy/tmp/cache/assets/E23/590/sprockets%2F467d2a58abfbf81d715fdacd6ac3b2b2 +0 -0
- data/test/dummy/tmp/cache/assets/E30/F10/sprockets%2Feb96e11c82be8b736df1fcccbcaa8529 +0 -0
- data/test/dummy/tmp/cache/assets/E33/680/sprockets%2F1c62bdad5d5cc668bc73eeadc944c97c +0 -0
- data/test/dummy/tmp/cache/assets/E34/9F0/sprockets%2F2dbdbaffe3f466f85cee37cee4331f34 +0 -0
- data/test/dummy/tmp/cache/assets/E44/410/sprockets%2Fcfdd750d7776be51e48bfefe3cbc99e4 +0 -0
- data/test/dummy/tmp/cache/assets/E44/560/sprockets%2Fd728f19f2f5dfac9f555babd49ebb89d +0 -0
- data/test/dummy/tmp/cache/assets/E6C/C10/sprockets%2F837ca65eade4def9af9b6ada7cb394f4 +0 -0
- data/test/dummy/tmp/cache/assets/E86/510/sprockets%2F6de0e7ce2c9b7e2c7ced4bcfac2b2d06 +0 -0
- data/test/functional/ueditor_rails/dialogs_controller_test.rb +16 -0
- data/test/functional/ueditor_rails/libs_controller_test.rb +21 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/ueditor_rails_test.rb +7 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.css.erb +130 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.html.erb +128 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/callbacks.js +166 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeMaps.js +29 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.css.erb +44 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.html.erb +54 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.js +186 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/0.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/bface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/cface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/fface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/jxface2.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/tface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/wface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/yface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/help/help.css +7 -0
- data/vendor/assets/javascripts/ueditor/dialogs/help/help.html.erb +82 -0
- data/vendor/assets/javascripts/ueditor/dialogs/help/help.js +54 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/image.css.erb +74 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/image.html.erb +204 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/image.js +712 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/imageUploader.swf +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/center_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/left_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/none_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/right_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/internal.js +79 -0
- data/vendor/assets/javascripts/ueditor/dialogs/link/link.html.erb +126 -0
- data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.html.erb +21 -0
- data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.js +56 -0
- data/vendor/assets/javascripts/ueditor/dialogs/table/dragicon.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.css +75 -0
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.html.erb +56 -0
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.js +182 -0
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittd.html.erb +50 -0
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittip.html.erb +33 -0
- data/vendor/assets/javascripts/ueditor/dialogs/tangram.js +1238 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/center_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/left_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/none_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/right_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/video.css +59 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/video.html.erb +67 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/video.js +402 -0
- data/vendor/assets/javascripts/ueditor/editor_all.js.erb +17707 -0
- data/vendor/assets/javascripts/ueditor/editor_config.js +238 -0
- data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/copy.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/imglabel.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/localimage.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/music.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/upload.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/zh-cn/zh-cn.js +492 -0
- data/vendor/assets/javascripts/ueditor/themes/default/css/ueditor.css +1582 -0
- data/vendor/assets/javascripts/ueditor/themes/default/dialogbase.css.erb +100 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/anchor.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/button-bg.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/cancelbutton.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_h.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_h.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_v.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_v.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/dialog-title-bg.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/filescan.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/highlighted.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/icons-all.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/icons.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/icons.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/lock.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/neweditor-tab-bg.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/pagebreak.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/scale.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/spacer.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/sparator_v.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/toolbar_bg.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/unhighlighted.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/upload.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/videologo.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/word.gif +0 -0
- data/vendor/assets/javascripts/ueditor/themes/default/images/wordpaste.png +0 -0
- data/vendor/assets/javascripts/ueditor/themes/iframe.css +1 -0
- data/vendor/assets/javascripts/ueditor/third-party/codemirror/codemirror.css +104 -0
- data/vendor/assets/javascripts/ueditor/third-party/codemirror/codemirror.js +3581 -0
- data/vendor/assets/javascripts/ueditor/third-party/swfupload/fileprogress.js +215 -0
- data/vendor/assets/javascripts/ueditor/third-party/swfupload/swfupload.cookies.js +53 -0
- data/vendor/assets/javascripts/ueditor/third-party/swfupload/swfupload.js +1132 -0
- data/vendor/assets/javascripts/ueditor/third-party/swfupload/swfupload.proxy.js +96 -0
- data/vendor/assets/javascripts/ueditor/third-party/swfupload/swfupload.queue.js +98 -0
- data/vendor/assets/javascripts/ueditor/third-party/swfupload/swfupload.speed.js +346 -0
- data/vendor/assets/javascripts/ueditor/third-party/swfupload/swfupload.swf +0 -0
- data/vendor/assets/javascripts/ueditor/third-party/swfupload/swfupload_fp9.swf +0 -0
- data/vendor/assets/javascripts/ueditor/uparse.js +358 -0
- metadata +674 -0
@@ -0,0 +1,205 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/html4/loose.dtd">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title></title>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
7
|
+
<script type="text/javascript" src="<%= asset_path 'ueditor/dialogs/internal.js' %>"></script>
|
8
|
+
<link rel="stylesheet" href="<%= asset_path 'ueditor/dialogs/image/image.css' %>" type="text/css" />
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<div class="wrapper">
|
12
|
+
<div id="imageTab">
|
13
|
+
<div id="tabHeads" class="tabhead">
|
14
|
+
<span tabSrc="remote" class="focus"><var id="lang_tab_remote"></var></span>
|
15
|
+
<span tabSrc="local"><var id="lang_tab_local"></var></span>
|
16
|
+
<span tabSrc="imgManager"><var id="lang_tab_imgManager"></var></span>
|
17
|
+
<span tabSrc="imgSearch"><var id="lang_tab_imgSearch"></var></span>
|
18
|
+
</div>
|
19
|
+
<div id="tabBodys" class="tabbody">
|
20
|
+
<div id="remote" class="panel">
|
21
|
+
<table cellpadding="0" cellspacing="0">
|
22
|
+
<tr>
|
23
|
+
<td class="label"><label for="url"><var id="lang_input_url"></var></label></td>
|
24
|
+
<td><input id="url" type="text"/></td>
|
25
|
+
</tr>
|
26
|
+
<tr>
|
27
|
+
<td class="label"><label for="width"><var id="lang_input_width"></var></label></td>
|
28
|
+
<td><input type="text" id="width"/> px</td>
|
29
|
+
</tr>
|
30
|
+
<tr>
|
31
|
+
<td class="label"><label for="height"><var id="lang_input_height"></var></label></td>
|
32
|
+
<td><input type="text" id="height"/> px</td>
|
33
|
+
</tr>
|
34
|
+
<tr>
|
35
|
+
<td class="label"><label for="border"><var id="lang_input_border"></var></label></td>
|
36
|
+
<td><input type="text" id="border"/> px</td>
|
37
|
+
</tr>
|
38
|
+
<tr>
|
39
|
+
<td class="label"><label for="vhSpace"><var id="lang_input_vhspace"></var></label></td>
|
40
|
+
<td><input type="text" id="vhSpace"/> px</td>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<td class="label"><label for="title"><var id="lang_input_title"></var></label></td>
|
44
|
+
<td><input type="text" id="title"/></td>
|
45
|
+
</tr>
|
46
|
+
<tr>
|
47
|
+
<td class="label"><var id="lang_input_remoteAlign"></var></td>
|
48
|
+
<td id="remoteFloat"></td>
|
49
|
+
</tr>
|
50
|
+
</table>
|
51
|
+
|
52
|
+
<div id="preview"></div>
|
53
|
+
<div class="lock"><input id="lock" type="checkbox" checked="checked"></div>
|
54
|
+
</div>
|
55
|
+
<div id="local" class="panel">
|
56
|
+
<div id="flashContainer"></div>
|
57
|
+
<div><div id="upload" style="display: none" ></div><div id="duiqi"></div><div id="localFloat"></div></div>
|
58
|
+
|
59
|
+
<div class="saveDir">
|
60
|
+
<var id="lang_savePath" ></var>:<select id="savePath">
|
61
|
+
<option value="1">upload</option>
|
62
|
+
<option value="2">upload1</option>
|
63
|
+
</select>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
<div id="imgManager" class="panel">
|
67
|
+
<div id="imageList"><var id="lang_imgLoading"></var></div>
|
68
|
+
</div>
|
69
|
+
<div id="imgSearch" class="panel">
|
70
|
+
<table style="margin-top: 5px;">
|
71
|
+
<tr>
|
72
|
+
<td width="200"><input id="imgSearchTxt" type="text" /></td>
|
73
|
+
<td width="65">
|
74
|
+
<select id="imgType">
|
75
|
+
<!--具体内容值将由国际化组件动态填充-->
|
76
|
+
<option value="&s=4&z=0"></option>
|
77
|
+
<option value="&s=1&z=19"></option>
|
78
|
+
<option value="&s=2&z=0"></option>
|
79
|
+
<option value="&s=3&z=0"></option>
|
80
|
+
</select>
|
81
|
+
</td>
|
82
|
+
<td width="80"><input id="imgSearchBtn" type="button" /></td>
|
83
|
+
<td width="80"><input id="imgSearchReset" type="button" /></td>
|
84
|
+
</tr>
|
85
|
+
</table>
|
86
|
+
<div id="searchList"></div>
|
87
|
+
</div>
|
88
|
+
<iframe id="maskIframe" src="about:blank" scrolling="no" frameborder="no"></iframe>
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
<script type="text/javascript" src="<%= asset_path 'ueditor/dialogs/tangram.js' %>"></script>
|
93
|
+
<script type="text/javascript" src="<%= asset_path 'ueditor/dialogs/image/image.js' %>"></script>
|
94
|
+
|
95
|
+
<script type="text/javascript">
|
96
|
+
//全局变量
|
97
|
+
var imageUrls = [], //用于保存从服务器返回的图片信息数组
|
98
|
+
selectedImageCount = 0; //当前已选择的但未上传的图片数量
|
99
|
+
|
100
|
+
editor.setOpt({
|
101
|
+
imageFieldName:"upfile",
|
102
|
+
compressSide:0,
|
103
|
+
maxImageSideLength:900
|
104
|
+
});
|
105
|
+
utils.domReady(function(){
|
106
|
+
var flashOptions = {
|
107
|
+
container:"flashContainer", //flash容器id
|
108
|
+
url:editor.options.imageUrl, // 上传处理页面的url地址
|
109
|
+
ext:"{}", //可向服务器提交的自定义参数列表
|
110
|
+
fileType:'{"description":"'+lang.fileType+'", "extension":"*.gif;*.jpeg;*.png;*.jpg"}', //上传文件格式限制
|
111
|
+
flashUrl:'<%= asset_path 'ueditor/dialogs/image/imageUploader.swf' %>', //上传用的flash组件地址
|
112
|
+
width:608, //flash的宽度
|
113
|
+
height:272, //flash的高度
|
114
|
+
gridWidth:121, // 每一个预览图片所占的宽度
|
115
|
+
gridHeight:120, // 每一个预览图片所占的高度
|
116
|
+
picWidth:100, // 单张预览图片的宽度
|
117
|
+
picHeight:100, // 单张预览图片的高度
|
118
|
+
uploadDataFieldName:editor.options.imageFieldName, // POST请求中图片数据的key
|
119
|
+
picDescFieldName:'pictitle', // POST请求中图片描述的key
|
120
|
+
maxSize:4, // 文件的最大体积,单位M
|
121
|
+
compressSize:2, // 上传前如果图片体积超过该值,会先压缩,单位M
|
122
|
+
maxNum:1, // 单次最大可上传多少个文件
|
123
|
+
compressSide:editor.options.compressSide, //等比压缩的基准,0为按照最长边,1为按照宽度,2为按照高度
|
124
|
+
compressLength:editor.options.maxImageSideLength //能接受的最大边长,超过该值Flash会自动等比压缩
|
125
|
+
};
|
126
|
+
//回调函数集合,支持传递函数名的字符串、函数句柄以及函数本身三种类型
|
127
|
+
var callbacks = {
|
128
|
+
// 选择文件的回调
|
129
|
+
selectFileCallback: function(selectFiles){
|
130
|
+
utils.each(selectFiles,function(file){
|
131
|
+
var tmp = {};
|
132
|
+
tmp.id = file.index;
|
133
|
+
tmp.data = {};
|
134
|
+
postConfig.push(tmp);
|
135
|
+
});
|
136
|
+
selectedImageCount += selectFiles.length;
|
137
|
+
if(selectedImageCount) baidu.g("upload").style.display = "";
|
138
|
+
dialog.buttons[0].setDisabled(true); //初始化时置灰确定按钮
|
139
|
+
},
|
140
|
+
// 删除文件的回调
|
141
|
+
deleteFileCallback: function(delFiles){
|
142
|
+
for(var i = 0,len = delFiles.length;i<len;i++){
|
143
|
+
var index = delFiles[i].index;
|
144
|
+
postConfig.splice(index,1);
|
145
|
+
}
|
146
|
+
selectedImageCount -= delFiles.length;
|
147
|
+
if (!selectedImageCount) {
|
148
|
+
baidu.g("upload").style.display = "none";
|
149
|
+
dialog.buttons[0].setDisabled(false); //没有选择图片时重新点亮按钮
|
150
|
+
}
|
151
|
+
},
|
152
|
+
|
153
|
+
// 单个文件上传完成的回调
|
154
|
+
uploadCompleteCallback: function(data){
|
155
|
+
try{
|
156
|
+
var info = eval("(" + data.info + ")");
|
157
|
+
info && imageUrls.push(info);
|
158
|
+
selectedImageCount--;
|
159
|
+
}catch(e){}
|
160
|
+
|
161
|
+
},
|
162
|
+
// 单个文件上传失败的回调,
|
163
|
+
uploadErrorCallback: function (data){
|
164
|
+
if(!data.info){
|
165
|
+
alert(lang.netError);
|
166
|
+
}
|
167
|
+
//console && console.log(data);
|
168
|
+
},
|
169
|
+
// 全部上传完成时的回调
|
170
|
+
allCompleteCallback: function(){
|
171
|
+
dialog.buttons[0].setDisabled(false); //上传完毕后点亮按钮
|
172
|
+
},
|
173
|
+
// 文件超出限制的最大体积时的回调
|
174
|
+
//exceedFileCallback: 'exceedFileCallback',
|
175
|
+
// 开始上传某个文件时的回调
|
176
|
+
startUploadCallback: function(){
|
177
|
+
var config = postConfig.shift();
|
178
|
+
//也可以在这里更改
|
179
|
+
//if(config.id==2){ //设置第三张图片的对应参数
|
180
|
+
// config.data={"myParam":"value"}
|
181
|
+
// }
|
182
|
+
flashObj.addCustomizedParams(config.id,config.data);
|
183
|
+
}
|
184
|
+
};
|
185
|
+
imageUploader.init(flashOptions,callbacks);
|
186
|
+
$G("upload").onclick = function () {
|
187
|
+
/**
|
188
|
+
* 接口imageUploader.setPostParams()可以在提交时设置本次上传提交的参数(包括所有图片)
|
189
|
+
* 参数为json对象{"key1":"value1","key2":"value2"},其中key即为向后台post提交的name,value即为值。
|
190
|
+
* 其中有一个特殊的保留key值为action,若设置,可以更改本次提交的处理地址
|
191
|
+
*/
|
192
|
+
var postParams = {
|
193
|
+
"<%= request_forgery_protection_token %>":"<%= form_authenticity_token %>",
|
194
|
+
"dir":baidu.g("savePath").value
|
195
|
+
};
|
196
|
+
imageUploader.setPostParams(postParams);
|
197
|
+
flashObj.upload();
|
198
|
+
this.style.display = "none";
|
199
|
+
$G("savePath").parentNode.style.display = "none";
|
200
|
+
};
|
201
|
+
|
202
|
+
});
|
203
|
+
</script>
|
204
|
+
</body>
|
205
|
+
</html>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module UeditorRails
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path('../templates', __FILE__)
|
4
|
+
|
5
|
+
desc "Mount Engine and copy config file to Rails app."
|
6
|
+
|
7
|
+
def copy_config_file
|
8
|
+
template "ueditor_config.js.erb", "app/assets/javascripts/ueditor_config.js.erb"
|
9
|
+
end
|
10
|
+
|
11
|
+
def mount_engine
|
12
|
+
route "mount UeditorRails::Engine => '/ueditor'"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,204 @@
|
|
1
|
+
//= require_self
|
2
|
+
//= require ueditor_rails/init
|
3
|
+
|
4
|
+
window.MY_UEDITOR_CONFIG = {
|
5
|
+
imageUrl: "" //图片上传提交地址
|
6
|
+
,imagePath: "" //图片修正地址,引用了fixedImagePath,如有特殊需求,可自行配置
|
7
|
+
//,imageFieldName:"upfile" //图片数据的key,若此处修改,需要在后台对应文件修改对应参数
|
8
|
+
//,compressSide:0 //等比压缩的基准,确定maxImageSideLength参数的参照对象。0为按照最长边,1为按照宽度,2为按照高度
|
9
|
+
//,maxImageSideLength:900 //上传图片最大允许的边长,超过会自动等比缩放,不缩放就设置一个比较大的值,更多设置在image.html中
|
10
|
+
|
11
|
+
//涂鸦图片配置区
|
12
|
+
,scrawlUrl: "" //涂鸦上传地址
|
13
|
+
,scrawlPath: "" //图片修正地址,同imagePath
|
14
|
+
|
15
|
+
//附件上传配置区
|
16
|
+
,fileUrl: "" //附件上传提交地址
|
17
|
+
,filePath: "" //附件修正地址,同imagePath
|
18
|
+
//,fileFieldName:"upfile" //附件提交的表单名,若此处修改,需要在后台对应文件修改对应参数
|
19
|
+
//远程抓取配置区
|
20
|
+
//,catchRemoteImageEnable:true //是否开启远程图片抓取,默认开启
|
21
|
+
,catcherUrl: "" //处理远程图片抓取的地址
|
22
|
+
,catcherPath: "" //图片修正地址,同imagePath
|
23
|
+
//,catchFieldName:"upfile" //提交到后台远程图片uri合集,若此处修改,需要在后台对应文件修改对应参数
|
24
|
+
//,separater:'ue_separate_ue' //提交至后台的远程图片地址字符串分隔符
|
25
|
+
//,localDomain:[] //本地顶级域名,当开启远程图片抓取时,除此之外的所有其它域名下的图片都将被抓取到本地,默认不抓取127.0.0.1和localhost
|
26
|
+
|
27
|
+
//图片在线管理配置区
|
28
|
+
,imageManagerUrl: "" //图片在线管理的处理地址
|
29
|
+
,imageManagerPath: "" //图片修正地址,同imagePath
|
30
|
+
|
31
|
+
//屏幕截图配置区
|
32
|
+
,snapscreenHost: "" //屏幕截图的server端文件所在的网站地址或者ip,请不要加http://
|
33
|
+
,snapscreenServerUrl: "" //屏幕截图的server端保存程序,UEditor的范例代码为“URL +"server/upload/php/snapImgUp.php"”
|
34
|
+
,snapscreenPath: ""
|
35
|
+
//,snapscreenServerPort: 80 //屏幕截图的server端端口
|
36
|
+
//,snapscreenImgAlign: 'center' //截图的图片默认的排版方式
|
37
|
+
|
38
|
+
//word转存配置区
|
39
|
+
,wordImageUrl: "" //word转存提交地址
|
40
|
+
,wordImagePath: "" //
|
41
|
+
//,wordImageFieldName:"upfile" //word转存表单名若此处修改,需要在后台对应文件修改对应参数
|
42
|
+
|
43
|
+
//获取视频数据的地址
|
44
|
+
,getMovieUrl: "" //视频数据获取地址
|
45
|
+
|
46
|
+
//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
|
47
|
+
,toolbars:[["bold","italic","underline","strikethrough","forecolor","backcolor","justifyleft","justifycenter","justifyright","justifyjustify","indent","removeformat","formatmatch","autotypeset","pasteplain","customstyle","insertunorderedlist","insertorderedlist","source","fullscreen","preview","help"],["insertimage","emotion","insertvideo","attachment","blockquote","spechars","link","unlink"],["inserttable","deletetable","mergedown","mergeright","splittorows","splittocols","splittocells","mergecells"],[]]
|
48
|
+
//当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
|
49
|
+
,labelMap:{
|
50
|
+
'anchor':'', 'undo':''
|
51
|
+
}
|
52
|
+
//webAppKey
|
53
|
+
//百度应用的APIkey,每个站长必须首先去百度官网注册一个key后方能正常使用app功能
|
54
|
+
,webAppKey:""
|
55
|
+
|
56
|
+
|
57
|
+
//语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
|
58
|
+
//lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
|
59
|
+
//,lang:'zh-cn'
|
60
|
+
|
61
|
+
//,langPath:URL +"lang/"
|
62
|
+
|
63
|
+
//主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
|
64
|
+
//现有如下皮肤:default,modern,gorgeous
|
65
|
+
//,theme:'default'
|
66
|
+
//,themePath:URL +"themes/"
|
67
|
+
|
68
|
+
//若实例化编辑器的页面手动修改的domain,此处需要设置为true
|
69
|
+
//,customDomain:false
|
70
|
+
|
71
|
+
//针对getAllHtml方法,会在对应的head标签中增加该编码设置。
|
72
|
+
//,charset:"utf-8"
|
73
|
+
|
74
|
+
//常用配置项目
|
75
|
+
//,isShow : true //默认显示编辑器
|
76
|
+
|
77
|
+
,initialContent:'' //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
|
78
|
+
|
79
|
+
//,initialFrameWidth:1000 //初始化编辑器宽度,默认1000
|
80
|
+
//,initialFrameHeight:320 //初始化编辑器高度,默认320
|
81
|
+
|
82
|
+
//,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
|
83
|
+
|
84
|
+
//,iframeCssUrl: URL + '/themes/iframe.css' //给编辑器内部引入一个css文件
|
85
|
+
//,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
|
86
|
+
//,focus:true //初始化时,是否让编辑器获得焦点true或false
|
87
|
+
|
88
|
+
//,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
|
89
|
+
|
90
|
+
//,fullscreen : false //是否开启初始化时即全屏,默认关闭
|
91
|
+
|
92
|
+
//,readonly : false /编辑器初始化结束后,编辑区域是否是只读的,默认是false
|
93
|
+
|
94
|
+
//,zIndex : 900 //编辑器层级的基数,默认是900
|
95
|
+
|
96
|
+
//,imagePopup:true //图片操作的浮层开关,默认打开
|
97
|
+
|
98
|
+
//,initialStyle:'body{font-size:18px}' //编辑器内部样式,可以用来改变字体等
|
99
|
+
|
100
|
+
//,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
|
101
|
+
|
102
|
+
//,pasteplain:false //是否纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
|
103
|
+
|
104
|
+
//,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
|
105
|
+
//iframeUrlMap
|
106
|
+
//dialog内容的路径 ~会被替换成URL,垓属性一旦打开,将覆盖所有的dialog的默认路径
|
107
|
+
//,iframeUrlMap:{
|
108
|
+
// 'anchor':'~/dialogs/anchor/anchor.html',
|
109
|
+
// }
|
110
|
+
//insertorderedlist
|
111
|
+
//有序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
|
112
|
+
// ,'insertorderedlist':{
|
113
|
+
// 'decimal' : '' , //'1,2,3...'
|
114
|
+
// 'lower-alpha' : '' , // 'a,b,c...'
|
115
|
+
// 'lower-roman' : '' , //'i,ii,iii...'
|
116
|
+
// 'upper-alpha' : '' , lang //'A,B,C'
|
117
|
+
// 'upper-roman' : '' //'I,II,III...'
|
118
|
+
// }
|
119
|
+
//insertunorderedlist
|
120
|
+
//无序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
|
121
|
+
//,insertunorderedlist : {
|
122
|
+
// 'circle' : '', // '○ 小圆圈'
|
123
|
+
// 'disc' : '', // '● 小圆点'
|
124
|
+
// 'square' : '' //'■ 小方块'
|
125
|
+
//}
|
126
|
+
|
127
|
+
//customstyle
|
128
|
+
//自定义样式,不支持国际化,此处配置值即可最后显示值
|
129
|
+
//block的元素是依据设置段落的逻辑设置的,inline的元素依据BIU的逻辑设置
|
130
|
+
//尽量使用一些常用的标签
|
131
|
+
//参数说明
|
132
|
+
//tag 使用的标签名字
|
133
|
+
//label 显示的名字也是用来标识不同类型的标识符,注意这个值每个要不同,
|
134
|
+
//style 添加的样式
|
135
|
+
//每一个对象就是一个自定义的样式
|
136
|
+
//,'customstyle':[
|
137
|
+
// {tag:'h1', name:'tc', label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'},
|
138
|
+
// {tag:'h1', name:'tl',label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;margin:0 0 10px 0;'},
|
139
|
+
// {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold'},
|
140
|
+
// {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'}
|
141
|
+
// ]
|
142
|
+
|
143
|
+
//右键菜单的内容,可以参考plugins/contextmenu.js里边的默认菜单的例子,label留空支持国际化,否则以此配置为准
|
144
|
+
// ,contextMenu:[
|
145
|
+
// {
|
146
|
+
// label:'', //显示的名称
|
147
|
+
// cmdName:'selectall',//执行的command命令,当点击这个右键菜单时
|
148
|
+
// //exec可选,有了exec就会在点击时执行这个function,优先级高于cmdName
|
149
|
+
// exec:function () {
|
150
|
+
// //this是当前编辑器的实例
|
151
|
+
// //this.ui._dialogs['inserttableDialog'].open();
|
152
|
+
// }
|
153
|
+
// }
|
154
|
+
// ]
|
155
|
+
//wordCount
|
156
|
+
//,wordCount:1 //是否开启字数统计
|
157
|
+
//,maximumWords:10000 //允许的最大字符数
|
158
|
+
//字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示
|
159
|
+
//,wordCountMsg:'' //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符
|
160
|
+
//超出字数限制提示 留空支持多语言自动切换,否则按此配置显示
|
161
|
+
//,wordOverFlowMsg:'' //<span style="color:red;">你输入的字符个数已经超出最大允许值,服务器可能会拒绝保存!</span>
|
162
|
+
|
163
|
+
//elementPathEnabled
|
164
|
+
//是否启用元素路径,默认是显示
|
165
|
+
//,elementPathEnabled : true
|
166
|
+
//removeFormat
|
167
|
+
//清除格式时可以删除的标签和属性
|
168
|
+
//removeForamtTags标签
|
169
|
+
//,removeFormatTags:'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'
|
170
|
+
//removeFormatAttributes属性
|
171
|
+
//,removeFormatAttributes:'class,style,lang,width,height,align,hspace,valign'
|
172
|
+
//autoHeightEnabled
|
173
|
+
// 是否自动长高,默认true
|
174
|
+
//,autoHeightEnabled:true
|
175
|
+
//,minFrameWidth:800 //编辑器拖动时最小宽度,默认800
|
176
|
+
//,minFrameHeight:220 //编辑器拖动时最小高度,默认220
|
177
|
+
//autoFloatEnabled
|
178
|
+
//是否保持toolbar的位置不动,默认true
|
179
|
+
//,autoFloatEnabled:true
|
180
|
+
//浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
|
181
|
+
//,topOffset:30
|
182
|
+
//indentValue
|
183
|
+
//首行缩进距离,默认是2em
|
184
|
+
//,indentValue:'2em'
|
185
|
+
|
186
|
+
//autotypeset
|
187
|
+
// //自动排版参数
|
188
|
+
// ,autotypeset:{
|
189
|
+
// mergeEmptyline : true, //合并空行
|
190
|
+
// removeClass : true, //去掉冗余的class
|
191
|
+
// removeEmptyline : false, //去掉空行
|
192
|
+
// textAlign : "left" , //段落的排版方式,可以是 left,right,center,justify 去掉这个属性表示不执行排版
|
193
|
+
// imageBlockLine : 'center', //图片的浮动方式,独占一行剧中,左右浮动,默认: center,left,right,none 去掉这个属性表示不执行排版
|
194
|
+
// pasteFilter : false, //根据规则过滤没事粘贴进来的内容
|
195
|
+
// clearFontSize : false, //去掉所有的内嵌字号,使用编辑器默认的字号
|
196
|
+
// clearFontFamily : false, //去掉所有的内嵌字体,使用编辑器默认的字体
|
197
|
+
// removeEmptyNode : false , // 去掉空节点
|
198
|
+
// //可以去掉的标签
|
199
|
+
// removeTagNames : {标签名字:1},
|
200
|
+
// indent : false, // 行首缩进
|
201
|
+
// indentValue : '2em' //行首缩进的大小
|
202
|
+
// }
|
203
|
+
|
204
|
+
};
|