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,16 @@
|
|
1
|
+
tinyMCE.addI18n('en.searchreplace_dlg',{
|
2
|
+
searchnext_desc:"Find again",
|
3
|
+
notfound:"The search has been completed. The search string could not be found.",
|
4
|
+
search_title:"Find",
|
5
|
+
replace_title:"Find/Replace",
|
6
|
+
allreplaced:"All occurrences of the search string were replaced.",
|
7
|
+
findwhat:"Find what",
|
8
|
+
replacewith:"Replace with",
|
9
|
+
direction:"Direction",
|
10
|
+
up:"Up",
|
11
|
+
down:"Down",
|
12
|
+
mcase:"Match case",
|
13
|
+
findnext:"Find next",
|
14
|
+
replace:"Replace",
|
15
|
+
replaceall:"Replace all"
|
16
|
+
});
|
@@ -0,0 +1,99 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title>{#searchreplace_dlg.replace_title}</title>
|
5
|
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6
|
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7
|
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8
|
+
<script type="text/javascript" src="js/searchreplace.js"></script>
|
9
|
+
<link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
|
10
|
+
</head>
|
11
|
+
<body style="display:none;">
|
12
|
+
<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
|
13
|
+
<div class="tabs">
|
14
|
+
<ul>
|
15
|
+
<li id="search_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
16
|
+
<li id="replace_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
17
|
+
</ul>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="panel_wrapper">
|
21
|
+
<div id="search_panel" class="panel">
|
22
|
+
<table border="0" cellspacing="0" cellpadding="2">
|
23
|
+
<tr>
|
24
|
+
<td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
25
|
+
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" /></td>
|
26
|
+
</tr>
|
27
|
+
<tr>
|
28
|
+
<td colspan="2">
|
29
|
+
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
30
|
+
<tr>
|
31
|
+
<td><label>{#searchreplace_dlg.direction}</label></td>
|
32
|
+
<td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
|
33
|
+
<td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
34
|
+
<td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
35
|
+
<td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
36
|
+
</tr>
|
37
|
+
</table>
|
38
|
+
</td>
|
39
|
+
</tr>
|
40
|
+
<tr>
|
41
|
+
<td colspan="2">
|
42
|
+
<table border="0" cellspacing="0" cellpadding="0">
|
43
|
+
<tr>
|
44
|
+
<td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
45
|
+
<td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
46
|
+
</tr>
|
47
|
+
</table>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
</table>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="replace_panel" class="panel">
|
54
|
+
<table border="0" cellspacing="0" cellpadding="2">
|
55
|
+
<tr>
|
56
|
+
<td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
57
|
+
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" /></td>
|
58
|
+
</tr>
|
59
|
+
<tr>
|
60
|
+
<td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
|
61
|
+
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" /></td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td colspan="2">
|
65
|
+
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
66
|
+
<tr>
|
67
|
+
<td><label>{#searchreplace_dlg.direction}</label></td>
|
68
|
+
<td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
|
69
|
+
<td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
70
|
+
<td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
71
|
+
<td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
<tr>
|
77
|
+
<td colspan="2">
|
78
|
+
<table border="0" cellspacing="0" cellpadding="0">
|
79
|
+
<tr>
|
80
|
+
<td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
81
|
+
<td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
82
|
+
</tr>
|
83
|
+
</table>
|
84
|
+
</td>
|
85
|
+
</tr>
|
86
|
+
</table>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div class="mceActionPanel">
|
92
|
+
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
93
|
+
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
94
|
+
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
95
|
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
96
|
+
</div>
|
97
|
+
</form>
|
98
|
+
</body>
|
99
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;}
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;e.addCommand("mceSpellCheck",function(){if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);e.windowManager.alert("spellchecker.no_mpell")}})}else{g._done()}});e.onInit.add(function(){if(e.settings.content_css!==false){e.dom.loadCSS(f+"/css/content.css")}});e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}����������������\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={};this._walk(e.getBody(),function(h){if(h.nodeType==3){d+=h.nodeValue+" "}});d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));c(d.split(" "),function(h){if(!f[h]){g.push(h);f[h]=1}});return g},_removeWords:function(e){var f=this.editor,h=f.dom,g=f.selection,d=g.getBookmark();c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!e||h.decode(i.innerHTML)==e){h.remove(i,1)}}});g.moveToBookmark(d)},_markWords:function(o){var i,h,g,f,e,n="",k=this.editor,p=this._getSeparators(),j=k.dom,d=[];var l=k.selection,m=l.getBookmark();c(o,function(q){n+=(n?"|":"")+q});i=new RegExp("(["+p+"])("+n+")(["+p+"])","g");h=new RegExp("^("+n+")","g");g=new RegExp("("+n+")(["+p+"]?)$","g");f=new RegExp("^("+n+")(["+p+"]?)$","g");e=new RegExp("("+n+")(["+p+"])","g");this._walk(this.editor.getBody(),function(q){if(q.nodeType==3){d.push(q)}});c(d,function(r){var q;if(r.nodeType==3){q=r.nodeValue;if(i.test(q)||h.test(q)||g.test(q)||f.test(q)){q=j.encode(q);q=q.replace(e,'<span class="mceItemHiddenSpellWord">$1</span>$2');q=q.replace(g,'<span class="mceItemHiddenSpellWord">$1</span>$2');j.replace(j.create("span",{"class":"mceItemHidden"},q),r)}}});l.moveToBookmark(m)},_showMenu:function(g,i){var h=this,g=h.editor,d=h._menu,k,j=g.dom,f=j.getViewPort(g.getWin());if(!d){k=b.getPos(g.getContentAreaContainer());d=g.controlManager.createDropMenu("spellcheckermenu",{offset_x:k.x,offset_y:k.y,"class":"mceNoIcons"});h._menu=d}if(j.hasClass(i.target,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);h._sendRPC("getSuggestions",[h.selectedLang,j.decode(i.target.innerHTML)],function(e){d.removeAll();if(e.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(e,function(l){d.add({title:l,onclick:function(){j.replace(g.getDoc().createTextNode(l),i.target);h._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}d.add({title:"spellchecker.ignore_word",onclick:function(){j.remove(i.target,1);h._checkDone()}});d.add({title:"spellchecker.ignore_words",onclick:function(){h._removeWords(j.decode(i.target.innerHTML));h._checkDone()}});d.update()});g.selection.select(i.target);k=j.getPos(i.target);d.showMenu(k.x,k.y+i.target.offsetHeight-f.y);return tinymce.dom.Event.cancel(i)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,h,d){var g=this,f=g.editor.getParam("spellchecker_rpc_url","{backend}");if(f=="{backend}"){g.editor.setProgressState(0);alert("Please specify: spellchecker_rpc_url");return}a.sendRPC({url:f,method:e,params:h,success:d,error:function(j,i){g.editor.setProgressState(0);g.editor.windowManager.alert(j.errstr||("Error response: "+i.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})();
|
@@ -0,0 +1,341 @@
|
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function() {
|
12
|
+
var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
|
13
|
+
|
14
|
+
tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
|
15
|
+
getInfo : function() {
|
16
|
+
return {
|
17
|
+
longname : 'Spellchecker',
|
18
|
+
author : 'Moxiecode Systems AB',
|
19
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
20
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
|
21
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
22
|
+
};
|
23
|
+
},
|
24
|
+
|
25
|
+
init : function(ed, url) {
|
26
|
+
var t = this, cm;
|
27
|
+
|
28
|
+
t.url = url;
|
29
|
+
t.editor = ed;
|
30
|
+
|
31
|
+
// Register commands
|
32
|
+
ed.addCommand('mceSpellCheck', function() {
|
33
|
+
if (!t.active) {
|
34
|
+
ed.setProgressState(1);
|
35
|
+
t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
|
36
|
+
if (r.length > 0) {
|
37
|
+
t.active = 1;
|
38
|
+
t._markWords(r);
|
39
|
+
ed.setProgressState(0);
|
40
|
+
ed.nodeChanged();
|
41
|
+
} else {
|
42
|
+
ed.setProgressState(0);
|
43
|
+
ed.windowManager.alert('spellchecker.no_mpell');
|
44
|
+
}
|
45
|
+
});
|
46
|
+
} else
|
47
|
+
t._done();
|
48
|
+
});
|
49
|
+
|
50
|
+
ed.onInit.add(function() {
|
51
|
+
if (ed.settings.content_css !== false)
|
52
|
+
ed.dom.loadCSS(url + '/css/content.css');
|
53
|
+
});
|
54
|
+
|
55
|
+
ed.onClick.add(t._showMenu, t);
|
56
|
+
ed.onContextMenu.add(t._showMenu, t);
|
57
|
+
ed.onBeforeGetContent.add(function() {
|
58
|
+
if (t.active)
|
59
|
+
t._removeWords();
|
60
|
+
});
|
61
|
+
|
62
|
+
ed.onNodeChange.add(function(ed, cm) {
|
63
|
+
cm.setActive('spellchecker', t.active);
|
64
|
+
});
|
65
|
+
|
66
|
+
ed.onSetContent.add(function() {
|
67
|
+
t._done();
|
68
|
+
});
|
69
|
+
|
70
|
+
ed.onBeforeGetContent.add(function() {
|
71
|
+
t._done();
|
72
|
+
});
|
73
|
+
|
74
|
+
ed.onBeforeExecCommand.add(function(ed, cmd) {
|
75
|
+
if (cmd == 'mceFullScreen')
|
76
|
+
t._done();
|
77
|
+
});
|
78
|
+
|
79
|
+
// Find selected language
|
80
|
+
t.languages = {};
|
81
|
+
each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) {
|
82
|
+
if (k.indexOf('+') === 0) {
|
83
|
+
k = k.substring(1);
|
84
|
+
t.selectedLang = v;
|
85
|
+
}
|
86
|
+
|
87
|
+
t.languages[k] = v;
|
88
|
+
});
|
89
|
+
},
|
90
|
+
|
91
|
+
createControl : function(n, cm) {
|
92
|
+
var t = this, c, ed = t.editor;
|
93
|
+
|
94
|
+
if (n == 'spellchecker') {
|
95
|
+
c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
|
96
|
+
|
97
|
+
c.onRenderMenu.add(function(c, m) {
|
98
|
+
m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
99
|
+
each(t.languages, function(v, k) {
|
100
|
+
var o = {icon : 1}, mi;
|
101
|
+
|
102
|
+
o.onclick = function() {
|
103
|
+
mi.setSelected(1);
|
104
|
+
t.selectedItem.setSelected(0);
|
105
|
+
t.selectedItem = mi;
|
106
|
+
t.selectedLang = v;
|
107
|
+
};
|
108
|
+
|
109
|
+
o.title = k;
|
110
|
+
mi = m.add(o);
|
111
|
+
mi.setSelected(v == t.selectedLang);
|
112
|
+
|
113
|
+
if (v == t.selectedLang)
|
114
|
+
t.selectedItem = mi;
|
115
|
+
})
|
116
|
+
});
|
117
|
+
|
118
|
+
return c;
|
119
|
+
}
|
120
|
+
},
|
121
|
+
|
122
|
+
// Internal functions
|
123
|
+
|
124
|
+
_walk : function(n, f) {
|
125
|
+
var d = this.editor.getDoc(), w;
|
126
|
+
|
127
|
+
if (d.createTreeWalker) {
|
128
|
+
w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
|
129
|
+
|
130
|
+
while ((n = w.nextNode()) != null)
|
131
|
+
f.call(this, n);
|
132
|
+
} else
|
133
|
+
tinymce.walk(n, f, 'childNodes');
|
134
|
+
},
|
135
|
+
|
136
|
+
_getSeparators : function() {
|
137
|
+
var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}����������������\u201d\u201c');
|
138
|
+
|
139
|
+
// Build word separator regexp
|
140
|
+
for (i=0; i<str.length; i++)
|
141
|
+
re += '\\' + str.charAt(i);
|
142
|
+
|
143
|
+
return re;
|
144
|
+
},
|
145
|
+
|
146
|
+
_getWords : function() {
|
147
|
+
var ed = this.editor, wl = [], tx = '', lo = {};
|
148
|
+
|
149
|
+
// Get area text
|
150
|
+
this._walk(ed.getBody(), function(n) {
|
151
|
+
if (n.nodeType == 3)
|
152
|
+
tx += n.nodeValue + ' ';
|
153
|
+
});
|
154
|
+
|
155
|
+
// Split words by separator
|
156
|
+
tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
|
157
|
+
tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
|
158
|
+
|
159
|
+
// Build word array and remove duplicates
|
160
|
+
each(tx.split(' '), function(v) {
|
161
|
+
if (!lo[v]) {
|
162
|
+
wl.push(v);
|
163
|
+
lo[v] = 1;
|
164
|
+
}
|
165
|
+
});
|
166
|
+
|
167
|
+
return wl;
|
168
|
+
},
|
169
|
+
|
170
|
+
_removeWords : function(w) {
|
171
|
+
var ed = this.editor, dom = ed.dom, se = ed.selection, b = se.getBookmark();
|
172
|
+
|
173
|
+
each(dom.select('span').reverse(), function(n) {
|
174
|
+
if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) {
|
175
|
+
if (!w || dom.decode(n.innerHTML) == w)
|
176
|
+
dom.remove(n, 1);
|
177
|
+
}
|
178
|
+
});
|
179
|
+
|
180
|
+
se.moveToBookmark(b);
|
181
|
+
},
|
182
|
+
|
183
|
+
_markWords : function(wl) {
|
184
|
+
var r1, r2, r3, r4, r5, w = '', ed = this.editor, re = this._getSeparators(), dom = ed.dom, nl = [];
|
185
|
+
var se = ed.selection, b = se.getBookmark();
|
186
|
+
|
187
|
+
each(wl, function(v) {
|
188
|
+
w += (w ? '|' : '') + v;
|
189
|
+
});
|
190
|
+
|
191
|
+
r1 = new RegExp('([' + re + '])(' + w + ')([' + re + '])', 'g');
|
192
|
+
r2 = new RegExp('^(' + w + ')', 'g');
|
193
|
+
r3 = new RegExp('(' + w + ')([' + re + ']?)$', 'g');
|
194
|
+
r4 = new RegExp('^(' + w + ')([' + re + ']?)$', 'g');
|
195
|
+
r5 = new RegExp('(' + w + ')([' + re + '])', 'g');
|
196
|
+
|
197
|
+
// Collect all text nodes
|
198
|
+
this._walk(this.editor.getBody(), function(n) {
|
199
|
+
if (n.nodeType == 3) {
|
200
|
+
nl.push(n);
|
201
|
+
}
|
202
|
+
});
|
203
|
+
|
204
|
+
// Wrap incorrect words in spans
|
205
|
+
each(nl, function(n) {
|
206
|
+
var v;
|
207
|
+
|
208
|
+
if (n.nodeType == 3) {
|
209
|
+
v = n.nodeValue;
|
210
|
+
|
211
|
+
if (r1.test(v) || r2.test(v) || r3.test(v) || r4.test(v)) {
|
212
|
+
v = dom.encode(v);
|
213
|
+
v = v.replace(r5, '<span class="mceItemHiddenSpellWord">$1</span>$2');
|
214
|
+
v = v.replace(r3, '<span class="mceItemHiddenSpellWord">$1</span>$2');
|
215
|
+
|
216
|
+
dom.replace(dom.create('span', {'class' : 'mceItemHidden'}, v), n);
|
217
|
+
}
|
218
|
+
}
|
219
|
+
});
|
220
|
+
|
221
|
+
se.moveToBookmark(b);
|
222
|
+
},
|
223
|
+
|
224
|
+
_showMenu : function(ed, e) {
|
225
|
+
var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin());
|
226
|
+
|
227
|
+
if (!m) {
|
228
|
+
p1 = DOM.getPos(ed.getContentAreaContainer());
|
229
|
+
//p2 = DOM.getPos(ed.getContainer());
|
230
|
+
|
231
|
+
m = ed.controlManager.createDropMenu('spellcheckermenu', {
|
232
|
+
offset_x : p1.x,
|
233
|
+
offset_y : p1.y,
|
234
|
+
'class' : 'mceNoIcons'
|
235
|
+
});
|
236
|
+
|
237
|
+
t._menu = m;
|
238
|
+
}
|
239
|
+
|
240
|
+
if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) {
|
241
|
+
m.removeAll();
|
242
|
+
m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
243
|
+
|
244
|
+
t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) {
|
245
|
+
m.removeAll();
|
246
|
+
|
247
|
+
if (r.length > 0) {
|
248
|
+
m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
249
|
+
each(r, function(v) {
|
250
|
+
m.add({title : v, onclick : function() {
|
251
|
+
dom.replace(ed.getDoc().createTextNode(v), e.target);
|
252
|
+
t._checkDone();
|
253
|
+
}});
|
254
|
+
});
|
255
|
+
|
256
|
+
m.addSeparator();
|
257
|
+
} else
|
258
|
+
m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
259
|
+
|
260
|
+
m.add({
|
261
|
+
title : 'spellchecker.ignore_word',
|
262
|
+
onclick : function() {
|
263
|
+
dom.remove(e.target, 1);
|
264
|
+
t._checkDone();
|
265
|
+
}
|
266
|
+
});
|
267
|
+
|
268
|
+
m.add({
|
269
|
+
title : 'spellchecker.ignore_words',
|
270
|
+
onclick : function() {
|
271
|
+
t._removeWords(dom.decode(e.target.innerHTML));
|
272
|
+
t._checkDone();
|
273
|
+
}
|
274
|
+
});
|
275
|
+
|
276
|
+
m.update();
|
277
|
+
});
|
278
|
+
|
279
|
+
ed.selection.select(e.target);
|
280
|
+
p1 = dom.getPos(e.target);
|
281
|
+
m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y);
|
282
|
+
|
283
|
+
return tinymce.dom.Event.cancel(e);
|
284
|
+
} else
|
285
|
+
m.hideMenu();
|
286
|
+
},
|
287
|
+
|
288
|
+
_checkDone : function() {
|
289
|
+
var t = this, ed = t.editor, dom = ed.dom, o;
|
290
|
+
|
291
|
+
each(dom.select('span'), function(n) {
|
292
|
+
if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) {
|
293
|
+
o = true;
|
294
|
+
return false;
|
295
|
+
}
|
296
|
+
});
|
297
|
+
|
298
|
+
if (!o)
|
299
|
+
t._done();
|
300
|
+
},
|
301
|
+
|
302
|
+
_done : function() {
|
303
|
+
var t = this, la = t.active;
|
304
|
+
|
305
|
+
if (t.active) {
|
306
|
+
t.active = 0;
|
307
|
+
t._removeWords();
|
308
|
+
|
309
|
+
if (t._menu)
|
310
|
+
t._menu.hideMenu();
|
311
|
+
|
312
|
+
if (la)
|
313
|
+
t.editor.nodeChanged();
|
314
|
+
}
|
315
|
+
},
|
316
|
+
|
317
|
+
_sendRPC : function(m, p, cb) {
|
318
|
+
var t = this, url = t.editor.getParam("spellchecker_rpc_url", "{backend}");
|
319
|
+
|
320
|
+
if (url == '{backend}') {
|
321
|
+
t.editor.setProgressState(0);
|
322
|
+
alert('Please specify: spellchecker_rpc_url');
|
323
|
+
return;
|
324
|
+
}
|
325
|
+
|
326
|
+
JSONRequest.sendRPC({
|
327
|
+
url : url,
|
328
|
+
method : m,
|
329
|
+
params : p,
|
330
|
+
success : cb,
|
331
|
+
error : function(e, x) {
|
332
|
+
t.editor.setProgressState(0);
|
333
|
+
t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText));
|
334
|
+
}
|
335
|
+
});
|
336
|
+
}
|
337
|
+
});
|
338
|
+
|
339
|
+
// Register plugin
|
340
|
+
tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
|
341
|
+
})();
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#text_font {width:250px;}
|
2
|
+
#text_size {width:70px;}
|
3
|
+
.mceAddSelectValue {background:#DDD;}
|
4
|
+
select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;}
|
5
|
+
#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;}
|
6
|
+
#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;}
|
7
|
+
#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;}
|
8
|
+
.panel_wrapper div.current {padding-top:10px;height:230px;}
|
9
|
+
.delim {border-left:1px solid gray;}
|
10
|
+
.tdelim {border-bottom:1px solid gray;}
|
11
|
+
#block_display {width:145px;}
|
12
|
+
#list_type {width:115px;}
|
13
|
+
.disabled {background:#EEE;}
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})();
|
@@ -0,0 +1,55 @@
|
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function() {
|
12
|
+
tinymce.create('tinymce.plugins.StylePlugin', {
|
13
|
+
init : function(ed, url) {
|
14
|
+
// Register commands
|
15
|
+
ed.addCommand('mceStyleProps', function() {
|
16
|
+
ed.windowManager.open({
|
17
|
+
file : url + '/props.htm',
|
18
|
+
width : 480 + parseInt(ed.getLang('style.delta_width', 0)),
|
19
|
+
height : 320 + parseInt(ed.getLang('style.delta_height', 0)),
|
20
|
+
inline : 1
|
21
|
+
}, {
|
22
|
+
plugin_url : url,
|
23
|
+
style_text : ed.selection.getNode().style.cssText
|
24
|
+
});
|
25
|
+
});
|
26
|
+
|
27
|
+
ed.addCommand('mceSetElementStyle', function(ui, v) {
|
28
|
+
if (e = ed.selection.getNode()) {
|
29
|
+
ed.dom.setAttrib(e, 'style', v);
|
30
|
+
ed.execCommand('mceRepaint');
|
31
|
+
}
|
32
|
+
});
|
33
|
+
|
34
|
+
ed.onNodeChange.add(function(ed, cm, n) {
|
35
|
+
cm.setDisabled('styleprops', n.nodeName === 'BODY');
|
36
|
+
});
|
37
|
+
|
38
|
+
// Register buttons
|
39
|
+
ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'});
|
40
|
+
},
|
41
|
+
|
42
|
+
getInfo : function() {
|
43
|
+
return {
|
44
|
+
longname : 'Style',
|
45
|
+
author : 'Moxiecode Systems AB',
|
46
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
47
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',
|
48
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
49
|
+
};
|
50
|
+
}
|
51
|
+
});
|
52
|
+
|
53
|
+
// Register plugin
|
54
|
+
tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin);
|
55
|
+
})();
|