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,75 @@
|
|
1
|
+
require 'apps/core/auth/_init.rb'
|
2
|
+
|
3
|
+
module Spider; module Components
|
4
|
+
|
5
|
+
# This widget creates an administration page for models.
|
6
|
+
#
|
7
|
+
# Attributes:
|
8
|
+
# *:models* Comma-separated list of model names
|
9
|
+
# *:title*
|
10
|
+
# *:logout_url*
|
11
|
+
#
|
12
|
+
# Content:
|
13
|
+
# Takes the tags
|
14
|
+
# *admin:model* A model to administer
|
15
|
+
# *admin:app* Administer all models belonging to the app. Can have an 'except' attribute.
|
16
|
+
|
17
|
+
class Admin < Spider::Widget
|
18
|
+
tag 'admin'
|
19
|
+
|
20
|
+
i_attribute :models, :process => lambda{ |models| models.split(/,[\s\n]*/).map{|m| const_get_full(m) } }
|
21
|
+
is_attr_accessor :title, :default => _("Administration")
|
22
|
+
is_attr_accessor :logout_url, :default => Spider::Auth.request_url+'/login/logout'
|
23
|
+
|
24
|
+
def init
|
25
|
+
@items = []
|
26
|
+
end
|
27
|
+
|
28
|
+
def route_widget
|
29
|
+
[:switcher, @_action]
|
30
|
+
end
|
31
|
+
|
32
|
+
def prepare_widgets
|
33
|
+
@models.each do |model|
|
34
|
+
crud = Crud.new(@request, @response)
|
35
|
+
crud.id = model.name.to_s.gsub('::', '_').downcase
|
36
|
+
crud.model = model
|
37
|
+
@widgets[:switcher].add(model.label_plural, crud, 'Gestione Dati')
|
38
|
+
end
|
39
|
+
if (@request.respond_to?(:user) && @request.user)
|
40
|
+
@scene.username = @request.user.to_s
|
41
|
+
else
|
42
|
+
@scene.username = _("guest")
|
43
|
+
end
|
44
|
+
super
|
45
|
+
end
|
46
|
+
|
47
|
+
def run
|
48
|
+
@scene.current = @widgets[:switcher].current_label
|
49
|
+
super
|
50
|
+
end
|
51
|
+
|
52
|
+
def parse_runtime_content(doc, src_path)
|
53
|
+
doc = super
|
54
|
+
mods = []
|
55
|
+
doc.search('admin:model').each do |mod|
|
56
|
+
mods << const_get_full(mod.innerText)
|
57
|
+
end
|
58
|
+
doc.search('admin:app').each do |app_tag|
|
59
|
+
except = []
|
60
|
+
if (app_tag.attributes['except'])
|
61
|
+
except = app_tag.attributes['except'].split(',').map{ |e| e.strip }
|
62
|
+
end
|
63
|
+
app = const_get_full(app_tag.innerText.strip)
|
64
|
+
mods += app.models.select{ |m|
|
65
|
+
!m.attributes[:sub_model] && m.mapper.class.write? && !except.include?(m.name.split('::')[-1])
|
66
|
+
}.sort{ |a, b| a.name <=> b.name }
|
67
|
+
end
|
68
|
+
@models ||= []
|
69
|
+
@models += mods
|
70
|
+
return doc
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end; end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="{ @widget[:css_class] }">
|
2
|
+
<tpl:asset type="css" src="css/admin.css" />
|
3
|
+
<div class="heading">
|
4
|
+
<div class="title">
|
5
|
+
<h1>{ @title }</h1>
|
6
|
+
</div>
|
7
|
+
<div class="tools">
|
8
|
+
Benvenuto, { @username }.
|
9
|
+
<a href="{ @logout_url }">Logout</a>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<div class="current_section">
|
13
|
+
<span id="label">{ @current }</span>
|
14
|
+
</div>
|
15
|
+
<core:switcher id="switcher" />
|
16
|
+
</div>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Spider; module Components
|
2
|
+
|
3
|
+
class Confirm < Spider::Widget
|
4
|
+
tag 'confirm'
|
5
|
+
is_attr_accessor :actions
|
6
|
+
|
7
|
+
def prepare
|
8
|
+
@scene.params = collapse_params(@request.params)
|
9
|
+
if (!@actions)
|
10
|
+
add_action('_w'+param_name(self)+'[cancel]', 'Cancel')
|
11
|
+
add_action('_w'+param_name(self)+'[ok]', 'Ok')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def add_action(name, value)
|
16
|
+
@actions ||= []
|
17
|
+
@actions << [name, value]
|
18
|
+
end
|
19
|
+
|
20
|
+
def collapse_params(h, first=true)
|
21
|
+
res = {}
|
22
|
+
h.each do |k, v|
|
23
|
+
res_key = first ? k : "[#{k}]"
|
24
|
+
if (v.is_a?(Hash))
|
25
|
+
collapse_params(v, false).each do |v_k, v_v|
|
26
|
+
res["#{res_key}#{v_k}"] = v_v
|
27
|
+
end
|
28
|
+
else
|
29
|
+
res[res_key] = v
|
30
|
+
end
|
31
|
+
end
|
32
|
+
return res
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end; end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<div class="">
|
2
|
+
<form action="{ @request[:path] }" method="POST">
|
3
|
+
<input sp:each="@params |name, value|" type="hidden" name="{ name }" value="{ value }" />
|
4
|
+
<tpl:placeholder name="text" />
|
5
|
+
<div class="actions">
|
6
|
+
<input sp:each="@actions |action|" type="submit" name="{ action[0] }" value="{ action[1] }" />
|
7
|
+
</div>
|
8
|
+
</form>
|
9
|
+
</div>
|
@@ -0,0 +1,119 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
module Spider; module Components
|
4
|
+
|
5
|
+
class Crud < Spider::Widget
|
6
|
+
tag 'crud'
|
7
|
+
is_attr_accessor :model, :required => true
|
8
|
+
is_attribute :action, :type => Symbol, :default => :table
|
9
|
+
attribute :table_elements
|
10
|
+
attr_accessor :fixed
|
11
|
+
|
12
|
+
def route_widget
|
13
|
+
[@action, @_action]
|
14
|
+
end
|
15
|
+
|
16
|
+
def prepare(action='')
|
17
|
+
@action = (@_action_local && !@_action_local.empty?) ? :form : :table
|
18
|
+
@_pass_action = (@action == :form) ? @_action : nil
|
19
|
+
@scene.saved = flash[:saved]
|
20
|
+
if (params['delete_cancel'])
|
21
|
+
params.delete('delete')
|
22
|
+
params.delete('do_delete')
|
23
|
+
end
|
24
|
+
if (params['delete'] && !params['do_delete'] && params['selected'])
|
25
|
+
@scene.ask_delete = true
|
26
|
+
end
|
27
|
+
super
|
28
|
+
transient_session[:table_params] = @widgets[:table].params if (@widgets[:table])
|
29
|
+
|
30
|
+
if (@action == :table)
|
31
|
+
if params['do_delete'] && params['selected'] && params['selected'].length > 0
|
32
|
+
delete_rows
|
33
|
+
flash[:deleted] = true
|
34
|
+
return redirect(widget_request_path)
|
35
|
+
elsif params['delete'] && params['selected']
|
36
|
+
@scene.ask_delete = true
|
37
|
+
rows = []
|
38
|
+
descs = @model.find({ @model.primary_keys[0].name => params['selected'].keys[0..9]})
|
39
|
+
descs.each { |obj| rows << obj.to_s }
|
40
|
+
total = params['selected'].keys.length
|
41
|
+
rows << "Altri #{total - 10}" if total > 10
|
42
|
+
@widgets[:ask_delete].scene.rows_to_del = rows
|
43
|
+
end
|
44
|
+
elsif (@action == :form)
|
45
|
+
# debugger
|
46
|
+
if (@widgets[:form].saved?)
|
47
|
+
flash[:saved] = true
|
48
|
+
if (@widgets[:form].saved_and_new?)
|
49
|
+
redirect(widget_request_path+'/new')
|
50
|
+
elsif (@widgets[:form].saved_and_stay?)
|
51
|
+
redirect(widget_request_path+'/'+@widgets[:form].pk)
|
52
|
+
else
|
53
|
+
redirect(widget_request_path)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
def prepare_widgets
|
61
|
+
if (@action == :table && @widgets[:table])
|
62
|
+
@key_element = @model.primary_keys[0].name
|
63
|
+
table_page = nil
|
64
|
+
if (transient_session[:table_params])
|
65
|
+
table_page = transient_session[:table_params]['page'] if transient_session[:table_params]['page']
|
66
|
+
end
|
67
|
+
table_page = 1 if params['table_q'] || params['clear_table_q']
|
68
|
+
@widgets[:table].page = table_page
|
69
|
+
@widgets[:table].attributes[:elements] = @attributes[:table_elements]
|
70
|
+
@widgets[:table].scene.key_element = @key_element
|
71
|
+
@widgets[:table].scene.crud_path = @full_path
|
72
|
+
@widgets[:table].scene.crud = widget_to_scene(self)
|
73
|
+
@table_q = params['table_q']
|
74
|
+
@table_q ||= transient_session[:table_q]
|
75
|
+
@table_q = nil if params['clear_table_q']
|
76
|
+
if (@table_q)
|
77
|
+
@widgets[:table].add_condition(@model.free_query_condition(@table_q))
|
78
|
+
end
|
79
|
+
transient_session[:table_q] = @table_q
|
80
|
+
if(@condition && @widgets[:table])
|
81
|
+
@widgets[:table].add_condition(@condition)
|
82
|
+
end
|
83
|
+
@scene.table_q = @table_q
|
84
|
+
end
|
85
|
+
if (@fixed)
|
86
|
+
if (@widgets[:table])
|
87
|
+
c = Spider::Model::Condition.new(@fixed)
|
88
|
+
@widgets[:table].add_condition(c)
|
89
|
+
elsif (@widgets[:form])
|
90
|
+
@widgets[:form].fixed = @fixed
|
91
|
+
end
|
92
|
+
end
|
93
|
+
if (@widgets[:ask_delete])
|
94
|
+
@widgets[:ask_delete].add_action('_w'+param_name(self)+'[delete_cancel]', _("Cancel"))
|
95
|
+
@widgets[:ask_delete].add_action('_w'+param_name(self)+'[do_delete]', _('Ok'))
|
96
|
+
end
|
97
|
+
|
98
|
+
super
|
99
|
+
|
100
|
+
end
|
101
|
+
|
102
|
+
def after_widget(id)
|
103
|
+
if (id == :table)
|
104
|
+
links = {}
|
105
|
+
table_rows = @widgets[:table].scene.data
|
106
|
+
table_rows.each_index do |i|
|
107
|
+
links[i] = "#{widget_request_path}/#{table_rows[i][@key_element]}"
|
108
|
+
end
|
109
|
+
@widgets[:table].scene.links_to_form = links
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def delete_rows
|
114
|
+
@model.mapper.delete({ @model.primary_keys[0].name => params['selected'].keys})
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
|
119
|
+
end; end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<div class="{ @widget[:css_class] }">
|
2
|
+
<tpl:asset type="css" src="css/crud.css" />
|
3
|
+
<div sp:if="@saved" class="flash">
|
4
|
+
Salvataggio effettuato
|
5
|
+
</div>
|
6
|
+
<div sp:if="@deleted" class="flash">
|
7
|
+
Cancellazione effettuata
|
8
|
+
</div>
|
9
|
+
<div sp:if="@action == :form" class="top">
|
10
|
+
<a class="back" href="{ @widget[:request_path] }">
|
11
|
+
Torna all'elenco { @model.label_plural.downcase }
|
12
|
+
</a>
|
13
|
+
</div>
|
14
|
+
<core:confirm id="ask_delete" sp:if="@ask_delete">
|
15
|
+
<tpl:content name="text">
|
16
|
+
Sei sicuro di voler cancellare i seguenti elementi?
|
17
|
+
<ul>
|
18
|
+
<li sp:each="@rows_to_del |row|">
|
19
|
+
{ row }
|
20
|
+
</li>
|
21
|
+
</ul>
|
22
|
+
</tpl:content>
|
23
|
+
</core:confirm>
|
24
|
+
<sp:pass sp:if="!@ask_delete">
|
25
|
+
<div sp:if="@action == :table" class="top">
|
26
|
+
<a class="add" href="{ @widget[:request_path] }/new">
|
27
|
+
Crea nuovo
|
28
|
+
</a>
|
29
|
+
</div>
|
30
|
+
<div class="table_search" sp:if="@action == :table">
|
31
|
+
<form action="{ @request[:path] }" method="GET">
|
32
|
+
<input type="text" name="_w{ param_name(@widget) }[table_q]" value="{ @table_q }">
|
33
|
+
<input type="submit" name="submit" value="Trova">
|
34
|
+
<input type="submit" name="_w{ param_name(@widget) }[clear_table_q]" value="Pulisci">
|
35
|
+
</form>
|
36
|
+
</div>
|
37
|
+
<core:table sp:if="@action == :table" id="table" model="@model">
|
38
|
+
<tpl:override-content search="table .row td">
|
39
|
+
<a href="{ @links_to_form[row_i] }" sp:tag-if="element == @key_element"><tpl:overridden /></a>
|
40
|
+
</tpl:override-content>
|
41
|
+
<tpl:append search="table .heading_row">
|
42
|
+
<th>Sel.</th>
|
43
|
+
</tpl:append>
|
44
|
+
<tpl:override search="table">
|
45
|
+
<form sp:if="@rows && @rows.length > 0" action="{ @request[:path] }" method="POST">
|
46
|
+
<tpl:overridden />
|
47
|
+
<div class="crud_table_actions">
|
48
|
+
<input type='submit' name="_w{ param_name(@crud) }[delete]" value="Cancella selezionati">
|
49
|
+
</div>
|
50
|
+
</form>
|
51
|
+
</tpl:override>
|
52
|
+
<tpl:append search="table .row">
|
53
|
+
<td align="center"><input type='checkbox' name="_w{ param_name(@crud) }[selected][{ @data[row_i][@key_element] }]"></td>
|
54
|
+
</tpl:append>
|
55
|
+
<tpl:override-attr search="table .paginator td" name="colspan" value="{ elements.size + 1 }" />
|
56
|
+
</core:table>
|
57
|
+
<forms:form sp:if="@action == :form" id="form" model="@model" show_related="true" show_additional_buttons="true" />
|
58
|
+
</sp:pass>
|
59
|
+
</div>
|
@@ -0,0 +1,294 @@
|
|
1
|
+
module Spider; module Components
|
2
|
+
|
3
|
+
class List < Spider::Widget
|
4
|
+
tag 'list'
|
5
|
+
|
6
|
+
i_attribute :lines, :required => :datasource
|
7
|
+
i_attr_accessor :queryset, :required => :datasource
|
8
|
+
i_attr_accessor :model, :required => :datasource
|
9
|
+
i_attribute :keys
|
10
|
+
is_attribute :delete, :default => false, :process => lambda{ |v| return true if v == "true"; return false if v == "false"; v }
|
11
|
+
is_attribute :delete_param
|
12
|
+
is_attribute :delete_mode, :default => 'all'
|
13
|
+
is_attribute :sortable; is_attribute :collapsable; is_attribute :collapsed
|
14
|
+
is_attribute :tree
|
15
|
+
is_attr_accessor :actions
|
16
|
+
is_attribute :sub_elements
|
17
|
+
is_attribute :is_child
|
18
|
+
is_attribute :paginate, :type => Fixnum, :default => false
|
19
|
+
is_attribute :searchable, :type => Spider::DataTypes::Bool
|
20
|
+
# Display message if list is empty
|
21
|
+
attribute :show_empty, :type => Spider::DataTypes::Bool
|
22
|
+
# Display empty <ul></ul> (default: false)
|
23
|
+
is_attribute :show_empty_list, :type => Spider::DataTypes::Bool
|
24
|
+
i_attribute :dereference_junction
|
25
|
+
i_attribute :dereference_sort, :type => Spider::DataTypes::Bool, :default => false
|
26
|
+
i_attribute :dereference_delete, :type => Spider::DataTypes::Bool, :default => true
|
27
|
+
is_attribute :list_tag, :default => 'ul'
|
28
|
+
i_attribute :element
|
29
|
+
i_attribute :parent_obj
|
30
|
+
|
31
|
+
def widget_init(action='')
|
32
|
+
super
|
33
|
+
@sortable = @sortable.to_sym if @sortable
|
34
|
+
@tree = @tree.to_sym if @tree
|
35
|
+
@model = const_get_full(@model) if @model.is_a?(String)
|
36
|
+
if (@model && !@queryset)
|
37
|
+
@queryset = @tree ? @model.roots : @model.all
|
38
|
+
elsif @queryset
|
39
|
+
@model = @queryset.model
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
def prepare
|
45
|
+
@scene.start_list_tag = "<#{@list_tag}>"
|
46
|
+
@scene.close_list_tag = "</#{@list_tag}>"
|
47
|
+
@sublists = []
|
48
|
+
if (@sub_elements && @sub_elements.is_a?(String))
|
49
|
+
@sub_elements = @sub_elements.split(/,\s+/).map{ |el| el.to_sym }
|
50
|
+
end
|
51
|
+
@sub_elements ||= []
|
52
|
+
@requested_sublists ||= []
|
53
|
+
if (@attributes[:paginate])
|
54
|
+
@page = params['page'] if params['page']
|
55
|
+
@page ||= 1
|
56
|
+
@page = @page.to_i
|
57
|
+
@offset = ((@page - 1) * @attributes[:paginate])
|
58
|
+
@scene.page = @page
|
59
|
+
end
|
60
|
+
@keys = []
|
61
|
+
@delete_keys = []
|
62
|
+
@values = []
|
63
|
+
if (params['delete'])
|
64
|
+
delete(params['delete'])
|
65
|
+
end
|
66
|
+
@dereference_junction = @dereference_junction.to_sym if @dereference_junction
|
67
|
+
css_model = @dereference_junction ? @model.elements[@dereference_junction].model : @model
|
68
|
+
@scene.model_class = css_model_class(css_model)
|
69
|
+
|
70
|
+
@css_classes << 'sortable' if @sortable
|
71
|
+
@css_classes << 'collapsable' if @collapsable
|
72
|
+
@css_classes << 'collapsed' if @collapsed
|
73
|
+
@css_classes << 'sublist' if @attributes[:is_child]
|
74
|
+
@css_classes << 'tree' if @attributes[:tree]
|
75
|
+
@scene.show_empty = @attributes[:show_empty]
|
76
|
+
if (!@lines && @queryset)
|
77
|
+
if (@attributes[:paginate])
|
78
|
+
@queryset.offset = @offset
|
79
|
+
@queryset.limit = @attributes[:paginate]
|
80
|
+
end
|
81
|
+
@scene.search_submit_text = _("Go")
|
82
|
+
@scene.search_clear_text = _("Clear")
|
83
|
+
@search_query = params['q'] || session['q']
|
84
|
+
@search_query = nil if params['clear']
|
85
|
+
session['q'] = @search_query
|
86
|
+
if (@attributes[:searchable] && @search_query)
|
87
|
+
@scene.search_query = @search_query.to_s
|
88
|
+
@queryset.condition.and(@queryset.model.free_query_condition(@search_query))
|
89
|
+
end
|
90
|
+
end
|
91
|
+
if (@widget_target)
|
92
|
+
first, rest = @widget_target.split('/', 2)
|
93
|
+
if first =~ /sublist_(\d+)_(.+)/
|
94
|
+
cnt = $1.to_i
|
95
|
+
sublist_id = $2
|
96
|
+
found = @requested_sublists.select{ |sbl| sbl['id'] == sublist_id }[0]
|
97
|
+
row = @queryset[cnt]
|
98
|
+
if (@dereference_junction)
|
99
|
+
row = row.get(@dereference_junction)
|
100
|
+
end
|
101
|
+
create_requested_sublist(found, row, cnt) if (found)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
super
|
105
|
+
end
|
106
|
+
|
107
|
+
def run
|
108
|
+
if (!@lines && @queryset)
|
109
|
+
@lines = []
|
110
|
+
cnt = 0
|
111
|
+
@queryset.each do |row|
|
112
|
+
if (@dereference_junction)
|
113
|
+
dr_keys = keys_string(row)
|
114
|
+
row = row.get(@dereference_junction)
|
115
|
+
end
|
116
|
+
@keys << keys_string(row)
|
117
|
+
if (@dereference_junction && !@dereference_sort)
|
118
|
+
@sort_keys ||= []
|
119
|
+
@sort_keys << dr_keys
|
120
|
+
end
|
121
|
+
@delete_keys << ((@dereference_junction && !@dereference_delete) ? dr_keys : @keys.last)
|
122
|
+
cnt2 = 0
|
123
|
+
if @tree && row.get(@tree).length > 0
|
124
|
+
sl = create_sublist("sublist_#{cnt}_#{cnt2+=1}")
|
125
|
+
if (@dereference_junction && @model.elements[@tree].model == @model.elements[@dereference_junction].model)
|
126
|
+
sl.attributes[:dereference_junction] = nil
|
127
|
+
end
|
128
|
+
sl.queryset = row.get(@tree)
|
129
|
+
@sublists[cnt] ||= []
|
130
|
+
@sublists[cnt] << sl
|
131
|
+
sl.run
|
132
|
+
end
|
133
|
+
@sub_elements.each do |el|
|
134
|
+
sub = row.get(el)
|
135
|
+
sl = create_sublist("sublist_#{cnt}_#{el}")
|
136
|
+
sl.queryset = sub
|
137
|
+
@sublists[cnt] ||= []
|
138
|
+
@sublists[cnt] << sl
|
139
|
+
sl.run
|
140
|
+
end
|
141
|
+
@requested_sublists.each do |sbl|
|
142
|
+
sl = create_requested_sublist(sbl, row, cnt)
|
143
|
+
sl.run
|
144
|
+
end
|
145
|
+
@values << row
|
146
|
+
@lines << format_line(row)
|
147
|
+
cnt += 1
|
148
|
+
end
|
149
|
+
if (@attributes[:paginate])
|
150
|
+
@scene.has_more = @queryset.has_more?
|
151
|
+
@scene.pages = (@queryset.total_rows.to_f / @attributes[:paginate]).ceil
|
152
|
+
end
|
153
|
+
end
|
154
|
+
@lines ||= []
|
155
|
+
@scene.lines = @lines
|
156
|
+
@scene.keys = @keys
|
157
|
+
@scene.values = @values
|
158
|
+
@scene.sublists = @sublists
|
159
|
+
@scene.delete_keys = @delete_keys
|
160
|
+
@scene.sort_keys = @sort_keys
|
161
|
+
@attributes[:delete] = @request.path if @attributes[:delete] == true
|
162
|
+
if (@attributes[:delete])
|
163
|
+
@scene.delete_link = @attributes[:delete]
|
164
|
+
if (@delete_param)
|
165
|
+
@scene.delete_link += "?#{@delete_param}"
|
166
|
+
else
|
167
|
+
@scene.delete_link += "?_w#{param_name(self)}[delete]="
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
def create_requested_sublist(sbl, row, cnt)
|
173
|
+
attributes = sbl.attributes.clone
|
174
|
+
if (attributes['element'])
|
175
|
+
el = @model.elements[attributes['element'].to_sym]
|
176
|
+
#next unless el # may be ok if the query is polymorphic
|
177
|
+
# if (sl['tree'] && el && el.attributes[:reverse])
|
178
|
+
# sub = el.model.send("#{sl['tree']}_roots")
|
179
|
+
# sub.condition[el.attributes[:reverse]] = row
|
180
|
+
# else
|
181
|
+
sub = row.get(attributes['element'].to_sym)
|
182
|
+
# end
|
183
|
+
end
|
184
|
+
el_name = attributes['element']
|
185
|
+
attributes.delete('element')
|
186
|
+
sl = create_sublist("sublist_#{cnt}_#{attributes['id']}", attributes)
|
187
|
+
if (el && el.model != @model)
|
188
|
+
sl.attributes[:model] = el.model
|
189
|
+
sl.attributes[:dereference_junction] = nil unless attributes['dereference_junction']
|
190
|
+
end
|
191
|
+
if (el)
|
192
|
+
sl.attributes[:element] = el
|
193
|
+
sl.attributes[:parent_obj] = row
|
194
|
+
end
|
195
|
+
sl.parse_runtime_content_xml("<sp:widget-content>#{sbl.innerHTML}</sp:widget-content>")
|
196
|
+
sl.queryset = sub
|
197
|
+
sl.css_classes << "sublist_#{el_name}"
|
198
|
+
@sublists[cnt] ||= []
|
199
|
+
@sublists[cnt] << sl
|
200
|
+
return sl
|
201
|
+
end
|
202
|
+
|
203
|
+
def create_sublist(name, attributes = {})
|
204
|
+
w = create_widget(self.class, name, @request, @response)
|
205
|
+
if (attributes['inherit_template'] && @template)
|
206
|
+
w.template = @template
|
207
|
+
end
|
208
|
+
w.attributes[:tree] = @tree
|
209
|
+
w.attributes[:actions] = @actions
|
210
|
+
w.attributes[:is_child] = true
|
211
|
+
@attributes.each do |key, val|
|
212
|
+
w.attributes[key.to_sym] = val
|
213
|
+
end
|
214
|
+
attributes.each do |key, val|
|
215
|
+
w.attributes[key.to_sym] = val if w.class.attribute?(key)
|
216
|
+
end
|
217
|
+
w.widget_before
|
218
|
+
return w
|
219
|
+
end
|
220
|
+
|
221
|
+
def keys_string(obj)
|
222
|
+
obj.keys_string
|
223
|
+
end
|
224
|
+
|
225
|
+
def format_line(obj)
|
226
|
+
obj.to_s
|
227
|
+
end
|
228
|
+
|
229
|
+
def parse_runtime_content(doc, src_path='')
|
230
|
+
doc = super
|
231
|
+
return doc if doc.children.empty?
|
232
|
+
doc.root.xpath('sublist', Template.xml_namespaces).each do |sl|
|
233
|
+
raise ArgumentError, "Sublist of #{@id} does not have an id" unless sl['id']
|
234
|
+
@requested_sublists ||= []
|
235
|
+
@requested_sublists << sl
|
236
|
+
end
|
237
|
+
return doc.root
|
238
|
+
end
|
239
|
+
|
240
|
+
__.json
|
241
|
+
def sort(id, pos)
|
242
|
+
raise "List #{@id} is not sortable" unless @sortable
|
243
|
+
obj = @model.new(id)
|
244
|
+
obj.set(@sortable, pos)
|
245
|
+
obj.save
|
246
|
+
$out << "{res: 'ok'}"
|
247
|
+
end
|
248
|
+
|
249
|
+
__.json
|
250
|
+
def tree_sort(id, parent_id, prev_id=nil)
|
251
|
+
#debugger
|
252
|
+
raise "List #{@id} is not a tree" unless @tree
|
253
|
+
raise "List #{@id} is not sortable" unless @sortable
|
254
|
+
obj = @model.new(id)
|
255
|
+
parent = @model.new(parent_id) if parent_id && !parent_id.empty?
|
256
|
+
prev = @model.new(prev_id) if prev_id && !prev_id.empty?
|
257
|
+
unless parent || prev
|
258
|
+
if (@parent_obj.class == @model)
|
259
|
+
parent = @parent_obj
|
260
|
+
else
|
261
|
+
raise "No parent or prev given"
|
262
|
+
end
|
263
|
+
end
|
264
|
+
tree_el = @model.elements[@tree]
|
265
|
+
obj_parent = obj.get(tree_el.attributes[:reverse])
|
266
|
+
# if (obj_parent)
|
267
|
+
@model.mapper.tree_remove(tree_el, obj)
|
268
|
+
# end
|
269
|
+
if (prev)
|
270
|
+
@model.mapper.tree_insert_node_right(tree_el, obj, prev)
|
271
|
+
else
|
272
|
+
@model.mapper.tree_insert_node_first(tree_el, obj, parent)
|
273
|
+
end
|
274
|
+
obj.save
|
275
|
+
$out << "{res: 'ok'}"
|
276
|
+
end
|
277
|
+
|
278
|
+
def delete(id)
|
279
|
+
if (@delete_mode == 'all')
|
280
|
+
obj = @model.new(id)
|
281
|
+
if (@tree)
|
282
|
+
obj.mapper.tree_delete(@model.elements[@tree], obj)
|
283
|
+
else
|
284
|
+
obj.delete
|
285
|
+
end
|
286
|
+
else
|
287
|
+
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
|
292
|
+
end
|
293
|
+
|
294
|
+
end; end
|