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,319 +0,0 @@
|
|
1
|
-
tinyMCEPopup.requireLangPack();
|
2
|
-
|
3
|
-
var ed;
|
4
|
-
|
5
|
-
function init() {
|
6
|
-
ed = tinyMCEPopup.editor;
|
7
|
-
tinyMCEPopup.resizeToInnerSize();
|
8
|
-
|
9
|
-
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
10
|
-
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
11
|
-
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
|
12
|
-
|
13
|
-
var inst = ed;
|
14
|
-
var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
|
15
|
-
var formObj = document.forms[0];
|
16
|
-
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
|
17
|
-
|
18
|
-
// Get table cell data
|
19
|
-
var celltype = tdElm.nodeName.toLowerCase();
|
20
|
-
var align = ed.dom.getAttrib(tdElm, 'align');
|
21
|
-
var valign = ed.dom.getAttrib(tdElm, 'valign');
|
22
|
-
var width = trimSize(getStyle(tdElm, 'width', 'width'));
|
23
|
-
var height = trimSize(getStyle(tdElm, 'height', 'height'));
|
24
|
-
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
|
25
|
-
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
|
26
|
-
var className = ed.dom.getAttrib(tdElm, 'class');
|
27
|
-
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
28
|
-
var id = ed.dom.getAttrib(tdElm, 'id');
|
29
|
-
var lang = ed.dom.getAttrib(tdElm, 'lang');
|
30
|
-
var dir = ed.dom.getAttrib(tdElm, 'dir');
|
31
|
-
var scope = ed.dom.getAttrib(tdElm, 'scope');
|
32
|
-
|
33
|
-
// Setup form
|
34
|
-
addClassesToList('class', 'table_cell_styles');
|
35
|
-
TinyMCE_EditableSelects.init();
|
36
|
-
|
37
|
-
if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
|
38
|
-
formObj.bordercolor.value = bordercolor;
|
39
|
-
formObj.bgcolor.value = bgcolor;
|
40
|
-
formObj.backgroundimage.value = backgroundimage;
|
41
|
-
formObj.width.value = width;
|
42
|
-
formObj.height.value = height;
|
43
|
-
formObj.id.value = id;
|
44
|
-
formObj.lang.value = lang;
|
45
|
-
formObj.style.value = ed.dom.serializeStyle(st);
|
46
|
-
selectByValue(formObj, 'align', align);
|
47
|
-
selectByValue(formObj, 'valign', valign);
|
48
|
-
selectByValue(formObj, 'class', className, true, true);
|
49
|
-
selectByValue(formObj, 'celltype', celltype);
|
50
|
-
selectByValue(formObj, 'dir', dir);
|
51
|
-
selectByValue(formObj, 'scope', scope);
|
52
|
-
|
53
|
-
// Resize some elements
|
54
|
-
if (isVisible('backgroundimagebrowser'))
|
55
|
-
document.getElementById('backgroundimage').style.width = '180px';
|
56
|
-
|
57
|
-
updateColor('bordercolor_pick', 'bordercolor');
|
58
|
-
updateColor('bgcolor_pick', 'bgcolor');
|
59
|
-
} else
|
60
|
-
tinyMCEPopup.dom.hide('action');
|
61
|
-
}
|
62
|
-
|
63
|
-
function updateAction() {
|
64
|
-
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
|
65
|
-
|
66
|
-
if (!AutoValidator.validate(formObj)) {
|
67
|
-
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
68
|
-
return false;
|
69
|
-
}
|
70
|
-
|
71
|
-
tinyMCEPopup.restoreSelection();
|
72
|
-
el = ed.selection.getStart();
|
73
|
-
tdElm = ed.dom.getParent(el, "td,th");
|
74
|
-
trElm = ed.dom.getParent(el, "tr");
|
75
|
-
tableElm = ed.dom.getParent(el, "table");
|
76
|
-
|
77
|
-
// Cell is selected
|
78
|
-
if (ed.dom.hasClass(tdElm, 'mceSelected')) {
|
79
|
-
// Update all selected sells
|
80
|
-
tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
|
81
|
-
updateCell(td);
|
82
|
-
});
|
83
|
-
|
84
|
-
ed.addVisual();
|
85
|
-
ed.nodeChanged();
|
86
|
-
inst.execCommand('mceEndUndoLevel');
|
87
|
-
tinyMCEPopup.close();
|
88
|
-
return;
|
89
|
-
}
|
90
|
-
|
91
|
-
switch (getSelectValue(formObj, 'action')) {
|
92
|
-
case "cell":
|
93
|
-
var celltype = getSelectValue(formObj, 'celltype');
|
94
|
-
var scope = getSelectValue(formObj, 'scope');
|
95
|
-
|
96
|
-
function doUpdate(s) {
|
97
|
-
if (s) {
|
98
|
-
updateCell(tdElm);
|
99
|
-
|
100
|
-
ed.addVisual();
|
101
|
-
ed.nodeChanged();
|
102
|
-
inst.execCommand('mceEndUndoLevel');
|
103
|
-
tinyMCEPopup.close();
|
104
|
-
}
|
105
|
-
};
|
106
|
-
|
107
|
-
if (ed.getParam("accessibility_warnings", 1)) {
|
108
|
-
if (celltype == "th" && scope == "")
|
109
|
-
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
|
110
|
-
else
|
111
|
-
doUpdate(1);
|
112
|
-
|
113
|
-
return;
|
114
|
-
}
|
115
|
-
|
116
|
-
updateCell(tdElm);
|
117
|
-
break;
|
118
|
-
|
119
|
-
case "row":
|
120
|
-
var cell = trElm.firstChild;
|
121
|
-
|
122
|
-
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
123
|
-
cell = nextCell(cell);
|
124
|
-
|
125
|
-
do {
|
126
|
-
cell = updateCell(cell, true);
|
127
|
-
} while ((cell = nextCell(cell)) != null);
|
128
|
-
|
129
|
-
break;
|
130
|
-
|
131
|
-
case "col":
|
132
|
-
var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr");
|
133
|
-
|
134
|
-
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
135
|
-
cell = nextCell(cell);
|
136
|
-
|
137
|
-
do {
|
138
|
-
if (cell == tdElm)
|
139
|
-
break;
|
140
|
-
col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
|
141
|
-
} while ((cell = nextCell(cell)) != null);
|
142
|
-
|
143
|
-
for (var i=0; i<rows.length; i++) {
|
144
|
-
cell = rows[i].firstChild;
|
145
|
-
|
146
|
-
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
147
|
-
cell = nextCell(cell);
|
148
|
-
|
149
|
-
curr = 0;
|
150
|
-
do {
|
151
|
-
if (curr == col) {
|
152
|
-
cell = updateCell(cell, true);
|
153
|
-
break;
|
154
|
-
}
|
155
|
-
curr += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
|
156
|
-
} while ((cell = nextCell(cell)) != null);
|
157
|
-
}
|
158
|
-
|
159
|
-
break;
|
160
|
-
|
161
|
-
case "all":
|
162
|
-
var rows = tableElm.getElementsByTagName("tr");
|
163
|
-
|
164
|
-
for (var i=0; i<rows.length; i++) {
|
165
|
-
var cell = rows[i].firstChild;
|
166
|
-
|
167
|
-
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
168
|
-
cell = nextCell(cell);
|
169
|
-
|
170
|
-
do {
|
171
|
-
cell = updateCell(cell, true);
|
172
|
-
} while ((cell = nextCell(cell)) != null);
|
173
|
-
}
|
174
|
-
|
175
|
-
break;
|
176
|
-
}
|
177
|
-
|
178
|
-
ed.addVisual();
|
179
|
-
ed.nodeChanged();
|
180
|
-
inst.execCommand('mceEndUndoLevel');
|
181
|
-
tinyMCEPopup.close();
|
182
|
-
}
|
183
|
-
|
184
|
-
function nextCell(elm) {
|
185
|
-
while ((elm = elm.nextSibling) != null) {
|
186
|
-
if (elm.nodeName == "TD" || elm.nodeName == "TH")
|
187
|
-
return elm;
|
188
|
-
}
|
189
|
-
|
190
|
-
return null;
|
191
|
-
}
|
192
|
-
|
193
|
-
function updateCell(td, skip_id) {
|
194
|
-
var inst = ed;
|
195
|
-
var formObj = document.forms[0];
|
196
|
-
var curCellType = td.nodeName.toLowerCase();
|
197
|
-
var celltype = getSelectValue(formObj, 'celltype');
|
198
|
-
var doc = inst.getDoc();
|
199
|
-
var dom = ed.dom;
|
200
|
-
|
201
|
-
if (!skip_id)
|
202
|
-
dom.setAttrib(td, 'id', formObj.id.value);
|
203
|
-
|
204
|
-
dom.setAttrib(td, 'align', formObj.align.value);
|
205
|
-
dom.setAttrib(td, 'vAlign', formObj.valign.value);
|
206
|
-
dom.setAttrib(td, 'lang', formObj.lang.value);
|
207
|
-
dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
|
208
|
-
dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
|
209
|
-
dom.setAttrib(td, 'scope', formObj.scope.value);
|
210
|
-
dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
|
211
|
-
|
212
|
-
// Clear deprecated attributes
|
213
|
-
ed.dom.setAttrib(td, 'width', '');
|
214
|
-
ed.dom.setAttrib(td, 'height', '');
|
215
|
-
ed.dom.setAttrib(td, 'bgColor', '');
|
216
|
-
ed.dom.setAttrib(td, 'borderColor', '');
|
217
|
-
ed.dom.setAttrib(td, 'background', '');
|
218
|
-
|
219
|
-
// Set styles
|
220
|
-
td.style.width = getCSSSize(formObj.width.value);
|
221
|
-
td.style.height = getCSSSize(formObj.height.value);
|
222
|
-
if (formObj.bordercolor.value != "") {
|
223
|
-
td.style.borderColor = formObj.bordercolor.value;
|
224
|
-
td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
|
225
|
-
td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
|
226
|
-
} else
|
227
|
-
td.style.borderColor = '';
|
228
|
-
|
229
|
-
td.style.backgroundColor = formObj.bgcolor.value;
|
230
|
-
|
231
|
-
if (formObj.backgroundimage.value != "")
|
232
|
-
td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
233
|
-
else
|
234
|
-
td.style.backgroundImage = '';
|
235
|
-
|
236
|
-
if (curCellType != celltype) {
|
237
|
-
// changing to a different node type
|
238
|
-
var newCell = doc.createElement(celltype);
|
239
|
-
|
240
|
-
for (var c=0; c<td.childNodes.length; c++)
|
241
|
-
newCell.appendChild(td.childNodes[c].cloneNode(1));
|
242
|
-
|
243
|
-
for (var a=0; a<td.attributes.length; a++)
|
244
|
-
ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
|
245
|
-
|
246
|
-
td.parentNode.replaceChild(newCell, td);
|
247
|
-
td = newCell;
|
248
|
-
}
|
249
|
-
|
250
|
-
dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
|
251
|
-
|
252
|
-
return td;
|
253
|
-
}
|
254
|
-
|
255
|
-
function changedBackgroundImage() {
|
256
|
-
var formObj = document.forms[0];
|
257
|
-
var st = ed.dom.parseStyle(formObj.style.value);
|
258
|
-
|
259
|
-
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
260
|
-
|
261
|
-
formObj.style.value = ed.dom.serializeStyle(st);
|
262
|
-
}
|
263
|
-
|
264
|
-
function changedSize() {
|
265
|
-
var formObj = document.forms[0];
|
266
|
-
var st = ed.dom.parseStyle(formObj.style.value);
|
267
|
-
|
268
|
-
var width = formObj.width.value;
|
269
|
-
if (width != "")
|
270
|
-
st['width'] = getCSSSize(width);
|
271
|
-
else
|
272
|
-
st['width'] = "";
|
273
|
-
|
274
|
-
var height = formObj.height.value;
|
275
|
-
if (height != "")
|
276
|
-
st['height'] = getCSSSize(height);
|
277
|
-
else
|
278
|
-
st['height'] = "";
|
279
|
-
|
280
|
-
formObj.style.value = ed.dom.serializeStyle(st);
|
281
|
-
}
|
282
|
-
|
283
|
-
function changedColor() {
|
284
|
-
var formObj = document.forms[0];
|
285
|
-
var st = ed.dom.parseStyle(formObj.style.value);
|
286
|
-
|
287
|
-
st['background-color'] = formObj.bgcolor.value;
|
288
|
-
st['border-color'] = formObj.bordercolor.value;
|
289
|
-
|
290
|
-
formObj.style.value = ed.dom.serializeStyle(st);
|
291
|
-
}
|
292
|
-
|
293
|
-
function changedStyle() {
|
294
|
-
var formObj = document.forms[0];
|
295
|
-
var st = ed.dom.parseStyle(formObj.style.value);
|
296
|
-
|
297
|
-
if (st['background-image'])
|
298
|
-
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
299
|
-
else
|
300
|
-
formObj.backgroundimage.value = '';
|
301
|
-
|
302
|
-
if (st['width'])
|
303
|
-
formObj.width.value = trimSize(st['width']);
|
304
|
-
|
305
|
-
if (st['height'])
|
306
|
-
formObj.height.value = trimSize(st['height']);
|
307
|
-
|
308
|
-
if (st['background-color']) {
|
309
|
-
formObj.bgcolor.value = st['background-color'];
|
310
|
-
updateColor('bgcolor_pick','bgcolor');
|
311
|
-
}
|
312
|
-
|
313
|
-
if (st['border-color']) {
|
314
|
-
formObj.bordercolor.value = st['border-color'];
|
315
|
-
updateColor('bordercolor_pick','bordercolor');
|
316
|
-
}
|
317
|
-
}
|
318
|
-
|
319
|
-
tinyMCEPopup.onInit.add(init);
|
@@ -1,27 +0,0 @@
|
|
1
|
-
tinyMCEPopup.requireLangPack();
|
2
|
-
|
3
|
-
var MergeCellsDialog = {
|
4
|
-
init : function() {
|
5
|
-
var f = document.forms[0];
|
6
|
-
|
7
|
-
f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
|
8
|
-
f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
|
9
|
-
},
|
10
|
-
|
11
|
-
merge : function() {
|
12
|
-
var func, f = document.forms[0];
|
13
|
-
|
14
|
-
tinyMCEPopup.restoreSelection();
|
15
|
-
|
16
|
-
func = tinyMCEPopup.getWindowArg('onaction');
|
17
|
-
|
18
|
-
func({
|
19
|
-
cols : f.numcols.value,
|
20
|
-
rows : f.numrows.value
|
21
|
-
});
|
22
|
-
|
23
|
-
tinyMCEPopup.close();
|
24
|
-
}
|
25
|
-
};
|
26
|
-
|
27
|
-
tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);
|
@@ -1,237 +0,0 @@
|
|
1
|
-
tinyMCEPopup.requireLangPack();
|
2
|
-
|
3
|
-
function init() {
|
4
|
-
tinyMCEPopup.resizeToInnerSize();
|
5
|
-
|
6
|
-
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
7
|
-
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
8
|
-
|
9
|
-
var inst = tinyMCEPopup.editor;
|
10
|
-
var dom = inst.dom;
|
11
|
-
var trElm = dom.getParent(inst.selection.getStart(), "tr");
|
12
|
-
var formObj = document.forms[0];
|
13
|
-
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
14
|
-
|
15
|
-
// Get table row data
|
16
|
-
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
17
|
-
var align = dom.getAttrib(trElm, 'align');
|
18
|
-
var valign = dom.getAttrib(trElm, 'valign');
|
19
|
-
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
20
|
-
var className = dom.getAttrib(trElm, 'class');
|
21
|
-
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
22
|
-
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
23
|
-
var id = dom.getAttrib(trElm, 'id');
|
24
|
-
var lang = dom.getAttrib(trElm, 'lang');
|
25
|
-
var dir = dom.getAttrib(trElm, 'dir');
|
26
|
-
|
27
|
-
selectByValue(formObj, 'rowtype', rowtype);
|
28
|
-
|
29
|
-
// Any cells selected
|
30
|
-
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
|
31
|
-
// Setup form
|
32
|
-
addClassesToList('class', 'table_row_styles');
|
33
|
-
TinyMCE_EditableSelects.init();
|
34
|
-
|
35
|
-
formObj.bgcolor.value = bgcolor;
|
36
|
-
formObj.backgroundimage.value = backgroundimage;
|
37
|
-
formObj.height.value = height;
|
38
|
-
formObj.id.value = id;
|
39
|
-
formObj.lang.value = lang;
|
40
|
-
formObj.style.value = dom.serializeStyle(st);
|
41
|
-
selectByValue(formObj, 'align', align);
|
42
|
-
selectByValue(formObj, 'valign', valign);
|
43
|
-
selectByValue(formObj, 'class', className, true, true);
|
44
|
-
selectByValue(formObj, 'dir', dir);
|
45
|
-
|
46
|
-
// Resize some elements
|
47
|
-
if (isVisible('backgroundimagebrowser'))
|
48
|
-
document.getElementById('backgroundimage').style.width = '180px';
|
49
|
-
|
50
|
-
updateColor('bgcolor_pick', 'bgcolor');
|
51
|
-
} else
|
52
|
-
tinyMCEPopup.dom.hide('action');
|
53
|
-
}
|
54
|
-
|
55
|
-
function updateAction() {
|
56
|
-
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
57
|
-
var action = getSelectValue(formObj, 'action');
|
58
|
-
|
59
|
-
if (!AutoValidator.validate(formObj)) {
|
60
|
-
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
61
|
-
return false;
|
62
|
-
}
|
63
|
-
|
64
|
-
tinyMCEPopup.restoreSelection();
|
65
|
-
trElm = dom.getParent(inst.selection.getStart(), "tr");
|
66
|
-
tableElm = dom.getParent(inst.selection.getStart(), "table");
|
67
|
-
|
68
|
-
// Update all selected rows
|
69
|
-
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
|
70
|
-
tinymce.each(tableElm.rows, function(tr) {
|
71
|
-
var i;
|
72
|
-
|
73
|
-
for (i = 0; i < tr.cells.length; i++) {
|
74
|
-
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
|
75
|
-
updateRow(tr, true);
|
76
|
-
return;
|
77
|
-
}
|
78
|
-
}
|
79
|
-
});
|
80
|
-
|
81
|
-
inst.addVisual();
|
82
|
-
inst.nodeChanged();
|
83
|
-
inst.execCommand('mceEndUndoLevel');
|
84
|
-
tinyMCEPopup.close();
|
85
|
-
return;
|
86
|
-
}
|
87
|
-
|
88
|
-
switch (action) {
|
89
|
-
case "row":
|
90
|
-
updateRow(trElm);
|
91
|
-
break;
|
92
|
-
|
93
|
-
case "all":
|
94
|
-
var rows = tableElm.getElementsByTagName("tr");
|
95
|
-
|
96
|
-
for (var i=0; i<rows.length; i++)
|
97
|
-
updateRow(rows[i], true);
|
98
|
-
|
99
|
-
break;
|
100
|
-
|
101
|
-
case "odd":
|
102
|
-
case "even":
|
103
|
-
var rows = tableElm.getElementsByTagName("tr");
|
104
|
-
|
105
|
-
for (var i=0; i<rows.length; i++) {
|
106
|
-
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
107
|
-
updateRow(rows[i], true, true);
|
108
|
-
}
|
109
|
-
|
110
|
-
break;
|
111
|
-
}
|
112
|
-
|
113
|
-
inst.addVisual();
|
114
|
-
inst.nodeChanged();
|
115
|
-
inst.execCommand('mceEndUndoLevel');
|
116
|
-
tinyMCEPopup.close();
|
117
|
-
}
|
118
|
-
|
119
|
-
function updateRow(tr_elm, skip_id, skip_parent) {
|
120
|
-
var inst = tinyMCEPopup.editor;
|
121
|
-
var formObj = document.forms[0];
|
122
|
-
var dom = inst.dom;
|
123
|
-
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
124
|
-
var rowtype = getSelectValue(formObj, 'rowtype');
|
125
|
-
var doc = inst.getDoc();
|
126
|
-
|
127
|
-
// Update row element
|
128
|
-
if (!skip_id)
|
129
|
-
dom.setAttrib(tr_elm, 'id', formObj.id.value);
|
130
|
-
|
131
|
-
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
|
132
|
-
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
|
133
|
-
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
|
134
|
-
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
|
135
|
-
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
136
|
-
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
137
|
-
|
138
|
-
// Clear deprecated attributes
|
139
|
-
dom.setAttrib(tr_elm, 'background', '');
|
140
|
-
dom.setAttrib(tr_elm, 'bgColor', '');
|
141
|
-
dom.setAttrib(tr_elm, 'height', '');
|
142
|
-
|
143
|
-
// Set styles
|
144
|
-
tr_elm.style.height = getCSSSize(formObj.height.value);
|
145
|
-
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
146
|
-
|
147
|
-
if (formObj.backgroundimage.value != "")
|
148
|
-
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
149
|
-
else
|
150
|
-
tr_elm.style.backgroundImage = '';
|
151
|
-
|
152
|
-
// Setup new rowtype
|
153
|
-
if (curRowType != rowtype && !skip_parent) {
|
154
|
-
// first, clone the node we are working on
|
155
|
-
var newRow = tr_elm.cloneNode(1);
|
156
|
-
|
157
|
-
// next, find the parent of its new destination (creating it if necessary)
|
158
|
-
var theTable = dom.getParent(tr_elm, "table");
|
159
|
-
var dest = rowtype;
|
160
|
-
var newParent = null;
|
161
|
-
for (var i = 0; i < theTable.childNodes.length; i++) {
|
162
|
-
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
163
|
-
newParent = theTable.childNodes[i];
|
164
|
-
}
|
165
|
-
|
166
|
-
if (newParent == null) {
|
167
|
-
newParent = doc.createElement(dest);
|
168
|
-
|
169
|
-
if (theTable.firstChild.nodeName == 'CAPTION')
|
170
|
-
inst.dom.insertAfter(newParent, theTable.firstChild);
|
171
|
-
else
|
172
|
-
theTable.insertBefore(newParent, theTable.firstChild);
|
173
|
-
}
|
174
|
-
|
175
|
-
// append the row to the new parent
|
176
|
-
newParent.appendChild(newRow);
|
177
|
-
|
178
|
-
// remove the original
|
179
|
-
tr_elm.parentNode.removeChild(tr_elm);
|
180
|
-
|
181
|
-
// set tr_elm to the new node
|
182
|
-
tr_elm = newRow;
|
183
|
-
}
|
184
|
-
|
185
|
-
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
186
|
-
}
|
187
|
-
|
188
|
-
function changedBackgroundImage() {
|
189
|
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
190
|
-
var st = dom.parseStyle(formObj.style.value);
|
191
|
-
|
192
|
-
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
193
|
-
|
194
|
-
formObj.style.value = dom.serializeStyle(st);
|
195
|
-
}
|
196
|
-
|
197
|
-
function changedStyle() {
|
198
|
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
199
|
-
var st = dom.parseStyle(formObj.style.value);
|
200
|
-
|
201
|
-
if (st['background-image'])
|
202
|
-
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
203
|
-
else
|
204
|
-
formObj.backgroundimage.value = '';
|
205
|
-
|
206
|
-
if (st['height'])
|
207
|
-
formObj.height.value = trimSize(st['height']);
|
208
|
-
|
209
|
-
if (st['background-color']) {
|
210
|
-
formObj.bgcolor.value = st['background-color'];
|
211
|
-
updateColor('bgcolor_pick','bgcolor');
|
212
|
-
}
|
213
|
-
}
|
214
|
-
|
215
|
-
function changedSize() {
|
216
|
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
217
|
-
var st = dom.parseStyle(formObj.style.value);
|
218
|
-
|
219
|
-
var height = formObj.height.value;
|
220
|
-
if (height != "")
|
221
|
-
st['height'] = getCSSSize(height);
|
222
|
-
else
|
223
|
-
st['height'] = "";
|
224
|
-
|
225
|
-
formObj.style.value = dom.serializeStyle(st);
|
226
|
-
}
|
227
|
-
|
228
|
-
function changedColor() {
|
229
|
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
230
|
-
var st = dom.parseStyle(formObj.style.value);
|
231
|
-
|
232
|
-
st['background-color'] = formObj.bgcolor.value;
|
233
|
-
|
234
|
-
formObj.style.value = dom.serializeStyle(st);
|
235
|
-
}
|
236
|
-
|
237
|
-
tinyMCEPopup.onInit.add(init);
|