tb_core 1.1.10 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/README.md +50 -2
- data/app/assets/javascripts/admin/core/application.js +2 -2
- data/app/assets/javascripts/admin/core/editor.js +1 -0
- data/app/assets/javascripts/admin/core/preinit.js +1 -1
- data/app/assets/javascripts/admin/core/split_pane.js +4 -0
- data/app/assets/javascripts/admin/core/users.js +59 -12
- data/app/assets/libs/bootstrap/css/{bootstrap.css → bootstrap.css.scss} +11 -11
- data/app/assets/libs/{tiny_mce → tinymce}/plugins/tableDropdown/editor_plugin.js +0 -0
- data/app/controllers/admin/application_controller.rb +0 -1
- data/app/controllers/admin/roles_controller.rb +10 -4
- data/app/controllers/admin/settings_controller.rb +10 -2
- data/app/controllers/admin/setup_controller.rb +7 -1
- data/app/controllers/admin/users_controller.rb +8 -2
- data/app/controllers/sitemaps_controller.rb +0 -1
- data/app/controllers/spud/application_controller.rb +9 -2
- data/app/helpers/spud/application_helper.rb +21 -0
- data/app/models/spud/spud_user_model.rb +79 -0
- data/app/models/spud_role.rb +0 -1
- data/app/models/spud_role_permission.rb +0 -1
- data/app/models/spud_user.rb +2 -80
- data/app/views/admin/roles/index.html.erb +4 -2
- data/app/views/admin/users/_form.html.erb +3 -0
- data/app/views/admin/users/_form_additions.html.erb +1 -0
- data/app/views/admin/users/_show_additions.html.erb +1 -0
- data/app/views/admin/users/show.html.erb +1 -0
- data/config/routes.rb +3 -3
- data/lib/generators/spud/module_generator.rb +5 -1
- data/lib/generators/spud/templates/admin_controller.rb.erb +6 -2
- data/lib/generators/spud/templates/views/admin/index.html.erb +5 -7
- data/lib/spud_core/engine.rb +2 -24
- data/lib/spud_core/version.rb +1 -1
- data/spec/controllers/admin/settings_controller_spec.rb +2 -2
- data/spec/controllers/sitemap_controllers_spec.rb +4 -3
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/config/environments/test.rb +9 -2
- data/spec/dummy/config/initializers/secret_token.rb +1 -0
- data/spec/dummy/log/test.log +12429 -0
- data/spec/dummy/tmp/cache/assets/test/sass/05388b0d18737541b44c9082e3fa19afa6bf3826/application.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/05388b0d18737541b44c9082e3fa19afa6bf3826/login.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/05388b0d18737541b44c9082e3fa19afa6bf3826/split_pane.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/05388b0d18737541b44c9082e3fa19afa6bf3826/users.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/e99c58815a3ff18987eada90ba5c7e95383074f2/bootstrap.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0075c6e170e8012f220c7ed9fb5dc88b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/01666d6af504317dcf63364a37ce60f4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/03dcdc877f0257624872c73967d201c6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/06d52af2fa483161bb27dd39c3b34ee3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/098869073bd11dbc41fcaa47716a0ce7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0cabf8a5146f359edd424e4f820e07f1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0f971f36ba87298fbaf46154fa8a5d30 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13809885160329b0a1a4e7885fb75ca4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/16243b3ad44c2997ad70996b58c56a2a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/169b221054fadd95f44252a232a5f053 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1816341e15110810c4647824cc81d1aa +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/18d440ef7bcf78056d346ac1ff2a6793 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1c06ad369cba88ec3ff5afc06e982d7c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1fa18bd231ff77b2af93913518487967 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/21e6a044a925c5f44f5a9d9b9e2d164a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2393e42173c512eb5171116ee479ab7e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2b94b5653a1151795fb999b3e98fd1d8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2fe2bffc50d1c3cd5c0a896a5528e23b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3024a96b82ffd6a5f68295a953231c92 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3123e8917685babc03cb0c8aeccac695 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/353180d0c9fd2a3ccef3718d7e6ace6c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/37539a535fefc75cd61aa9438d821846 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/38eabf5ce9c4dda42d09332aee816d3e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/39efa102c753ebe9defd90062785a8aa +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3cc30d9fb936455c063d7a950c46bb32 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4546971591261f8a01d0837f5a31af35 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/45b53d5ab2cac60703cd9d2cf52c14eb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/49d27d2d81616b48039efe15075da4f2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4a689e727abc31a4f93798253a176295 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/55d4fc42707dc9a3400faf92bed0360a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5759e8cff07b97209ca7ea6a93b3ed1a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5c4e1741d24424c6947eaff78829d41f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5cdaff8b68930bd29868b3d0fcb33766 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5de67e95811f3524bac96ba237505ae6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5fe538b2e33228dd92d36cfce50cf4b7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6671fad14ea054e577e2dfbcd98e571c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6d7103090b0047c9b8d5746d75e8fac9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/705426de92785d4afa88b06757d25f7d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/71e715ef316e725981280e9bfe9d0527 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7391889bc52e8664fd5d590d58a7ec8f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7828cb89eaa43959329e301a04ef10a6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/80dda53c03df39ae9ed8c2400f05990a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8121614a686088a7f27165baf5d63da3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/85af4404353b8373764b166027ce78a4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/85cdc3810a743722e618b949199320ec +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/88099ac9106f32ee56c2cdde301f4aeb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/89fbb1e40182037e0eec01e0d3bab067 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8bb56cbae5a8a5b5f1cf04183a746966 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8fb7066c091dc8956fadaa0c316fb808 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9214ad2c4fc7c0298ec351e00379a706 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9313c3ae5de2dc96635bfa4e6957a149 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/940374cda01486d892775b6f65986599 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/966f020d24b19c1d685c51c240d1923a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a444109f6d82fec9d3e8224e0508abc9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a4adceeb24e0e96b3cd701b06c7b53d2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a4c8d8c64ed3eca5b07e3c1478b00a81 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a7305f76eab9ded7ce734cea8967a8ee +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aa893fde36bb6d9e2184bba8385ce160 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b26e8bc7c7c32058397f892cd9d046d8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b8d4b4de990b07fda478ecb232a3b76f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ba173160d353bfb6e1f0f284bac8b9de +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bc750b216ba26d779bcf79fac037b36b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bef9d4af2f246671b5c9d21c40b49545 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c0eaf65fe0db1674c49ba2ae6cccb410 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c4fa3869fe96ebf26a17b08d5b45d5fb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c666b756412f64241236e1112b2e403d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c7301f1b1c7ee199b8b8487f43ce78c8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cb96d7509d3c2b2f16d6d3a1eaac2b79 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d02977fa67cf6643e31bb4c063a6d205 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d5b4ee9436615cb36bb22b9ba87791cf +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/daec02064da70ae5def8a75a5c36e58d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dd32919d4bcd591d7aa6937ba4b39ddb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e12ec2fd151046a8235cb53a379b3151 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e232a62130dade197fcabdd428cf737c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e7d7a71fa09119e96e640cba43763911 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f165c137fabbacd60c1bc9fbb6878ae9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f365efd4df73b42e492cd479032636ca +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f81f473be9c249d9ff823b35ba6c7130 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fda81067bc547bd67ac35e1bc4a7c167 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fde0dc66d618f90500842b827a11d83b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fe35aa99166bfe64fdab2f5f5373a80d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ff91e57c48a0748be0394a67cd555438 +0 -0
- metadata +240 -182
- data/app/assets/libs/tiny_mce/jquery.tinymce.js +0 -1
- data/app/assets/libs/tiny_mce/langs/en.js +0 -1
- data/app/assets/libs/tiny_mce/license.txt +0 -504
- data/app/assets/libs/tiny_mce/plugins/advhr/css/advhr.css +0 -5
- data/app/assets/libs/tiny_mce/plugins/advhr/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/advhr/editor_plugin_src.js +0 -57
- data/app/assets/libs/tiny_mce/plugins/advhr/js/rule.js +0 -43
- data/app/assets/libs/tiny_mce/plugins/advhr/langs/en_dlg.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/advhr/rule.htm +0 -58
- data/app/assets/libs/tiny_mce/plugins/advimage/css/advimage.css +0 -13
- data/app/assets/libs/tiny_mce/plugins/advimage/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/advimage/editor_plugin_src.js +0 -50
- data/app/assets/libs/tiny_mce/plugins/advimage/image.htm +0 -235
- data/app/assets/libs/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/advimage/js/image.js +0 -462
- data/app/assets/libs/tiny_mce/plugins/advimage/langs/en_dlg.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/advlink/css/advlink.css +0 -8
- data/app/assets/libs/tiny_mce/plugins/advlink/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/advlink/editor_plugin_src.js +0 -61
- data/app/assets/libs/tiny_mce/plugins/advlink/js/advlink.js +0 -539
- data/app/assets/libs/tiny_mce/plugins/advlink/langs/en_dlg.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/advlink/link.htm +0 -338
- data/app/assets/libs/tiny_mce/plugins/autolink/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/autolink/editor_plugin_src.js +0 -174
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +0 -699
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -90
- data/app/assets/libs/tiny_mce/plugins/inlinepopups/template.htm +0 -387
- data/app/assets/libs/tiny_mce/plugins/lists/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/lists/editor_plugin_src.js +0 -951
- data/app/assets/libs/tiny_mce/plugins/media/css/media.css +0 -17
- data/app/assets/libs/tiny_mce/plugins/media/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/media/editor_plugin_src.js +0 -890
- data/app/assets/libs/tiny_mce/plugins/media/js/embed.js +0 -73
- data/app/assets/libs/tiny_mce/plugins/media/js/media.js +0 -470
- data/app/assets/libs/tiny_mce/plugins/media/langs/en_dlg.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/media/media.htm +0 -922
- data/app/assets/libs/tiny_mce/plugins/media/moxieplayer.swf +0 -0
- data/app/assets/libs/tiny_mce/plugins/paste/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/paste/editor_plugin_src.js +0 -871
- data/app/assets/libs/tiny_mce/plugins/paste/js/pastetext.js +0 -36
- data/app/assets/libs/tiny_mce/plugins/paste/js/pasteword.js +0 -51
- data/app/assets/libs/tiny_mce/plugins/paste/langs/en_dlg.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/paste/pastetext.htm +0 -27
- data/app/assets/libs/tiny_mce/plugins/paste/pasteword.htm +0 -21
- data/app/assets/libs/tiny_mce/plugins/table/cell.htm +0 -180
- data/app/assets/libs/tiny_mce/plugins/table/css/cell.css +0 -17
- data/app/assets/libs/tiny_mce/plugins/table/css/row.css +0 -25
- data/app/assets/libs/tiny_mce/plugins/table/css/table.css +0 -13
- data/app/assets/libs/tiny_mce/plugins/table/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/table/editor_plugin_src.js +0 -1428
- data/app/assets/libs/tiny_mce/plugins/table/js/cell.js +0 -319
- data/app/assets/libs/tiny_mce/plugins/table/js/merge_cells.js +0 -27
- data/app/assets/libs/tiny_mce/plugins/table/js/row.js +0 -237
- data/app/assets/libs/tiny_mce/plugins/table/js/table.js +0 -489
- data/app/assets/libs/tiny_mce/plugins/table/langs/en_dlg.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/table/merge_cells.htm +0 -32
- data/app/assets/libs/tiny_mce/plugins/table/row.htm +0 -158
- data/app/assets/libs/tiny_mce/plugins/table/table.htm +0 -188
- data/app/assets/libs/tiny_mce/themes/advanced/about.htm +0 -52
- data/app/assets/libs/tiny_mce/themes/advanced/anchor.htm +0 -26
- data/app/assets/libs/tiny_mce/themes/advanced/charmap.htm +0 -55
- data/app/assets/libs/tiny_mce/themes/advanced/color_picker.htm +0 -70
- data/app/assets/libs/tiny_mce/themes/advanced/editor_template.js +0 -1
- data/app/assets/libs/tiny_mce/themes/advanced/editor_template_src.js +0 -1467
- data/app/assets/libs/tiny_mce/themes/advanced/image.htm +0 -80
- data/app/assets/libs/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/flash.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/iframe.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/trans.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/video.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/js/about.js +0 -73
- data/app/assets/libs/tiny_mce/themes/advanced/js/anchor.js +0 -44
- data/app/assets/libs/tiny_mce/themes/advanced/js/charmap.js +0 -363
- data/app/assets/libs/tiny_mce/themes/advanced/js/color_picker.js +0 -345
- data/app/assets/libs/tiny_mce/themes/advanced/js/image.js +0 -251
- data/app/assets/libs/tiny_mce/themes/advanced/js/link.js +0 -153
- data/app/assets/libs/tiny_mce/themes/advanced/js/source_editor.js +0 -78
- data/app/assets/libs/tiny_mce/themes/advanced/langs/en.js +0 -1
- data/app/assets/libs/tiny_mce/themes/advanced/langs/en_dlg.js +0 -1
- data/app/assets/libs/tiny_mce/themes/advanced/link.htm +0 -57
- data/app/assets/libs/tiny_mce/themes/advanced/shortcuts.htm +0 -47
- data/app/assets/libs/tiny_mce/themes/advanced/skins/default/content.css +0 -51
- data/app/assets/libs/tiny_mce/themes/advanced/skins/default/dialog.css +0 -118
- data/app/assets/libs/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/skins/default/ui.css +0 -215
- data/app/assets/libs/tiny_mce/themes/advanced/skins/highcontrast/content.css +0 -25
- data/app/assets/libs/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +0 -106
- data/app/assets/libs/tiny_mce/themes/advanced/skins/highcontrast/ui.css +0 -102
- data/app/assets/libs/tiny_mce/themes/advanced/skins/o2k7/content.css +0 -49
- data/app/assets/libs/tiny_mce/themes/advanced/skins/o2k7/dialog.css +0 -118
- data/app/assets/libs/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/app/assets/libs/tiny_mce/themes/advanced/skins/o2k7/ui.css +0 -218
- data/app/assets/libs/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +0 -8
- data/app/assets/libs/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
- data/app/assets/libs/tiny_mce/themes/advanced/source_editor.htm +0 -25
- data/app/assets/libs/tiny_mce/themes/simple/editor_template.js +0 -1
- data/app/assets/libs/tiny_mce/themes/simple/editor_template_src.js +0 -84
- data/app/assets/libs/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/app/assets/libs/tiny_mce/themes/simple/langs/en.js +0 -1
- data/app/assets/libs/tiny_mce/themes/simple/skins/default/content.css +0 -25
- data/app/assets/libs/tiny_mce/themes/simple/skins/default/ui.css +0 -32
- data/app/assets/libs/tiny_mce/themes/simple/skins/o2k7/content.css +0 -17
- data/app/assets/libs/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/app/assets/libs/tiny_mce/themes/simple/skins/o2k7/ui.css +0 -35
- data/app/assets/libs/tiny_mce/tiny_mce.js +0 -1
- data/app/assets/libs/tiny_mce/tiny_mce_popup.js +0 -5
- data/app/assets/libs/tiny_mce/tiny_mce_src.js +0 -16753
- data/app/assets/libs/tiny_mce/utils/editable_selects.js +0 -70
- data/app/assets/libs/tiny_mce/utils/form_utils.js +0 -210
- data/app/assets/libs/tiny_mce/utils/mctabs.js +0 -162
- data/app/assets/libs/tiny_mce/utils/validate.js +0 -252
- data/app/models/concerns/spud_authentication.rb +0 -10
@@ -1,699 +0,0 @@
|
|
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 DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
|
13
|
-
|
14
|
-
tinymce.create('tinymce.plugins.InlinePopups', {
|
15
|
-
init : function(ed, url) {
|
16
|
-
// Replace window manager
|
17
|
-
ed.onBeforeRenderUI.add(function() {
|
18
|
-
ed.windowManager = new tinymce.InlineWindowManager(ed);
|
19
|
-
DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
|
20
|
-
});
|
21
|
-
},
|
22
|
-
|
23
|
-
getInfo : function() {
|
24
|
-
return {
|
25
|
-
longname : 'InlinePopups',
|
26
|
-
author : 'Moxiecode Systems AB',
|
27
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
28
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
|
29
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
30
|
-
};
|
31
|
-
}
|
32
|
-
});
|
33
|
-
|
34
|
-
tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
|
35
|
-
InlineWindowManager : function(ed) {
|
36
|
-
var t = this;
|
37
|
-
|
38
|
-
t.parent(ed);
|
39
|
-
t.zIndex = 300000;
|
40
|
-
t.count = 0;
|
41
|
-
t.windows = {};
|
42
|
-
},
|
43
|
-
|
44
|
-
open : function(f, p) {
|
45
|
-
var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
|
46
|
-
|
47
|
-
f = f || {};
|
48
|
-
p = p || {};
|
49
|
-
|
50
|
-
// Run native windows
|
51
|
-
if (!f.inline)
|
52
|
-
return t.parent(f, p);
|
53
|
-
|
54
|
-
parentWindow = t._frontWindow();
|
55
|
-
if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
|
56
|
-
parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
|
57
|
-
}
|
58
|
-
|
59
|
-
// Only store selection if the type is a normal window
|
60
|
-
if (!f.type)
|
61
|
-
t.bookmark = ed.selection.getBookmark(1);
|
62
|
-
|
63
|
-
id = DOM.uniqueId();
|
64
|
-
vp = DOM.getViewPort();
|
65
|
-
f.width = parseInt(f.width || 320);
|
66
|
-
f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
|
67
|
-
f.min_width = parseInt(f.min_width || 150);
|
68
|
-
f.min_height = parseInt(f.min_height || 100);
|
69
|
-
f.max_width = parseInt(f.max_width || 2000);
|
70
|
-
f.max_height = parseInt(f.max_height || 2000);
|
71
|
-
f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
|
72
|
-
f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
|
73
|
-
f.movable = f.resizable = true;
|
74
|
-
p.mce_width = f.width;
|
75
|
-
p.mce_height = f.height;
|
76
|
-
p.mce_inline = true;
|
77
|
-
p.mce_window_id = id;
|
78
|
-
p.mce_auto_focus = f.auto_focus;
|
79
|
-
|
80
|
-
// Transpose
|
81
|
-
// po = DOM.getPos(ed.getContainer());
|
82
|
-
// f.left -= po.x;
|
83
|
-
// f.top -= po.y;
|
84
|
-
|
85
|
-
t.features = f;
|
86
|
-
t.params = p;
|
87
|
-
t.onOpen.dispatch(t, f, p);
|
88
|
-
|
89
|
-
if (f.type) {
|
90
|
-
opt += ' mceModal';
|
91
|
-
|
92
|
-
if (f.type)
|
93
|
-
opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
|
94
|
-
|
95
|
-
f.resizable = false;
|
96
|
-
}
|
97
|
-
|
98
|
-
if (f.statusbar)
|
99
|
-
opt += ' mceStatusbar';
|
100
|
-
|
101
|
-
if (f.resizable)
|
102
|
-
opt += ' mceResizable';
|
103
|
-
|
104
|
-
if (f.minimizable)
|
105
|
-
opt += ' mceMinimizable';
|
106
|
-
|
107
|
-
if (f.maximizable)
|
108
|
-
opt += ' mceMaximizable';
|
109
|
-
|
110
|
-
if (f.movable)
|
111
|
-
opt += ' mceMovable';
|
112
|
-
|
113
|
-
// Create DOM objects
|
114
|
-
t._addAll(DOM.doc.body,
|
115
|
-
['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
|
116
|
-
['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
|
117
|
-
['div', {id : id + '_top', 'class' : 'mceTop'},
|
118
|
-
['div', {'class' : 'mceLeft'}],
|
119
|
-
['div', {'class' : 'mceCenter'}],
|
120
|
-
['div', {'class' : 'mceRight'}],
|
121
|
-
['span', {id : id + '_title'}, f.title || '']
|
122
|
-
],
|
123
|
-
|
124
|
-
['div', {id : id + '_middle', 'class' : 'mceMiddle'},
|
125
|
-
['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
|
126
|
-
['span', {id : id + '_content'}],
|
127
|
-
['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
|
128
|
-
],
|
129
|
-
|
130
|
-
['div', {id : id + '_bottom', 'class' : 'mceBottom'},
|
131
|
-
['div', {'class' : 'mceLeft'}],
|
132
|
-
['div', {'class' : 'mceCenter'}],
|
133
|
-
['div', {'class' : 'mceRight'}],
|
134
|
-
['span', {id : id + '_status'}, 'Content']
|
135
|
-
],
|
136
|
-
|
137
|
-
['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
|
138
|
-
['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
139
|
-
['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
140
|
-
['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
141
|
-
['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
142
|
-
['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
|
143
|
-
['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
|
144
|
-
['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
|
145
|
-
['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
|
146
|
-
['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
|
147
|
-
['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
|
148
|
-
['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
|
149
|
-
['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
|
150
|
-
]
|
151
|
-
]
|
152
|
-
);
|
153
|
-
|
154
|
-
DOM.setStyles(id, {top : -10000, left : -10000});
|
155
|
-
|
156
|
-
// Fix gecko rendering bug, where the editors iframe messed with window contents
|
157
|
-
if (tinymce.isGecko)
|
158
|
-
DOM.setStyle(id, 'overflow', 'auto');
|
159
|
-
|
160
|
-
// Measure borders
|
161
|
-
if (!f.type) {
|
162
|
-
dw += DOM.get(id + '_left').clientWidth;
|
163
|
-
dw += DOM.get(id + '_right').clientWidth;
|
164
|
-
dh += DOM.get(id + '_top').clientHeight;
|
165
|
-
dh += DOM.get(id + '_bottom').clientHeight;
|
166
|
-
}
|
167
|
-
|
168
|
-
// Resize window
|
169
|
-
DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
|
170
|
-
|
171
|
-
u = f.url || f.file;
|
172
|
-
if (u) {
|
173
|
-
if (tinymce.relaxedDomain)
|
174
|
-
u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
|
175
|
-
|
176
|
-
u = tinymce._addVer(u);
|
177
|
-
}
|
178
|
-
|
179
|
-
if (!f.type) {
|
180
|
-
DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
|
181
|
-
DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
|
182
|
-
DOM.setAttrib(id + '_ifr', 'src', u);
|
183
|
-
} else {
|
184
|
-
DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
|
185
|
-
|
186
|
-
if (f.type == 'confirm')
|
187
|
-
DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
|
188
|
-
|
189
|
-
DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
|
190
|
-
DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
|
191
|
-
|
192
|
-
Event.add(id, 'keyup', function(evt) {
|
193
|
-
var VK_ESCAPE = 27;
|
194
|
-
if (evt.keyCode === VK_ESCAPE) {
|
195
|
-
f.button_func(false);
|
196
|
-
return Event.cancel(evt);
|
197
|
-
}
|
198
|
-
});
|
199
|
-
|
200
|
-
Event.add(id, 'keydown', function(evt) {
|
201
|
-
var cancelButton, VK_TAB = 9;
|
202
|
-
if (evt.keyCode === VK_TAB) {
|
203
|
-
cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
|
204
|
-
if (cancelButton && cancelButton !== evt.target) {
|
205
|
-
cancelButton.focus();
|
206
|
-
} else {
|
207
|
-
DOM.get(id + '_ok').focus();
|
208
|
-
}
|
209
|
-
return Event.cancel(evt);
|
210
|
-
}
|
211
|
-
});
|
212
|
-
}
|
213
|
-
|
214
|
-
// Register events
|
215
|
-
mdf = Event.add(id, 'mousedown', function(e) {
|
216
|
-
var n = e.target, w, vp;
|
217
|
-
|
218
|
-
w = t.windows[id];
|
219
|
-
t.focus(id);
|
220
|
-
|
221
|
-
if (n.nodeName == 'A' || n.nodeName == 'a') {
|
222
|
-
if (n.className == 'mceClose') {
|
223
|
-
t.close(null, id);
|
224
|
-
return Event.cancel(e);
|
225
|
-
} else if (n.className == 'mceMax') {
|
226
|
-
w.oldPos = w.element.getXY();
|
227
|
-
w.oldSize = w.element.getSize();
|
228
|
-
|
229
|
-
vp = DOM.getViewPort();
|
230
|
-
|
231
|
-
// Reduce viewport size to avoid scrollbars
|
232
|
-
vp.w -= 2;
|
233
|
-
vp.h -= 2;
|
234
|
-
|
235
|
-
w.element.moveTo(vp.x, vp.y);
|
236
|
-
w.element.resizeTo(vp.w, vp.h);
|
237
|
-
DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
|
238
|
-
DOM.addClass(id + '_wrapper', 'mceMaximized');
|
239
|
-
} else if (n.className == 'mceMed') {
|
240
|
-
// Reset to old size
|
241
|
-
w.element.moveTo(w.oldPos.x, w.oldPos.y);
|
242
|
-
w.element.resizeTo(w.oldSize.w, w.oldSize.h);
|
243
|
-
w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
|
244
|
-
|
245
|
-
DOM.removeClass(id + '_wrapper', 'mceMaximized');
|
246
|
-
} else if (n.className == 'mceMove')
|
247
|
-
return t._startDrag(id, e, n.className);
|
248
|
-
else if (DOM.hasClass(n, 'mceResize'))
|
249
|
-
return t._startDrag(id, e, n.className.substring(13));
|
250
|
-
}
|
251
|
-
});
|
252
|
-
|
253
|
-
clf = Event.add(id, 'click', function(e) {
|
254
|
-
var n = e.target;
|
255
|
-
|
256
|
-
t.focus(id);
|
257
|
-
|
258
|
-
if (n.nodeName == 'A' || n.nodeName == 'a') {
|
259
|
-
switch (n.className) {
|
260
|
-
case 'mceClose':
|
261
|
-
t.close(null, id);
|
262
|
-
return Event.cancel(e);
|
263
|
-
|
264
|
-
case 'mceButton mceOk':
|
265
|
-
case 'mceButton mceCancel':
|
266
|
-
f.button_func(n.className == 'mceButton mceOk');
|
267
|
-
return Event.cancel(e);
|
268
|
-
}
|
269
|
-
}
|
270
|
-
});
|
271
|
-
|
272
|
-
// Make sure the tab order loops within the dialog.
|
273
|
-
Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
|
274
|
-
var iframe = DOM.get(id + '_ifr');
|
275
|
-
if (iframe) {
|
276
|
-
var body = iframe.contentWindow.document.body;
|
277
|
-
var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
|
278
|
-
if (evt.target.id === (id + '_left')) {
|
279
|
-
focusable[focusable.length - 1].focus();
|
280
|
-
} else {
|
281
|
-
focusable[0].focus();
|
282
|
-
}
|
283
|
-
} else {
|
284
|
-
DOM.get(id + '_ok').focus();
|
285
|
-
}
|
286
|
-
});
|
287
|
-
|
288
|
-
// Add window
|
289
|
-
w = t.windows[id] = {
|
290
|
-
id : id,
|
291
|
-
mousedown_func : mdf,
|
292
|
-
click_func : clf,
|
293
|
-
element : new Element(id, {blocker : 1, container : ed.getContainer()}),
|
294
|
-
iframeElement : new Element(id + '_ifr'),
|
295
|
-
features : f,
|
296
|
-
deltaWidth : dw,
|
297
|
-
deltaHeight : dh
|
298
|
-
};
|
299
|
-
|
300
|
-
w.iframeElement.on('focus', function() {
|
301
|
-
t.focus(id);
|
302
|
-
});
|
303
|
-
|
304
|
-
// Setup blocker
|
305
|
-
if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
|
306
|
-
DOM.add(DOM.doc.body, 'div', {
|
307
|
-
id : 'mceModalBlocker',
|
308
|
-
'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
|
309
|
-
style : {zIndex : t.zIndex - 1}
|
310
|
-
});
|
311
|
-
|
312
|
-
DOM.show('mceModalBlocker'); // Reduces flicker in IE
|
313
|
-
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
|
314
|
-
} else
|
315
|
-
DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
|
316
|
-
|
317
|
-
if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
|
318
|
-
DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
319
|
-
|
320
|
-
DOM.setAttrib(id, 'aria-hidden', 'false');
|
321
|
-
t.focus(id);
|
322
|
-
t._fixIELayout(id, 1);
|
323
|
-
|
324
|
-
// Focus ok button
|
325
|
-
if (DOM.get(id + '_ok'))
|
326
|
-
DOM.get(id + '_ok').focus();
|
327
|
-
t.count++;
|
328
|
-
|
329
|
-
return w;
|
330
|
-
},
|
331
|
-
|
332
|
-
focus : function(id) {
|
333
|
-
var t = this, w;
|
334
|
-
|
335
|
-
if (w = t.windows[id]) {
|
336
|
-
w.zIndex = this.zIndex++;
|
337
|
-
w.element.setStyle('zIndex', w.zIndex);
|
338
|
-
w.element.update();
|
339
|
-
|
340
|
-
id = id + '_wrapper';
|
341
|
-
DOM.removeClass(t.lastId, 'mceFocus');
|
342
|
-
DOM.addClass(id, 'mceFocus');
|
343
|
-
t.lastId = id;
|
344
|
-
|
345
|
-
if (w.focussedElement) {
|
346
|
-
w.focussedElement.focus();
|
347
|
-
} else if (DOM.get(id + '_ok')) {
|
348
|
-
DOM.get(w.id + '_ok').focus();
|
349
|
-
} else if (DOM.get(w.id + '_ifr')) {
|
350
|
-
DOM.get(w.id + '_ifr').focus();
|
351
|
-
}
|
352
|
-
}
|
353
|
-
},
|
354
|
-
|
355
|
-
_addAll : function(te, ne) {
|
356
|
-
var i, n, t = this, dom = tinymce.DOM;
|
357
|
-
|
358
|
-
if (is(ne, 'string'))
|
359
|
-
te.appendChild(dom.doc.createTextNode(ne));
|
360
|
-
else if (ne.length) {
|
361
|
-
te = te.appendChild(dom.create(ne[0], ne[1]));
|
362
|
-
|
363
|
-
for (i=2; i<ne.length; i++)
|
364
|
-
t._addAll(te, ne[i]);
|
365
|
-
}
|
366
|
-
},
|
367
|
-
|
368
|
-
_startDrag : function(id, se, ac) {
|
369
|
-
var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
|
370
|
-
|
371
|
-
// Get positons and sizes
|
372
|
-
// cp = DOM.getPos(t.editor.getContainer());
|
373
|
-
cp = {x : 0, y : 0};
|
374
|
-
vp = DOM.getViewPort();
|
375
|
-
|
376
|
-
// Reduce viewport size to avoid scrollbars while dragging
|
377
|
-
vp.w -= 2;
|
378
|
-
vp.h -= 2;
|
379
|
-
|
380
|
-
sex = se.screenX;
|
381
|
-
sey = se.screenY;
|
382
|
-
dx = dy = dw = dh = 0;
|
383
|
-
|
384
|
-
// Handle mouse up
|
385
|
-
mu = Event.add(d, 'mouseup', function(e) {
|
386
|
-
Event.remove(d, 'mouseup', mu);
|
387
|
-
Event.remove(d, 'mousemove', mm);
|
388
|
-
|
389
|
-
if (eb)
|
390
|
-
eb.remove();
|
391
|
-
|
392
|
-
we.moveBy(dx, dy);
|
393
|
-
we.resizeBy(dw, dh);
|
394
|
-
sz = we.getSize();
|
395
|
-
DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
|
396
|
-
t._fixIELayout(id, 1);
|
397
|
-
|
398
|
-
return Event.cancel(e);
|
399
|
-
});
|
400
|
-
|
401
|
-
if (ac != 'Move')
|
402
|
-
startMove();
|
403
|
-
|
404
|
-
function startMove() {
|
405
|
-
if (eb)
|
406
|
-
return;
|
407
|
-
|
408
|
-
t._fixIELayout(id, 0);
|
409
|
-
|
410
|
-
// Setup event blocker
|
411
|
-
DOM.add(d.body, 'div', {
|
412
|
-
id : 'mceEventBlocker',
|
413
|
-
'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
|
414
|
-
style : {zIndex : t.zIndex + 1}
|
415
|
-
});
|
416
|
-
|
417
|
-
if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
|
418
|
-
DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
419
|
-
|
420
|
-
eb = new Element('mceEventBlocker');
|
421
|
-
eb.update();
|
422
|
-
|
423
|
-
// Setup placeholder
|
424
|
-
p = we.getXY();
|
425
|
-
sz = we.getSize();
|
426
|
-
sx = cp.x + p.x - vp.x;
|
427
|
-
sy = cp.y + p.y - vp.y;
|
428
|
-
DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
|
429
|
-
ph = new Element('mcePlaceHolder');
|
430
|
-
};
|
431
|
-
|
432
|
-
// Handle mouse move/drag
|
433
|
-
mm = Event.add(d, 'mousemove', function(e) {
|
434
|
-
var x, y, v;
|
435
|
-
|
436
|
-
startMove();
|
437
|
-
|
438
|
-
x = e.screenX - sex;
|
439
|
-
y = e.screenY - sey;
|
440
|
-
|
441
|
-
switch (ac) {
|
442
|
-
case 'ResizeW':
|
443
|
-
dx = x;
|
444
|
-
dw = 0 - x;
|
445
|
-
break;
|
446
|
-
|
447
|
-
case 'ResizeE':
|
448
|
-
dw = x;
|
449
|
-
break;
|
450
|
-
|
451
|
-
case 'ResizeN':
|
452
|
-
case 'ResizeNW':
|
453
|
-
case 'ResizeNE':
|
454
|
-
if (ac == "ResizeNW") {
|
455
|
-
dx = x;
|
456
|
-
dw = 0 - x;
|
457
|
-
} else if (ac == "ResizeNE")
|
458
|
-
dw = x;
|
459
|
-
|
460
|
-
dy = y;
|
461
|
-
dh = 0 - y;
|
462
|
-
break;
|
463
|
-
|
464
|
-
case 'ResizeS':
|
465
|
-
case 'ResizeSW':
|
466
|
-
case 'ResizeSE':
|
467
|
-
if (ac == "ResizeSW") {
|
468
|
-
dx = x;
|
469
|
-
dw = 0 - x;
|
470
|
-
} else if (ac == "ResizeSE")
|
471
|
-
dw = x;
|
472
|
-
|
473
|
-
dh = y;
|
474
|
-
break;
|
475
|
-
|
476
|
-
case 'mceMove':
|
477
|
-
dx = x;
|
478
|
-
dy = y;
|
479
|
-
break;
|
480
|
-
}
|
481
|
-
|
482
|
-
// Boundary check
|
483
|
-
if (dw < (v = w.features.min_width - sz.w)) {
|
484
|
-
if (dx !== 0)
|
485
|
-
dx += dw - v;
|
486
|
-
|
487
|
-
dw = v;
|
488
|
-
}
|
489
|
-
|
490
|
-
if (dh < (v = w.features.min_height - sz.h)) {
|
491
|
-
if (dy !== 0)
|
492
|
-
dy += dh - v;
|
493
|
-
|
494
|
-
dh = v;
|
495
|
-
}
|
496
|
-
|
497
|
-
dw = Math.min(dw, w.features.max_width - sz.w);
|
498
|
-
dh = Math.min(dh, w.features.max_height - sz.h);
|
499
|
-
dx = Math.max(dx, vp.x - (sx + vp.x));
|
500
|
-
dy = Math.max(dy, vp.y - (sy + vp.y));
|
501
|
-
dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
|
502
|
-
dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
|
503
|
-
|
504
|
-
// Move if needed
|
505
|
-
if (dx + dy !== 0) {
|
506
|
-
if (sx + dx < 0)
|
507
|
-
dx = 0;
|
508
|
-
|
509
|
-
if (sy + dy < 0)
|
510
|
-
dy = 0;
|
511
|
-
|
512
|
-
ph.moveTo(sx + dx, sy + dy);
|
513
|
-
}
|
514
|
-
|
515
|
-
// Resize if needed
|
516
|
-
if (dw + dh !== 0)
|
517
|
-
ph.resizeTo(sz.w + dw, sz.h + dh);
|
518
|
-
|
519
|
-
return Event.cancel(e);
|
520
|
-
});
|
521
|
-
|
522
|
-
return Event.cancel(se);
|
523
|
-
},
|
524
|
-
|
525
|
-
resizeBy : function(dw, dh, id) {
|
526
|
-
var w = this.windows[id];
|
527
|
-
|
528
|
-
if (w) {
|
529
|
-
w.element.resizeBy(dw, dh);
|
530
|
-
w.iframeElement.resizeBy(dw, dh);
|
531
|
-
}
|
532
|
-
},
|
533
|
-
|
534
|
-
close : function(win, id) {
|
535
|
-
var t = this, w, d = DOM.doc, fw, id;
|
536
|
-
|
537
|
-
id = t._findId(id || win);
|
538
|
-
|
539
|
-
// Probably not inline
|
540
|
-
if (!t.windows[id]) {
|
541
|
-
t.parent(win);
|
542
|
-
return;
|
543
|
-
}
|
544
|
-
|
545
|
-
t.count--;
|
546
|
-
|
547
|
-
if (t.count == 0) {
|
548
|
-
DOM.remove('mceModalBlocker');
|
549
|
-
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
|
550
|
-
t.editor.focus();
|
551
|
-
}
|
552
|
-
|
553
|
-
if (w = t.windows[id]) {
|
554
|
-
t.onClose.dispatch(t);
|
555
|
-
Event.remove(d, 'mousedown', w.mousedownFunc);
|
556
|
-
Event.remove(d, 'click', w.clickFunc);
|
557
|
-
Event.clear(id);
|
558
|
-
Event.clear(id + '_ifr');
|
559
|
-
|
560
|
-
DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
|
561
|
-
w.element.remove();
|
562
|
-
delete t.windows[id];
|
563
|
-
|
564
|
-
fw = t._frontWindow();
|
565
|
-
|
566
|
-
if (fw)
|
567
|
-
t.focus(fw.id);
|
568
|
-
}
|
569
|
-
},
|
570
|
-
|
571
|
-
// Find front most window
|
572
|
-
_frontWindow : function() {
|
573
|
-
var fw, ix = 0;
|
574
|
-
// Find front most window and focus that
|
575
|
-
each (this.windows, function(w) {
|
576
|
-
if (w.zIndex > ix) {
|
577
|
-
fw = w;
|
578
|
-
ix = w.zIndex;
|
579
|
-
}
|
580
|
-
});
|
581
|
-
return fw;
|
582
|
-
},
|
583
|
-
|
584
|
-
setTitle : function(w, ti) {
|
585
|
-
var e;
|
586
|
-
|
587
|
-
w = this._findId(w);
|
588
|
-
|
589
|
-
if (e = DOM.get(w + '_title'))
|
590
|
-
e.innerHTML = DOM.encode(ti);
|
591
|
-
},
|
592
|
-
|
593
|
-
alert : function(txt, cb, s) {
|
594
|
-
var t = this, w;
|
595
|
-
|
596
|
-
w = t.open({
|
597
|
-
title : t,
|
598
|
-
type : 'alert',
|
599
|
-
button_func : function(s) {
|
600
|
-
if (cb)
|
601
|
-
cb.call(s || t, s);
|
602
|
-
|
603
|
-
t.close(null, w.id);
|
604
|
-
},
|
605
|
-
content : DOM.encode(t.editor.getLang(txt, txt)),
|
606
|
-
inline : 1,
|
607
|
-
width : 400,
|
608
|
-
height : 130
|
609
|
-
});
|
610
|
-
},
|
611
|
-
|
612
|
-
confirm : function(txt, cb, s) {
|
613
|
-
var t = this, w;
|
614
|
-
|
615
|
-
w = t.open({
|
616
|
-
title : t,
|
617
|
-
type : 'confirm',
|
618
|
-
button_func : function(s) {
|
619
|
-
if (cb)
|
620
|
-
cb.call(s || t, s);
|
621
|
-
|
622
|
-
t.close(null, w.id);
|
623
|
-
},
|
624
|
-
content : DOM.encode(t.editor.getLang(txt, txt)),
|
625
|
-
inline : 1,
|
626
|
-
width : 400,
|
627
|
-
height : 130
|
628
|
-
});
|
629
|
-
},
|
630
|
-
|
631
|
-
// Internal functions
|
632
|
-
|
633
|
-
_findId : function(w) {
|
634
|
-
var t = this;
|
635
|
-
|
636
|
-
if (typeof(w) == 'string')
|
637
|
-
return w;
|
638
|
-
|
639
|
-
each(t.windows, function(wo) {
|
640
|
-
var ifr = DOM.get(wo.id + '_ifr');
|
641
|
-
|
642
|
-
if (ifr && w == ifr.contentWindow) {
|
643
|
-
w = wo.id;
|
644
|
-
return false;
|
645
|
-
}
|
646
|
-
});
|
647
|
-
|
648
|
-
return w;
|
649
|
-
},
|
650
|
-
|
651
|
-
_fixIELayout : function(id, s) {
|
652
|
-
var w, img;
|
653
|
-
|
654
|
-
if (!tinymce.isIE6)
|
655
|
-
return;
|
656
|
-
|
657
|
-
// Fixes the bug where hover flickers and does odd things in IE6
|
658
|
-
each(['n','s','w','e','nw','ne','sw','se'], function(v) {
|
659
|
-
var e = DOM.get(id + '_resize_' + v);
|
660
|
-
|
661
|
-
DOM.setStyles(e, {
|
662
|
-
width : s ? e.clientWidth : '',
|
663
|
-
height : s ? e.clientHeight : '',
|
664
|
-
cursor : DOM.getStyle(e, 'cursor', 1)
|
665
|
-
});
|
666
|
-
|
667
|
-
DOM.setStyle(id + "_bottom", 'bottom', '-1px');
|
668
|
-
|
669
|
-
e = 0;
|
670
|
-
});
|
671
|
-
|
672
|
-
// Fixes graphics glitch
|
673
|
-
if (w = this.windows[id]) {
|
674
|
-
// Fixes rendering bug after resize
|
675
|
-
w.element.hide();
|
676
|
-
w.element.show();
|
677
|
-
|
678
|
-
// Forced a repaint of the window
|
679
|
-
//DOM.get(id).style.filter = '';
|
680
|
-
|
681
|
-
// IE has a bug where images used in CSS won't get loaded
|
682
|
-
// sometimes when the cache in the browser is disabled
|
683
|
-
// This fix tries to solve it by loading the images using the image object
|
684
|
-
each(DOM.select('div,a', id), function(e, i) {
|
685
|
-
if (e.currentStyle.backgroundImage != 'none') {
|
686
|
-
img = new Image();
|
687
|
-
img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
|
688
|
-
}
|
689
|
-
});
|
690
|
-
|
691
|
-
DOM.get(id).style.filter = '';
|
692
|
-
}
|
693
|
-
}
|
694
|
-
});
|
695
|
-
|
696
|
-
// Register plugin
|
697
|
-
tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
|
698
|
-
})();
|
699
|
-
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|