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,1019 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery UI Sortable 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/Sortables
|
9
|
+
*
|
10
|
+
* Depends:
|
11
|
+
* ui.core.js
|
12
|
+
*/
|
13
|
+
(function($) {
|
14
|
+
|
15
|
+
$.widget("ui.sortable", $.extend({}, $.ui.mouse, {
|
16
|
+
_init: function() {
|
17
|
+
|
18
|
+
var o = this.options;
|
19
|
+
this.containerCache = {};
|
20
|
+
this.element.addClass("ui-sortable");
|
21
|
+
|
22
|
+
//Get the items
|
23
|
+
this.refresh();
|
24
|
+
|
25
|
+
//Let's determine if the items are floating
|
26
|
+
this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
|
27
|
+
|
28
|
+
//Let's determine the parent's offset
|
29
|
+
this.offset = this.element.offset();
|
30
|
+
|
31
|
+
//Initialize mouse events for interaction
|
32
|
+
this._mouseInit();
|
33
|
+
|
34
|
+
},
|
35
|
+
|
36
|
+
destroy: function() {
|
37
|
+
this.element
|
38
|
+
.removeClass("ui-sortable ui-sortable-disabled")
|
39
|
+
.removeData("sortable")
|
40
|
+
.unbind(".sortable");
|
41
|
+
this._mouseDestroy();
|
42
|
+
|
43
|
+
for ( var i = this.items.length - 1; i >= 0; i-- )
|
44
|
+
this.items[i].item.removeData("sortable-item");
|
45
|
+
},
|
46
|
+
|
47
|
+
_mouseCapture: function(event, overrideHandle) {
|
48
|
+
|
49
|
+
if (this.reverting) {
|
50
|
+
return false;
|
51
|
+
}
|
52
|
+
|
53
|
+
if(this.options.disabled || this.options.type == 'static') return false;
|
54
|
+
|
55
|
+
//We have to refresh the items data once first
|
56
|
+
this._refreshItems(event);
|
57
|
+
|
58
|
+
//Find out if the clicked node (or one of its parents) is a actual item in this.items
|
59
|
+
var currentItem = null, self = this, nodes = $(event.target).parents().each(function() {
|
60
|
+
if($.data(this, 'sortable-item') == self) {
|
61
|
+
currentItem = $(this);
|
62
|
+
return false;
|
63
|
+
}
|
64
|
+
});
|
65
|
+
if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target);
|
66
|
+
|
67
|
+
if(!currentItem) return false;
|
68
|
+
if(this.options.handle && !overrideHandle) {
|
69
|
+
var validHandle = false;
|
70
|
+
|
71
|
+
$(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
|
72
|
+
if(!validHandle) return false;
|
73
|
+
}
|
74
|
+
|
75
|
+
this.currentItem = currentItem;
|
76
|
+
this._removeCurrentsFromItems();
|
77
|
+
return true;
|
78
|
+
|
79
|
+
},
|
80
|
+
|
81
|
+
_mouseStart: function(event, overrideHandle, noActivation) {
|
82
|
+
|
83
|
+
var o = this.options, self = this;
|
84
|
+
this.currentContainer = this;
|
85
|
+
|
86
|
+
//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
|
87
|
+
this.refreshPositions();
|
88
|
+
|
89
|
+
//Create and append the visible helper
|
90
|
+
this.helper = this._createHelper(event);
|
91
|
+
|
92
|
+
//Cache the helper size
|
93
|
+
this._cacheHelperProportions();
|
94
|
+
|
95
|
+
/*
|
96
|
+
* - Position generation -
|
97
|
+
* This block generates everything position related - it's the core of draggables.
|
98
|
+
*/
|
99
|
+
|
100
|
+
//Cache the margins of the original element
|
101
|
+
this._cacheMargins();
|
102
|
+
|
103
|
+
//Get the next scrolling parent
|
104
|
+
this.scrollParent = this.helper.scrollParent();
|
105
|
+
|
106
|
+
//The element's absolute position on the page minus margins
|
107
|
+
this.offset = this.currentItem.offset();
|
108
|
+
this.offset = {
|
109
|
+
top: this.offset.top - this.margins.top,
|
110
|
+
left: this.offset.left - this.margins.left
|
111
|
+
};
|
112
|
+
|
113
|
+
// Only after we got the offset, we can change the helper's position to absolute
|
114
|
+
// TODO: Still need to figure out a way to make relative sorting possible
|
115
|
+
this.helper.css("position", "absolute");
|
116
|
+
this.cssPosition = this.helper.css("position");
|
117
|
+
|
118
|
+
$.extend(this.offset, {
|
119
|
+
click: { //Where the click happened, relative to the element
|
120
|
+
left: event.pageX - this.offset.left,
|
121
|
+
top: event.pageY - this.offset.top
|
122
|
+
},
|
123
|
+
parent: this._getParentOffset(),
|
124
|
+
relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
|
125
|
+
});
|
126
|
+
|
127
|
+
//Generate the original position
|
128
|
+
this.originalPosition = this._generatePosition(event);
|
129
|
+
this.originalPageX = event.pageX;
|
130
|
+
this.originalPageY = event.pageY;
|
131
|
+
|
132
|
+
//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
|
133
|
+
if(o.cursorAt)
|
134
|
+
this._adjustOffsetFromHelper(o.cursorAt);
|
135
|
+
|
136
|
+
//Cache the former DOM position
|
137
|
+
this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
|
138
|
+
|
139
|
+
//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
|
140
|
+
if(this.helper[0] != this.currentItem[0]) {
|
141
|
+
this.currentItem.hide();
|
142
|
+
}
|
143
|
+
|
144
|
+
//Create the placeholder
|
145
|
+
this._createPlaceholder();
|
146
|
+
|
147
|
+
//Set a containment if given in the options
|
148
|
+
if(o.containment)
|
149
|
+
this._setContainment();
|
150
|
+
|
151
|
+
if(o.cursor) { // cursor option
|
152
|
+
if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
|
153
|
+
$('body').css("cursor", o.cursor);
|
154
|
+
}
|
155
|
+
|
156
|
+
if(o.opacity) { // opacity option
|
157
|
+
if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
|
158
|
+
this.helper.css("opacity", o.opacity);
|
159
|
+
}
|
160
|
+
|
161
|
+
if(o.zIndex) { // zIndex option
|
162
|
+
if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
|
163
|
+
this.helper.css("zIndex", o.zIndex);
|
164
|
+
}
|
165
|
+
|
166
|
+
//Prepare scrolling
|
167
|
+
if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
|
168
|
+
this.overflowOffset = this.scrollParent.offset();
|
169
|
+
|
170
|
+
//Call callbacks
|
171
|
+
this._trigger("start", event, this._uiHash());
|
172
|
+
|
173
|
+
//Recache the helper size
|
174
|
+
if(!this._preserveHelperProportions)
|
175
|
+
this._cacheHelperProportions();
|
176
|
+
|
177
|
+
|
178
|
+
//Post 'activate' events to possible containers
|
179
|
+
if(!noActivation) {
|
180
|
+
for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); }
|
181
|
+
}
|
182
|
+
|
183
|
+
//Prepare possible droppables
|
184
|
+
if($.ui.ddmanager)
|
185
|
+
$.ui.ddmanager.current = this;
|
186
|
+
|
187
|
+
if ($.ui.ddmanager && !o.dropBehaviour)
|
188
|
+
$.ui.ddmanager.prepareOffsets(this, event);
|
189
|
+
|
190
|
+
this.dragging = true;
|
191
|
+
|
192
|
+
this.helper.addClass("ui-sortable-helper");
|
193
|
+
this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
|
194
|
+
return true;
|
195
|
+
|
196
|
+
},
|
197
|
+
|
198
|
+
_mouseDrag: function(event) {
|
199
|
+
|
200
|
+
//Compute the helpers position
|
201
|
+
this.position = this._generatePosition(event);
|
202
|
+
this.positionAbs = this._convertPositionTo("absolute");
|
203
|
+
|
204
|
+
if (!this.lastPositionAbs) {
|
205
|
+
this.lastPositionAbs = this.positionAbs;
|
206
|
+
}
|
207
|
+
|
208
|
+
//Do scrolling
|
209
|
+
if(this.options.scroll) {
|
210
|
+
var o = this.options, scrolled = false;
|
211
|
+
if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
|
212
|
+
|
213
|
+
if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
|
214
|
+
this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
|
215
|
+
else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
|
216
|
+
this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
|
217
|
+
|
218
|
+
if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
|
219
|
+
this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
|
220
|
+
else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
|
221
|
+
this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
|
222
|
+
|
223
|
+
} else {
|
224
|
+
|
225
|
+
if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
|
226
|
+
scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
|
227
|
+
else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
|
228
|
+
scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
|
229
|
+
|
230
|
+
if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
|
231
|
+
scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
|
232
|
+
else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
|
233
|
+
scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
|
234
|
+
|
235
|
+
}
|
236
|
+
|
237
|
+
if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
|
238
|
+
$.ui.ddmanager.prepareOffsets(this, event);
|
239
|
+
}
|
240
|
+
|
241
|
+
//Regenerate the absolute position used for position checks
|
242
|
+
this.positionAbs = this._convertPositionTo("absolute");
|
243
|
+
|
244
|
+
//Set the helper position
|
245
|
+
if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
|
246
|
+
if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
|
247
|
+
|
248
|
+
//Rearrange
|
249
|
+
for (var i = this.items.length - 1; i >= 0; i--) {
|
250
|
+
|
251
|
+
//Cache variables and intersection, continue if no intersection
|
252
|
+
var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
|
253
|
+
if (!intersection) continue;
|
254
|
+
|
255
|
+
if(itemElement != this.currentItem[0] //cannot intersect with itself
|
256
|
+
&& this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
|
257
|
+
&& !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
|
258
|
+
&& (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)
|
259
|
+
) {
|
260
|
+
|
261
|
+
this.direction = intersection == 1 ? "down" : "up";
|
262
|
+
|
263
|
+
if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
|
264
|
+
this._rearrange(event, item);
|
265
|
+
} else {
|
266
|
+
break;
|
267
|
+
}
|
268
|
+
|
269
|
+
this._trigger("change", event, this._uiHash());
|
270
|
+
break;
|
271
|
+
}
|
272
|
+
}
|
273
|
+
|
274
|
+
//Post events to containers
|
275
|
+
this._contactContainers(event);
|
276
|
+
|
277
|
+
//Interconnect with droppables
|
278
|
+
if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
|
279
|
+
|
280
|
+
//Call callbacks
|
281
|
+
this._trigger('sort', event, this._uiHash());
|
282
|
+
|
283
|
+
this.lastPositionAbs = this.positionAbs;
|
284
|
+
return false;
|
285
|
+
|
286
|
+
},
|
287
|
+
|
288
|
+
_mouseStop: function(event, noPropagation) {
|
289
|
+
|
290
|
+
if(!event) return;
|
291
|
+
|
292
|
+
//If we are using droppables, inform the manager about the drop
|
293
|
+
if ($.ui.ddmanager && !this.options.dropBehaviour)
|
294
|
+
$.ui.ddmanager.drop(this, event);
|
295
|
+
|
296
|
+
if(this.options.revert) {
|
297
|
+
var self = this;
|
298
|
+
var cur = self.placeholder.offset();
|
299
|
+
|
300
|
+
self.reverting = true;
|
301
|
+
|
302
|
+
$(this.helper).animate({
|
303
|
+
left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
|
304
|
+
top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
|
305
|
+
}, parseInt(this.options.revert, 10) || 500, function() {
|
306
|
+
self._clear(event);
|
307
|
+
});
|
308
|
+
} else {
|
309
|
+
this._clear(event, noPropagation);
|
310
|
+
}
|
311
|
+
|
312
|
+
return false;
|
313
|
+
|
314
|
+
},
|
315
|
+
|
316
|
+
cancel: function() {
|
317
|
+
|
318
|
+
var self = this;
|
319
|
+
|
320
|
+
if(this.dragging) {
|
321
|
+
|
322
|
+
this._mouseUp();
|
323
|
+
|
324
|
+
if(this.options.helper == "original")
|
325
|
+
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
|
326
|
+
else
|
327
|
+
this.currentItem.show();
|
328
|
+
|
329
|
+
//Post deactivating events to containers
|
330
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
331
|
+
this.containers[i]._trigger("deactivate", null, self._uiHash(this));
|
332
|
+
if(this.containers[i].containerCache.over) {
|
333
|
+
this.containers[i]._trigger("out", null, self._uiHash(this));
|
334
|
+
this.containers[i].containerCache.over = 0;
|
335
|
+
}
|
336
|
+
}
|
337
|
+
|
338
|
+
}
|
339
|
+
|
340
|
+
//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
|
341
|
+
if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
|
342
|
+
if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
|
343
|
+
|
344
|
+
$.extend(this, {
|
345
|
+
helper: null,
|
346
|
+
dragging: false,
|
347
|
+
reverting: false,
|
348
|
+
_noFinalSort: null
|
349
|
+
});
|
350
|
+
|
351
|
+
if(this.domPosition.prev) {
|
352
|
+
$(this.domPosition.prev).after(this.currentItem);
|
353
|
+
} else {
|
354
|
+
$(this.domPosition.parent).prepend(this.currentItem);
|
355
|
+
}
|
356
|
+
|
357
|
+
return true;
|
358
|
+
|
359
|
+
},
|
360
|
+
|
361
|
+
serialize: function(o) {
|
362
|
+
|
363
|
+
var items = this._getItemsAsjQuery(o && o.connected);
|
364
|
+
var str = []; o = o || {};
|
365
|
+
|
366
|
+
$(items).each(function() {
|
367
|
+
var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
|
368
|
+
if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
|
369
|
+
});
|
370
|
+
|
371
|
+
return str.join('&');
|
372
|
+
|
373
|
+
},
|
374
|
+
|
375
|
+
toArray: function(o) {
|
376
|
+
|
377
|
+
var items = this._getItemsAsjQuery(o && o.connected);
|
378
|
+
var ret = []; o = o || {};
|
379
|
+
|
380
|
+
items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
|
381
|
+
return ret;
|
382
|
+
|
383
|
+
},
|
384
|
+
|
385
|
+
/* Be careful with the following core functions */
|
386
|
+
_intersectsWith: function(item) {
|
387
|
+
|
388
|
+
var x1 = this.positionAbs.left,
|
389
|
+
x2 = x1 + this.helperProportions.width,
|
390
|
+
y1 = this.positionAbs.top,
|
391
|
+
y2 = y1 + this.helperProportions.height;
|
392
|
+
|
393
|
+
var l = item.left,
|
394
|
+
r = l + item.width,
|
395
|
+
t = item.top,
|
396
|
+
b = t + item.height;
|
397
|
+
|
398
|
+
var dyClick = this.offset.click.top,
|
399
|
+
dxClick = this.offset.click.left;
|
400
|
+
|
401
|
+
var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
|
402
|
+
|
403
|
+
if( this.options.tolerance == "pointer"
|
404
|
+
|| this.options.forcePointerForContainers
|
405
|
+
|| (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
|
406
|
+
) {
|
407
|
+
return isOverElement;
|
408
|
+
} else {
|
409
|
+
|
410
|
+
return (l < x1 + (this.helperProportions.width / 2) // Right Half
|
411
|
+
&& x2 - (this.helperProportions.width / 2) < r // Left Half
|
412
|
+
&& t < y1 + (this.helperProportions.height / 2) // Bottom Half
|
413
|
+
&& y2 - (this.helperProportions.height / 2) < b ); // Top Half
|
414
|
+
|
415
|
+
}
|
416
|
+
},
|
417
|
+
|
418
|
+
_intersectsWithPointer: function(item) {
|
419
|
+
|
420
|
+
var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
|
421
|
+
isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
|
422
|
+
isOverElement = isOverElementHeight && isOverElementWidth,
|
423
|
+
verticalDirection = this._getDragVerticalDirection(),
|
424
|
+
horizontalDirection = this._getDragHorizontalDirection();
|
425
|
+
|
426
|
+
if (!isOverElement)
|
427
|
+
return false;
|
428
|
+
|
429
|
+
return this.floating ?
|
430
|
+
( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
|
431
|
+
: ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
|
432
|
+
|
433
|
+
},
|
434
|
+
|
435
|
+
_intersectsWithSides: function(item) {
|
436
|
+
|
437
|
+
var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
|
438
|
+
isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
|
439
|
+
verticalDirection = this._getDragVerticalDirection(),
|
440
|
+
horizontalDirection = this._getDragHorizontalDirection();
|
441
|
+
|
442
|
+
if (this.floating && horizontalDirection) {
|
443
|
+
return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
|
444
|
+
} else {
|
445
|
+
return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
|
446
|
+
}
|
447
|
+
|
448
|
+
},
|
449
|
+
|
450
|
+
_getDragVerticalDirection: function() {
|
451
|
+
var delta = this.positionAbs.top - this.lastPositionAbs.top;
|
452
|
+
return delta != 0 && (delta > 0 ? "down" : "up");
|
453
|
+
},
|
454
|
+
|
455
|
+
_getDragHorizontalDirection: function() {
|
456
|
+
var delta = this.positionAbs.left - this.lastPositionAbs.left;
|
457
|
+
return delta != 0 && (delta > 0 ? "right" : "left");
|
458
|
+
},
|
459
|
+
|
460
|
+
refresh: function(event) {
|
461
|
+
this._refreshItems(event);
|
462
|
+
this.refreshPositions();
|
463
|
+
},
|
464
|
+
|
465
|
+
_connectWith: function() {
|
466
|
+
var options = this.options;
|
467
|
+
return options.connectWith.constructor == String
|
468
|
+
? [options.connectWith]
|
469
|
+
: options.connectWith;
|
470
|
+
},
|
471
|
+
|
472
|
+
_getItemsAsjQuery: function(connected) {
|
473
|
+
|
474
|
+
var self = this;
|
475
|
+
var items = [];
|
476
|
+
var queries = [];
|
477
|
+
var connectWith = this._connectWith();
|
478
|
+
|
479
|
+
if(connectWith && connected) {
|
480
|
+
for (var i = connectWith.length - 1; i >= 0; i--){
|
481
|
+
var cur = $(connectWith[i]);
|
482
|
+
for (var j = cur.length - 1; j >= 0; j--){
|
483
|
+
var inst = $.data(cur[j], 'sortable');
|
484
|
+
if(inst && inst != this && !inst.options.disabled) {
|
485
|
+
queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper"), inst]);
|
486
|
+
}
|
487
|
+
};
|
488
|
+
};
|
489
|
+
}
|
490
|
+
|
491
|
+
queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper"), this]);
|
492
|
+
|
493
|
+
for (var i = queries.length - 1; i >= 0; i--){
|
494
|
+
queries[i][0].each(function() {
|
495
|
+
items.push(this);
|
496
|
+
});
|
497
|
+
};
|
498
|
+
|
499
|
+
return $(items);
|
500
|
+
|
501
|
+
},
|
502
|
+
|
503
|
+
_removeCurrentsFromItems: function() {
|
504
|
+
|
505
|
+
var list = this.currentItem.find(":data(sortable-item)");
|
506
|
+
|
507
|
+
for (var i=0; i < this.items.length; i++) {
|
508
|
+
|
509
|
+
for (var j=0; j < list.length; j++) {
|
510
|
+
if(list[j] == this.items[i].item[0])
|
511
|
+
this.items.splice(i,1);
|
512
|
+
};
|
513
|
+
|
514
|
+
};
|
515
|
+
|
516
|
+
},
|
517
|
+
|
518
|
+
_refreshItems: function(event) {
|
519
|
+
|
520
|
+
this.items = [];
|
521
|
+
this.containers = [this];
|
522
|
+
var items = this.items;
|
523
|
+
var self = this;
|
524
|
+
var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
|
525
|
+
var connectWith = this._connectWith();
|
526
|
+
|
527
|
+
if(connectWith) {
|
528
|
+
for (var i = connectWith.length - 1; i >= 0; i--){
|
529
|
+
var cur = $(connectWith[i]);
|
530
|
+
for (var j = cur.length - 1; j >= 0; j--){
|
531
|
+
var inst = $.data(cur[j], 'sortable');
|
532
|
+
if(inst && inst != this && !inst.options.disabled) {
|
533
|
+
queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
|
534
|
+
this.containers.push(inst);
|
535
|
+
}
|
536
|
+
};
|
537
|
+
};
|
538
|
+
}
|
539
|
+
|
540
|
+
for (var i = queries.length - 1; i >= 0; i--) {
|
541
|
+
var targetData = queries[i][1];
|
542
|
+
var _queries = queries[i][0];
|
543
|
+
|
544
|
+
for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
|
545
|
+
var item = $(_queries[j]);
|
546
|
+
|
547
|
+
item.data('sortable-item', targetData); // Data for target checking (mouse manager)
|
548
|
+
|
549
|
+
items.push({
|
550
|
+
item: item,
|
551
|
+
instance: targetData,
|
552
|
+
width: 0, height: 0,
|
553
|
+
left: 0, top: 0
|
554
|
+
});
|
555
|
+
};
|
556
|
+
};
|
557
|
+
|
558
|
+
},
|
559
|
+
|
560
|
+
refreshPositions: function(fast) {
|
561
|
+
|
562
|
+
//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
|
563
|
+
if(this.offsetParent && this.helper) {
|
564
|
+
this.offset.parent = this._getParentOffset();
|
565
|
+
}
|
566
|
+
|
567
|
+
for (var i = this.items.length - 1; i >= 0; i--){
|
568
|
+
var item = this.items[i];
|
569
|
+
|
570
|
+
//We ignore calculating positions of all connected containers when we're not over them
|
571
|
+
if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
|
572
|
+
continue;
|
573
|
+
|
574
|
+
var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
|
575
|
+
|
576
|
+
if (!fast) {
|
577
|
+
item.width = t.outerWidth();
|
578
|
+
item.height = t.outerHeight();
|
579
|
+
}
|
580
|
+
|
581
|
+
var p = t.offset();
|
582
|
+
item.left = p.left;
|
583
|
+
item.top = p.top;
|
584
|
+
};
|
585
|
+
|
586
|
+
if(this.options.custom && this.options.custom.refreshContainers) {
|
587
|
+
this.options.custom.refreshContainers.call(this);
|
588
|
+
} else {
|
589
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
590
|
+
var p = this.containers[i].element.offset();
|
591
|
+
this.containers[i].containerCache.left = p.left;
|
592
|
+
this.containers[i].containerCache.top = p.top;
|
593
|
+
this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
|
594
|
+
this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
|
595
|
+
};
|
596
|
+
}
|
597
|
+
|
598
|
+
},
|
599
|
+
|
600
|
+
_createPlaceholder: function(that) {
|
601
|
+
|
602
|
+
var self = that || this, o = self.options;
|
603
|
+
|
604
|
+
if(!o.placeholder || o.placeholder.constructor == String) {
|
605
|
+
var className = o.placeholder;
|
606
|
+
o.placeholder = {
|
607
|
+
element: function() {
|
608
|
+
|
609
|
+
var el = $(document.createElement(self.currentItem[0].nodeName))
|
610
|
+
.addClass(className || self.currentItem[0].className+" ui-sortable-placeholder")
|
611
|
+
.removeClass("ui-sortable-helper")[0];
|
612
|
+
|
613
|
+
if(!className)
|
614
|
+
el.style.visibility = "hidden";
|
615
|
+
|
616
|
+
return el;
|
617
|
+
},
|
618
|
+
update: function(container, p) {
|
619
|
+
|
620
|
+
// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
|
621
|
+
// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
|
622
|
+
if(className && !o.forcePlaceholderSize) return;
|
623
|
+
|
624
|
+
//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
|
625
|
+
if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
|
626
|
+
if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
|
627
|
+
}
|
628
|
+
};
|
629
|
+
}
|
630
|
+
|
631
|
+
//Create the placeholder
|
632
|
+
self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem));
|
633
|
+
|
634
|
+
//Append it after the actual current item
|
635
|
+
self.currentItem.after(self.placeholder);
|
636
|
+
|
637
|
+
//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
|
638
|
+
o.placeholder.update(self, self.placeholder);
|
639
|
+
|
640
|
+
},
|
641
|
+
|
642
|
+
_contactContainers: function(event) {
|
643
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
644
|
+
|
645
|
+
if(this._intersectsWith(this.containers[i].containerCache)) {
|
646
|
+
if(!this.containers[i].containerCache.over) {
|
647
|
+
|
648
|
+
if(this.currentContainer != this.containers[i]) {
|
649
|
+
|
650
|
+
//When entering a new container, we will find the item with the least distance and append our item near it
|
651
|
+
var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[i].floating ? 'left' : 'top'];
|
652
|
+
for (var j = this.items.length - 1; j >= 0; j--) {
|
653
|
+
if(!$.ui.contains(this.containers[i].element[0], this.items[j].item[0])) continue;
|
654
|
+
var cur = this.items[j][this.containers[i].floating ? 'left' : 'top'];
|
655
|
+
if(Math.abs(cur - base) < dist) {
|
656
|
+
dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
|
657
|
+
}
|
658
|
+
}
|
659
|
+
|
660
|
+
if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
|
661
|
+
continue;
|
662
|
+
|
663
|
+
this.currentContainer = this.containers[i];
|
664
|
+
itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[i].element, true);
|
665
|
+
this._trigger("change", event, this._uiHash());
|
666
|
+
this.containers[i]._trigger("change", event, this._uiHash(this));
|
667
|
+
|
668
|
+
//Update the placeholder
|
669
|
+
this.options.placeholder.update(this.currentContainer, this.placeholder);
|
670
|
+
|
671
|
+
}
|
672
|
+
|
673
|
+
this.containers[i]._trigger("over", event, this._uiHash(this));
|
674
|
+
this.containers[i].containerCache.over = 1;
|
675
|
+
}
|
676
|
+
} else {
|
677
|
+
if(this.containers[i].containerCache.over) {
|
678
|
+
this.containers[i]._trigger("out", event, this._uiHash(this));
|
679
|
+
this.containers[i].containerCache.over = 0;
|
680
|
+
}
|
681
|
+
}
|
682
|
+
|
683
|
+
};
|
684
|
+
},
|
685
|
+
|
686
|
+
_createHelper: function(event) {
|
687
|
+
|
688
|
+
var o = this.options;
|
689
|
+
var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
|
690
|
+
|
691
|
+
if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
|
692
|
+
$(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
|
693
|
+
|
694
|
+
if(helper[0] == this.currentItem[0])
|
695
|
+
this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
|
696
|
+
|
697
|
+
if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
|
698
|
+
if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
|
699
|
+
|
700
|
+
return helper;
|
701
|
+
|
702
|
+
},
|
703
|
+
|
704
|
+
_adjustOffsetFromHelper: function(obj) {
|
705
|
+
if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
|
706
|
+
if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
|
707
|
+
if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
|
708
|
+
if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
|
709
|
+
},
|
710
|
+
|
711
|
+
_getParentOffset: function() {
|
712
|
+
|
713
|
+
|
714
|
+
//Get the offsetParent and cache its position
|
715
|
+
this.offsetParent = this.helper.offsetParent();
|
716
|
+
var po = this.offsetParent.offset();
|
717
|
+
|
718
|
+
// This is a special case where we need to modify a offset calculated on start, since the following happened:
|
719
|
+
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
|
720
|
+
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
|
721
|
+
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
|
722
|
+
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
|
723
|
+
po.left += this.scrollParent.scrollLeft();
|
724
|
+
po.top += this.scrollParent.scrollTop();
|
725
|
+
}
|
726
|
+
|
727
|
+
if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
|
728
|
+
|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
|
729
|
+
po = { top: 0, left: 0 };
|
730
|
+
|
731
|
+
return {
|
732
|
+
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
|
733
|
+
left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
|
734
|
+
};
|
735
|
+
|
736
|
+
},
|
737
|
+
|
738
|
+
_getRelativeOffset: function() {
|
739
|
+
|
740
|
+
if(this.cssPosition == "relative") {
|
741
|
+
var p = this.currentItem.position();
|
742
|
+
return {
|
743
|
+
top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
|
744
|
+
left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
|
745
|
+
};
|
746
|
+
} else {
|
747
|
+
return { top: 0, left: 0 };
|
748
|
+
}
|
749
|
+
|
750
|
+
},
|
751
|
+
|
752
|
+
_cacheMargins: function() {
|
753
|
+
this.margins = {
|
754
|
+
left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
|
755
|
+
top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
|
756
|
+
};
|
757
|
+
},
|
758
|
+
|
759
|
+
_cacheHelperProportions: function() {
|
760
|
+
this.helperProportions = {
|
761
|
+
width: this.helper.outerWidth(),
|
762
|
+
height: this.helper.outerHeight()
|
763
|
+
};
|
764
|
+
},
|
765
|
+
|
766
|
+
_setContainment: function() {
|
767
|
+
|
768
|
+
var o = this.options;
|
769
|
+
if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
|
770
|
+
if(o.containment == 'document' || o.containment == 'window') this.containment = [
|
771
|
+
0 - this.offset.relative.left - this.offset.parent.left,
|
772
|
+
0 - this.offset.relative.top - this.offset.parent.top,
|
773
|
+
$(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
|
774
|
+
($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
|
775
|
+
];
|
776
|
+
|
777
|
+
if(!(/^(document|window|parent)$/).test(o.containment)) {
|
778
|
+
var ce = $(o.containment)[0];
|
779
|
+
var co = $(o.containment).offset();
|
780
|
+
var over = ($(ce).css("overflow") != 'hidden');
|
781
|
+
|
782
|
+
this.containment = [
|
783
|
+
co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
|
784
|
+
co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
|
785
|
+
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,
|
786
|
+
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
|
787
|
+
];
|
788
|
+
}
|
789
|
+
|
790
|
+
},
|
791
|
+
|
792
|
+
_convertPositionTo: function(d, pos) {
|
793
|
+
|
794
|
+
if(!pos) pos = this.position;
|
795
|
+
var mod = d == "absolute" ? 1 : -1;
|
796
|
+
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);
|
797
|
+
|
798
|
+
return {
|
799
|
+
top: (
|
800
|
+
pos.top // The absolute mouse position
|
801
|
+
+ this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
802
|
+
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
|
803
|
+
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
|
804
|
+
),
|
805
|
+
left: (
|
806
|
+
pos.left // The absolute mouse position
|
807
|
+
+ this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
808
|
+
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
|
809
|
+
- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
810
|
+
)
|
811
|
+
};
|
812
|
+
|
813
|
+
},
|
814
|
+
|
815
|
+
_generatePosition: function(event) {
|
816
|
+
|
817
|
+
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);
|
818
|
+
|
819
|
+
// This is another very weird special case that only happens for relative elements:
|
820
|
+
// 1. If the css position is relative
|
821
|
+
// 2. and the scroll parent is the document or similar to the offset parent
|
822
|
+
// we have to refresh the relative offset during the scroll so there are no jumps
|
823
|
+
if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
|
824
|
+
this.offset.relative = this._getRelativeOffset();
|
825
|
+
}
|
826
|
+
|
827
|
+
var pageX = event.pageX;
|
828
|
+
var pageY = event.pageY;
|
829
|
+
|
830
|
+
/*
|
831
|
+
* - Position constraining -
|
832
|
+
* Constrain the position to a mix of grid, containment.
|
833
|
+
*/
|
834
|
+
|
835
|
+
if(this.originalPosition) { //If we are not dragging yet, we won't check for options
|
836
|
+
|
837
|
+
if(this.containment) {
|
838
|
+
if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
|
839
|
+
if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
|
840
|
+
if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
|
841
|
+
if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
|
842
|
+
}
|
843
|
+
|
844
|
+
if(o.grid) {
|
845
|
+
var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
|
846
|
+
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;
|
847
|
+
|
848
|
+
var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
|
849
|
+
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;
|
850
|
+
}
|
851
|
+
|
852
|
+
}
|
853
|
+
|
854
|
+
return {
|
855
|
+
top: (
|
856
|
+
pageY // The absolute mouse position
|
857
|
+
- this.offset.click.top // Click offset (relative to the element)
|
858
|
+
- this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
|
859
|
+
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
|
860
|
+
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
|
861
|
+
),
|
862
|
+
left: (
|
863
|
+
pageX // The absolute mouse position
|
864
|
+
- this.offset.click.left // Click offset (relative to the element)
|
865
|
+
- this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
|
866
|
+
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
|
867
|
+
+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
868
|
+
)
|
869
|
+
};
|
870
|
+
|
871
|
+
},
|
872
|
+
|
873
|
+
_rearrange: function(event, i, a, hardRefresh) {
|
874
|
+
|
875
|
+
a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
|
876
|
+
|
877
|
+
//Various things done here to improve the performance:
|
878
|
+
// 1. we create a setTimeout, that calls refreshPositions
|
879
|
+
// 2. on the instance, we have a counter variable, that get's higher after every append
|
880
|
+
// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
|
881
|
+
// 4. this lets only the last addition to the timeout stack through
|
882
|
+
this.counter = this.counter ? ++this.counter : 1;
|
883
|
+
var self = this, counter = this.counter;
|
884
|
+
|
885
|
+
window.setTimeout(function() {
|
886
|
+
if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
|
887
|
+
},0);
|
888
|
+
|
889
|
+
},
|
890
|
+
|
891
|
+
_clear: function(event, noPropagation) {
|
892
|
+
|
893
|
+
this.reverting = false;
|
894
|
+
// We delay all events that have to be triggered to after the point where the placeholder has been removed and
|
895
|
+
// everything else normalized again
|
896
|
+
var delayedTriggers = [], self = this;
|
897
|
+
|
898
|
+
// We first have to update the dom position of the actual currentItem
|
899
|
+
// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
|
900
|
+
if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
|
901
|
+
this._noFinalSort = null;
|
902
|
+
|
903
|
+
if(this.helper[0] == this.currentItem[0]) {
|
904
|
+
for(var i in this._storedCSS) {
|
905
|
+
if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
|
906
|
+
}
|
907
|
+
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
|
908
|
+
} else {
|
909
|
+
this.currentItem.show();
|
910
|
+
}
|
911
|
+
|
912
|
+
if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
|
913
|
+
if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
|
914
|
+
if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
|
915
|
+
if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
|
916
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
917
|
+
if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
|
918
|
+
delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
919
|
+
delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
920
|
+
}
|
921
|
+
};
|
922
|
+
};
|
923
|
+
|
924
|
+
//Post events to containers
|
925
|
+
for (var i = this.containers.length - 1; i >= 0; i--){
|
926
|
+
if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
927
|
+
if(this.containers[i].containerCache.over) {
|
928
|
+
delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
|
929
|
+
this.containers[i].containerCache.over = 0;
|
930
|
+
}
|
931
|
+
}
|
932
|
+
|
933
|
+
//Do what was originally in plugins
|
934
|
+
if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
|
935
|
+
if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset cursor
|
936
|
+
if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
|
937
|
+
|
938
|
+
this.dragging = false;
|
939
|
+
if(this.cancelHelperRemoval) {
|
940
|
+
if(!noPropagation) {
|
941
|
+
this._trigger("beforeStop", event, this._uiHash());
|
942
|
+
for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
|
943
|
+
this._trigger("stop", event, this._uiHash());
|
944
|
+
}
|
945
|
+
return false;
|
946
|
+
}
|
947
|
+
|
948
|
+
if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
|
949
|
+
|
950
|
+
//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
|
951
|
+
this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
|
952
|
+
|
953
|
+
if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
|
954
|
+
|
955
|
+
if(!noPropagation) {
|
956
|
+
for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
|
957
|
+
this._trigger("stop", event, this._uiHash());
|
958
|
+
}
|
959
|
+
|
960
|
+
this.fromOutside = false;
|
961
|
+
return true;
|
962
|
+
|
963
|
+
},
|
964
|
+
|
965
|
+
_trigger: function() {
|
966
|
+
if ($.widget.prototype._trigger.apply(this, arguments) === false) {
|
967
|
+
this.cancel();
|
968
|
+
}
|
969
|
+
},
|
970
|
+
|
971
|
+
_uiHash: function(inst) {
|
972
|
+
var self = inst || this;
|
973
|
+
return {
|
974
|
+
helper: self.helper,
|
975
|
+
placeholder: self.placeholder || $([]),
|
976
|
+
position: self.position,
|
977
|
+
absolutePosition: self.positionAbs, //deprecated
|
978
|
+
offset: self.positionAbs,
|
979
|
+
item: self.currentItem,
|
980
|
+
sender: inst ? inst.element : null
|
981
|
+
};
|
982
|
+
}
|
983
|
+
|
984
|
+
}));
|
985
|
+
|
986
|
+
$.extend($.ui.sortable, {
|
987
|
+
getter: "serialize toArray",
|
988
|
+
version: "1.7.2",
|
989
|
+
eventPrefix: "sort",
|
990
|
+
defaults: {
|
991
|
+
appendTo: "parent",
|
992
|
+
axis: false,
|
993
|
+
cancel: ":input,option",
|
994
|
+
connectWith: false,
|
995
|
+
containment: false,
|
996
|
+
cursor: 'auto',
|
997
|
+
cursorAt: false,
|
998
|
+
delay: 0,
|
999
|
+
distance: 1,
|
1000
|
+
dropOnEmpty: true,
|
1001
|
+
forcePlaceholderSize: false,
|
1002
|
+
forceHelperSize: false,
|
1003
|
+
grid: false,
|
1004
|
+
handle: false,
|
1005
|
+
helper: "original",
|
1006
|
+
items: '> *',
|
1007
|
+
opacity: false,
|
1008
|
+
placeholder: false,
|
1009
|
+
revert: false,
|
1010
|
+
scroll: true,
|
1011
|
+
scrollSensitivity: 20,
|
1012
|
+
scrollSpeed: 20,
|
1013
|
+
scope: "default",
|
1014
|
+
tolerance: "intersect",
|
1015
|
+
zIndex: 1000
|
1016
|
+
}
|
1017
|
+
});
|
1018
|
+
|
1019
|
+
})(jQuery);
|