noodall-ui 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +29 -0
- data/Gemfile +29 -0
- data/Gemfile.lock +205 -0
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +17 -0
- data/app/controllers/noodall/admin/assets_controller.rb +241 -0
- data/app/controllers/noodall/admin/base_controller.rb +8 -0
- data/app/controllers/noodall/admin/components_controller.rb +22 -0
- data/app/controllers/noodall/admin/groups_controller.rb +11 -0
- data/app/controllers/noodall/admin/nodes_controller.rb +159 -0
- data/app/controllers/noodall/nodes_controller.rb +41 -0
- data/app/helpers/noodall/admin/assets_helper.rb +15 -0
- data/app/helpers/noodall/admin/base_helper.rb +14 -0
- data/app/helpers/noodall/admin/nodes_helper.rb +37 -0
- data/app/helpers/noodall/components_helper.rb +38 -0
- data/app/helpers/noodall/layout_helper.rb +25 -0
- data/app/helpers/noodall/nodes_helper.rb +72 -0
- data/app/models/asset.rb +103 -0
- data/app/views/layouts/noodall_admin.html.erb +66 -0
- data/app/views/noodall/admin/assets/_browser.html.erb +28 -0
- data/app/views/noodall/admin/assets/_form.html.erb +54 -0
- data/app/views/noodall/admin/assets/_menu.html.erb +8 -0
- data/app/views/noodall/admin/assets/_show.html.erb +48 -0
- data/app/views/noodall/admin/assets/_tags.html.erb +13 -0
- data/app/views/noodall/admin/assets/add.html.erb +10 -0
- data/app/views/noodall/admin/assets/form.html.erb +12 -0
- data/app/views/noodall/admin/assets/form.js.erb +2 -0
- data/app/views/noodall/admin/assets/index.html.erb +65 -0
- data/app/views/noodall/admin/assets/index.js.erb +1 -0
- data/app/views/noodall/admin/assets/show.html.erb +3 -0
- data/app/views/noodall/admin/assets/show.js.erb +1 -0
- data/app/views/noodall/admin/assets/tags.html.erb +3 -0
- data/app/views/noodall/admin/assets/tags.js.erb +1 -0
- data/app/views/noodall/admin/components/_component.erb +0 -0
- data/app/views/noodall/admin/nodes/_body.html.erb +5 -0
- data/app/views/noodall/admin/nodes/_branch.html.erb +10 -0
- data/app/views/noodall/admin/nodes/_home.html.erb +27 -0
- data/app/views/noodall/admin/nodes/_slot_form.html.erb +16 -0
- data/app/views/noodall/admin/nodes/change_template.html.erb +38 -0
- data/app/views/noodall/admin/nodes/index.html.erb +69 -0
- data/app/views/noodall/admin/nodes/new.html.erb +30 -0
- data/app/views/noodall/admin/nodes/show.html.erb +144 -0
- data/app/views/noodall/admin/nodes/tree.html.erb +3 -0
- data/app/views/noodall/admin/nodes/tree.js.erb +2 -0
- data/app/views/noodall/components/_component.erb +0 -0
- data/app/views/noodall/nodes/search.html.erb +14 -0
- data/app/views/noodall/nodes/sitemap.html.erb +3 -0
- data/app/views/noodall/nodes/sitemap.xml.rxml +22 -0
- data/config/application.rb +29 -0
- data/config/boot.rb +13 -0
- data/config/cucumber.yml +8 -0
- data/config/database.yml +14 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +30 -0
- data/config/environments/production.rb +50 -0
- data/config/environments/test.rb +35 -0
- data/config/locales/en.yml +5 -0
- data/config.ru +4 -0
- data/demo/controllers/application_controller.rb +22 -0
- data/demo/initializers/dragonfly.rb +1 -0
- data/demo/initializers/mongo_mapper.rb +13 -0
- data/demo/initializers/noodall.rb +2 -0
- data/demo/initializers/secret_token.rb +7 -0
- data/demo/initializers/session_store.rb +8 -0
- data/demo/models/gallery.rb +17 -0
- data/demo/models/page_a.rb +9 -0
- data/demo/models/page_b.rb +4 -0
- data/demo/models/page_c.rb +7 -0
- data/demo/models/promo.rb +22 -0
- data/demo/models/user.rb +12 -0
- data/demo/routes.rb +3 -0
- data/demo/seeds.rb +8 -0
- data/demo/views/admin/components/_gallery.html.erb +49 -0
- data/demo/views/admin/components/_promo.html.erb +34 -0
- data/demo/views/admin/nodes/_page_a.html.erb +47 -0
- data/demo/views/admin/nodes/_page_b.html.erb +35 -0
- data/demo/views/admin/nodes/_page_c.html.erb +35 -0
- data/demo/views/components/_gallery.html.erb +23 -0
- data/demo/views/components/_promo.html.erb +5 -0
- data/demo/views/layouts/application.html.erb +121 -0
- data/demo/views/nodes/page_a.html.erb +14 -0
- data/demo/views/nodes/page_b.html.erb +9 -0
- data/demo/views/nodes/page_c.html.erb +12 -0
- data/features/change_templates.feature +25 -0
- data/features/content_templates.feature +18 -0
- data/features/gallery_component.feature +22 -0
- data/features/manage_assets.feature +28 -0
- data/features/manage_content_tree.feature +42 -0
- data/features/preview.feature +8 -0
- data/features/promo_component.feature +18 -0
- data/features/publish_content.feature +28 -0
- data/features/search.feature +12 -0
- data/features/sitemap.feature +9 -0
- data/features/step_definitions/asset_steps.rb +66 -0
- data/features/step_definitions/cms_node_steps.rb +126 -0
- data/features/step_definitions/component_steps.rb +137 -0
- data/features/step_definitions/content_steps.rb +187 -0
- data/features/step_definitions/date_select_steps.rb +39 -0
- data/features/step_definitions/groups_access_steps.rb +92 -0
- data/features/step_definitions/node_steps.rb +25 -0
- data/features/step_definitions/preview_steps.rb +7 -0
- data/features/step_definitions/pubish_content_steps.rb +45 -0
- data/features/step_definitions/search_steps.rb +21 -0
- data/features/step_definitions/sign_in_steps.rb +3 -0
- data/features/step_definitions/web_steps.rb +219 -0
- data/features/support/env.rb +52 -0
- data/features/support/logo.png +0 -0
- data/features/support/paths.rb +56 -0
- data/generators/component/USAGE +8 -0
- data/generators/component/component_generator.rb +35 -0
- data/generators/component/lib/insert_commands.rb +61 -0
- data/generators/component/templates/admin_template.html.erb +50 -0
- data/generators/component/templates/factory.rb +5 -0
- data/generators/component/templates/model.rb +8 -0
- data/generators/component/templates/template.html.erb +41 -0
- data/generators/node/USAGE +8 -0
- data/generators/node/lib/insert_commands.rb +47 -0
- data/generators/node/node_generator.rb +35 -0
- data/generators/node/templates/admin_template.html.erb +49 -0
- data/generators/node/templates/factory.rb +5 -0
- data/generators/node/templates/model.rb +11 -0
- data/generators/node/templates/template.html.erb +41 -0
- data/generators/node_features/USAGE +8 -0
- data/generators/node_features/node_features_generator.rb +16 -0
- data/lib/generators/noodall/node/USAGE +8 -0
- data/lib/generators/noodall/node/node_generator.rb +21 -0
- data/lib/generators/noodall/node/templates/admin_template.html.erb +52 -0
- data/lib/generators/noodall/node/templates/factory.rb +8 -0
- data/lib/generators/noodall/node/templates/model.rb +13 -0
- data/lib/generators/noodall/node/templates/template.html.erb +12 -0
- data/lib/noodall/canable.rb +1 -0
- data/lib/noodall/dragonfly.rb +23 -0
- data/lib/noodall/engine.rb +13 -0
- data/lib/noodall/permalinks.rb +12 -0
- data/lib/noodall/routes.rb +45 -0
- data/lib/noodall/ui/version.rb +5 -0
- data/lib/noodall/ui.rb +17 -0
- data/lib/noodall/video_thumbnail_encoder.rb +31 -0
- data/lib/noodall-ui.rb +6 -0
- data/lib/tasks/cucumber.rake +53 -0
- data/log/.gitignore +0 -0
- data/noodall-ui.gemspec +28 -0
- data/public/favicon.ico +0 -0
- data/public/images/admin/add-small.png +0 -0
- data/public/images/admin/add.png +0 -0
- data/public/images/admin/add_file.gif +0 -0
- data/public/images/admin/advanced.gif +0 -0
- data/public/images/admin/back.png +0 -0
- data/public/images/admin/cancel-small.gif +0 -0
- data/public/images/admin/cancel.gif +0 -0
- data/public/images/admin/change-bg.gif +0 -0
- data/public/images/admin/change.gif +0 -0
- data/public/images/admin/check.png +0 -0
- data/public/images/admin/clear.gif +0 -0
- data/public/images/admin/close.png +0 -0
- data/public/images/admin/create.gif +0 -0
- data/public/images/admin/delete.gif +0 -0
- data/public/images/admin/delete.png +0 -0
- data/public/images/admin/doc-icon.png +0 -0
- data/public/images/admin/document.png +0 -0
- data/public/images/admin/down.png +0 -0
- data/public/images/admin/download.png +0 -0
- data/public/images/admin/draft.gif +0 -0
- data/public/images/admin/draft.png +0 -0
- data/public/images/admin/edit.gif +0 -0
- data/public/images/admin/edit.png +0 -0
- data/public/images/admin/image.png +0 -0
- data/public/images/admin/image_small.png +0 -0
- data/public/images/admin/info-white.png +0 -0
- data/public/images/admin/info.png +0 -0
- data/public/images/admin/media.gif +0 -0
- data/public/images/admin/nav-2.gif +0 -0
- data/public/images/admin/nav.gif +0 -0
- data/public/images/admin/next.png +0 -0
- data/public/images/admin/no-type-icon.png +0 -0
- data/public/images/admin/pagination.gif +0 -0
- data/public/images/admin/pdf-icon.png +0 -0
- data/public/images/admin/prev.png +0 -0
- data/public/images/admin/preview.gif +0 -0
- data/public/images/admin/publish.gif +0 -0
- data/public/images/admin/remove.gif +0 -0
- data/public/images/admin/reset.gif +0 -0
- data/public/images/admin/select_image.gif +0 -0
- data/public/images/admin/select_images.gif +0 -0
- data/public/images/admin/set.gif +0 -0
- data/public/images/admin/sort.png +0 -0
- data/public/images/admin/tag.png +0 -0
- data/public/images/admin/templates/article-page.gif +0 -0
- data/public/images/admin/templates/articles-list.gif +0 -0
- data/public/images/admin/templates/course-page.gif +0 -0
- data/public/images/admin/templates/event-page.gif +0 -0
- data/public/images/admin/templates/events-list.gif +0 -0
- data/public/images/admin/templates/home.gif +0 -0
- data/public/images/admin/templates/landing-page.gif +0 -0
- data/public/images/admin/templates/page-a.gif +0 -0
- data/public/images/admin/templates/page-b.gif +0 -0
- data/public/images/admin/templates/school-landing-page.gif +0 -0
- data/public/images/admin/templates/study-landing-page.gif +0 -0
- data/public/images/admin/top-level.png +0 -0
- data/public/images/admin/top-level_small.png +0 -0
- data/public/images/admin/txt-icon.png +0 -0
- data/public/images/admin/uncheck.png +0 -0
- data/public/images/admin/up.png +0 -0
- data/public/images/admin/update.gif +0 -0
- data/public/images/admin/upload.png +0 -0
- data/public/images/admin/video.png +0 -0
- data/public/images/admin/view.png +0 -0
- data/public/images/admin/xls-icon.png +0 -0
- data/public/images/fancybox/blank.gif +0 -0
- data/public/images/fancybox/fancy_close.png +0 -0
- data/public/images/fancybox/fancy_loading.png +0 -0
- data/public/images/fancybox/fancy_nav_left.png +0 -0
- data/public/images/fancybox/fancy_nav_right.png +0 -0
- data/public/images/fancybox/fancy_shadow_e.png +0 -0
- data/public/images/fancybox/fancy_shadow_n.png +0 -0
- data/public/images/fancybox/fancy_shadow_ne.png +0 -0
- data/public/images/fancybox/fancy_shadow_nw.png +0 -0
- data/public/images/fancybox/fancy_shadow_s.png +0 -0
- data/public/images/fancybox/fancy_shadow_se.png +0 -0
- data/public/images/fancybox/fancy_shadow_sw.png +0 -0
- data/public/images/fancybox/fancy_shadow_w.png +0 -0
- data/public/images/fancybox/fancy_title_left.png +0 -0
- data/public/images/fancybox/fancy_title_main.png +0 -0
- data/public/images/fancybox/fancy_title_over.png +0 -0
- data/public/images/fancybox/fancy_title_right.png +0 -0
- data/public/images/fancybox/fancybox-x.png +0 -0
- data/public/images/fancybox/fancybox-y.png +0 -0
- data/public/images/fancybox/fancybox.png +0 -0
- data/public/images/plupload/backgrounds.gif +0 -0
- data/public/images/plupload/buttons-disabled.png +0 -0
- data/public/images/plupload/buttons.png +0 -0
- data/public/images/plupload/delete.gif +0 -0
- data/public/images/plupload/done.gif +0 -0
- data/public/images/plupload/error.gif +0 -0
- data/public/images/plupload/throbber.gif +0 -0
- data/public/images/plupload/transp50.png +0 -0
- data/public/javascripts/admin/application.js +586 -0
- data/public/javascripts/admin/asset_edit.js +30 -0
- data/public/javascripts/admin/assets.js +98 -0
- data/public/javascripts/admin/gotham.font.js +20 -0
- data/public/javascripts/admin/jquery.jqtransform.js +366 -0
- data/public/javascripts/admin/nodes.js +30 -0
- data/public/javascripts/admin/tiny_mce_config.js +118 -0
- data/public/javascripts/ajaxify.js +20 -0
- data/public/javascripts/application.js +37 -0
- data/public/javascripts/carousel.lite.js +1 -0
- data/public/javascripts/cufon-yui.js +8 -0
- data/public/javascripts/fancybox.js +1078 -0
- data/public/javascripts/plupload/gears_init.js +86 -0
- data/public/javascripts/plupload/jquery.plupload.queue.min.js +1 -0
- data/public/javascripts/plupload/plupload.flash.swf +0 -0
- data/public/javascripts/plupload/plupload.full.min.js +1 -0
- data/public/javascripts/plupload/plupload.silverlight.xap +0 -0
- data/public/javascripts/rails.js +132 -0
- data/public/javascripts/tiny_mce/jquery.tinymce.js +1 -0
- data/public/javascripts/tiny_mce/langs/en.js +169 -0
- data/public/javascripts/tiny_mce/license.txt +504 -0
- data/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- data/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
- data/public/javascripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
- data/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +5 -0
- data/public/javascripts/tiny_mce/plugins/advhr/rule.htm +57 -0
- data/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
- data/public/javascripts/tiny_mce/plugins/advimage/image.htm +232 -0
- data/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/advimage/js/image.js +443 -0
- data/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +43 -0
- data/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
- data/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js +528 -0
- data/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +52 -0
- data/public/javascripts/tiny_mce/plugins/advlink/link.htm +333 -0
- data/public/javascripts/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advlist/editor_plugin_src.js +154 -0
- data/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +117 -0
- data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +422 -0
- data/public/javascripts/tiny_mce/plugins/autosave/langs/en.js +4 -0
- data/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
- data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +127 -0
- data/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
- data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
- data/public/javascripts/tiny_mce/plugins/emotions/emotions.htm +40 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
- data/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
- data/public/javascripts/tiny_mce/plugins/example/dialog.htm +22 -0
- data/public/javascripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
- data/public/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/example/js/dialog.js +19 -0
- data/public/javascripts/tiny_mce/plugins/example/langs/en.js +3 -0
- data/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +182 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +149 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +571 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +471 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
- data/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +148 -0
- data/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
- data/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +635 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- data/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +212 -0
- data/public/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +136 -0
- data/public/javascripts/tiny_mce/plugins/media/css/content.css +6 -0
- data/public/javascripts/tiny_mce/plugins/media/css/media.css +16 -0
- data/public/javascripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +414 -0
- data/public/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/js/embed.js +73 -0
- data/public/javascripts/tiny_mce/plugins/media/js/media.js +630 -0
- data/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
- data/public/javascripts/tiny_mce/plugins/media/media.htm +817 -0
- data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
- data/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +90 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css +1 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +77 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +929 -0
- data/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/public/javascripts/tiny_mce/plugins/paste/pastetext.htm +27 -0
- data/public/javascripts/tiny_mce/plugins/paste/pasteword.htm +21 -0
- data/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
- data/public/javascripts/tiny_mce/plugins/preview/example.html +28 -0
- data/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- data/public/javascripts/tiny_mce/plugins/preview/preview.html +17 -0
- data/public/javascripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
- data/public/javascripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +57 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +130 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +99 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +341 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/style/css/props.css +13 -0
- data/public/javascripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
- data/public/javascripts/tiny_mce/plugins/style/js/props.js +641 -0
- data/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +63 -0
- data/public/javascripts/tiny_mce/plugins/style/props.htm +726 -0
- data/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +112 -0
- data/public/javascripts/tiny_mce/plugins/table/cell.htm +178 -0
- data/public/javascripts/tiny_mce/plugins/table/css/cell.css +17 -0
- data/public/javascripts/tiny_mce/plugins/table/css/row.css +25 -0
- data/public/javascripts/tiny_mce/plugins/table/css/table.css +13 -0
- data/public/javascripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +1118 -0
- data/public/javascripts/tiny_mce/plugins/table/js/cell.js +286 -0
- data/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- data/public/javascripts/tiny_mce/plugins/table/js/row.js +237 -0
- data/public/javascripts/tiny_mce/plugins/table/js/table.js +449 -0
- data/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
- data/public/javascripts/tiny_mce/plugins/table/merge_cells.htm +32 -0
- data/public/javascripts/tiny_mce/plugins/table/row.htm +155 -0
- data/public/javascripts/tiny_mce/plugins/table/table.htm +187 -0
- data/public/javascripts/tiny_mce/plugins/template/blank.htm +12 -0
- data/public/javascripts/tiny_mce/plugins/template/css/template.css +23 -0
- data/public/javascripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/public/javascripts/tiny_mce/plugins/template/js/template.js +106 -0
- data/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
- data/public/javascripts/tiny_mce/plugins/template/template.htm +32 -0
- data/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +76 -0
- data/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +98 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +141 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +141 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +148 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +141 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +161 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +144 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +161 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +126 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +63 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +231 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +62 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
- data/public/javascripts/tiny_mce/themes/advanced/about.htm +54 -0
- data/public/javascripts/tiny_mce/themes/advanced/anchor.htm +26 -0
- data/public/javascripts/tiny_mce/themes/advanced/charmap.htm +53 -0
- data/public/javascripts/tiny_mce/themes/advanced/color_picker.htm +73 -0
- data/public/javascripts/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/public/javascripts/tiny_mce/themes/advanced/editor_template_src.js +1167 -0
- data/public/javascripts/tiny_mce/themes/advanced/image.htm +80 -0
- data/public/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/about.js +72 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/anchor.js +37 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/charmap.js +335 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/color_picker.js +253 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/image.js +245 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/link.js +156 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/source_editor.js +62 -0
- data/public/javascripts/tiny_mce/themes/advanced/langs/en.js +62 -0
- data/public/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
- data/public/javascripts/tiny_mce/themes/advanced/link.htm +58 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/content.css +35 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +213 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +35 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +116 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +215 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/public/javascripts/tiny_mce/themes/advanced/source_editor.htm +26 -0
- data/public/javascripts/tiny_mce/themes/simple/editor_template.js +1 -0
- data/public/javascripts/tiny_mce/themes/simple/editor_template_src.js +85 -0
- data/public/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/public/javascripts/tiny_mce/themes/simple/langs/en.js +11 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
- data/public/javascripts/tiny_mce/tiny_mce.js +1 -0
- data/public/javascripts/tiny_mce/tiny_mce_popup.js +5 -0
- data/public/javascripts/tiny_mce/tiny_mce_src.js +13134 -0
- data/public/javascripts/tiny_mce/utils/editable_selects.js +70 -0
- data/public/javascripts/tiny_mce/utils/form_utils.js +200 -0
- data/public/javascripts/tiny_mce/utils/mctabs.js +77 -0
- data/public/javascripts/tiny_mce/utils/validate.js +220 -0
- data/public/stylesheets/admin/fancybox.css +341 -0
- data/public/stylesheets/admin/forms.css +520 -0
- data/public/stylesheets/admin/handheld.css +6 -0
- data/public/stylesheets/admin/ie.css +118 -0
- data/public/stylesheets/admin/ie6.css +23 -0
- data/public/stylesheets/admin/ie8.css +16 -0
- data/public/stylesheets/admin/layout.css +723 -0
- data/public/stylesheets/admin/print.css +27 -0
- data/public/stylesheets/admin/reset.css +81 -0
- data/public/stylesheets/admin/skin.css +698 -0
- data/public/stylesheets/admin/tinymce.css +2 -0
- data/public/stylesheets/admin/typography.css +207 -0
- data/public/stylesheets/ellipsis.xml +15 -0
- data/public/stylesheets/fancybox.css +313 -0
- data/public/stylesheets/forms.css +7 -0
- data/public/stylesheets/ie.css +12 -0
- data/public/stylesheets/ie8.css +8 -0
- data/public/stylesheets/layout.css +31 -0
- data/public/stylesheets/plupload.queue.css +181 -0
- data/public/stylesheets/reset.css +84 -0
- data/public/stylesheets/sass/forms.scss +7 -0
- data/public/stylesheets/sass/ie.scss +12 -0
- data/public/stylesheets/sass/ie8.scss +8 -0
- data/public/stylesheets/sass/layout.scss +45 -0
- data/public/stylesheets/sass/skin.scss +35 -0
- data/public/stylesheets/sass/typography.scss +162 -0
- data/public/stylesheets/skin.css +22 -0
- data/public/stylesheets/typography.css +162 -0
- data/script/cucumber +10 -0
- data/script/rails +6 -0
- data/spec/factories/asset.rb +16 -0
- data/spec/factories/component.rb +9 -0
- data/spec/factories/node.rb +15 -0
- data/spec/factories/user.rb +5 -0
- data/spec/files/beef.png +0 -0
- data/spec/files/get_video.flv +0 -0
- data/spec/files/test.pdf +0 -0
- data/spec/noodall-ui_spec.rb +9 -0
- data/spec/spec_helper.rb +4 -0
- data/tmp/.gitignore +0 -0
- metadata +685 -0
@@ -0,0 +1,86 @@
|
|
1
|
+
// Copyright 2007, Google Inc.
|
2
|
+
//
|
3
|
+
// Redistribution and use in source and binary forms, with or without
|
4
|
+
// modification, are permitted provided that the following conditions are met:
|
5
|
+
//
|
6
|
+
// 1. Redistributions of source code must retain the above copyright notice,
|
7
|
+
// this list of conditions and the following disclaimer.
|
8
|
+
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
9
|
+
// this list of conditions and the following disclaimer in the documentation
|
10
|
+
// and/or other materials provided with the distribution.
|
11
|
+
// 3. Neither the name of Google Inc. nor the names of its contributors may be
|
12
|
+
// used to endorse or promote products derived from this software without
|
13
|
+
// specific prior written permission.
|
14
|
+
//
|
15
|
+
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
16
|
+
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
17
|
+
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
18
|
+
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
19
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
20
|
+
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
21
|
+
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
22
|
+
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
23
|
+
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
24
|
+
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
25
|
+
//
|
26
|
+
// Sets up google.gears.*, which is *the only* supported way to access Gears.
|
27
|
+
//
|
28
|
+
// Circumvent this file at your own risk!
|
29
|
+
//
|
30
|
+
// In the future, Gears may automatically define google.gears.* without this
|
31
|
+
// file. Gears may use these objects to transparently fix bugs and compatibility
|
32
|
+
// issues. Applications that use the code below will continue to work seamlessly
|
33
|
+
// when that happens.
|
34
|
+
|
35
|
+
(function() {
|
36
|
+
// We are already defined. Hooray!
|
37
|
+
if (window.google && google.gears) {
|
38
|
+
return;
|
39
|
+
}
|
40
|
+
|
41
|
+
var factory = null;
|
42
|
+
|
43
|
+
// Firefox
|
44
|
+
if (typeof GearsFactory != 'undefined') {
|
45
|
+
factory = new GearsFactory();
|
46
|
+
} else {
|
47
|
+
// IE
|
48
|
+
try {
|
49
|
+
factory = new ActiveXObject('Gears.Factory');
|
50
|
+
// privateSetGlobalObject is only required and supported on WinCE.
|
51
|
+
if (factory.getBuildInfo().indexOf('ie_mobile') != -1) {
|
52
|
+
factory.privateSetGlobalObject(this);
|
53
|
+
}
|
54
|
+
} catch (e) {
|
55
|
+
// Safari
|
56
|
+
if ((typeof navigator.mimeTypes != 'undefined')
|
57
|
+
&& navigator.mimeTypes["application/x-googlegears"]) {
|
58
|
+
factory = document.createElement("object");
|
59
|
+
factory.style.display = "none";
|
60
|
+
factory.width = 0;
|
61
|
+
factory.height = 0;
|
62
|
+
factory.type = "application/x-googlegears";
|
63
|
+
document.documentElement.appendChild(factory);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
// *Do not* define any objects if Gears is not installed. This mimics the
|
69
|
+
// behavior of Gears defining the objects in the future.
|
70
|
+
if (!factory) {
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
|
74
|
+
// Now set up the objects, being careful not to overwrite anything.
|
75
|
+
//
|
76
|
+
// Note: In Internet Explorer for Windows Mobile, you can't add properties to
|
77
|
+
// the window object. However, global objects are automatically added as
|
78
|
+
// properties of the window object in all browsers.
|
79
|
+
if (!window.google) {
|
80
|
+
google = {};
|
81
|
+
}
|
82
|
+
|
83
|
+
if (!google.gears) {
|
84
|
+
google.gears = {factory: factory};
|
85
|
+
}
|
86
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(c){var d={};function a(e){return plupload.translate(e)||e}function b(f,e){e.contents().each(function(g,h){h=c(h);if(!h.is(".plupload")){h.remove()}});e.prepend('<div class="plupload_wrapper plupload_scroll"><div id="'+f+'_container" class="plupload_container"><div class="plupload"><div class="plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">'+a("Select files")+'</div><div class="plupload_header_text">'+a("Add files to the upload queue and click the start button.")+'</div></div></div><div class="plupload_content"><div class="plupload_filelist_header"><div class="plupload_file_name">'+a("Filename")+'</div><div class="plupload_file_action"> </div><div class="plupload_file_status"><span>'+a("Status")+'</span></div><div class="plupload_file_size">'+a("Size")+'</div><div class="plupload_clearer"> </div></div><ul id="'+f+'_filelist" class="plupload_filelist"></ul><div class="plupload_filelist_footer"><div class="plupload_file_name"><div class="plupload_buttons"><a href="#" class="plupload_button plupload_add">'+a("Add files")+'</a><a href="#" class="plupload_button plupload_start">'+a("Start upload")+'</a></div><span class="plupload_upload_status"></span></div><div class="plupload_file_action"></div><div class="plupload_file_status"><span class="plupload_total_status">0%</span></div><div class="plupload_file_size"><span class="plupload_total_file_size">0 b</span></div><div class="plupload_progress"><div class="plupload_progress_container"><div class="plupload_progress_bar"></div></div></div><div class="plupload_clearer"> </div></div></div></div></div><input type="hidden" id="'+f+'_count" name="'+f+'_count" value="0" /></div>')}c.fn.pluploadQueue=function(e){if(e){this.each(function(){var j,i,k;i=c(this);k=i.attr("id");if(!k){k=plupload.guid();i.attr("id",k)}j=new plupload.Uploader(c.extend({dragdrop:true,container:k},e));if(e.preinit){e.preinit(j)}d[k]=j;function h(l){var m;if(l.status==plupload.DONE){m="plupload_done"}if(l.status==plupload.FAILED){m="plupload_failed"}if(l.status==plupload.QUEUED){m="plupload_delete"}if(l.status==plupload.UPLOADING){m="plupload_uploading"}c("#"+l.id).attr("class",m).find("a").css("display","block")}function f(){c("span.plupload_total_status",i).html(j.total.percent+"%");c("div.plupload_progress_bar",i).css("width",j.total.percent+"%");c("span.plupload_upload_status",i).text("Uploaded "+j.total.uploaded+"/"+j.files.length+" files");if(j.total.uploaded==j.files.length){j.stop()}}function g(){var m=c("ul.plupload_filelist",i).html(""),n=0,l;c.each(j.files,function(p,o){l="";if(o.status==plupload.DONE){if(o.target_name){l+='<input type="hidden" name="'+k+"_"+n+'_tmpname" value="'+plupload.xmlEncode(o.target_name)+'" />'}l+='<input type="hidden" name="'+k+"_"+n+'_name" value="'+plupload.xmlEncode(o.name)+'" />';l+='<input type="hidden" name="'+k+"_"+n+'_status" value="'+(o.status==plupload.DONE?"done":"failed")+'" />';n++;c("#"+k+"_count").val(n)}m.append('<li id="'+o.id+'"><div class="plupload_file_name"><span>'+o.name+'</span></div><div class="plupload_file_action"><a href="#"></a></div><div class="plupload_file_status">'+o.percent+'%</div><div class="plupload_file_size">'+plupload.formatSize(o.size)+'</div><div class="plupload_clearer"> </div>'+l+"</li>");h(o);c("#"+o.id+".plupload_delete a").click(function(q){c("#"+o.id).remove();j.removeFile(o);q.preventDefault()})});c("span.plupload_total_file_size",i).html(plupload.formatSize(j.total.size));if(j.total.queued===0){c("span.plupload_add_text",i).text(a("Add files."))}else{c("span.plupload_add_text",i).text(j.total.queued+" files queued.")}c("a.plupload_start",i).toggleClass("plupload_disabled",j.files.length===0);m[0].scrollTop=m[0].scrollHeight;f();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){c("#"+k+"_filelist").append('<li class="plupload_droptext">'+a("Drag files here.")+"</li>")}}j.bind("UploadFile",function(l,m){c("#"+m.id).addClass("plupload_current_file")});j.bind("Init",function(l,m){b(k,i);if(!e.unique_names&&e.rename){c("#"+k+"_filelist div.plupload_file_name span",i).live("click",function(s){var q=c(s.target),o,r,n,p="";o=l.getFile(q.parents("li")[0].id);n=o.name;r=/^(.+)(\.[^.]+)$/.exec(n);if(r){n=r[1];p=r[2]}q.hide().after('<input type="text" />');q.next().val(n).focus().blur(function(){q.show().next().remove()}).keydown(function(u){var t=c(this);if(u.keyCode==13){u.preventDefault();o.name=t.val()+p;q.text(o.name);t.blur()}})})}c("a.plupload_add",i).attr("id",k+"_browse");l.settings.browse_button=k+"_browse";if(l.features.dragdrop&&l.settings.dragdrop){l.settings.drop_element=k+"_filelist";c("#"+k+"_filelist").append('<li class="plupload_droptext">'+a("Drag files here.")+"</li>")}c("#"+k+"_container").attr("title","Using runtime: "+m.runtime);c("a.plupload_start",i).click(function(n){if(!c(this).hasClass("plupload_disabled")){j.start()}n.preventDefault()});c("a.plupload_stop",i).click(function(n){j.stop();n.preventDefault()});c("a.plupload_start",i).addClass("plupload_disabled")});j.init();if(e.setup){e.setup(j)}j.bind("Error",function(l,o){var m=o.file,n;if(m){n=o.message;if(o.details){n+=" ("+o.details+")"}c("#"+m.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",n)}});j.bind("StateChanged",function(){if(j.state===plupload.STARTED){c("li.plupload_delete a,div.plupload_buttons",i).hide();c("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",i).css("display","block");c("span.plupload_upload_status",i).text("Uploaded 0/"+j.files.length+" files")}else{c("a.plupload_stop,div.plupload_progress",i).hide();c("a.plupload_delete",i).css("display","block")}});j.bind("QueueChanged",g);j.bind("StateChanged",function(l){if(l.state==plupload.STOPPED){g()}});j.bind("FileUploaded",function(l,m){h(m)});j.bind("UploadProgress",function(l,m){c("#"+m.id+" div.plupload_file_status",i).html(m.percent+"%");h(m);f()})});return this}else{return d[c(this[0]).attr("id")]}}})(jQuery);
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var c=0,h=[],j={},f={},a={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},i=/[<>&\"\']/g,b;function e(){this.returnValue=false}function g(){this.cancelBubble=true}(function(k){var l=k.split(/,/),m,o,n;for(m=0;m<l.length;m+=2){n=l[m+1].split(/ /);for(o=0;o<n.length;o++){f[n[o]]=l[m]}}})("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats,docx pptx xlsx,audio/mpeg,mpga mpega mp2 mp3,audio/x-wav,wav,image/bmp,bmp,image/gif,gif,image/jpeg,jpeg jpg jpe,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/html,htm html xhtml,text/rtf,rtf,video/mpeg,mpeg mpg mpe,video/quicktime,qt mov,video/x-flv,flv,video/vnd.rn-realvideo,rv,text/plain,asc txt text diff log,application/octet-stream,exe");var d={STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-700,mimeTypes:f,extend:function(k){d.each(arguments,function(l,m){if(m>0){d.each(l,function(o,n){k[n]=o})}});return k},cleanName:function(k){var l,m;m=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(l=0;l<m.length;l+=2){k=k.replace(m[l],m[l+1])}k=k.replace(/\s+/g,"_");k=k.replace(/[^a-z0-9_\-\.]+/gi,"");return k},addRuntime:function(k,l){l.name=k;h[k]=l;h.push(l);return l},guid:function(){var k=new Date().getTime().toString(32),l;for(l=0;l<5;l++){k+=Math.floor(Math.random()*65535).toString(32)}return(d.guidPrefix||"p")+k+(c++).toString(32)},buildUrl:function(l,k){var m="";d.each(k,function(o,n){m+=(m?"&":"")+encodeURIComponent(n)+"="+encodeURIComponent(o)});if(m){l+=(l.indexOf("?")>0?"&":"?")+m}return l},each:function(n,o){var m,l,k;if(n){m=n.length;if(m===b){for(l in n){if(n.hasOwnProperty(l)){if(o(n[l],l)===false){return}}}}else{for(k=0;k<m;k++){if(o(n[k],k)===false){return}}}}},formatSize:function(k){if(k===b){return d.translate("N/A")}if(k>1048576){return Math.round(k/1048576,1)+" MB"}if(k>1024){return Math.round(k/1024,1)+" KB"}return k+" b"},getPos:function(l,p){var q=0,o=0,s,r=document,m,n;l=l;p=p||r.body;function k(w){var u,v,t=0,z=0;if(w){v=w.getBoundingClientRect();u=r.compatMode==="CSS1Compat"?r.documentElement:r.body;t=v.left+u.scrollLeft;z=v.top+u.scrollTop}return{x:t,y:z}}if(l.getBoundingClientRect&&(navigator.userAgent.indexOf("MSIE")>0&&r.documentMode!==8)){m=k(l);n=k(p);return{x:m.x-n.x,y:m.y-n.y}}s=l;while(s&&s!=p&&s.nodeType){q+=s.offsetLeft||0;o+=s.offsetTop||0;s=s.offsetParent}s=l.parentNode;while(s&&s!=p&&s.nodeType){q-=s.scrollLeft||0;o-=s.scrollTop||0;s=s.parentNode}return{x:q,y:o}},getSize:function(k){return{w:k.clientWidth||k.offsetWidth,h:k.clientHeight||k.offsetHeight}},parseSize:function(k){var l;if(typeof(k)=="string"){k=/^([0-9]+)([mgk]+)$/.exec(k.toLowerCase().replace(/[^0-9mkg]/g,""));l=k[2];k=+k[1];if(l=="g"){k*=1073741824}if(l=="m"){k*=1048576}if(l=="k"){k*=1024}}return k},xmlEncode:function(k){return k?(""+k).replace(i,function(l){return a[l]?"&"+a[l]+";":l}):k},toArray:function(m){var l,k=[];for(l=0;l<m.length;l++){k[l]=m[l]}return k},addI18n:function(k){return d.extend(j,k)},translate:function(k){return j[k]||k},addEvent:function(l,k,m){if(l.attachEvent){l.attachEvent("on"+k,function(){var n=window.event;if(!n.target){n.target=n.srcElement}n.preventDefault=e;n.stopPropagation=g;m(n)})}else{if(l.addEventListener){l.addEventListener(k,m,false)}}}};d.Uploader=function(n){var l={},q,p=[],r,m;q=new d.QueueProgress();n=d.extend({chunk_size:0,max_file_size:"1gb",multi_selection:true,file_data_name:"file",filters:[]},n);function o(){var s;if(this.state==d.STARTED&&r<p.length){s=p[r++];if(s.status==d.QUEUED){this.trigger("UploadFile",s)}else{o.call(this)}}else{this.stop()}}function k(){var t,s;q.reset();for(t=0;t<p.length;t++){s=p[t];if(s.size!==b){q.size+=s.size;q.loaded+=s.loaded}else{q.size=b}if(s.status==d.DONE){q.uploaded++}else{if(s.status==d.FAILED){q.failed++}else{q.queued++}}}if(q.size===b){q.percent=p.length>0?Math.ceil(q.uploaded/p.length*100):0}else{q.bytesPerSec=Math.ceil(q.loaded/((+new Date()-m||1)/1000));q.percent=q.size>0?Math.ceil(q.loaded/q.size*100):0}}d.extend(this,{state:d.STOPPED,features:{},files:p,settings:n,total:q,id:d.guid(),init:function(){var x=this,y,u,t,w=0,v;n.page_url=n.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(n.url)){n.url=n.page_url+n.url}n.chunk_size=d.parseSize(n.chunk_size);n.max_file_size=d.parseSize(n.max_file_size);x.bind("FilesAdded",function(z,C){var B,A,F=0,E,D=n.filters;if(D&&D.length){E={};d.each(D,function(G){d.each(G.extensions.split(/,/),function(H){E[H.toLowerCase()]=true})})}for(B=0;B<C.length;B++){A=C[B];A.loaded=0;A.percent=0;A.status=d.QUEUED;if(E&&!E[A.name.toLowerCase().split(".").slice(-1)]){z.trigger("Error",{code:d.FILE_EXTENSION_ERROR,message:"File extension error.",file:A});continue}if(A.size!==b&&A.size>n.max_file_size){z.trigger("Error",{code:d.FILE_SIZE_ERROR,message:"File size error.",file:A});continue}p.push(A);F++}if(F){x.trigger("QueueChanged");x.refresh()}});if(n.unique_names){x.bind("UploadFile",function(z,A){A.target_name=A.id+".tmp"})}x.bind("UploadProgress",function(z,A){if(A.status==d.QUEUED){A.status=d.UPLOADING}A.percent=A.size>0?Math.ceil(A.loaded/A.size*100):100;k()});x.bind("StateChanged",function(z){if(z.state==d.STARTED){m=(+new Date())}});x.bind("QueueChanged",k);x.bind("Error",function(z,A){if(A.file){A.file.status=d.FAILED;k();window.setTimeout(function(){o.call(x)})}});x.bind("FileUploaded",function(z,A){A.status=d.DONE;z.trigger("UploadProgress",A);o.call(x)});if(n.runtimes){u=[];v=n.runtimes.split(/\s?,\s?/);for(y=0;y<v.length;y++){if(h[v[y]]){u.push(h[v[y]])}}}else{u=h}function s(){var C=u[w++],B,z,A;if(C){B=C.getFeatures();z=x.settings.required_features;if(z){z=z.split(",");for(A=0;A<z.length;A++){if(!B[z[A]]){s();return}}}C.init(x,function(D){if(D&&D.success){x.features=B;x.trigger("Init",{runtime:C.name});x.trigger("PostInit");x.refresh()}else{s()}})}else{x.trigger("Error",{code:d.INIT_ERROR,message:"Init error."})}}s()},refresh:function(){this.trigger("Refresh")},start:function(){if(this.state!=d.STARTED){r=0;this.state=d.STARTED;this.trigger("StateChanged");o.call(this)}},stop:function(){if(this.state!=d.STOPPED){this.state=d.STOPPED;this.trigger("StateChanged")}},getFile:function(t){var s;for(s=p.length-1;s>=0;s--){if(p[s].id===t){return p[s]}}},removeFile:function(t){var s;for(s=p.length-1;s>=0;s--){if(p[s].id===t.id){return this.splice(s,1)[0]}}},splice:function(u,s){var t;t=p.splice(u,s);this.trigger("FilesRemoved",t);this.trigger("QueueChanged");return t},trigger:function(t){var v=l[t.toLowerCase()],u,s;if(v){s=Array.prototype.slice.call(arguments);s[0]=this;for(u=0;u<v.length;u++){if(v[u].func.apply(v[u].scope,s)===false){return false}}}return true},bind:function(s,u,t){var v;s=s.toLowerCase();v=l[s]||[];v.push({func:u,scope:t||this});l[s]=v},unbind:function(s,u){var v=l[s.toLowerCase()],t;if(v){for(t=v.length-1;t>=0;t--){if(v[t].func===u){v.splice(t,1)}}}}})};d.File=function(n,l,m){var k=this;k.id=n;k.name=l;k.size=m;k.loaded=0;k.percent=0;k.status=0};d.Runtime=function(){this.getFeatures=function(){};this.init=function(k,l){}};d.QueueProgress=function(){var k=this;k.size=0;k.loaded=0;k.uploaded=0;k.failed=0;k.queued=0;k.percent=0;k.bytesPerSec=0;k.reset=function(){k.size=k.loaded=k.uploaded=k.failed=k.queued=k.percent=k.bytesPerSec=0}};d.runtimes={};window.plupload=d})();(function(b){var c={};function a(i,e,k,j,d){var l,g,f,h;g=google.gears.factory.create("beta.canvas");g.decode(i);h=Math.min(e/g.width,k/g.height);if(h<1){e=Math.round(g.width*h);k=Math.round(g.height*h)}else{e=g.width;k=g.height}g.resize(e,k);return g.encode(d,{quality:j/100})}b.runtimes.Gears=b.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,i){var h;if(!window.google||!google.gears){return i({success:false})}try{h=google.gears.factory.create("beta.desktop")}catch(f){return i({success:false})}function d(k){var j,e,l=[],m;for(e=0;e<k.length;e++){j=k[e];m=b.guid();c[m]=j.blob;l.push(new b.File(m,j.name,j.blob.length))}g.trigger("FilesAdded",l)}g.bind("PostInit",function(){var j=g.settings,e=document.getElementById(j.drop_element);if(e){b.addEvent(e,"dragover",function(k){h.setDropEffect(k,"copy");k.preventDefault()});b.addEvent(e,"drop",function(l){var k=h.getDragData(l,"application/x-gears-files");if(k){d(k.files)}l.preventDefault()});e=0}b.addEvent(document.getElementById(j.browse_button),"click",function(o){var n=[],l,k,m;o.preventDefault();for(l=0;l<j.filters.length;l++){m=j.filters[l].extensions.split(",");for(k=0;k<m.length;k++){n.push("."+m[k])}}h.openFiles(d,{singleFile:!j.multi_selection,filter:n})})});g.bind("UploadFile",function(o,l){var q=0,p,m,n=0,k=o.settings.resize,e;m=o.settings.chunk_size;e=m>0;p=Math.ceil(l.size/m);if(!e){m=l.size;p=1}if(k&&/\.(png|jpg|jpeg)$/i.test(l.name)){c[l.id]=a(c[l.id],k.width,k.height,k.quality||90,/\.png$/i.test(l.name)?"image/png":"image/jpeg")}l.size=c[l.id].length;function j(){var u,w,s=o.settings.multipart,r=0,v={name:l.target_name||l.name};function t(y){var x,C="----pluploadboundary"+b.guid(),A="--",B="\r\n",z;if(s){u.setRequestHeader("Content-Type","multipart/form-data; boundary="+C);x=google.gears.factory.create("beta.blobbuilder");b.each(o.settings.multipart_params,function(E,D){x.append(A+C+B+'Content-Disposition: form-data; name="'+D+'"'+B+B);x.append(E+B)});x.append(A+C+B+'Content-Disposition: form-data; name="'+o.settings.file_data_name+'"; filename="'+l.name+'"'+B+"Content-Type: application/octet-stream"+B+B);x.append(y);x.append(B+A+C+A+B);z=x.getAsBlob();r=z.length-y.length;y=z}u.send(y)}if(l.status==b.DONE||l.status==b.FAILED||o.state==b.STOPPED){return}if(e){v.chunk=q;v.chunks=p}w=Math.min(m,l.size-(q*m));u=google.gears.factory.create("beta.httprequest");u.open("POST",b.buildUrl(o.settings.url,v));if(!s){u.setRequestHeader("Content-Disposition",'attachment; filename="'+l.name+'"');u.setRequestHeader("Content-Type","application/octet-stream")}b.each(o.settings.headers,function(y,x){u.setRequestHeader(x,y)});u.upload.onprogress=function(x){l.loaded=n+x.loaded-r;o.trigger("UploadProgress",l)};u.onreadystatechange=function(){var x;if(u.readyState==4){if(u.status==200){x={chunk:q,chunks:p,response:u.responseText,status:u.status};o.trigger("ChunkUploaded",l,x);if(x.cancelled){l.status=b.FAILED;return}n+=w;if(++q>=p){l.status=b.DONE;o.trigger("FileUploaded",l,{response:u.responseText,status:u.status})}else{j()}}else{o.trigger("Error",{code:b.HTTP_ERROR,message:"HTTP Error.",file:l,chunk:q,chunks:p,status:u.status})}}};if(q<p){t(c[l.id].slice(q*m,w))}}j()});i({success:true})}})})(plupload);(function(c){var a={};function b(l){var k,j=typeof l,h,e,g,f;if(j==="string"){k="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+l.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(n,m){var i=k.indexOf(m);if(i+1){return"\\"+k.charAt(i+1)}n=m.charCodeAt().toString(16);return"\\u"+"0000".substring(n.length)+n})+'"'}if(j=="object"){e=l.length!==h;k="";if(e){for(g=0;g<l.length;g++){if(k){k+=","}k+=b(l[g])}k="["+k+"]"}else{for(f in l){if(l.hasOwnProperty(f)){if(k){k+=","}k+=b(f)+":"+b(l[f])}}k="{"+k+"}"}return k}if(l===h){return"null"}return""+l}function d(o){var r=false,f=null,k=null,g,h,i,q,j,m=0;try{try{k=new ActiveXObject("AgControl.AgControl");if(k.IsVersionSupported(o)){r=true}k=null}catch(n){var l=navigator.plugins["Silverlight Plug-In"];if(l){g=l.description;if(g==="1.0.30226.2"){g="2.0.30226.2"}h=g.split(".");while(h.length>3){h.pop()}while(h.length<4){h.push(0)}i=o.split(".");while(i.length>4){i.pop()}do{q=parseInt(i[m],10);j=parseInt(h[m],10);m++}while(m<i.length&&q===j);if(q<=j&&!isNaN(q)){r=true}}}}catch(p){r=false}return r}c.silverlight={trigger:function(j,f){var h=a[j],g,e;if(h){e=c.toArray(arguments).slice(1);e[0]="Silverlight:"+f;setTimeout(function(){h.trigger.apply(h,e)},0)}}};c.runtimes.Silverlight=c.addRuntime("silverlight",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(l,m){var k,h="",j=l.settings.filters,g,f=document.body;if(!d("2.0.31005.0")||(window.opera&&window.opera.buildNumber)){m({success:false});return}a[l.id]=l;k=document.createElement("div");k.id=l.id+"_silverlight_container";c.extend(k.style,{position:"absolute",top:"0px",background:l.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100px",height:"100px",overflow:"hidden",opacity:l.settings.shim_bgcolor?"":0.01});k.className="plupload silverlight";if(l.settings.container){f=document.getElementById(l.settings.container);f.style.position="relative"}f.appendChild(k);for(g=0;g<j.length;g++){h+=(h!=""?"|":"")+j[g].title+" | *."+j[g].extensions.replace(/,/g,";*.")}k.innerHTML='<object id="'+l.id+'_silverlight" data="data:application/x-silverlight," type="application/x-silverlight-2" style="outline:none;" width="1024" height="1024"><param name="source" value="'+l.settings.silverlight_xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="initParams" value="id='+l.id+",filter="+h+'"/></object>';function e(){return document.getElementById(l.id+"_silverlight").content.Upload}l.bind("Silverlight:Init",function(){var i,n={};l.bind("Silverlight:StartSelectFiles",function(o){i=[]});l.bind("Silverlight:SelectFile",function(o,r,p,q){var s;s=c.guid();n[s]=r;n[r]=s;i.push(new c.File(s,p,q))});l.bind("Silverlight:SelectSuccessful",function(){if(i.length){l.trigger("FilesAdded",i)}});l.bind("Silverlight:UploadChunkError",function(o,r,p,s,q){l.trigger("Error",{code:c.IO_ERROR,message:"IO Error.",details:q,file:o.getFile(n[r])})});l.bind("Silverlight:UploadFileProgress",function(o,s,p,r){var q=o.getFile(n[s]);if(q.status!=c.FAILED){q.size=r;q.loaded=p;o.trigger("UploadProgress",q)}});l.bind("Refresh",function(o){var p,q,r;p=document.getElementById(o.settings.browse_button);q=c.getPos(p,document.getElementById(o.settings.container));r=c.getSize(p);c.extend(document.getElementById(o.id+"_silverlight_container").style,{top:q.y+"px",left:q.x+"px",width:r.w+"px",height:r.h+"px"})});l.bind("Silverlight:UploadChunkSuccessful",function(o,r,p,u,t){var s,q=o.getFile(n[r]);s={chunk:p,chunks:u,response:t};o.trigger("ChunkUploaded",q,s);if(q.status!=c.FAILED){e().UploadNextChunk()}if(p==u-1){q.status=c.DONE;o.trigger("FileUploaded",q,{response:t})}});l.bind("Silverlight:UploadSuccessful",function(o,r,p){var q=o.getFile(n[r]);q.status=c.DONE;o.trigger("FileUploaded",q,{response:p})});l.bind("FilesRemoved",function(o,q){var p;for(p=0;p<q.length;p++){e().RemoveFile(n[q[p].id])}});l.bind("UploadFile",function(o,q){var r=o.settings,p=r.resize||{};e().UploadFile(n[q.id],c.buildUrl(o.settings.url,{name:q.target_name||q.name}),b({chunk_size:r.chunk_size,image_width:p.width,image_height:p.height,image_quality:p.quality||90,multipart:!!r.multipart,multipart_params:r.multipart_params||{},headers:r.headers}))});m({success:true})})}})})(plupload);(function(c){var a={};function b(){var d;try{d=navigator.plugins["Shockwave Flash"];d=d.description}catch(f){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(e){d="0.0"}}d=d.match(/\d+/g);return parseFloat(d[0]+"."+d[1])}c.flash={trigger:function(f,d,e){setTimeout(function(){var j=a[f],h,g;if(j){j.trigger("Flash:"+d,e)}},0)}};c.runtimes.Flash=c.addRuntime("flash",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,l){var k,f,h,e,m=0,d=document.body;if(b()<10){l({success:false});return}a[g.id]=g;k=document.getElementById(g.settings.browse_button);f=document.createElement("div");f.id=g.id+"_flash_container";c.extend(f.style,{position:"absolute",top:"0px",background:g.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"});f.className="plupload flash";if(g.settings.container){d=document.getElementById(g.settings.container);d.style.position="relative"}d.appendChild(f);h="id="+escape(g.id);f.innerHTML='<object id="'+g.id+'_flash" width="100%" height="100%" style="outline:0" type="application/x-shockwave-flash" data="'+g.settings.flash_swf_url+'"><param name="movie" value="'+g.settings.flash_swf_url+'" /><param name="flashvars" value="'+h+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>';function j(){return document.getElementById(g.id+"_flash")}function i(){if(m++>5000){l({success:false});return}if(!e){setTimeout(i,1)}}i();k=f=null;g.bind("Flash:Init",function(){var p={},o,n=g.settings.resize||{};e=true;j().setFileFilters(g.settings.filters,g.settings.multi_selection);g.bind("UploadFile",function(q,r){var s=q.settings;j().uploadFile(p[r.id],c.buildUrl(s.url,{name:r.target_name||r.name}),{chunk_size:s.chunk_size,width:n.width,height:n.height,quality:n.quality||90,multipart:s.multipart,multipart_params:s.multipart_params,file_data_name:s.file_data_name,format:/\.(jpg|jpeg)$/i.test(r.name)?"jpg":"png",headers:s.headers})});g.bind("Flash:UploadProcess",function(r,q){var s=r.getFile(p[q.id]);if(s.status!=c.FAILED){s.loaded=q.loaded;s.size=q.size;r.trigger("UploadProgress",s)}});g.bind("Flash:UploadChunkComplete",function(q,s){var t,r=q.getFile(p[s.id]);t={chunk:s.chunk,chunks:s.chunks,response:s.text};q.trigger("ChunkUploaded",r,t);if(r.status!=c.FAILED){j().uploadNextChunk()}if(s.chunk==s.chunks-1){r.status=c.DONE;q.trigger("FileUploaded",r,{response:s.text})}});g.bind("Flash:SelectFiles",function(q,t){var s,r,u=[],v;for(r=0;r<t.length;r++){s=t[r];v=c.guid();p[v]=s.id;p[s.id]=v;u.push(new c.File(v,s.name,s.size))}if(u.length){g.trigger("FilesAdded",u)}});g.bind("Flash:SecurityError",function(q,r){g.trigger("Error",{code:c.SECURITY_ERROR,message:"Security error.",details:r.message,file:g.getFile(p[r.id])})});g.bind("Flash:GenericError",function(q,r){g.trigger("Error",{code:c.GENERIC_ERROR,message:"Generic error.",details:r.message,file:g.getFile(p[r.id])})});g.bind("Flash:IOError",function(q,r){g.trigger("Error",{code:c.IO_ERROR,message:"IO error.",details:r.message,file:g.getFile(p[r.id])})});g.bind("QueueChanged",function(q){g.refresh()});g.bind("FilesRemoved",function(q,s){var r;for(r=0;r<s.length;r++){j().removeFile(p[s[r].id])}});g.bind("StateChanged",function(q){g.refresh()});g.bind("Refresh",function(q){var r,s,t;j().setFileFilters(g.settings.filters,g.settings.multi_selection);r=document.getElementById(q.settings.browse_button);s=c.getPos(r,document.getElementById(q.settings.container));t=c.getSize(r);c.extend(document.getElementById(q.id+"_flash_container").style,{top:s.y+"px",left:s.x+"px",width:t.w+"px",height:t.h+"px"})});l({success:true})})}})})(plupload);(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,i){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(n){var m,l,j=[],k,o;for(l=0;l<n.length;l++){k=n[l];o=a.guid();h[o]=k;j.push(new a.File(o,k.name,k.size))}if(l){g.trigger("FilesAdded",j)}}function b(){g.bind("PostInit",function(){var m,k=d.drop_element,o=g.id+"_droptarget",j=document.getElementById(k),l;function p(r,q){e.DragAndDrop.AddDropTarget({id:r},function(s){e.DragAndDrop.AttachCallbacks({id:r,hover:function(t){if(!t&&q){q()}},drop:function(t){if(q){q()}f(t)}},function(){})})}function n(){document.getElementById(o).style.top="-1000px"}if(j){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){m=document.createElement("div");m.setAttribute("id",o);a.extend(m.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(m);a.addEvent(j,"dragenter",function(r){var q,s;q=document.getElementById(k);s=a.getPos(q);a.extend(document.getElementById(o).style,{top:s.y+"px",left:s.x+"px",width:q.offsetWidth+"px",height:q.offsetHeight+"px"})});p(o,n)}else{p(k)}}a.addEvent(document.getElementById(d.browse_button),"click",function(v){var t=[],r,q,u=d.filters,s;v.preventDefault();for(r=0;r<u.length;r++){s=u[r].extensions.split(",");for(q=0;q<s.length;q++){t.push(a.mimeTypes[s[q]])}}e.FileBrowse.OpenBrowseDialog({mimeTypes:t},function(w){if(w.success){f(w.value)}})});j=m=null});g.bind("UploadFile",function(n,k){var m=h[k.id],j={},l=n.settings.chunk_size,o,p=[];function r(s,u){var t;if(k.status==a.FAILED){return}j.name=k.target_name||k.name;if(l){j.chunk=s;j.chunks=u}t=p.shift();e.Uploader.upload({url:a.buildUrl(n.settings.url,j),files:{file:t},cookies:document.cookies,postvars:n.settings.multipart_params,progressCallback:function(x){var w,v=0;o[s]=parseInt(x.filePercent*t.size/100,10);for(w=0;w<o.length;w++){v+=o[w]}k.loaded=v;n.trigger("UploadProgress",k)}},function(w){var v,x;if(w.success){v=w.value.statusCode;if(l){n.trigger("ChunkUploaded",k,{chunk:s,chunks:u,response:w.value.body,status:v})}if(p.length>0){r(++s,u)}else{k.status=a.DONE;n.trigger("FileUploaded",k,{response:w.value.body,status:v});if(v>=400){n.trigger("Error",{code:a.HTTP_ERROR,message:"HTTP Error.",file:k,status:v})}}}else{n.trigger("Error",{code:a.GENERIC_ERROR,message:"Generic Error.",file:k,details:w.error})}})}function q(s){k.size=s.size;if(l){e.FileAccess.chunk({file:s,chunkSize:l},function(v){if(v.success){var w=v.value,t=w.length;o=Array(t);for(var u=0;u<t;u++){o[u]=0;p.push(w[u])}r(0,t)}})}else{o=Array(1);p.push(s);r(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(k.name)){BrowserPlus.ImageAlter.transform({file:m,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(s){if(s.success){q(s.value.file)}})}else{q(m)}});i({success:true})}if(e){e.init(function(k){var j=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){j.push({service:"ImageAlter",version:"4"})}if(k.success){e.require({services:j},function(l){if(l.success){b()}else{i()}})}else{i()}})}else{i()}}})})(plupload);(function(b){function a(i,l,j,c,k){var e,d,h,g,f;e=document.createElement("canvas");e.style.display="none";document.body.appendChild(e);d=e.getContext("2d");h=new Image();h.onload=function(){var o,m,n;f=Math.min(l/h.width,j/h.height);if(f<1){o=Math.round(h.width*f);m=Math.round(h.height*f)}else{o=h.width;m=h.height}e.width=o;e.height=m;d.drawImage(h,0,0,o,m);g=e.toDataURL(c);g=g.substring(g.indexOf("base64,")+7);g=atob(g);e.parentNode.removeChild(e);k({success:true,data:g})};h.src=i}b.runtimes.Html5=b.addRuntime("html5",{getFeatures:function(){var g,d,f,e,c;d=f=e=c=false;if(window.XMLHttpRequest){g=new XMLHttpRequest();f=!!g.upload;d=!!(g.sendAsBinary||g.upload)}if(d){e=!!(File&&File.prototype.getAsDataURL);c=!!(File&&File.prototype.slice)}return{html5:d,dragdrop:window.mozInnerScreenX!==undefined||c,jpgresize:e,pngresize:e,multipart:e,progress:f}},init:function(e,f){var c={};function d(k){var h,g,j=[],l;for(g=0;g<k.length;g++){h=k[g];l=b.guid();c[l]=h;j.push(new b.File(l,h.fileName,h.fileSize))}if(j.length){e.trigger("FilesAdded",j)}}if(!this.getFeatures().html5){f({success:false});return}e.bind("Init",function(l){var p,n=[],k,o,h=l.settings.filters,j,m,g=document.body;p=document.createElement("div");p.id=l.id+"_html5_container";for(k=0;k<h.length;k++){j=h[k].extensions.split(/,/);for(o=0;o<j.length;o++){m=b.mimeTypes[j[o]];if(m){n.push(m)}}}b.extend(p.style,{position:"absolute",background:e.settings.shim_bgcolor||"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:e.settings.shim_bgcolor?"":0});p.className="plupload html5";if(e.settings.container){g=document.getElementById(e.settings.container);g.style.position="relative"}g.appendChild(p);p.innerHTML='<input id="'+e.id+'_html5" style="width:100%;" type="file" accept="'+n.join(",")+'" '+(e.settings.multi_selection?'multiple="multiple"':"")+" />";document.getElementById(e.id+"_html5").onchange=function(){d(this.files);this.value=""}});e.bind("PostInit",function(){var g=document.getElementById(e.settings.drop_element);if(g){b.addEvent(g,"dragover",function(h){h.preventDefault()});b.addEvent(g,"drop",function(i){var h=i.dataTransfer;if(h&&h.files){d(h.files)}i.preventDefault()})}});e.bind("Refresh",function(g){var h,i,j;h=document.getElementById(e.settings.browse_button);i=b.getPos(h,document.getElementById(g.settings.container));j=b.getSize(h);b.extend(document.getElementById(e.id+"_html5_container").style,{top:i.y+"px",left:i.x+"px",width:j.w+"px",height:j.h+"px"})});e.bind("UploadFile",function(g,j){var n=new XMLHttpRequest(),i=n.upload,h=g.settings.resize,m,l=0;function k(o){var s="----pluploadboundary"+b.guid(),q="--",r="\r\n",p="";if(g.settings.multipart){n.setRequestHeader("Content-Type","multipart/form-data; boundary="+s);b.each(g.settings.multipart_params,function(u,t){p+=q+s+r+'Content-Disposition: form-data; name="'+t+'"'+r+r;p+=u+r});p+=q+s+r+'Content-Disposition: form-data; name="'+g.settings.file_data_name+'"; filename="'+j.name+'"'+r+"Content-Type: application/octet-stream"+r+r+o+r+q+s+q+r;l=p.length-o.length;o=p}n.sendAsBinary(o)}if(j.status==b.DONE||j.status==b.FAILED||g.state==b.STOPPED){return}if(i){i.onprogress=function(o){j.loaded=o.loaded-l;g.trigger("UploadProgress",j)}}n.onreadystatechange=function(){var o;if(n.readyState==4){try{o=n.status}catch(p){o=0}j.status=b.DONE;j.loaded=j.size;g.trigger("UploadProgress",j);g.trigger("FileUploaded",j,{response:n.responseText,status:o});if(o>=400){g.trigger("Error",{code:b.HTTP_ERROR,message:"HTTP Error.",file:j,status:o})}}};n.open("post",b.buildUrl(g.settings.url,{name:j.target_name||j.name}),true);n.setRequestHeader("Content-Type","application/octet-stream");b.each(g.settings.headers,function(p,o){n.setRequestHeader(o,p)});m=c[j.id];if(n.sendAsBinary){if(h&&/\.(png|jpg|jpeg)$/i.test(j.name)){a(m.getAsDataURL(),h.width,h.height,/\.png$/i.test(j.name)?"image/png":"image/jpeg",function(o){if(o.success){j.size=o.data.length;k(o.data)}else{k(m.getAsBinary())}})}else{k(m.getAsBinary())}}else{n.send(m)}});f({success:true})}})})(plupload);(function(a){a.runtimes.Html4=a.addRuntime("html4",{getFeatures:function(){return{multipart:true}},init:function(f,g){var d={},c,b;function e(l){var k,j,m=[],n,h;h=l.value.replace(/\\/g,"/");h=h.substring(h.length,h.lastIndexOf("/")+1);n=a.guid();k=new a.File(n,h);d[n]=k;k.input=l;m.push(k);if(m.length){f.trigger("FilesAdded",m)}}f.bind("Init",function(p){var h,x,v,t=[],o,u,m=p.settings.filters,l,s,r=/MSIE/.test(navigator.userAgent),k="javascript",w,j=document.body,n;if(f.settings.container){j=document.getElementById(f.settings.container);j.style.position="relative"}c=(typeof p.settings.form=="string")?document.getElementById(p.settings.form):p.settings.form;if(!c){n=document.getElementById(f.settings.browse_button);for(;n;n=n.parentNode){if(n.nodeName=="FORM"){c=n}}}if(!c){c=document.createElement("form");c.style.display="inline";n=document.getElementById(f.settings.container);n.parentNode.insertBefore(c,n);c.appendChild(n)}c.setAttribute("method","post");c.setAttribute("enctype","multipart/form-data");a.each(p.settings.multipart_params,function(z,y){var i=document.createElement("input");a.extend(i,{type:"hidden",name:y,value:z});c.appendChild(i)});b=document.createElement("iframe");b.setAttribute("src",k+':""');b.setAttribute("name",p.id+"_iframe");b.setAttribute("id",p.id+"_iframe");b.style.display="none";a.addEvent(b,"load",function(B){var C=B.target,z=f.currentfile,A;try{A=C.contentWindow.document||C.contentDocument||window.frames[C.id].document}catch(y){p.trigger("Error",{code:a.SECURITY_ERROR,message:"Security error.",file:z});return}if(A.location.href=="about:blank"||!z){return}var i=A.documentElement.innerText||A.documentElement.textContent;if(i!=""){z.status=a.DONE;z.loaded=1025;z.percent=100;if(z.input){z.input.removeAttribute("name")}p.trigger("UploadProgress",z);p.trigger("FileUploaded",z,{response:i});if(c.tmpAction){c.setAttribute("action",c.tmpAction)}if(c.tmpTarget){c.setAttribute("target",c.tmpTarget)}}});c.appendChild(b);if(r){window.frames[b.id].name=b.name}x=document.createElement("div");x.id=p.id+"_iframe_container";for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(u=0;u<l.length;u++){s=a.mimeTypes[l[u]];if(s){t.push(s)}}}a.extend(x.style,{position:"absolute",background:"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:0});w=f.settings.shim_bgcolor;if(w){a.extend(x.style,{background:w,opacity:1})}x.className="plupload_iframe";j.appendChild(x);function q(){v=document.createElement("input");v.setAttribute("type","file");v.setAttribute("accept",t.join(","));v.setAttribute("size",1);a.extend(v.style,{width:"100%",height:"100%",opacity:0});if(r){a.extend(v.style,{filter:"alpha(opacity=0)"})}a.addEvent(v,"change",function(i){var y=i.target;if(y.value){q();y.style.display="none";e(y)}});x.appendChild(v);return true}q()});f.bind("Refresh",function(h){var i,j,k;i=document.getElementById(f.settings.browse_button);j=a.getPos(i,document.getElementById(h.settings.container));k=a.getSize(i);a.extend(document.getElementById(f.id+"_iframe_container").style,{top:j.y+"px",left:j.x+"px",width:k.w+"px",height:k.h+"px"})});f.bind("UploadFile",function(h,i){if(i.status==a.DONE||i.status==a.FAILED||h.state==a.STOPPED){return}if(!i.input){i.status=a.ERROR;return}i.input.setAttribute("name",h.settings.file_data_name);c.tmpAction=c.getAttribute("action");c.setAttribute("action",a.buildUrl(h.settings.url,{name:i.target_name||i.name}));c.tmpTarget=c.getAttribute("target");c.setAttribute("target",b.name);this.currentfile=i;c.submit()});f.bind("FilesRemoved",function(h,k){var j,l;for(j=0;j<k.length;j++){l=k[j].input;if(l){l.parentNode.removeChild(l)}}});g({success:true})}})})(plupload);
|
Binary file
|
@@ -0,0 +1,132 @@
|
|
1
|
+
jQuery(function ($) {
|
2
|
+
var csrf_token = $('meta[name=csrf-token]').attr('content'),
|
3
|
+
csrf_param = $('meta[name=csrf-param]').attr('content');
|
4
|
+
|
5
|
+
$.fn.extend({
|
6
|
+
/**
|
7
|
+
* Triggers a custom event on an element and returns the event result
|
8
|
+
* this is used to get around not being able to ensure callbacks are placed
|
9
|
+
* at the end of the chain.
|
10
|
+
*
|
11
|
+
* TODO: deprecate with jQuery 1.4.2 release, in favor of subscribing to our
|
12
|
+
* own events and placing ourselves at the end of the chain.
|
13
|
+
*/
|
14
|
+
triggerAndReturn: function (name, data) {
|
15
|
+
var event = new $.Event(name);
|
16
|
+
this.trigger(event, data);
|
17
|
+
|
18
|
+
return event.result !== false;
|
19
|
+
},
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Handles execution of remote calls firing overridable events along the way
|
23
|
+
*/
|
24
|
+
callRemote: function () {
|
25
|
+
var el = this,
|
26
|
+
method = el.attr('method') || el.attr('data-method') || 'GET',
|
27
|
+
url = el.attr('action') || el.attr('href'),
|
28
|
+
dataType = el.attr('data-type') || 'script';
|
29
|
+
|
30
|
+
if (url === undefined) {
|
31
|
+
throw "No URL specified for remote call (action or href must be present).";
|
32
|
+
} else {
|
33
|
+
if (el.triggerAndReturn('ajax:before')) {
|
34
|
+
var data = el.is('form') ? el.serializeArray() : [];
|
35
|
+
$.ajax({
|
36
|
+
url: url,
|
37
|
+
data: data,
|
38
|
+
dataType: dataType,
|
39
|
+
type: method.toUpperCase(),
|
40
|
+
beforeSend: function (xhr) {
|
41
|
+
el.trigger('ajax:loading', xhr);
|
42
|
+
},
|
43
|
+
success: function (data, status, xhr) {
|
44
|
+
el.trigger('ajax:success', [data, status, xhr]);
|
45
|
+
},
|
46
|
+
complete: function (xhr) {
|
47
|
+
el.trigger('ajax:complete', xhr);
|
48
|
+
},
|
49
|
+
error: function (xhr, status, error) {
|
50
|
+
el.trigger('ajax:failure', [xhr, status, error]);
|
51
|
+
}
|
52
|
+
});
|
53
|
+
}
|
54
|
+
|
55
|
+
el.trigger('ajax:after');
|
56
|
+
}
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
/**
|
61
|
+
* confirmation handler
|
62
|
+
*/
|
63
|
+
$('a[data-confirm],input[data-confirm]').live('click', function () {
|
64
|
+
var el = $(this);
|
65
|
+
if (el.triggerAndReturn('confirm')) {
|
66
|
+
if (!confirm(el.attr('data-confirm'))) {
|
67
|
+
return false;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
});
|
71
|
+
|
72
|
+
|
73
|
+
/**
|
74
|
+
* remote handlers
|
75
|
+
*/
|
76
|
+
$('form[data-remote]').live('submit', function (e) {
|
77
|
+
$(this).callRemote();
|
78
|
+
e.preventDefault();
|
79
|
+
});
|
80
|
+
|
81
|
+
$('a[data-remote],input[data-remote]').live('click', function (e) {
|
82
|
+
$(this).callRemote();
|
83
|
+
e.preventDefault();
|
84
|
+
});
|
85
|
+
|
86
|
+
$('a[data-method]:not([data-remote])').live('click', function (e){
|
87
|
+
var link = $(this),
|
88
|
+
href = link.attr('href'),
|
89
|
+
method = link.attr('data-method'),
|
90
|
+
form = $('<form method="post" action="'+href+'"></form>'),
|
91
|
+
metadata_input = '<input name="_method" value="'+method+'" type="hidden" />';
|
92
|
+
|
93
|
+
if (csrf_param != null && csrf_token != null) {
|
94
|
+
metadata_input += '<input name="'+csrf_param+'" value="'+csrf_token+'" type="hidden" />';
|
95
|
+
}
|
96
|
+
|
97
|
+
form.hide()
|
98
|
+
.append(metadata_input)
|
99
|
+
.appendTo('body');
|
100
|
+
|
101
|
+
e.preventDefault();
|
102
|
+
form.submit();
|
103
|
+
});
|
104
|
+
|
105
|
+
/**
|
106
|
+
* disable-with handlers
|
107
|
+
*/
|
108
|
+
var disable_with_input_selector = 'input[data-disable-with]';
|
109
|
+
var disable_with_form_remote_selector = 'form[data-remote]:has(' + disable_with_input_selector + ')';
|
110
|
+
var disable_with_form_not_remote_selector = 'form:not([data-remote]):has(' + disable_with_input_selector + ')';
|
111
|
+
|
112
|
+
var disable_with_input_function = function () {
|
113
|
+
$(this).find(disable_with_input_selector).each(function () {
|
114
|
+
var input = $(this);
|
115
|
+
input.data('enable-with', input.val())
|
116
|
+
.attr('value', input.attr('data-disable-with'))
|
117
|
+
.attr('disabled', 'disabled');
|
118
|
+
});
|
119
|
+
};
|
120
|
+
|
121
|
+
$(disable_with_form_remote_selector).live('ajax:before', disable_with_input_function);
|
122
|
+
$(disable_with_form_not_remote_selector).live('submit', disable_with_input_function);
|
123
|
+
|
124
|
+
$(disable_with_form_remote_selector).live('ajax:complete', function () {
|
125
|
+
$(this).find(disable_with_input_selector).each(function () {
|
126
|
+
var input = $(this);
|
127
|
+
input.removeAttr('disabled')
|
128
|
+
.val(input.data('enable-with'));
|
129
|
+
});
|
130
|
+
});
|
131
|
+
|
132
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(b){var e,d,a=[],c=window;b.fn.tinymce=function(j){var p=this,g,k,h,m,i,l="",n="";if(!p.length){return}if(!j){return tinyMCE.get(p[0].id)}function o(){var r=[],q=0;if(f){f();f=null}p.each(function(t,u){var s,w=u.id,v=j.oninit;if(!w){u.id=w=tinymce.DOM.uniqueId()}s=new tinymce.Editor(w,j);r.push(s);if(v){s.onInit.add(function(){var x,y=v;if(++q==r.length){if(tinymce.is(y,"string")){x=(y.indexOf(".")===-1)?null:tinymce.resolve(y.replace(/\.\w+$/,""));y=tinymce.resolve(y)}y.apply(x||tinymce,r)}})}});b.each(r,function(t,s){s.render()})}if(!c.tinymce&&!d&&(g=j.script_url)){d=1;h=g.substring(0,g.lastIndexOf("/"));if(/_(src|dev)\.js/g.test(g)){n="_src"}m=g.lastIndexOf("?");if(m!=-1){l=g.substring(m+1)}c.tinyMCEPreInit={base:h,suffix:n,query:l};if(g.indexOf("gzip")!=-1){i=j.language||"en";g=g+(/\?/.test(g)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(j.theme)+"&plugins="+escape(j.plugins)+"&languages="+i;if(!c.tinyMCE_GZ){tinyMCE_GZ={start:function(){tinymce.suffix=n;function q(r){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(r))}q("langs/"+i+".js");q("themes/"+j.theme+"/editor_template"+n+".js");q("themes/"+j.theme+"/langs/"+i+".js");b.each(j.plugins.split(","),function(s,r){if(r){q("plugins/"+r+"/editor_plugin"+n+".js");q("plugins/"+r+"/langs/"+i+".js")}})},end:function(){}}}}b.ajax({type:"GET",url:g,dataType:"script",cache:true,success:function(){tinymce.dom.Event.domLoaded=1;d=2;o();b.each(a,function(q,r){r()})}})}else{if(d===1){a.push(o)}else{o()}}};b.extend(b.expr[":"],{tinymce:function(g){return g.id&&!!tinyMCE.get(g.id)}});function f(){function i(l){if(l==="remove"){this.each(function(n,o){var m=h(o);if(m){m.remove()}})}this.find("span.mceEditor,div.mceEditor").each(function(n,o){var m=tinyMCE.get(o.id.replace(/_parent$/,""));if(m){m.remove()}})}function k(n){var m=this,l;if(n!==e){i.call(m);m.each(function(p,q){var o;if(o=tinyMCE.get(q.id)){o.setContent(n)}})}else{if(m.length>0){if(l=tinyMCE.get(m[0].id)){return l.getContent()}}}}function h(m){var l=null;(m)&&(m.id)&&(c.tinymce)&&(l=tinyMCE.get(m.id));return l}function g(l){return !!((l)&&(l.length)&&(c.tinymce)&&(l.is(":tinymce")))}var j={};b.each(["text","html","val"],function(n,l){var o=j[l]=b.fn[l],m=(l==="text");b.fn[l]=function(r){var p=this;if(!g(p)){return o.call(p,r)}if(r!==e){k.call(p.filter(":tinymce"),r);o.call(p.not(":tinymce"),r);return p}else{var q="";(m?p:p.eq(0)).each(function(t,u){var s=h(u);q+=s?(m?s.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):s.getContent()):o.call(b(u),r)});return q}}});b.each(["append","prepend"],function(n,m){var o=j[m]=b.fn[m],l=(m==="prepend");b.fn[m]=function(q){var p=this;if(!g(p)){return o.call(p,q)}if(q!==e){p.filter(":tinymce").each(function(s,t){var r=h(t);r&&r.setContent(l?q+r.getContent():r.getContent()+q)});o.call(p.not(":tinymce"),q);return p}}});b.each(["remove","replaceWith","replaceAll","empty"],function(m,l){var n=j[l]=b.fn[l];b.fn[l]=function(){i.call(this,l);return n.apply(this,arguments)}});j.attr=b.fn.attr;b.fn.attr=function(n,q,o){var m=this;if((!n)||(n!=="value")||(!g(m))){return j.attr.call(m,n,q,o)}if(q!==e){k.call(m.filter(":tinymce"),q);j.attr.call(m.not(":tinymce"),n,q,o);return m}else{var p=m[0],l=h(p);return l?l.getContent():j.attr.call(b(p),n,q,o)}}}})(jQuery);
|
@@ -0,0 +1,169 @@
|
|
1
|
+
tinyMCE.addI18n({en:{
|
2
|
+
common:{
|
3
|
+
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
|
4
|
+
apply:"Apply",
|
5
|
+
insert:"Insert",
|
6
|
+
update:"Update",
|
7
|
+
cancel:"Cancel",
|
8
|
+
close:"Close",
|
9
|
+
browse:"Browse",
|
10
|
+
class_name:"Class",
|
11
|
+
not_set:"-- Not set --",
|
12
|
+
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
|
13
|
+
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
|
14
|
+
popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
|
15
|
+
invalid_data:"Error: Invalid values entered, these are marked in red.",
|
16
|
+
more_colors:"More colors"
|
17
|
+
},
|
18
|
+
contextmenu:{
|
19
|
+
align:"Alignment",
|
20
|
+
left:"Left",
|
21
|
+
center:"Center",
|
22
|
+
right:"Right",
|
23
|
+
full:"Full"
|
24
|
+
},
|
25
|
+
insertdatetime:{
|
26
|
+
date_fmt:"%Y-%m-%d",
|
27
|
+
time_fmt:"%H:%M:%S",
|
28
|
+
insertdate_desc:"Insert date",
|
29
|
+
inserttime_desc:"Insert time",
|
30
|
+
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
|
31
|
+
months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
|
32
|
+
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
|
33
|
+
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
|
34
|
+
},
|
35
|
+
print:{
|
36
|
+
print_desc:"Print"
|
37
|
+
},
|
38
|
+
preview:{
|
39
|
+
preview_desc:"Preview"
|
40
|
+
},
|
41
|
+
directionality:{
|
42
|
+
ltr_desc:"Direction left to right",
|
43
|
+
rtl_desc:"Direction right to left"
|
44
|
+
},
|
45
|
+
layer:{
|
46
|
+
insertlayer_desc:"Insert new layer",
|
47
|
+
forward_desc:"Move forward",
|
48
|
+
backward_desc:"Move backward",
|
49
|
+
absolute_desc:"Toggle absolute positioning",
|
50
|
+
content:"New layer..."
|
51
|
+
},
|
52
|
+
save:{
|
53
|
+
save_desc:"Save",
|
54
|
+
cancel_desc:"Cancel all changes"
|
55
|
+
},
|
56
|
+
nonbreaking:{
|
57
|
+
nonbreaking_desc:"Insert non-breaking space character"
|
58
|
+
},
|
59
|
+
iespell:{
|
60
|
+
iespell_desc:"Run spell checking",
|
61
|
+
download:"ieSpell not detected. Do you want to install it now?"
|
62
|
+
},
|
63
|
+
advhr:{
|
64
|
+
advhr_desc:"Horizontal rule"
|
65
|
+
},
|
66
|
+
emotions:{
|
67
|
+
emotions_desc:"Emotions"
|
68
|
+
},
|
69
|
+
searchreplace:{
|
70
|
+
search_desc:"Find",
|
71
|
+
replace_desc:"Find/Replace"
|
72
|
+
},
|
73
|
+
advimage:{
|
74
|
+
image_desc:"Insert/edit image"
|
75
|
+
},
|
76
|
+
advlink:{
|
77
|
+
link_desc:"Insert/edit link"
|
78
|
+
},
|
79
|
+
xhtmlxtras:{
|
80
|
+
cite_desc:"Citation",
|
81
|
+
abbr_desc:"Abbreviation",
|
82
|
+
acronym_desc:"Acronym",
|
83
|
+
del_desc:"Deletion",
|
84
|
+
ins_desc:"Insertion",
|
85
|
+
attribs_desc:"Insert/Edit Attributes"
|
86
|
+
},
|
87
|
+
style:{
|
88
|
+
desc:"Edit CSS Style"
|
89
|
+
},
|
90
|
+
paste:{
|
91
|
+
paste_text_desc:"Paste as Plain Text",
|
92
|
+
paste_word_desc:"Paste from Word",
|
93
|
+
selectall_desc:"Select All"
|
94
|
+
},
|
95
|
+
paste_dlg:{
|
96
|
+
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
|
97
|
+
text_linebreaks:"Keep linebreaks",
|
98
|
+
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
|
99
|
+
},
|
100
|
+
table:{
|
101
|
+
desc:"Inserts a new table",
|
102
|
+
row_before_desc:"Insert row before",
|
103
|
+
row_after_desc:"Insert row after",
|
104
|
+
delete_row_desc:"Delete row",
|
105
|
+
col_before_desc:"Insert column before",
|
106
|
+
col_after_desc:"Insert column after",
|
107
|
+
delete_col_desc:"Remove column",
|
108
|
+
split_cells_desc:"Split merged table cells",
|
109
|
+
merge_cells_desc:"Merge table cells",
|
110
|
+
row_desc:"Table row properties",
|
111
|
+
cell_desc:"Table cell properties",
|
112
|
+
props_desc:"Table properties",
|
113
|
+
paste_row_before_desc:"Paste table row before",
|
114
|
+
paste_row_after_desc:"Paste table row after",
|
115
|
+
cut_row_desc:"Cut table row",
|
116
|
+
copy_row_desc:"Copy table row",
|
117
|
+
del:"Delete table",
|
118
|
+
row:"Row",
|
119
|
+
col:"Column",
|
120
|
+
cell:"Cell"
|
121
|
+
},
|
122
|
+
autosave:{
|
123
|
+
unload_msg:"The changes you made will be lost if you navigate away from this page.",
|
124
|
+
restore_content: "Restore auto-saved content",
|
125
|
+
warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?"
|
126
|
+
},
|
127
|
+
fullscreen:{
|
128
|
+
desc:"Toggle fullscreen mode"
|
129
|
+
},
|
130
|
+
media:{
|
131
|
+
desc:"Insert / edit embedded media",
|
132
|
+
edit:"Edit embedded media"
|
133
|
+
},
|
134
|
+
fullpage:{
|
135
|
+
desc:"Document properties"
|
136
|
+
},
|
137
|
+
template:{
|
138
|
+
desc:"Insert predefined template content"
|
139
|
+
},
|
140
|
+
visualchars:{
|
141
|
+
desc:"Visual control characters on/off."
|
142
|
+
},
|
143
|
+
spellchecker:{
|
144
|
+
desc:"Toggle spellchecker",
|
145
|
+
menu:"Spellchecker settings",
|
146
|
+
ignore_word:"Ignore word",
|
147
|
+
ignore_words:"Ignore all",
|
148
|
+
langs:"Languages",
|
149
|
+
wait:"Please wait...",
|
150
|
+
sug:"Suggestions",
|
151
|
+
no_sug:"No suggestions",
|
152
|
+
no_mpell:"No misspellings found."
|
153
|
+
},
|
154
|
+
pagebreak:{
|
155
|
+
desc:"Insert page break."
|
156
|
+
},
|
157
|
+
advlist : {
|
158
|
+
types : 'Types',
|
159
|
+
def : 'Default',
|
160
|
+
lower_alpha : "Lower alpha",
|
161
|
+
lower_greek : "Lower greek",
|
162
|
+
lower_roman : "Lower roman",
|
163
|
+
upper_alpha : "Upper alpha",
|
164
|
+
upper_roman : "Upper roman",
|
165
|
+
circle : "Circle",
|
166
|
+
disc : "Disc",
|
167
|
+
square : "Square"
|
168
|
+
}
|
169
|
+
}});
|