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,234 @@
|
|
1
|
+
Spider.defineWidget('Spider.Components.List', {
|
2
|
+
|
3
|
+
autoInit: '.wdgt-Spider-Components-List',
|
4
|
+
|
5
|
+
startup: function(){
|
6
|
+
},
|
7
|
+
|
8
|
+
ready: function(){
|
9
|
+
this.listEl = $('>ul, >ol', this.el);
|
10
|
+
var options = {};
|
11
|
+
if (this.listEl.length > 0){
|
12
|
+
this.listTagName = this.listEl.get(0).tagName;
|
13
|
+
if (this.el.hasClass('collapsed')) options.collapsed = true;
|
14
|
+
if (this.el.hasClass('tree')) $(this.listTagName, this.el).treeview(options);
|
15
|
+
if (this.el.hasClass('sortable')) this.makeSortable();
|
16
|
+
|
17
|
+
};
|
18
|
+
this.ajaxify($('form, .paginator a', this.el));
|
19
|
+
this.ajaxify($('.delete_link:not(.unmanaged)', this.el));
|
20
|
+
},
|
21
|
+
|
22
|
+
update: function(){
|
23
|
+
},
|
24
|
+
|
25
|
+
|
26
|
+
makeSortable: function(){
|
27
|
+
var options = {
|
28
|
+
items: '>li',
|
29
|
+
helper: function(e,item) {
|
30
|
+
return $("<div class='treeview-helper'>"+item.find("span.desc").html()+"</div>");
|
31
|
+
},
|
32
|
+
handle: '> span.desc',
|
33
|
+
update: this.handleSort.bind(this),
|
34
|
+
receive: this.handleReceive.bind(this)
|
35
|
+
};
|
36
|
+
if (this.el.hasClass('tree')){
|
37
|
+
options = $.extend(options, {
|
38
|
+
//revert: true,
|
39
|
+
sortIndication: {
|
40
|
+
down: function(item) {
|
41
|
+
item.before($('<li id="list-sort-indicator" />'));
|
42
|
+
},
|
43
|
+
up: function(item) {
|
44
|
+
item.after($('<li id="list-sort-indicator" />'));
|
45
|
+
},
|
46
|
+
remove: function(item) {
|
47
|
+
$('#list-sort-indicator').remove();
|
48
|
+
}
|
49
|
+
},
|
50
|
+
start: function(e, ui) {
|
51
|
+
console.log("Tree start:");
|
52
|
+
console.log(e);
|
53
|
+
console.log(ui);
|
54
|
+
// ui.instance.element.treeview({update: ui.item});
|
55
|
+
},
|
56
|
+
update: this.handleTreeUpdate.bind(this)
|
57
|
+
});
|
58
|
+
this.listEl.sortableTree(options);
|
59
|
+
// handles drops on non-subtrees nodes
|
60
|
+
// debugger;
|
61
|
+
$('.desc', this.el).droppable({
|
62
|
+
accept: "li",
|
63
|
+
hoverClass: "drop",
|
64
|
+
tolerance: "pointer",
|
65
|
+
// greedy: true,
|
66
|
+
drop: this.handleTreeDrop.bind(this)
|
67
|
+
// over: function(e,ui) {
|
68
|
+
// ui.helper.css("outline", "1px dotted green");
|
69
|
+
// },
|
70
|
+
// out: function(e,ui) {
|
71
|
+
// ui.helper.css("outline", "1px dotted red");
|
72
|
+
// }
|
73
|
+
});
|
74
|
+
}
|
75
|
+
else{
|
76
|
+
this.listEl.sortable(options);
|
77
|
+
}
|
78
|
+
},
|
79
|
+
|
80
|
+
handleSort: function(e, ui){
|
81
|
+
if (ui.sender) return; // handled by handleReceive
|
82
|
+
var item = ui.item;
|
83
|
+
var pos = this.findLiPosition(item);
|
84
|
+
if (pos == -1) return;
|
85
|
+
if (this.listEl.data('sortable').fromOutside){ // hack to work around strange jquery ui behaviour...
|
86
|
+
return this.acceptFromSender(null, ui.item, pos);
|
87
|
+
}
|
88
|
+
this.remote('sort', this.getSortItemId(item), pos);
|
89
|
+
},
|
90
|
+
|
91
|
+
|
92
|
+
handleReceive: function(e, ui){
|
93
|
+
if (ui.sender == ui.item){
|
94
|
+
// the item is received from a draggable, not from a list. For some reason the receiver is not
|
95
|
+
// yet ready to find the position; will call acceptFromSender from handleSort.
|
96
|
+
return;
|
97
|
+
}
|
98
|
+
var pos = this.findLiPosition(ui.item);
|
99
|
+
return this.acceptFromSender(ui.sender, ui.item, pos);
|
100
|
+
},
|
101
|
+
|
102
|
+
handleTreeUpdate: function(e, ui){
|
103
|
+
var parentId = this.getItemId(ui.item.parents('li.tree').eq(0));
|
104
|
+
var prevId = this.getItemId(ui.item.prev('li.tree'));
|
105
|
+
this.remote('tree_sort', this.getItemId(ui.item), parentId, prevId);
|
106
|
+
},
|
107
|
+
|
108
|
+
handleTreeDrop: function(e, ui){
|
109
|
+
if (e.target.parentNode == ui.draggable[0]) return false; //dropped over itself
|
110
|
+
console.log('dropped inside');
|
111
|
+
var dropLi = $(e.target.parentNode);
|
112
|
+
var subUl = $("> "+this.listTagName, dropLi);
|
113
|
+
if (subUl.length == 0){
|
114
|
+
subUl = $("<"+this.listTagName+" />").appendTo(dropLi);
|
115
|
+
this.el.treeview({add: e.target.parentNode});
|
116
|
+
}
|
117
|
+
subUl.append(ui.draggable);
|
118
|
+
var parentId = this.getItemId($(e.target).parents('li.tree').eq(0));
|
119
|
+
var prevId = null;
|
120
|
+
this.remote('tree_sort', this.getItemId(ui.draggable), parentId, prevId);
|
121
|
+
return false;
|
122
|
+
},
|
123
|
+
|
124
|
+
acceptFromSender: function(sender, item, pos){
|
125
|
+
console.error("Accept from sender must be implemented by the widget instance");
|
126
|
+
},
|
127
|
+
|
128
|
+
getItemId: function(li){
|
129
|
+
return $('> .dataobject-key', li).text();
|
130
|
+
},
|
131
|
+
|
132
|
+
getItemById: function(id){
|
133
|
+
var found = null;
|
134
|
+
var self = this;
|
135
|
+
$('>li', this.listEl).each(function(){
|
136
|
+
if (self.getItemId(this) == id){
|
137
|
+
found = $(this);
|
138
|
+
return false;
|
139
|
+
}
|
140
|
+
});
|
141
|
+
return found;
|
142
|
+
},
|
143
|
+
|
144
|
+
getSortItemId: function(li){
|
145
|
+
var k = $('> .sort-key', li);
|
146
|
+
if (k.length > 0) return k.text();
|
147
|
+
return this.getItemId(li);
|
148
|
+
},
|
149
|
+
|
150
|
+
findLiPosition: function(item){
|
151
|
+
var cnt = 1;
|
152
|
+
var li = $('> li', this.listEl);
|
153
|
+
li.each(function(){
|
154
|
+
if (this == item.get(0)) return false;
|
155
|
+
cnt++;
|
156
|
+
});
|
157
|
+
if (cnt > li.length) return -1; // the row was dropped outside
|
158
|
+
return cnt;
|
159
|
+
},
|
160
|
+
|
161
|
+
sortResult: function(res){
|
162
|
+
console.log(res);
|
163
|
+
},
|
164
|
+
|
165
|
+
scrollable: function(options){
|
166
|
+
options = $.extend({
|
167
|
+
num: 5,
|
168
|
+
scroll: 1
|
169
|
+
}, options);
|
170
|
+
this.scrollOptions = options;
|
171
|
+
this.scrollPos = 0;
|
172
|
+
this.scrollBackButton = $('<a href="#"><</a>').click(
|
173
|
+
function(){ this.scroll(-options.scroll); return false; }.bind(this)
|
174
|
+
);
|
175
|
+
this.scrollForwarButton = $('<a href="#">></a>').click(
|
176
|
+
function(){ this.scroll(options.scroll); return false; }.bind(this)
|
177
|
+
);
|
178
|
+
this.el
|
179
|
+
.append(this.scrollBackButton)
|
180
|
+
.append($('<span> </span>'))
|
181
|
+
.append(this.scrollForwarButton);
|
182
|
+
this.scroll(1);
|
183
|
+
},
|
184
|
+
|
185
|
+
scroll: function(num){
|
186
|
+
var newPos = null;
|
187
|
+
newPos = this.scrollPos + num;
|
188
|
+
if (newPos < 1) newPos = 1;
|
189
|
+
var size = $('>li', this.listEl).length;
|
190
|
+
var max = size - this.scrollOptions.num + 1;
|
191
|
+
if (max < 1) max = 1;
|
192
|
+
if (newPos > max) newPos = max;
|
193
|
+
$('>li', this.listEl).show();
|
194
|
+
$('>li:lt('+(newPos-1)+')', this.listEl).hide();
|
195
|
+
$('>li:gt('+(newPos+this.scrollOptions.num-2)+')', this.listEl).hide();
|
196
|
+
this.listEl.attr('start', newPos);
|
197
|
+
this.scrollPos = newPos;
|
198
|
+
if (this.scrollPos == 1) this.scrollBackButton.hide();
|
199
|
+
else this.scrollBackButton.show();
|
200
|
+
if (this.scrollPos == max) this.scrollForwarButton.hide();
|
201
|
+
else this.scrollForwarButton.show();
|
202
|
+
},
|
203
|
+
|
204
|
+
makeEditable: function(button, form_path){
|
205
|
+
$(button, this.el).click(function(e){
|
206
|
+
e.preventDefault();
|
207
|
+
var form = $W(form_path);
|
208
|
+
form.el.appendTo($(this).parents('.listItem').eq(0));
|
209
|
+
form.el.show();
|
210
|
+
form.reload({pk: $(this).getDataObjectKey()}, function(){
|
211
|
+
var widget = this;
|
212
|
+
$('.buttons', this.el).append(
|
213
|
+
$('<input type="submit" value="Annulla" />').click(function(e){
|
214
|
+
e.preventDefault();
|
215
|
+
widget.el.html('');
|
216
|
+
widget.el.hide();
|
217
|
+
})
|
218
|
+
);
|
219
|
+
});
|
220
|
+
});
|
221
|
+
|
222
|
+
},
|
223
|
+
|
224
|
+
keys: function(){
|
225
|
+
var keys = [];
|
226
|
+
$('>li >.dataobject-key').each(function(){
|
227
|
+
keys.push($(this).text());
|
228
|
+
});
|
229
|
+
return keys;
|
230
|
+
}
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
});
|
@@ -0,0 +1,484 @@
|
|
1
|
+
function $W(path){
|
2
|
+
// var path_parts = path.split('/');
|
3
|
+
// var wdgt;
|
4
|
+
// for (var i=0; i < path_parts.length; i++){
|
5
|
+
// wdgt = $('.widget.id-'+path_parts[i]);
|
6
|
+
// }
|
7
|
+
if (Spider.widgets[path]) return Spider.widgets[path];
|
8
|
+
var wdgt_id = path.replace(/\//g, '-');
|
9
|
+
var wdgt = $('#'+wdgt_id);
|
10
|
+
if (!wdgt) return null;
|
11
|
+
return Spider.Widget.initFromEl(wdgt);
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
Spider = function(){};
|
16
|
+
|
17
|
+
Spider.widgets = {};
|
18
|
+
|
19
|
+
Widgets = function(){};
|
20
|
+
|
21
|
+
Spider.Widget = Class.extend({
|
22
|
+
|
23
|
+
init: function(container, path, config){
|
24
|
+
this.el = container;
|
25
|
+
this.path = path;
|
26
|
+
this.backend = new Spider.WidgetBackend(this);
|
27
|
+
this.readyFunctions = [];
|
28
|
+
config = $.extend({}, config);
|
29
|
+
this.config = config;
|
30
|
+
this.model = config.model;
|
31
|
+
Spider.widgets[path] = this;
|
32
|
+
this.events = [];
|
33
|
+
this.startup();
|
34
|
+
this.ready();
|
35
|
+
this.applyReady();
|
36
|
+
},
|
37
|
+
|
38
|
+
remote: function(){
|
39
|
+
var args = Array.prototype.slice.call(arguments);
|
40
|
+
var method = args.shift();
|
41
|
+
return this.backend.send(method, args);
|
42
|
+
},
|
43
|
+
|
44
|
+
onReady: function(callback){
|
45
|
+
this.readyFunctions.push(callback);
|
46
|
+
callback.apply(this);
|
47
|
+
},
|
48
|
+
|
49
|
+
applyReady: function(){
|
50
|
+
for (var i=0; i<this.readyFunctions.length; i++){
|
51
|
+
this.readyFunctions[i].apply(this);
|
52
|
+
}
|
53
|
+
},
|
54
|
+
|
55
|
+
reload: function(params, callback){
|
56
|
+
$C.loadWidget(this.path, params, callback);
|
57
|
+
},
|
58
|
+
|
59
|
+
startup: function(){},
|
60
|
+
ready: function(){},
|
61
|
+
update: function(){},
|
62
|
+
|
63
|
+
replaceHTML: function(html){
|
64
|
+
var el = $(html);
|
65
|
+
this.el.html(el.html());
|
66
|
+
this.update();
|
67
|
+
this.ready();
|
68
|
+
Spider.newHTML(this.el);
|
69
|
+
this.applyReady();
|
70
|
+
|
71
|
+
},
|
72
|
+
|
73
|
+
replaceEl: function(el){
|
74
|
+
this.el = el;
|
75
|
+
this.update();
|
76
|
+
this.ready();
|
77
|
+
this.applyReady();
|
78
|
+
},
|
79
|
+
|
80
|
+
paramName: function(key){
|
81
|
+
var pathParts = this.path.split('/');
|
82
|
+
var param = "_w";
|
83
|
+
for (var i=0; i<pathParts.length; i++){
|
84
|
+
param += "["+pathParts[i]+"]";
|
85
|
+
}
|
86
|
+
if (matches = key.match(/(.+)(\[.*\])/)){
|
87
|
+
param += "["+matches[1]+"]"+matches[2];
|
88
|
+
}
|
89
|
+
else param += "["+key+"]";
|
90
|
+
return param;
|
91
|
+
},
|
92
|
+
|
93
|
+
|
94
|
+
ajaxify: function(el, options){
|
95
|
+
var w = this;
|
96
|
+
if (!options) options = {};
|
97
|
+
el.each(function(){
|
98
|
+
var $this = $(this);
|
99
|
+
if (this.tagName == 'FORM'){
|
100
|
+
$('input[type=submit]', $this).click(function(e){
|
101
|
+
e.preventDefault();
|
102
|
+
w.setLoading();
|
103
|
+
var submitName = $(this).attr('name');
|
104
|
+
var submitValue = $(this).val();
|
105
|
+
$this.ajaxSubmit({
|
106
|
+
dataType: 'html',
|
107
|
+
beforeSubmit: function(data, form, options){
|
108
|
+
data.push({name: submitName, value: submitValue});
|
109
|
+
data.push({name: '_wt', value: w.path});
|
110
|
+
},
|
111
|
+
success: function(res){
|
112
|
+
w.replaceHTML(res);
|
113
|
+
w.removeLoading();
|
114
|
+
}
|
115
|
+
});
|
116
|
+
});
|
117
|
+
}
|
118
|
+
else if (this.tagName == 'A'){
|
119
|
+
$this.click(function(e){
|
120
|
+
if (options.before){
|
121
|
+
var res = options.before.apply(this);
|
122
|
+
if (res === false) return false ;
|
123
|
+
}
|
124
|
+
e.preventDefault();
|
125
|
+
var a = $(e.target);
|
126
|
+
var url = $(this).attr('href');
|
127
|
+
var parts = url.split('?');
|
128
|
+
url = parts[0]; //+'.json';
|
129
|
+
url += '?';
|
130
|
+
if (parts[1]) url += parts[1]+'&';
|
131
|
+
url += '_wt='+w.path;
|
132
|
+
w.setLoading();
|
133
|
+
$.ajax({
|
134
|
+
url: url,
|
135
|
+
type: 'GET',
|
136
|
+
dataType: 'html',
|
137
|
+
success: function(res){
|
138
|
+
w.replaceHTML(res);
|
139
|
+
w.removeLoading();
|
140
|
+
}
|
141
|
+
});
|
142
|
+
});
|
143
|
+
}
|
144
|
+
});
|
145
|
+
|
146
|
+
},
|
147
|
+
|
148
|
+
setLoading: function(){
|
149
|
+
if (this.el.is(':empty')){
|
150
|
+
this.el.addClass('loading-empty');
|
151
|
+
}
|
152
|
+
else{
|
153
|
+
this.el.addClass('loading');
|
154
|
+
}
|
155
|
+
},
|
156
|
+
|
157
|
+
removeLoading: function(){
|
158
|
+
this.el.removeClass('loading').removeClass('loading-empty');
|
159
|
+
},
|
160
|
+
|
161
|
+
acceptDataObject: function(model, acceptOptions, droppableOptions){
|
162
|
+
if (!model.push) model = [model];
|
163
|
+
var cls = "";
|
164
|
+
for (var i=0; i<model.length; i++){
|
165
|
+
if (cls) cls += ', ';
|
166
|
+
cls += '.model-'+Spider.modelToCSS(model[i])+' .dataobject';
|
167
|
+
}
|
168
|
+
droppableOptions = $.extend({
|
169
|
+
accept: cls,
|
170
|
+
hoverClass: 'drophover',
|
171
|
+
tolerance: 'pointer'
|
172
|
+
}, droppableOptions);
|
173
|
+
acceptOptions = $.extend({
|
174
|
+
el: this.el
|
175
|
+
}, acceptOptions);
|
176
|
+
if (acceptOptions.el != this.el){
|
177
|
+
this.onReady(function(){
|
178
|
+
$(acceptOptions.el, this.el).droppable(droppableOptions);
|
179
|
+
});
|
180
|
+
}
|
181
|
+
else this.el.droppable(droppableOptions);
|
182
|
+
},
|
183
|
+
|
184
|
+
getClassInfo: function(prefix){
|
185
|
+
var info = [];
|
186
|
+
var cl = this.el.attr('class');
|
187
|
+
var cl_parts = cl.split(' ');
|
188
|
+
for (var i=0; i < cl_parts.length; i++){
|
189
|
+
if (cl_parts[i].substr(0, prefix.length) == prefix){
|
190
|
+
info.push(cl_parts[i].substr(prefix.length+1));
|
191
|
+
}
|
192
|
+
}
|
193
|
+
return info;
|
194
|
+
},
|
195
|
+
|
196
|
+
bind: function(eventName, callback){
|
197
|
+
if (!this.events[eventName]){
|
198
|
+
this.events[eventName] = [];
|
199
|
+
}
|
200
|
+
this.events[eventName].push(callback);
|
201
|
+
},
|
202
|
+
|
203
|
+
trigger: function(eventName){
|
204
|
+
if (!this.events[eventName]) return;
|
205
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
206
|
+
for (var i=0; i < this.events[eventName].length; i++){
|
207
|
+
this.events[eventName][i].apply(this, args);
|
208
|
+
}
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
});
|
214
|
+
|
215
|
+
Spider.Widget.initFromEl = function(el){
|
216
|
+
if (!el || !el.attr('id')) return;
|
217
|
+
var path = Spider.Widget.pathFromId(el.attr('id'));
|
218
|
+
if (Spider.widgets[path]){
|
219
|
+
var widget = Spider.widgets[path];
|
220
|
+
widget.replaceEl(el);
|
221
|
+
return widget;
|
222
|
+
}
|
223
|
+
var cl = el.attr('class');
|
224
|
+
var cl_parts = cl.split(' ');
|
225
|
+
var w_cl = null;
|
226
|
+
var config = {};
|
227
|
+
for (var i=0; i < cl_parts.length; i++){
|
228
|
+
if (cl_parts[i].substr(0, 5) == 'wdgt-'){
|
229
|
+
w_cl = cl_parts[i].substr(5);
|
230
|
+
}
|
231
|
+
else if (cl_parts[i].substr(0, 6) == 'model-'){
|
232
|
+
config.model = cl_parts[i].substr(6);
|
233
|
+
}
|
234
|
+
}
|
235
|
+
if (w_cl){
|
236
|
+
var w_cl_parts = w_cl.split('-');
|
237
|
+
var target = Widgets;
|
238
|
+
for (var i=0; i < w_cl_parts.length; i++){
|
239
|
+
target = target[w_cl_parts[i]];
|
240
|
+
if (!target) break;
|
241
|
+
}
|
242
|
+
}
|
243
|
+
var func = null;
|
244
|
+
if (target) func = target;
|
245
|
+
else func = Spider.Widget;
|
246
|
+
var obj = new func(el, path, config);
|
247
|
+
return obj;
|
248
|
+
};
|
249
|
+
|
250
|
+
Spider.Widget.pathFromId = function(id){
|
251
|
+
return id.replace(/-/g, '/');
|
252
|
+
};
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
Spider.WidgetBackend = Class.extend({
|
257
|
+
|
258
|
+
init: function(widget){
|
259
|
+
this.widget = widget;
|
260
|
+
this.baseUrl = document.location.href;
|
261
|
+
this.urlParts = this.baseUrl.split('?');
|
262
|
+
this.urlParts[0] = this.urlParts[0].split('#')[0];
|
263
|
+
this.wUrl = this.urlParts[0]+'?';
|
264
|
+
if (this.urlParts[1]) this.wUrl += this.urlParts[1]+'&';
|
265
|
+
this.wUrl += '_wt='+this.widget.path;
|
266
|
+
},
|
267
|
+
|
268
|
+
urlForMethod: function(method){
|
269
|
+
return this.wUrl + '&_we='+method;
|
270
|
+
},
|
271
|
+
|
272
|
+
send: function(method, args, options){
|
273
|
+
var url = this.urlForMethod(method);
|
274
|
+
for (var i=0; i<args.length; i++){
|
275
|
+
url += '&_wp[]='+args[i];
|
276
|
+
}
|
277
|
+
var data = {};
|
278
|
+
var callback = this.widget[method+'_response'];
|
279
|
+
if (!callback) callback = function(){};
|
280
|
+
var defaults = {
|
281
|
+
url: url,
|
282
|
+
type: 'POST',
|
283
|
+
success: callback,
|
284
|
+
data: data
|
285
|
+
};
|
286
|
+
options = $.extend(defaults, options);
|
287
|
+
$.ajax(options);
|
288
|
+
}
|
289
|
+
|
290
|
+
});
|
291
|
+
|
292
|
+
Spider.widgetClasses = {};
|
293
|
+
|
294
|
+
Spider.defineWidget = function(name, parent, w){
|
295
|
+
if (!w){
|
296
|
+
w = parent;
|
297
|
+
parent = null;
|
298
|
+
}
|
299
|
+
var parts = name.split('.');
|
300
|
+
var curr = Widgets;
|
301
|
+
for (var i=0; i<parts.length-1; i++){
|
302
|
+
if (!curr[parts[i]]) curr[parts[i]] = function(){};
|
303
|
+
curr = curr[parts[i]];
|
304
|
+
}
|
305
|
+
if (parent) parent = Spider.widgetClasses[parent];
|
306
|
+
else parent = Spider.Widget;
|
307
|
+
var widget = parent.extend(w);
|
308
|
+
curr[parts[parts.length-1]] = widget;
|
309
|
+
Spider.widgetClasses[name] = widget;
|
310
|
+
if (w.autoInit){
|
311
|
+
var initSelector = null;
|
312
|
+
if (w.autoInit === true){
|
313
|
+
initSelector = '.wdgt-'+parts.join('-');
|
314
|
+
}
|
315
|
+
else{
|
316
|
+
initSelector = w.autoInit;
|
317
|
+
}
|
318
|
+
Spider.onHTML(function(){
|
319
|
+
$(initSelector, this).each(function(){
|
320
|
+
Spider.Widget.initFromEl($(this));
|
321
|
+
});
|
322
|
+
});
|
323
|
+
}
|
324
|
+
};
|
325
|
+
|
326
|
+
Spider.Controller = Class.extend({
|
327
|
+
|
328
|
+
init: function(){
|
329
|
+
var url = ''+document.location;
|
330
|
+
var slashPos = url.lastIndexOf('/');
|
331
|
+
url = url.substr(0, slashPos);
|
332
|
+
this.url = url;
|
333
|
+
},
|
334
|
+
|
335
|
+
remote: function(method, params, callback, options){
|
336
|
+
var args = Array.prototype.slice.call(arguments);
|
337
|
+
if (!callback) callback = function(){};
|
338
|
+
var url = this.url+'/'+method+'.json';
|
339
|
+
var defaults = {
|
340
|
+
url: url,
|
341
|
+
type: 'POST',
|
342
|
+
complete: callback,
|
343
|
+
data: params
|
344
|
+
};
|
345
|
+
options = $.extend(defaults, options);
|
346
|
+
$.ajax(options);
|
347
|
+
},
|
348
|
+
|
349
|
+
loadWidget: function(path, params, callback){
|
350
|
+
var widget = $W(path);
|
351
|
+
var href = document.location.href;
|
352
|
+
var urlParts = href.split('?');
|
353
|
+
var docParts = urlParts[0].split('#');
|
354
|
+
var url = docParts[0]+'?_wt='+path;
|
355
|
+
if (urlParts[1]) url += "&"+urlParts[1];
|
356
|
+
if (params){
|
357
|
+
for (var key in params){
|
358
|
+
url += '&'+this.paramToQuery(params[key], widget.paramName(key));
|
359
|
+
}
|
360
|
+
}
|
361
|
+
widget.setLoading();
|
362
|
+
$.ajax({
|
363
|
+
url: url,
|
364
|
+
type: 'GET',
|
365
|
+
dataType: 'html',
|
366
|
+
success: function(res){
|
367
|
+
widget.replaceHTML(res);
|
368
|
+
widget.removeLoading();
|
369
|
+
//widget.el.effect('highlight', {}, 700);
|
370
|
+
if (callback) callback.apply(widget);
|
371
|
+
}
|
372
|
+
});
|
373
|
+
},
|
374
|
+
|
375
|
+
paramToQuery: function(value, prefix){
|
376
|
+
var res = null;
|
377
|
+
if (!prefix) prefix = '';
|
378
|
+
if (!value){
|
379
|
+
return '=null';
|
380
|
+
}
|
381
|
+
else if (value.push){ // array
|
382
|
+
for (var i=0; i < value.length; i++){
|
383
|
+
if (!res) res = "";
|
384
|
+
else res += '&';
|
385
|
+
res += this.paramToQuery(value[i], prefix+'[]');
|
386
|
+
}
|
387
|
+
return res;
|
388
|
+
}
|
389
|
+
else if (typeof (value) == 'object'){
|
390
|
+
for (var name in value){
|
391
|
+
if (!res) res = "";
|
392
|
+
else res += '&';
|
393
|
+
res += this.paramToQuery(value[name], prefix+'['+name+']');
|
394
|
+
}
|
395
|
+
return res;
|
396
|
+
}
|
397
|
+
else{
|
398
|
+
return prefix+"="+value;
|
399
|
+
}
|
400
|
+
}
|
401
|
+
|
402
|
+
});
|
403
|
+
|
404
|
+
$C = new Spider.Controller();
|
405
|
+
|
406
|
+
$(document).ready(function(){
|
407
|
+
$('a.ajax').click(function(e){
|
408
|
+
e.preventDefault();
|
409
|
+
var a = $(e.target);
|
410
|
+
var url = $(this).attr('href');
|
411
|
+
var parts = url.split('?');
|
412
|
+
url = parts[0]+'.json';
|
413
|
+
if (parts[1]) url += '?'+parts[1];
|
414
|
+
$.ajax({
|
415
|
+
url: url,
|
416
|
+
type: 'GET',
|
417
|
+
dataType: 'json',
|
418
|
+
success: function(res){
|
419
|
+
a.trigger('autoAjaxSuccess', res);
|
420
|
+
}
|
421
|
+
});
|
422
|
+
return false;
|
423
|
+
});
|
424
|
+
});
|
425
|
+
|
426
|
+
$.fn.spiderWidget = function(){
|
427
|
+
if (!this.attr('id')) return;
|
428
|
+
return $W(Spider.Widget.pathFromId(this.attr('id')));
|
429
|
+
};
|
430
|
+
|
431
|
+
$.fn.parentWidget = function(){
|
432
|
+
var par = this;
|
433
|
+
while (par && par.length > 0 && !par.is('.widget')){
|
434
|
+
par = par.parent();
|
435
|
+
}
|
436
|
+
if (!par) return null;
|
437
|
+
return par.spiderWidget();
|
438
|
+
};
|
439
|
+
|
440
|
+
$.fn.getDataObjectKey = function(){
|
441
|
+
var doParent = null;
|
442
|
+
var par = this;
|
443
|
+
while (par && par.length > 0 && !par.is('.dataobject')){
|
444
|
+
par = par.parent();
|
445
|
+
}
|
446
|
+
if (!par) return null;
|
447
|
+
return $('>.dataobject-key', par).text();
|
448
|
+
};
|
449
|
+
|
450
|
+
$.fn.getDataModel = function(){
|
451
|
+
var par = this;
|
452
|
+
while (par && par.length > 0 && !par.is('.model')){
|
453
|
+
par = par.parent();
|
454
|
+
}
|
455
|
+
if (!par) return null;
|
456
|
+
var cl = par.attr('class');
|
457
|
+
if (!cl) return null;
|
458
|
+
var cl_parts = cl.split(' ');
|
459
|
+
for (var i=0; i < cl_parts.length; i++){
|
460
|
+
if (cl_parts[i].substr(0, 6) == 'model-'){
|
461
|
+
return cl_parts[i].substr(6).replace(/-/g, '::');;
|
462
|
+
}
|
463
|
+
}
|
464
|
+
};
|
465
|
+
|
466
|
+
Spider.htmlFunctions = [];
|
467
|
+
Spider.onHTML = function(callback){
|
468
|
+
Spider.htmlFunctions.push(callback);
|
469
|
+
$(document).ready(function(){
|
470
|
+
callback.call($(this.body));
|
471
|
+
});
|
472
|
+
};
|
473
|
+
|
474
|
+
Spider.newHTML = function(el){
|
475
|
+
for (var i=0; i<Spider.htmlFunctions.length; i++){
|
476
|
+
Spider.htmlFunctions[i].call(el);
|
477
|
+
}
|
478
|
+
};
|
479
|
+
|
480
|
+
Spider.modelToCSS = function(name){
|
481
|
+
return name.split('::').join('-');
|
482
|
+
};
|
483
|
+
|
484
|
+
|