spiderfw 0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README +4 -0
- data/Rakefile +74 -0
- data/apps/cas_server/_init.rb +23 -0
- data/apps/cas_server/config/options.rb +9 -0
- data/apps/cas_server/controllers/mixins/cas_login_mixin.rb +353 -0
- data/apps/cas_server/lib/cas.rb +329 -0
- data/apps/cas_server/lib/utils.rb +30 -0
- data/apps/cas_server/models/login_ticket.rb +11 -0
- data/apps/cas_server/models/mixins/consumable.rb +10 -0
- data/apps/cas_server/models/proxy_granting_ticket.rb +12 -0
- data/apps/cas_server/models/proxy_ticket.rb +12 -0
- data/apps/cas_server/models/service_ticket.rb +22 -0
- data/apps/cas_server/models/ticket.rb +20 -0
- data/apps/cas_server/models/ticket_granting_ticket.rb +15 -0
- data/apps/cas_server/views/logout.shtml +3 -0
- data/apps/core/admin/_init.rb +23 -0
- data/apps/core/admin/admin.rb +17 -0
- data/apps/core/admin/controllers/admin_controller.rb +15 -0
- data/apps/core/admin/views/index.shtml +1 -0
- data/apps/core/admin/views/spider_admin.layout.shtml +23 -0
- data/apps/core/admin/widgets/admin_menu/admin_menu.rb +17 -0
- data/apps/core/auth/_init.rb +42 -0
- data/apps/core/auth/controllers/login_controller.rb +94 -0
- data/apps/core/auth/controllers/mixins/auth_helper.rb +114 -0
- data/apps/core/auth/controllers/mixins/http_basic_auth.rb +24 -0
- data/apps/core/auth/controllers/mixins/http_digest_auth.rb +26 -0
- data/apps/core/auth/lib/authenticable.rb +86 -0
- data/apps/core/auth/lib/authenticator.rb +11 -0
- data/apps/core/auth/lib/digest_authenticator.rb +44 -0
- data/apps/core/auth/lib/login_authenticator.rb +27 -0
- data/apps/core/auth/models/digest_user.rb +34 -0
- data/apps/core/auth/models/group.rb +22 -0
- data/apps/core/auth/models/login_user.rb +15 -0
- data/apps/core/auth/models/mixins/access_control.rb +71 -0
- data/apps/core/auth/models/mixins/authentication_tracking.rb +19 -0
- data/apps/core/auth/models/super_user.rb +8 -0
- data/apps/core/auth/models/user.rb +15 -0
- data/apps/core/auth/po/it/spider_auth.po +33 -0
- data/apps/core/auth/po/spider_auth.pot +31 -0
- data/apps/core/auth/views/login.shtml +25 -0
- data/apps/core/components/_init.rb +21 -0
- data/apps/core/components/po/it/spider_components.po +52 -0
- data/apps/core/components/po/spider_components.pot +53 -0
- data/apps/core/components/public/css/admin.css +73 -0
- data/apps/core/components/public/css/crud.css +58 -0
- data/apps/core/components/public/css/img/add.gif +0 -0
- data/apps/core/components/public/css/img/ajax-loader.gif +0 -0
- data/apps/core/components/public/css/img/back.gif +0 -0
- data/apps/core/components/public/css/img/bg_header.png +0 -0
- data/apps/core/components/public/css/img/body_bg.jpg +0 -0
- data/apps/core/components/public/css/img/gray_gradient.gif +0 -0
- data/apps/core/components/public/css/img/li_bg.png +0 -0
- data/apps/core/components/public/css/img/li_bg_active.png +0 -0
- data/apps/core/components/public/css/img/li_bg_hover.png +0 -0
- data/apps/core/components/public/css/img/logo.png +0 -0
- data/apps/core/components/public/css/img/menu_bg.png +0 -0
- data/apps/core/components/public/css/img/menu_bottom.png +0 -0
- data/apps/core/components/public/css/img/menu_top.png +0 -0
- data/apps/core/components/public/css/img/section-bottom.jpg +0 -0
- data/apps/core/components/public/css/list.css +7 -0
- data/apps/core/components/public/css/menu.css +47 -0
- data/apps/core/components/public/css/spider.css +9 -0
- data/apps/core/components/public/css/switcher.css +13 -0
- data/apps/core/components/public/css/table.css +99 -0
- data/apps/core/components/public/js/inheritance.js +71 -0
- data/apps/core/components/public/js/jquery/jquery-1.3.2.js +4376 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/smoothness/jquery-ui-1.7.2.custom.css +406 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/css/ui-lightness/jquery-ui-1.7.2.custom.css +406 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/AUTHORS.txt +30 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/GPL-LICENSE.txt +278 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/MIT-LICENSE.txt +25 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/ChangeLog.txt +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/META.json +32 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.js +100 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.min.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.pack.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/test/index.html +197 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.js +97 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.min.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.pack.js +10 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.zip +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/jsdiff/jsdiff.js +159 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testrunner.js +780 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testsuite.css +120 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/simulate/jquery.simulate.js +152 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/jquery-1.3.2.js +4376 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_454545_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_888888_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.accordion.css +9 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.all.css +2 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.base.css +8 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.core.css +37 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.datepicker.css +62 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.dialog.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.progressbar.css +4 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.resizable.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.slider.css +17 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.tabs.css +11 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.theme.css +245 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/jquery-ui-1.7.2.custom.css +406 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.accordion.css +9 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.all.css +2 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.base.css +8 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.core.css +37 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.datepicker.css +62 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.dialog.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.progressbar.css +4 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.resizable.css +13 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.slider.css +17 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.tabs.css +11 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.theme.css +247 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.blind.js +49 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.bounce.js +78 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.clip.js +54 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.core.js +545 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.drop.js +50 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.explode.js +79 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.fold.js +56 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.highlight.js +48 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.pulsate.js +56 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.scale.js +180 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.shake.js +57 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.slide.js +50 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.transfer.js +45 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/jquery-ui-i18n.js +771 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ar.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-bg.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ca.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-cs.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-da.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-de.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-el.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-eo.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-es.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-fa.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-fi.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-fr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-he.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-hr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-hu.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-hy.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-id.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-is.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-it.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ja.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ko.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-lt.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-lv.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ms.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-nl.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-no.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-pl.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-pt-BR.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ro.js +22 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-ru.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sk.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sl.js +20 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sq.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr-SR.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-sv.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-th.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-tr.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-uk.js +25 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-CN.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-TW.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.js +9133 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.accordion.js +477 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.core.js +519 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.datepicker.js +1636 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.dialog.js +671 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.draggable.js +766 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.droppable.js +282 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.progressbar.js +116 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.resizable.js +800 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.selectable.js +257 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.slider.js +558 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.sortable.js +1019 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.tabs.js +685 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/version.txt +1 -0
- data/apps/core/components/public/js/jquery/jquery-ui/index.html +367 -0
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-1.3.2.min.js +19 -0
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-ui-1.7.2.custom.min.js +298 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/changelog.txt +27 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.css +48 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.js +808 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.min.js +13 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.pack.js +12 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.ajaxQueue.js +116 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.bgiframe.min.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.js +3558 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox-compressed.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox.css +163 -0
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/todo +166 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.form.js +653 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.query-2.1.6.js +224 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.url.js +214 -0
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.js +187 -0
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.min.js +1 -0
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.spider.1.0.js +193 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/changelog.txt +35 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/ajax-loader.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/file.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/folder-closed.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/folder.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/minus.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/plus.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-black-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-black.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-default-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-default.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-famfamfam-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-famfamfam.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-gray-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-gray.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-red-line.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/images/treeview-red.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.async.js +110 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.css +74 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.edit.js +37 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.js +256 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.min.js +15 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.pack.js +16 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/jquery.treeview.sortable.js +386 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/lib/jquery.cookie.js +92 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/lib/jquery.js +3534 -0
- data/apps/core/components/public/js/jquery/plugins/treeview/todo +8 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/LICENSE +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/README +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/jquery.timepickr.css +34 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/jquery.timepickr.js +1413 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/jquery.timepickr.min.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/222222_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/2e83ff_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/454545_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/888888_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/aaaaaa_40x100_textures_01_flat_0.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/cccccc_40x100_textures_03_highlight_soft_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/cd0a0a_256x240_icons_icons.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/dadada_40x100_textures_02_glass_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/e6e6e6_40x100_textures_02_glass_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/fbf9ee_40x100_textures_02_glass_55.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/fef1ec_40x100_textures_05_inset_soft_95.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/ffffff_40x100_textures_02_glass_65.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/images/ffffff_40x100_textures_02_glass_75.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.accordion.css +9 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.all.css +4 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.allplugins.css +7 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.core.css +37 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.datepicker.css +60 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.dialog.css +13 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.progressbar.css +4 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.resizable.css +13 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.slider.css +13 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.tabs.css +9 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.theme.css +238 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/themes/default/ui.timepickr.css +44 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/ui.timepickr.js +2307 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/dist/ui.timepickr.min.js +10 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/body-bg.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/btn-hover.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/btn.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/buttons.psd +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/index.html +326 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.anchorHandler.js +44 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.strings.js +290 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.ui.all.js +518 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.utils.js +255 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/jquery.utils.ui.min.js +26 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo-ff.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo-ie.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/logo.psd +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/package.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/reset.css +48 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/script_code.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/styles.css +308 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/themeroller_ready_black_200px.gif +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/page/weather_sun.png +0 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/css/ui.dropslide.css +26 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/css/ui.timepickr.css +18 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/ui.dropslide.js +132 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/src/ui.timepickr.js +217 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/data/testrunner.js +1 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/index.html +34 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/otherlibs/jquery/1.2.1/jquery.js +11 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/otherlibs/jquery/1.2.3/jquery.js +11 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/qunit/testrunner.js +780 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/qunit/testsuite.css +120 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/styles.css +201 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/test.js +41 -0
- data/apps/core/components/public/js/jquery/plugins/ui-timepickr/test/unit/ui.timepickr.js +154 -0
- data/apps/core/components/public/js/list.js +234 -0
- data/apps/core/components/public/js/spider.js +484 -0
- data/apps/core/components/public/widgets/search_table.js +10 -0
- data/apps/core/components/public/widgets/table.js +9 -0
- data/apps/core/components/widgets/admin/admin.rb +75 -0
- data/apps/core/components/widgets/admin/admin.shtml +16 -0
- data/apps/core/components/widgets/confirm/confirm.rb +37 -0
- data/apps/core/components/widgets/confirm/confirm.shtml +9 -0
- data/apps/core/components/widgets/crud/crud.rb +119 -0
- data/apps/core/components/widgets/crud/crud.shtml +59 -0
- data/apps/core/components/widgets/crud/form_table/form_table.rb +13 -0
- data/apps/core/components/widgets/crud/form_table/form_table.shtml +3 -0
- data/apps/core/components/widgets/list/list.rb +294 -0
- data/apps/core/components/widgets/list/list.shtml +38 -0
- data/apps/core/components/widgets/list/plugins/exportable/exportable_list.rb +19 -0
- data/apps/core/components/widgets/list/plugins/exportable/exportable_list.shtml +5 -0
- data/apps/core/components/widgets/menu/menu.rb +20 -0
- data/apps/core/components/widgets/menu/menu.shtml +13 -0
- data/apps/core/components/widgets/search_table/search_table.rb +22 -0
- data/apps/core/components/widgets/search_table/search_table.shtml +11 -0
- data/apps/core/components/widgets/switcher/switcher.rb +68 -0
- data/apps/core/components/widgets/switcher/switcher.shtml +17 -0
- data/apps/core/components/widgets/table/table.rb +153 -0
- data/apps/core/components/widgets/table/table.shtml +41 -0
- data/apps/core/components/widgets/tabs/tabs.rb +38 -0
- data/apps/core/components/widgets/tabs/tabs.shtml +2 -0
- data/apps/core/forms/_init.rb +22 -0
- data/apps/core/forms/po/it/spider_forms.po +36 -0
- data/apps/core/forms/po/spider_forms.pot +37 -0
- data/apps/core/forms/public/date_time.js +23 -0
- data/apps/core/forms/public/form.css +81 -0
- data/apps/core/forms/public/form.js +19 -0
- data/apps/core/forms/public/input.js +30 -0
- data/apps/core/forms/public/search_select.js +123 -0
- data/apps/core/forms/public/select.js +11 -0
- data/apps/core/forms/tags/element_label.erb +1 -0
- data/apps/core/forms/tags/element_row.erb +4 -0
- data/apps/core/forms/tags/row.erb +4 -0
- data/apps/core/forms/widgets/form/form.rb +430 -0
- data/apps/core/forms/widgets/form/form.shtml +47 -0
- data/apps/core/forms/widgets/inputs/checkbox/checkbox.rb +13 -0
- data/apps/core/forms/widgets/inputs/checkbox/checkbox.shtml +3 -0
- data/apps/core/forms/widgets/inputs/date_time/date_time.rb +48 -0
- data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +4 -0
- data/apps/core/forms/widgets/inputs/hidden/hidden.rb +8 -0
- data/apps/core/forms/widgets/inputs/hidden/hidden.shtml +3 -0
- data/apps/core/forms/widgets/inputs/input/input.rb +105 -0
- data/apps/core/forms/widgets/inputs/input/input.shtml +3 -0
- data/apps/core/forms/widgets/inputs/input/readonly.shtml +6 -0
- data/apps/core/forms/widgets/inputs/password/password.rb +24 -0
- data/apps/core/forms/widgets/inputs/password/password.shtml +5 -0
- data/apps/core/forms/widgets/inputs/search_select/search_select.rb +168 -0
- data/apps/core/forms/widgets/inputs/search_select/search_select.shtml +42 -0
- data/apps/core/forms/widgets/inputs/select/select.rb +126 -0
- data/apps/core/forms/widgets/inputs/select/select.shtml +8 -0
- data/apps/core/forms/widgets/inputs/subform/subform.rb +10 -0
- data/apps/core/forms/widgets/inputs/subform/subform.shtml +5 -0
- data/apps/core/forms/widgets/inputs/text/text.rb +9 -0
- data/apps/core/forms/widgets/inputs/text/text.shtml +3 -0
- data/apps/core/forms/widgets/inputs/text_area/text_area.rb +10 -0
- data/apps/core/forms/widgets/inputs/text_area/text_area.shtml +1 -0
- data/apps/drb_server/_init.rb +8 -0
- data/apps/drb_server/lib/model_server.rb +41 -0
- data/apps/drb_server/script/start_server.rb +19 -0
- data/apps/hippo/_init.rb +10 -0
- data/apps/hippo/models/mixins/hippo_struct.rb +210 -0
- data/apps/hippo/models/security_group.rb +21 -0
- data/apps/hippo/models/security_user.rb +29 -0
- data/apps/messenger/_init.rb +24 -0
- data/apps/messenger/config/options.rb +15 -0
- data/apps/messenger/config/worker.rb +3 -0
- data/apps/messenger/controllers/messenger_controller.rb +80 -0
- data/apps/messenger/controllers/mixins/messenger_controller_mixin.rb +54 -0
- data/apps/messenger/lib/backends/email/smtp.rb +0 -0
- data/apps/messenger/messenger.rb +94 -0
- data/apps/messenger/models/email.rb +22 -0
- data/apps/messenger/models/message.rb +44 -0
- data/apps/messenger/po/it/spider_messenger.po +77 -0
- data/apps/messenger/po/spider_messenger.pot +77 -0
- data/apps/messenger/views/index.shtml +13 -0
- data/apps/messenger/views/list.shtml +5 -0
- data/apps/messenger/views/messenger.layout.shtml +4 -0
- data/apps/messenger/views/queue.shtml +8 -0
- data/apps/messenger/views/tags/sent_messages.shtml +1 -0
- data/apps/soap/_init.rb +16 -0
- data/apps/soap/controllers/soap_controller.rb +334 -0
- data/apps/soap/doc/examples/example.rb +28 -0
- data/apps/soap/lib/soap.rb +217 -0
- data/apps/sso/_init.rb +16 -0
- data/apps/sso/config/options.rb +13 -0
- data/apps/sso/controllers/mixins/saml2_mixin.rb +149 -0
- data/apps/sso/lib/saml2/backend.rb +16 -0
- data/apps/sso/lib/saml2/lasso_backend.rb +88 -0
- data/apps/sso/lib/saml2.rb +112 -0
- data/apps/sso/views/saml2_post.shtml +19 -0
- data/apps/webdav/_init.rb +15 -0
- data/apps/webdav/controllers/webdav_controller.rb +862 -0
- data/apps/webdav/lib/locking.rb +193 -0
- data/apps/webdav/lib/vfs/abstract.rb +78 -0
- data/apps/webdav/lib/vfs/local.rb +126 -0
- data/apps/webdav/lib/vfs/mapped.rb +235 -0
- data/apps/webdav/lib/vfs/properties.rb +41 -0
- data/apps/worker/_init.rb +13 -0
- data/apps/worker/cmd.rb +65 -0
- data/apps/worker/config/options.rb +9 -0
- data/apps/worker/lib/runner.rb +43 -0
- data/apps/worker/lib/task.rb +9 -0
- data/apps/worker/models/job.rb +20 -0
- data/apps/worker/worker.rb +168 -0
- data/bin/spider +9 -0
- data/blueprints/app/_init.rb +10 -0
- data/blueprints/app/controllers/__APP___controller.rb +14 -0
- data/blueprints/app/views/__APP__.layout.shtml +8 -0
- data/blueprints/app/views/index.shtml +3 -0
- data/blueprints/install/config/config.yml +14 -0
- data/blueprints/install/init.rb +3 -0
- data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_auth.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_components.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_forms.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_messenger.mo +0 -0
- data/lib/spiderfw/app.rb +186 -0
- data/lib/spiderfw/autoload.rb +12 -0
- data/lib/spiderfw/cache/template_cache.rb +136 -0
- data/lib/spiderfw/cmd/cmd.rb +72 -0
- data/lib/spiderfw/cmd/commands/cert.rb +427 -0
- data/lib/spiderfw/cmd/commands/console.rb +27 -0
- data/lib/spiderfw/cmd/commands/init.rb +52 -0
- data/lib/spiderfw/cmd/commands/model.rb +131 -0
- data/lib/spiderfw/cmd/commands/setup.rb +54 -0
- data/lib/spiderfw/cmd/commands/test.rb +61 -0
- data/lib/spiderfw/cmd/commands/webserver.rb +93 -0
- data/lib/spiderfw/config/configurable.rb +38 -0
- data/lib/spiderfw/config/configuration.rb +281 -0
- data/lib/spiderfw/config/options/spider.rb +122 -0
- data/lib/spiderfw/controller/app_controller.rb +14 -0
- data/lib/spiderfw/controller/controller.rb +321 -0
- data/lib/spiderfw/controller/controller_exceptions.rb +27 -0
- data/lib/spiderfw/controller/controller_io.rb +26 -0
- data/lib/spiderfw/controller/controller_mixin.rb +12 -0
- data/lib/spiderfw/controller/cookie.rb +20 -0
- data/lib/spiderfw/controller/cookies.rb +17 -0
- data/lib/spiderfw/controller/dispatcher.rb +269 -0
- data/lib/spiderfw/controller/first_responder.rb +59 -0
- data/lib/spiderfw/controller/formats/html.rb +90 -0
- data/lib/spiderfw/controller/helpers/widget_helper.rb +73 -0
- data/lib/spiderfw/controller/home_controller.rb +26 -0
- data/lib/spiderfw/controller/http_controller.rb +112 -0
- data/lib/spiderfw/controller/mixins/http_mixin.rb +228 -0
- data/lib/spiderfw/controller/mixins/static_content.rb +90 -0
- data/lib/spiderfw/controller/mixins/visual.rb +489 -0
- data/lib/spiderfw/controller/page_controller.rb +39 -0
- data/lib/spiderfw/controller/request.rb +48 -0
- data/lib/spiderfw/controller/response.rb +50 -0
- data/lib/spiderfw/controller/router.rb +9 -0
- data/lib/spiderfw/controller/scene.rb +27 -0
- data/lib/spiderfw/controller/session/file_session.rb +83 -0
- data/lib/spiderfw/controller/session/flash_hash.rb +56 -0
- data/lib/spiderfw/controller/session/memory_session.rb +62 -0
- data/lib/spiderfw/controller/session/transient_hash.rb +18 -0
- data/lib/spiderfw/controller/session.rb +106 -0
- data/lib/spiderfw/controller/spider_controller.rb +20 -0
- data/lib/spiderfw/create.rb +64 -0
- data/lib/spiderfw/env.rb +17 -0
- data/lib/spiderfw/exceptions.rb +2 -0
- data/lib/spiderfw/home.rb +26 -0
- data/lib/spiderfw/http/adapters/cgi.rb +62 -0
- data/lib/spiderfw/http/adapters/cgi_io.rb +27 -0
- data/lib/spiderfw/http/adapters/fcgi.rb +62 -0
- data/lib/spiderfw/http/adapters/mongrel.rb +207 -0
- data/lib/spiderfw/http/adapters/rack.rb +152 -0
- data/lib/spiderfw/http/adapters/thin.rb +38 -0
- data/lib/spiderfw/http/adapters/webrick.rb +176 -0
- data/lib/spiderfw/http/http.rb +297 -0
- data/lib/spiderfw/http/server.rb +40 -0
- data/lib/spiderfw/i18n/cldr.rb +114 -0
- data/lib/spiderfw/i18n/gettext.rb +8 -0
- data/lib/spiderfw/i18n/i18n.rb +120 -0
- data/lib/spiderfw/i18n/provider.rb +12 -0
- data/lib/spiderfw/i18n/rails.rb +89 -0
- data/lib/spiderfw/i18n/shtml_parser.rb +41 -0
- data/lib/spiderfw/model/active_record.rb +335 -0
- data/lib/spiderfw/model/base_model.rb +2068 -0
- data/lib/spiderfw/model/condition.rb +416 -0
- data/lib/spiderfw/model/data_type.rb +75 -0
- data/lib/spiderfw/model/datatypes/binary.rb +10 -0
- data/lib/spiderfw/model/datatypes/bool.rb +10 -0
- data/lib/spiderfw/model/datatypes/decimal.rb +22 -0
- data/lib/spiderfw/model/datatypes/email.rb +13 -0
- data/lib/spiderfw/model/datatypes/password.rb +63 -0
- data/lib/spiderfw/model/datatypes/serialized_object.rb +32 -0
- data/lib/spiderfw/model/datatypes/text.rb +10 -0
- data/lib/spiderfw/model/datatypes/uuid.rb +29 -0
- data/lib/spiderfw/model/datatypes.rb +19 -0
- data/lib/spiderfw/model/element.rb +250 -0
- data/lib/spiderfw/model/extended_models/managed.rb +43 -0
- data/lib/spiderfw/model/identity_mapper.rb +89 -0
- data/lib/spiderfw/model/inline_model.rb +37 -0
- data/lib/spiderfw/model/mappers/db_mapper.rb +1126 -0
- data/lib/spiderfw/model/mappers/hash_mapper.rb +114 -0
- data/lib/spiderfw/model/mappers/mapper.rb +926 -0
- data/lib/spiderfw/model/mappers/mappers.rb +7 -0
- data/lib/spiderfw/model/mappers/proxy_mapper.rb +25 -0
- data/lib/spiderfw/model/mappers/vfs/flat_file.rb +31 -0
- data/lib/spiderfw/model/mixins/converted.rb +110 -0
- data/lib/spiderfw/model/mixins/list.rb +135 -0
- data/lib/spiderfw/model/mixins/mixins.rb +7 -0
- data/lib/spiderfw/model/mixins/state_machine.rb +81 -0
- data/lib/spiderfw/model/mixins/synchronized.rb +88 -0
- data/lib/spiderfw/model/mixins/tree.rb +296 -0
- data/lib/spiderfw/model/mixins/versioned.rb +147 -0
- data/lib/spiderfw/model/model.rb +226 -0
- data/lib/spiderfw/model/model_hash.rb +50 -0
- data/lib/spiderfw/model/proxy_model.rb +37 -0
- data/lib/spiderfw/model/query.rb +147 -0
- data/lib/spiderfw/model/query_funcs.rb +99 -0
- data/lib/spiderfw/model/query_set.rb +700 -0
- data/lib/spiderfw/model/request.rb +80 -0
- data/lib/spiderfw/model/storage/base_storage.rb +110 -0
- data/lib/spiderfw/model/storage/db/adapters/mssql.rb +129 -0
- data/lib/spiderfw/model/storage/db/adapters/mysql.rb +436 -0
- data/lib/spiderfw/model/storage/db/adapters/oci8.rb +533 -0
- data/lib/spiderfw/model/storage/db/adapters/sqlite.rb +163 -0
- data/lib/spiderfw/model/storage/db/connectors/odbc.rb +213 -0
- data/lib/spiderfw/model/storage/db/db.rb +13 -0
- data/lib/spiderfw/model/storage/db/db_connection_pool.rb +126 -0
- data/lib/spiderfw/model/storage/db/db_connector.rb +9 -0
- data/lib/spiderfw/model/storage/db/db_schema.rb +233 -0
- data/lib/spiderfw/model/storage/db/db_storage.rb +872 -0
- data/lib/spiderfw/model/storage/db/dialects/no_total_rows.rb +18 -0
- data/lib/spiderfw/model/storage/db/reflector.rb +36 -0
- data/lib/spiderfw/model/storage/null_storage.rb +18 -0
- data/lib/spiderfw/model/storage/schema.rb +19 -0
- data/lib/spiderfw/model/storage.rb +72 -0
- data/lib/spiderfw/model/sync.rb +94 -0
- data/lib/spiderfw/model/type.rb +13 -0
- data/lib/spiderfw/model/unit_of_work.rb +75 -0
- data/lib/spiderfw/requires.rb +21 -0
- data/lib/spiderfw/resource.rb +18 -0
- data/lib/spiderfw/setup/setup_task.rb +44 -0
- data/lib/spiderfw/tag/tag.rb +28 -0
- data/lib/spiderfw/templates/blocks/attr_if.rb +32 -0
- data/lib/spiderfw/templates/blocks/comment.rb +38 -0
- data/lib/spiderfw/templates/blocks/debugger.rb +16 -0
- data/lib/spiderfw/templates/blocks/each.rb +51 -0
- data/lib/spiderfw/templates/blocks/html.rb +70 -0
- data/lib/spiderfw/templates/blocks/if.rb +35 -0
- data/lib/spiderfw/templates/blocks/pass.rb +16 -0
- data/lib/spiderfw/templates/blocks/render.rb +23 -0
- data/lib/spiderfw/templates/blocks/run.rb +30 -0
- data/lib/spiderfw/templates/blocks/tag.rb +21 -0
- data/lib/spiderfw/templates/blocks/tag_if.rb +29 -0
- data/lib/spiderfw/templates/blocks/text.rb +43 -0
- data/lib/spiderfw/templates/blocks/widget.rb +58 -0
- data/lib/spiderfw/templates/blocks/yield.rb +18 -0
- data/lib/spiderfw/templates/layout.rb +44 -0
- data/lib/spiderfw/templates/resources/less.rb +14 -0
- data/lib/spiderfw/templates/template.rb +625 -0
- data/lib/spiderfw/templates/template_blocks.rb +185 -0
- data/lib/spiderfw/utils/annotations.rb +201 -0
- data/lib/spiderfw/utils/fork.rb +75 -0
- data/lib/spiderfw/utils/hash_comparison.rb +8 -0
- data/lib/spiderfw/utils/inflector.rb +42 -0
- data/lib/spiderfw/utils/logger.rb +92 -0
- data/lib/spiderfw/utils/monkey/class.rb +59 -0
- data/lib/spiderfw/utils/monkey/date_time.rb +34 -0
- data/lib/spiderfw/utils/monkey/debugger.rb +25 -0
- data/lib/spiderfw/utils/monkey/exception.rb +23 -0
- data/lib/spiderfw/utils/monkey/kernel.rb +12 -0
- data/lib/spiderfw/utils/monkey/module.rb +12 -0
- data/lib/spiderfw/utils/monkey/symbol.rb +7 -0
- data/lib/spiderfw/utils/monkey/time.rb +17 -0
- data/lib/spiderfw/utils/multi_level_hash.rb +33 -0
- data/lib/spiderfw/utils/periodic_runner.rb +50 -0
- data/lib/spiderfw/utils/rails.rb +78 -0
- data/lib/spiderfw/utils/rails_app.rb +53 -0
- data/lib/spiderfw/utils/sanitizer.rb +178 -0
- data/lib/spiderfw/utils/setup_task.rb +35 -0
- data/lib/spiderfw/utils/shared_store/file_shared_store.rb +73 -0
- data/lib/spiderfw/utils/shared_store/memory_shared_store.rb +46 -0
- data/lib/spiderfw/utils/shared_store.rb +47 -0
- data/lib/spiderfw/utils/test_case.rb +24 -0
- data/lib/spiderfw/utils/thread_out.rb +24 -0
- data/lib/spiderfw/version.rb +3 -0
- data/lib/spiderfw/widget/rest_model.rb +20 -0
- data/lib/spiderfw/widget/widget.rb +671 -0
- data/lib/spiderfw/widget/widget_attributes.rb +54 -0
- data/lib/spiderfw/widget/widget_plugin.rb +37 -0
- data/lib/spiderfw.rb +509 -0
- data/spider.gemspec +43 -0
- data/views/errors/404.shtml +6 -0
- data/views/errors/error.layout.shtml +70 -0
- data/views/errors/error_generic.shtml +6 -0
- metadata +800 -0
@@ -0,0 +1,766 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery UI Draggable 1.7.2
|
3
|
+
*
|
4
|
+
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
5
|
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
6
|
+
* and GPL (GPL-LICENSE.txt) licenses.
|
7
|
+
*
|
8
|
+
* http://docs.jquery.com/UI/Draggables
|
9
|
+
*
|
10
|
+
* Depends:
|
11
|
+
* ui.core.js
|
12
|
+
*/
|
13
|
+
(function($) {
|
14
|
+
|
15
|
+
$.widget("ui.draggable", $.extend({}, $.ui.mouse, {
|
16
|
+
|
17
|
+
_init: function() {
|
18
|
+
|
19
|
+
if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
|
20
|
+
this.element[0].style.position = 'relative';
|
21
|
+
|
22
|
+
(this.options.addClasses && this.element.addClass("ui-draggable"));
|
23
|
+
(this.options.disabled && this.element.addClass("ui-draggable-disabled"));
|
24
|
+
|
25
|
+
this._mouseInit();
|
26
|
+
|
27
|
+
},
|
28
|
+
|
29
|
+
destroy: function() {
|
30
|
+
if(!this.element.data('draggable')) return;
|
31
|
+
this.element
|
32
|
+
.removeData("draggable")
|
33
|
+
.unbind(".draggable")
|
34
|
+
.removeClass("ui-draggable"
|
35
|
+
+ " ui-draggable-dragging"
|
36
|
+
+ " ui-draggable-disabled");
|
37
|
+
this._mouseDestroy();
|
38
|
+
},
|
39
|
+
|
40
|
+
_mouseCapture: function(event) {
|
41
|
+
|
42
|
+
var o = this.options;
|
43
|
+
|
44
|
+
if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
|
45
|
+
return false;
|
46
|
+
|
47
|
+
//Quit if we're not on a valid handle
|
48
|
+
this.handle = this._getHandle(event);
|
49
|
+
if (!this.handle)
|
50
|
+
return false;
|
51
|
+
|
52
|
+
return true;
|
53
|
+
|
54
|
+
},
|
55
|
+
|
56
|
+
_mouseStart: function(event) {
|
57
|
+
|
58
|
+
var o = this.options;
|
59
|
+
|
60
|
+
//Create and append the visible helper
|
61
|
+
this.helper = this._createHelper(event);
|
62
|
+
|
63
|
+
//Cache the helper size
|
64
|
+
this._cacheHelperProportions();
|
65
|
+
|
66
|
+
//If ddmanager is used for droppables, set the global draggable
|
67
|
+
if($.ui.ddmanager)
|
68
|
+
$.ui.ddmanager.current = this;
|
69
|
+
|
70
|
+
/*
|
71
|
+
* - Position generation -
|
72
|
+
* This block generates everything position related - it's the core of draggables.
|
73
|
+
*/
|
74
|
+
|
75
|
+
//Cache the margins of the original element
|
76
|
+
this._cacheMargins();
|
77
|
+
|
78
|
+
//Store the helper's css position
|
79
|
+
this.cssPosition = this.helper.css("position");
|
80
|
+
this.scrollParent = this.helper.scrollParent();
|
81
|
+
|
82
|
+
//The element's absolute position on the page minus margins
|
83
|
+
this.offset = this.element.offset();
|
84
|
+
this.offset = {
|
85
|
+
top: this.offset.top - this.margins.top,
|
86
|
+
left: this.offset.left - this.margins.left
|
87
|
+
};
|
88
|
+
|
89
|
+
$.extend(this.offset, {
|
90
|
+
click: { //Where the click happened, relative to the element
|
91
|
+
left: event.pageX - this.offset.left,
|
92
|
+
top: event.pageY - this.offset.top
|
93
|
+
},
|
94
|
+
parent: this._getParentOffset(),
|
95
|
+
relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
|
96
|
+
});
|
97
|
+
|
98
|
+
//Generate the original position
|
99
|
+
this.originalPosition = this._generatePosition(event);
|
100
|
+
this.originalPageX = event.pageX;
|
101
|
+
this.originalPageY = event.pageY;
|
102
|
+
|
103
|
+
//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
|
104
|
+
if(o.cursorAt)
|
105
|
+
this._adjustOffsetFromHelper(o.cursorAt);
|
106
|
+
|
107
|
+
//Set a containment if given in the options
|
108
|
+
if(o.containment)
|
109
|
+
this._setContainment();
|
110
|
+
|
111
|
+
//Call plugins and callbacks
|
112
|
+
this._trigger("start", event);
|
113
|
+
|
114
|
+
//Recache the helper size
|
115
|
+
this._cacheHelperProportions();
|
116
|
+
|
117
|
+
//Prepare the droppable offsets
|
118
|
+
if ($.ui.ddmanager && !o.dropBehaviour)
|
119
|
+
$.ui.ddmanager.prepareOffsets(this, event);
|
120
|
+
|
121
|
+
this.helper.addClass("ui-draggable-dragging");
|
122
|
+
this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
|
123
|
+
return true;
|
124
|
+
},
|
125
|
+
|
126
|
+
_mouseDrag: function(event, noPropagation) {
|
127
|
+
|
128
|
+
//Compute the helpers position
|
129
|
+
this.position = this._generatePosition(event);
|
130
|
+
this.positionAbs = this._convertPositionTo("absolute");
|
131
|
+
|
132
|
+
//Call plugins and callbacks and use the resulting position if something is returned
|
133
|
+
if (!noPropagation) {
|
134
|
+
var ui = this._uiHash();
|
135
|
+
this._trigger('drag', event, ui);
|
136
|
+
this.position = ui.position;
|
137
|
+
}
|
138
|
+
|
139
|
+
if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
|
140
|
+
if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
|
141
|
+
if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
|
142
|
+
|
143
|
+
return false;
|
144
|
+
},
|
145
|
+
|
146
|
+
_mouseStop: function(event) {
|
147
|
+
|
148
|
+
//If we are using droppables, inform the manager about the drop
|
149
|
+
var dropped = false;
|
150
|
+
if ($.ui.ddmanager && !this.options.dropBehaviour)
|
151
|
+
dropped = $.ui.ddmanager.drop(this, event);
|
152
|
+
|
153
|
+
//if a drop comes from outside (a sortable)
|
154
|
+
if(this.dropped) {
|
155
|
+
dropped = this.dropped;
|
156
|
+
this.dropped = false;
|
157
|
+
}
|
158
|
+
|
159
|
+
if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
|
160
|
+
var self = this;
|
161
|
+
$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
|
162
|
+
self._trigger("stop", event);
|
163
|
+
self._clear();
|
164
|
+
});
|
165
|
+
} else {
|
166
|
+
this._trigger("stop", event);
|
167
|
+
this._clear();
|
168
|
+
}
|
169
|
+
|
170
|
+
return false;
|
171
|
+
},
|
172
|
+
|
173
|
+
_getHandle: function(event) {
|
174
|
+
|
175
|
+
var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
|
176
|
+
$(this.options.handle, this.element)
|
177
|
+
.find("*")
|
178
|
+
.andSelf()
|
179
|
+
.each(function() {
|
180
|
+
if(this == event.target) handle = true;
|
181
|
+
});
|
182
|
+
|
183
|
+
return handle;
|
184
|
+
|
185
|
+
},
|
186
|
+
|
187
|
+
_createHelper: function(event) {
|
188
|
+
|
189
|
+
var o = this.options;
|
190
|
+
var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone() : this.element);
|
191
|
+
|
192
|
+
if(!helper.parents('body').length)
|
193
|
+
helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
|
194
|
+
|
195
|
+
if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
|
196
|
+
helper.css("position", "absolute");
|
197
|
+
|
198
|
+
return helper;
|
199
|
+
|
200
|
+
},
|
201
|
+
|
202
|
+
_adjustOffsetFromHelper: function(obj) {
|
203
|
+
if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
|
204
|
+
if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
|
205
|
+
if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
|
206
|
+
if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
|
207
|
+
},
|
208
|
+
|
209
|
+
_getParentOffset: function() {
|
210
|
+
|
211
|
+
//Get the offsetParent and cache its position
|
212
|
+
this.offsetParent = this.helper.offsetParent();
|
213
|
+
var po = this.offsetParent.offset();
|
214
|
+
|
215
|
+
// This is a special case where we need to modify a offset calculated on start, since the following happened:
|
216
|
+
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
|
217
|
+
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
|
218
|
+
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
|
219
|
+
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
|
220
|
+
po.left += this.scrollParent.scrollLeft();
|
221
|
+
po.top += this.scrollParent.scrollTop();
|
222
|
+
}
|
223
|
+
|
224
|
+
if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
|
225
|
+
|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
|
226
|
+
po = { top: 0, left: 0 };
|
227
|
+
|
228
|
+
return {
|
229
|
+
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
|
230
|
+
left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
|
231
|
+
};
|
232
|
+
|
233
|
+
},
|
234
|
+
|
235
|
+
_getRelativeOffset: function() {
|
236
|
+
|
237
|
+
if(this.cssPosition == "relative") {
|
238
|
+
var p = this.element.position();
|
239
|
+
return {
|
240
|
+
top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
|
241
|
+
left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
|
242
|
+
};
|
243
|
+
} else {
|
244
|
+
return { top: 0, left: 0 };
|
245
|
+
}
|
246
|
+
|
247
|
+
},
|
248
|
+
|
249
|
+
_cacheMargins: function() {
|
250
|
+
this.margins = {
|
251
|
+
left: (parseInt(this.element.css("marginLeft"),10) || 0),
|
252
|
+
top: (parseInt(this.element.css("marginTop"),10) || 0)
|
253
|
+
};
|
254
|
+
},
|
255
|
+
|
256
|
+
_cacheHelperProportions: function() {
|
257
|
+
this.helperProportions = {
|
258
|
+
width: this.helper.outerWidth(),
|
259
|
+
height: this.helper.outerHeight()
|
260
|
+
};
|
261
|
+
},
|
262
|
+
|
263
|
+
_setContainment: function() {
|
264
|
+
|
265
|
+
var o = this.options;
|
266
|
+
if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
|
267
|
+
if(o.containment == 'document' || o.containment == 'window') this.containment = [
|
268
|
+
0 - this.offset.relative.left - this.offset.parent.left,
|
269
|
+
0 - this.offset.relative.top - this.offset.parent.top,
|
270
|
+
$(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
|
271
|
+
($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
|
272
|
+
];
|
273
|
+
|
274
|
+
if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
|
275
|
+
var ce = $(o.containment)[0]; if(!ce) return;
|
276
|
+
var co = $(o.containment).offset();
|
277
|
+
var over = ($(ce).css("overflow") != 'hidden');
|
278
|
+
|
279
|
+
this.containment = [
|
280
|
+
co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
|
281
|
+
co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
|
282
|
+
co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
|
283
|
+
co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
|
284
|
+
];
|
285
|
+
} else if(o.containment.constructor == Array) {
|
286
|
+
this.containment = o.containment;
|
287
|
+
}
|
288
|
+
|
289
|
+
},
|
290
|
+
|
291
|
+
_convertPositionTo: function(d, pos) {
|
292
|
+
|
293
|
+
if(!pos) pos = this.position;
|
294
|
+
var mod = d == "absolute" ? 1 : -1;
|
295
|
+
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
296
|
+
|
297
|
+
return {
|
298
|
+
top: (
|
299
|
+
pos.top // The absolute mouse position
|
300
|
+
+ this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
301
|
+
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
|
302
|
+
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
|
303
|
+
),
|
304
|
+
left: (
|
305
|
+
pos.left // The absolute mouse position
|
306
|
+
+ this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
307
|
+
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
|
308
|
+
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
309
|
+
)
|
310
|
+
};
|
311
|
+
|
312
|
+
},
|
313
|
+
|
314
|
+
_generatePosition: function(event) {
|
315
|
+
|
316
|
+
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
317
|
+
|
318
|
+
// This is another very weird special case that only happens for relative elements:
|
319
|
+
// 1. If the css position is relative
|
320
|
+
// 2. and the scroll parent is the document or similar to the offset parent
|
321
|
+
// we have to refresh the relative offset during the scroll so there are no jumps
|
322
|
+
if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
|
323
|
+
this.offset.relative = this._getRelativeOffset();
|
324
|
+
}
|
325
|
+
|
326
|
+
var pageX = event.pageX;
|
327
|
+
var pageY = event.pageY;
|
328
|
+
|
329
|
+
/*
|
330
|
+
* - Position constraining -
|
331
|
+
* Constrain the position to a mix of grid, containment.
|
332
|
+
*/
|
333
|
+
|
334
|
+
if(this.originalPosition) { //If we are not dragging yet, we won't check for options
|
335
|
+
|
336
|
+
if(this.containment) {
|
337
|
+
if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
|
338
|
+
if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
|
339
|
+
if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
|
340
|
+
if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
|
341
|
+
}
|
342
|
+
|
343
|
+
if(o.grid) {
|
344
|
+
var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
|
345
|
+
pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
|
346
|
+
|
347
|
+
var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
|
348
|
+
pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
|
349
|
+
}
|
350
|
+
|
351
|
+
}
|
352
|
+
|
353
|
+
return {
|
354
|
+
top: (
|
355
|
+
pageY // The absolute mouse position
|
356
|
+
- this.offset.click.top // Click offset (relative to the element)
|
357
|
+
- this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
|
358
|
+
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
|
359
|
+
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
|
360
|
+
),
|
361
|
+
left: (
|
362
|
+
pageX // The absolute mouse position
|
363
|
+
- this.offset.click.left // Click offset (relative to the element)
|
364
|
+
- this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
|
365
|
+
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
|
366
|
+
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
367
|
+
)
|
368
|
+
};
|
369
|
+
|
370
|
+
},
|
371
|
+
|
372
|
+
_clear: function() {
|
373
|
+
this.helper.removeClass("ui-draggable-dragging");
|
374
|
+
if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
|
375
|
+
//if($.ui.ddmanager) $.ui.ddmanager.current = null;
|
376
|
+
this.helper = null;
|
377
|
+
this.cancelHelperRemoval = false;
|
378
|
+
},
|
379
|
+
|
380
|
+
// From now on bulk stuff - mainly helpers
|
381
|
+
|
382
|
+
_trigger: function(type, event, ui) {
|
383
|
+
ui = ui || this._uiHash();
|
384
|
+
$.ui.plugin.call(this, type, [event, ui]);
|
385
|
+
if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
|
386
|
+
return $.widget.prototype._trigger.call(this, type, event, ui);
|
387
|
+
},
|
388
|
+
|
389
|
+
plugins: {},
|
390
|
+
|
391
|
+
_uiHash: function(event) {
|
392
|
+
return {
|
393
|
+
helper: this.helper,
|
394
|
+
position: this.position,
|
395
|
+
absolutePosition: this.positionAbs, //deprecated
|
396
|
+
offset: this.positionAbs
|
397
|
+
};
|
398
|
+
}
|
399
|
+
|
400
|
+
}));
|
401
|
+
|
402
|
+
$.extend($.ui.draggable, {
|
403
|
+
version: "1.7.2",
|
404
|
+
eventPrefix: "drag",
|
405
|
+
defaults: {
|
406
|
+
addClasses: true,
|
407
|
+
appendTo: "parent",
|
408
|
+
axis: false,
|
409
|
+
cancel: ":input,option",
|
410
|
+
connectToSortable: false,
|
411
|
+
containment: false,
|
412
|
+
cursor: "auto",
|
413
|
+
cursorAt: false,
|
414
|
+
delay: 0,
|
415
|
+
distance: 1,
|
416
|
+
grid: false,
|
417
|
+
handle: false,
|
418
|
+
helper: "original",
|
419
|
+
iframeFix: false,
|
420
|
+
opacity: false,
|
421
|
+
refreshPositions: false,
|
422
|
+
revert: false,
|
423
|
+
revertDuration: 500,
|
424
|
+
scope: "default",
|
425
|
+
scroll: true,
|
426
|
+
scrollSensitivity: 20,
|
427
|
+
scrollSpeed: 20,
|
428
|
+
snap: false,
|
429
|
+
snapMode: "both",
|
430
|
+
snapTolerance: 20,
|
431
|
+
stack: false,
|
432
|
+
zIndex: false
|
433
|
+
}
|
434
|
+
});
|
435
|
+
|
436
|
+
$.ui.plugin.add("draggable", "connectToSortable", {
|
437
|
+
start: function(event, ui) {
|
438
|
+
|
439
|
+
var inst = $(this).data("draggable"), o = inst.options,
|
440
|
+
uiSortable = $.extend({}, ui, { item: inst.element });
|
441
|
+
inst.sortables = [];
|
442
|
+
$(o.connectToSortable).each(function() {
|
443
|
+
var sortable = $.data(this, 'sortable');
|
444
|
+
if (sortable && !sortable.options.disabled) {
|
445
|
+
inst.sortables.push({
|
446
|
+
instance: sortable,
|
447
|
+
shouldRevert: sortable.options.revert
|
448
|
+
});
|
449
|
+
sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
|
450
|
+
sortable._trigger("activate", event, uiSortable);
|
451
|
+
}
|
452
|
+
});
|
453
|
+
|
454
|
+
},
|
455
|
+
stop: function(event, ui) {
|
456
|
+
|
457
|
+
//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
|
458
|
+
var inst = $(this).data("draggable"),
|
459
|
+
uiSortable = $.extend({}, ui, { item: inst.element });
|
460
|
+
|
461
|
+
$.each(inst.sortables, function() {
|
462
|
+
if(this.instance.isOver) {
|
463
|
+
|
464
|
+
this.instance.isOver = 0;
|
465
|
+
|
466
|
+
inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
|
467
|
+
this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
|
468
|
+
|
469
|
+
//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
|
470
|
+
if(this.shouldRevert) this.instance.options.revert = true;
|
471
|
+
|
472
|
+
//Trigger the stop of the sortable
|
473
|
+
this.instance._mouseStop(event);
|
474
|
+
|
475
|
+
this.instance.options.helper = this.instance.options._helper;
|
476
|
+
|
477
|
+
//If the helper has been the original item, restore properties in the sortable
|
478
|
+
if(inst.options.helper == 'original')
|
479
|
+
this.instance.currentItem.css({ top: 'auto', left: 'auto' });
|
480
|
+
|
481
|
+
} else {
|
482
|
+
this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
|
483
|
+
this.instance._trigger("deactivate", event, uiSortable);
|
484
|
+
}
|
485
|
+
|
486
|
+
});
|
487
|
+
|
488
|
+
},
|
489
|
+
drag: function(event, ui) {
|
490
|
+
|
491
|
+
var inst = $(this).data("draggable"), self = this;
|
492
|
+
|
493
|
+
var checkPos = function(o) {
|
494
|
+
var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
|
495
|
+
var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
|
496
|
+
var itemHeight = o.height, itemWidth = o.width;
|
497
|
+
var itemTop = o.top, itemLeft = o.left;
|
498
|
+
|
499
|
+
return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
|
500
|
+
};
|
501
|
+
|
502
|
+
$.each(inst.sortables, function(i) {
|
503
|
+
|
504
|
+
//Copy over some variables to allow calling the sortable's native _intersectsWith
|
505
|
+
this.instance.positionAbs = inst.positionAbs;
|
506
|
+
this.instance.helperProportions = inst.helperProportions;
|
507
|
+
this.instance.offset.click = inst.offset.click;
|
508
|
+
|
509
|
+
if(this.instance._intersectsWith(this.instance.containerCache)) {
|
510
|
+
|
511
|
+
//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
|
512
|
+
if(!this.instance.isOver) {
|
513
|
+
|
514
|
+
this.instance.isOver = 1;
|
515
|
+
//Now we fake the start of dragging for the sortable instance,
|
516
|
+
//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
|
517
|
+
//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
|
518
|
+
this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true);
|
519
|
+
this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
|
520
|
+
this.instance.options.helper = function() { return ui.helper[0]; };
|
521
|
+
|
522
|
+
event.target = this.instance.currentItem[0];
|
523
|
+
this.instance._mouseCapture(event, true);
|
524
|
+
this.instance._mouseStart(event, true, true);
|
525
|
+
|
526
|
+
//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
|
527
|
+
this.instance.offset.click.top = inst.offset.click.top;
|
528
|
+
this.instance.offset.click.left = inst.offset.click.left;
|
529
|
+
this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
|
530
|
+
this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
|
531
|
+
|
532
|
+
inst._trigger("toSortable", event);
|
533
|
+
inst.dropped = this.instance.element; //draggable revert needs that
|
534
|
+
//hack so receive/update callbacks work (mostly)
|
535
|
+
inst.currentItem = inst.element;
|
536
|
+
this.instance.fromOutside = inst;
|
537
|
+
|
538
|
+
}
|
539
|
+
|
540
|
+
//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
|
541
|
+
if(this.instance.currentItem) this.instance._mouseDrag(event);
|
542
|
+
|
543
|
+
} else {
|
544
|
+
|
545
|
+
//If it doesn't intersect with the sortable, and it intersected before,
|
546
|
+
//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
|
547
|
+
if(this.instance.isOver) {
|
548
|
+
|
549
|
+
this.instance.isOver = 0;
|
550
|
+
this.instance.cancelHelperRemoval = true;
|
551
|
+
|
552
|
+
//Prevent reverting on this forced stop
|
553
|
+
this.instance.options.revert = false;
|
554
|
+
|
555
|
+
// The out event needs to be triggered independently
|
556
|
+
this.instance._trigger('out', event, this.instance._uiHash(this.instance));
|
557
|
+
|
558
|
+
this.instance._mouseStop(event, true);
|
559
|
+
this.instance.options.helper = this.instance.options._helper;
|
560
|
+
|
561
|
+
//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
|
562
|
+
this.instance.currentItem.remove();
|
563
|
+
if(this.instance.placeholder) this.instance.placeholder.remove();
|
564
|
+
|
565
|
+
inst._trigger("fromSortable", event);
|
566
|
+
inst.dropped = false; //draggable revert needs that
|
567
|
+
}
|
568
|
+
|
569
|
+
};
|
570
|
+
|
571
|
+
});
|
572
|
+
|
573
|
+
}
|
574
|
+
});
|
575
|
+
|
576
|
+
$.ui.plugin.add("draggable", "cursor", {
|
577
|
+
start: function(event, ui) {
|
578
|
+
var t = $('body'), o = $(this).data('draggable').options;
|
579
|
+
if (t.css("cursor")) o._cursor = t.css("cursor");
|
580
|
+
t.css("cursor", o.cursor);
|
581
|
+
},
|
582
|
+
stop: function(event, ui) {
|
583
|
+
var o = $(this).data('draggable').options;
|
584
|
+
if (o._cursor) $('body').css("cursor", o._cursor);
|
585
|
+
}
|
586
|
+
});
|
587
|
+
|
588
|
+
$.ui.plugin.add("draggable", "iframeFix", {
|
589
|
+
start: function(event, ui) {
|
590
|
+
var o = $(this).data('draggable').options;
|
591
|
+
$(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
|
592
|
+
$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
|
593
|
+
.css({
|
594
|
+
width: this.offsetWidth+"px", height: this.offsetHeight+"px",
|
595
|
+
position: "absolute", opacity: "0.001", zIndex: 1000
|
596
|
+
})
|
597
|
+
.css($(this).offset())
|
598
|
+
.appendTo("body");
|
599
|
+
});
|
600
|
+
},
|
601
|
+
stop: function(event, ui) {
|
602
|
+
$("div.ui-draggable-iframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers
|
603
|
+
}
|
604
|
+
});
|
605
|
+
|
606
|
+
$.ui.plugin.add("draggable", "opacity", {
|
607
|
+
start: function(event, ui) {
|
608
|
+
var t = $(ui.helper), o = $(this).data('draggable').options;
|
609
|
+
if(t.css("opacity")) o._opacity = t.css("opacity");
|
610
|
+
t.css('opacity', o.opacity);
|
611
|
+
},
|
612
|
+
stop: function(event, ui) {
|
613
|
+
var o = $(this).data('draggable').options;
|
614
|
+
if(o._opacity) $(ui.helper).css('opacity', o._opacity);
|
615
|
+
}
|
616
|
+
});
|
617
|
+
|
618
|
+
$.ui.plugin.add("draggable", "scroll", {
|
619
|
+
start: function(event, ui) {
|
620
|
+
var i = $(this).data("draggable");
|
621
|
+
if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
|
622
|
+
},
|
623
|
+
drag: function(event, ui) {
|
624
|
+
|
625
|
+
var i = $(this).data("draggable"), o = i.options, scrolled = false;
|
626
|
+
|
627
|
+
if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
|
628
|
+
|
629
|
+
if(!o.axis || o.axis != 'x') {
|
630
|
+
if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
|
631
|
+
i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
|
632
|
+
else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
|
633
|
+
i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
|
634
|
+
}
|
635
|
+
|
636
|
+
if(!o.axis || o.axis != 'y') {
|
637
|
+
if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
|
638
|
+
i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
|
639
|
+
else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
|
640
|
+
i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
|
641
|
+
}
|
642
|
+
|
643
|
+
} else {
|
644
|
+
|
645
|
+
if(!o.axis || o.axis != 'x') {
|
646
|
+
if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
|
647
|
+
scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
|
648
|
+
else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
|
649
|
+
scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
|
650
|
+
}
|
651
|
+
|
652
|
+
if(!o.axis || o.axis != 'y') {
|
653
|
+
if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
|
654
|
+
scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
|
655
|
+
else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
|
656
|
+
scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
|
657
|
+
}
|
658
|
+
|
659
|
+
}
|
660
|
+
|
661
|
+
if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
|
662
|
+
$.ui.ddmanager.prepareOffsets(i, event);
|
663
|
+
|
664
|
+
}
|
665
|
+
});
|
666
|
+
|
667
|
+
$.ui.plugin.add("draggable", "snap", {
|
668
|
+
start: function(event, ui) {
|
669
|
+
|
670
|
+
var i = $(this).data("draggable"), o = i.options;
|
671
|
+
i.snapElements = [];
|
672
|
+
|
673
|
+
$(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
|
674
|
+
var $t = $(this); var $o = $t.offset();
|
675
|
+
if(this != i.element[0]) i.snapElements.push({
|
676
|
+
item: this,
|
677
|
+
width: $t.outerWidth(), height: $t.outerHeight(),
|
678
|
+
top: $o.top, left: $o.left
|
679
|
+
});
|
680
|
+
});
|
681
|
+
|
682
|
+
},
|
683
|
+
drag: function(event, ui) {
|
684
|
+
|
685
|
+
var inst = $(this).data("draggable"), o = inst.options;
|
686
|
+
var d = o.snapTolerance;
|
687
|
+
|
688
|
+
var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
|
689
|
+
y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
|
690
|
+
|
691
|
+
for (var i = inst.snapElements.length - 1; i >= 0; i--){
|
692
|
+
|
693
|
+
var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
|
694
|
+
t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
|
695
|
+
|
696
|
+
//Yes, I know, this is insane ;)
|
697
|
+
if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
|
698
|
+
if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
|
699
|
+
inst.snapElements[i].snapping = false;
|
700
|
+
continue;
|
701
|
+
}
|
702
|
+
|
703
|
+
if(o.snapMode != 'inner') {
|
704
|
+
var ts = Math.abs(t - y2) <= d;
|
705
|
+
var bs = Math.abs(b - y1) <= d;
|
706
|
+
var ls = Math.abs(l - x2) <= d;
|
707
|
+
var rs = Math.abs(r - x1) <= d;
|
708
|
+
if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
|
709
|
+
if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
|
710
|
+
if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
|
711
|
+
if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
|
712
|
+
}
|
713
|
+
|
714
|
+
var first = (ts || bs || ls || rs);
|
715
|
+
|
716
|
+
if(o.snapMode != 'outer') {
|
717
|
+
var ts = Math.abs(t - y1) <= d;
|
718
|
+
var bs = Math.abs(b - y2) <= d;
|
719
|
+
var ls = Math.abs(l - x1) <= d;
|
720
|
+
var rs = Math.abs(r - x2) <= d;
|
721
|
+
if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
|
722
|
+
if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
|
723
|
+
if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
|
724
|
+
if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
|
725
|
+
}
|
726
|
+
|
727
|
+
if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
|
728
|
+
(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
|
729
|
+
inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
|
730
|
+
|
731
|
+
};
|
732
|
+
|
733
|
+
}
|
734
|
+
});
|
735
|
+
|
736
|
+
$.ui.plugin.add("draggable", "stack", {
|
737
|
+
start: function(event, ui) {
|
738
|
+
|
739
|
+
var o = $(this).data("draggable").options;
|
740
|
+
|
741
|
+
var group = $.makeArray($(o.stack.group)).sort(function(a,b) {
|
742
|
+
return (parseInt($(a).css("zIndex"),10) || o.stack.min) - (parseInt($(b).css("zIndex"),10) || o.stack.min);
|
743
|
+
});
|
744
|
+
|
745
|
+
$(group).each(function(i) {
|
746
|
+
this.style.zIndex = o.stack.min + i;
|
747
|
+
});
|
748
|
+
|
749
|
+
this[0].style.zIndex = o.stack.min + group.length;
|
750
|
+
|
751
|
+
}
|
752
|
+
});
|
753
|
+
|
754
|
+
$.ui.plugin.add("draggable", "zIndex", {
|
755
|
+
start: function(event, ui) {
|
756
|
+
var t = $(ui.helper), o = $(this).data("draggable").options;
|
757
|
+
if(t.css("zIndex")) o._zIndex = t.css("zIndex");
|
758
|
+
t.css('zIndex', o.zIndex);
|
759
|
+
},
|
760
|
+
stop: function(event, ui) {
|
761
|
+
var o = $(this).data("draggable").options;
|
762
|
+
if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
|
763
|
+
}
|
764
|
+
});
|
765
|
+
|
766
|
+
})(jQuery);
|