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,808 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery Autocomplete plugin 1.1
|
3
|
+
*
|
4
|
+
* Copyright (c) 2009 Jörn Zaefferer
|
5
|
+
*
|
6
|
+
* Dual licensed under the MIT and GPL licenses:
|
7
|
+
* http://www.opensource.org/licenses/mit-license.php
|
8
|
+
* http://www.gnu.org/licenses/gpl.html
|
9
|
+
*
|
10
|
+
* Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
|
11
|
+
*/
|
12
|
+
|
13
|
+
;(function($) {
|
14
|
+
|
15
|
+
$.fn.extend({
|
16
|
+
autocomplete: function(urlOrData, options) {
|
17
|
+
var isUrl = typeof urlOrData == "string";
|
18
|
+
options = $.extend({}, $.Autocompleter.defaults, {
|
19
|
+
url: isUrl ? urlOrData : null,
|
20
|
+
data: isUrl ? null : urlOrData,
|
21
|
+
delay: isUrl ? $.Autocompleter.defaults.delay : 10,
|
22
|
+
max: options && !options.scroll ? 10 : 150
|
23
|
+
}, options);
|
24
|
+
|
25
|
+
// if highlight is set to false, replace it with a do-nothing function
|
26
|
+
options.highlight = options.highlight || function(value) { return value; };
|
27
|
+
|
28
|
+
// if the formatMatch option is not specified, then use formatItem for backwards compatibility
|
29
|
+
options.formatMatch = options.formatMatch || options.formatItem;
|
30
|
+
|
31
|
+
return this.each(function() {
|
32
|
+
new $.Autocompleter(this, options);
|
33
|
+
});
|
34
|
+
},
|
35
|
+
result: function(handler) {
|
36
|
+
return this.bind("result", handler);
|
37
|
+
},
|
38
|
+
search: function(handler) {
|
39
|
+
return this.trigger("search", [handler]);
|
40
|
+
},
|
41
|
+
flushCache: function() {
|
42
|
+
return this.trigger("flushCache");
|
43
|
+
},
|
44
|
+
setOptions: function(options){
|
45
|
+
return this.trigger("setOptions", [options]);
|
46
|
+
},
|
47
|
+
unautocomplete: function() {
|
48
|
+
return this.trigger("unautocomplete");
|
49
|
+
}
|
50
|
+
});
|
51
|
+
|
52
|
+
$.Autocompleter = function(input, options) {
|
53
|
+
|
54
|
+
var KEY = {
|
55
|
+
UP: 38,
|
56
|
+
DOWN: 40,
|
57
|
+
DEL: 46,
|
58
|
+
TAB: 9,
|
59
|
+
RETURN: 13,
|
60
|
+
ESC: 27,
|
61
|
+
COMMA: 188,
|
62
|
+
PAGEUP: 33,
|
63
|
+
PAGEDOWN: 34,
|
64
|
+
BACKSPACE: 8
|
65
|
+
};
|
66
|
+
|
67
|
+
// Create $ object for input element
|
68
|
+
var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
|
69
|
+
|
70
|
+
var timeout;
|
71
|
+
var previousValue = "";
|
72
|
+
var cache = $.Autocompleter.Cache(options);
|
73
|
+
var hasFocus = 0;
|
74
|
+
var lastKeyPressCode;
|
75
|
+
var config = {
|
76
|
+
mouseDownOnSelect: false
|
77
|
+
};
|
78
|
+
var select = $.Autocompleter.Select(options, input, selectCurrent, config);
|
79
|
+
|
80
|
+
var blockSubmit;
|
81
|
+
|
82
|
+
// prevent form submit in opera when selecting with return key
|
83
|
+
$.browser.opera && $(input.form).bind("submit.autocomplete", function() {
|
84
|
+
if (blockSubmit) {
|
85
|
+
blockSubmit = false;
|
86
|
+
return false;
|
87
|
+
}
|
88
|
+
});
|
89
|
+
|
90
|
+
// only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
|
91
|
+
$input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
|
92
|
+
// a keypress means the input has focus
|
93
|
+
// avoids issue where input had focus before the autocomplete was applied
|
94
|
+
hasFocus = 1;
|
95
|
+
// track last key pressed
|
96
|
+
lastKeyPressCode = event.keyCode;
|
97
|
+
switch(event.keyCode) {
|
98
|
+
|
99
|
+
case KEY.UP:
|
100
|
+
event.preventDefault();
|
101
|
+
if ( select.visible() ) {
|
102
|
+
select.prev();
|
103
|
+
} else {
|
104
|
+
onChange(0, true);
|
105
|
+
}
|
106
|
+
break;
|
107
|
+
|
108
|
+
case KEY.DOWN:
|
109
|
+
event.preventDefault();
|
110
|
+
if ( select.visible() ) {
|
111
|
+
select.next();
|
112
|
+
} else {
|
113
|
+
onChange(0, true);
|
114
|
+
}
|
115
|
+
break;
|
116
|
+
|
117
|
+
case KEY.PAGEUP:
|
118
|
+
event.preventDefault();
|
119
|
+
if ( select.visible() ) {
|
120
|
+
select.pageUp();
|
121
|
+
} else {
|
122
|
+
onChange(0, true);
|
123
|
+
}
|
124
|
+
break;
|
125
|
+
|
126
|
+
case KEY.PAGEDOWN:
|
127
|
+
event.preventDefault();
|
128
|
+
if ( select.visible() ) {
|
129
|
+
select.pageDown();
|
130
|
+
} else {
|
131
|
+
onChange(0, true);
|
132
|
+
}
|
133
|
+
break;
|
134
|
+
|
135
|
+
// matches also semicolon
|
136
|
+
case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
|
137
|
+
case KEY.TAB:
|
138
|
+
case KEY.RETURN:
|
139
|
+
if( selectCurrent() ) {
|
140
|
+
// stop default to prevent a form submit, Opera needs special handling
|
141
|
+
event.preventDefault();
|
142
|
+
blockSubmit = true;
|
143
|
+
return false;
|
144
|
+
}
|
145
|
+
break;
|
146
|
+
|
147
|
+
case KEY.ESC:
|
148
|
+
select.hide();
|
149
|
+
break;
|
150
|
+
|
151
|
+
default:
|
152
|
+
clearTimeout(timeout);
|
153
|
+
timeout = setTimeout(onChange, options.delay);
|
154
|
+
break;
|
155
|
+
}
|
156
|
+
}).focus(function(){
|
157
|
+
// track whether the field has focus, we shouldn't process any
|
158
|
+
// results if the field no longer has focus
|
159
|
+
hasFocus++;
|
160
|
+
}).blur(function() {
|
161
|
+
hasFocus = 0;
|
162
|
+
if (!config.mouseDownOnSelect) {
|
163
|
+
hideResults();
|
164
|
+
}
|
165
|
+
}).click(function() {
|
166
|
+
// show select when clicking in a focused field
|
167
|
+
if ( hasFocus++ > 1 && !select.visible() ) {
|
168
|
+
onChange(0, true);
|
169
|
+
}
|
170
|
+
}).bind("search", function() {
|
171
|
+
// TODO why not just specifying both arguments?
|
172
|
+
var fn = (arguments.length > 1) ? arguments[1] : null;
|
173
|
+
function findValueCallback(q, data) {
|
174
|
+
var result;
|
175
|
+
if( data && data.length ) {
|
176
|
+
for (var i=0; i < data.length; i++) {
|
177
|
+
if( data[i].result.toLowerCase() == q.toLowerCase() ) {
|
178
|
+
result = data[i];
|
179
|
+
break;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
if( typeof fn == "function" ) fn(result);
|
184
|
+
else $input.trigger("result", result && [result.data, result.value]);
|
185
|
+
}
|
186
|
+
$.each(trimWords($input.val()), function(i, value) {
|
187
|
+
request(value, findValueCallback, findValueCallback);
|
188
|
+
});
|
189
|
+
}).bind("flushCache", function() {
|
190
|
+
cache.flush();
|
191
|
+
}).bind("setOptions", function() {
|
192
|
+
$.extend(options, arguments[1]);
|
193
|
+
// if we've updated the data, repopulate
|
194
|
+
if ( "data" in arguments[1] )
|
195
|
+
cache.populate();
|
196
|
+
}).bind("unautocomplete", function() {
|
197
|
+
select.unbind();
|
198
|
+
$input.unbind();
|
199
|
+
$(input.form).unbind(".autocomplete");
|
200
|
+
});
|
201
|
+
|
202
|
+
|
203
|
+
function selectCurrent() {
|
204
|
+
var selected = select.selected();
|
205
|
+
if( !selected )
|
206
|
+
return false;
|
207
|
+
|
208
|
+
var v = selected.result;
|
209
|
+
previousValue = v;
|
210
|
+
|
211
|
+
if ( options.multiple ) {
|
212
|
+
var words = trimWords($input.val());
|
213
|
+
if ( words.length > 1 ) {
|
214
|
+
var seperator = options.multipleSeparator.length;
|
215
|
+
var cursorAt = $(input).selection().start;
|
216
|
+
var wordAt, progress = 0;
|
217
|
+
$.each(words, function(i, word) {
|
218
|
+
progress += word.length;
|
219
|
+
if (cursorAt <= progress) {
|
220
|
+
wordAt = i;
|
221
|
+
return false;
|
222
|
+
}
|
223
|
+
progress += seperator;
|
224
|
+
});
|
225
|
+
words[wordAt] = v;
|
226
|
+
// TODO this should set the cursor to the right position, but it gets overriden somewhere
|
227
|
+
//$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
|
228
|
+
v = words.join( options.multipleSeparator );
|
229
|
+
}
|
230
|
+
v += options.multipleSeparator;
|
231
|
+
}
|
232
|
+
|
233
|
+
$input.val(v);
|
234
|
+
hideResultsNow();
|
235
|
+
$input.trigger("result", [selected.data, selected.value]);
|
236
|
+
return true;
|
237
|
+
}
|
238
|
+
|
239
|
+
function onChange(crap, skipPrevCheck) {
|
240
|
+
if( lastKeyPressCode == KEY.DEL ) {
|
241
|
+
select.hide();
|
242
|
+
return;
|
243
|
+
}
|
244
|
+
|
245
|
+
var currentValue = $input.val();
|
246
|
+
|
247
|
+
if ( !skipPrevCheck && currentValue == previousValue )
|
248
|
+
return;
|
249
|
+
|
250
|
+
previousValue = currentValue;
|
251
|
+
|
252
|
+
currentValue = lastWord(currentValue);
|
253
|
+
if ( currentValue.length >= options.minChars) {
|
254
|
+
$input.addClass(options.loadingClass);
|
255
|
+
if (!options.matchCase)
|
256
|
+
currentValue = currentValue.toLowerCase();
|
257
|
+
request(currentValue, receiveData, hideResultsNow);
|
258
|
+
} else {
|
259
|
+
stopLoading();
|
260
|
+
select.hide();
|
261
|
+
}
|
262
|
+
};
|
263
|
+
|
264
|
+
function trimWords(value) {
|
265
|
+
if (!value)
|
266
|
+
return [""];
|
267
|
+
if (!options.multiple)
|
268
|
+
return [$.trim(value)];
|
269
|
+
return $.map(value.split(options.multipleSeparator), function(word) {
|
270
|
+
return $.trim(value).length ? $.trim(word) : null;
|
271
|
+
});
|
272
|
+
}
|
273
|
+
|
274
|
+
function lastWord(value) {
|
275
|
+
if ( !options.multiple )
|
276
|
+
return value;
|
277
|
+
var words = trimWords(value);
|
278
|
+
if (words.length == 1)
|
279
|
+
return words[0];
|
280
|
+
var cursorAt = $(input).selection().start;
|
281
|
+
if (cursorAt == value.length) {
|
282
|
+
words = trimWords(value)
|
283
|
+
} else {
|
284
|
+
words = trimWords(value.replace(value.substring(cursorAt), ""));
|
285
|
+
}
|
286
|
+
return words[words.length - 1];
|
287
|
+
}
|
288
|
+
|
289
|
+
// fills in the input box w/the first match (assumed to be the best match)
|
290
|
+
// q: the term entered
|
291
|
+
// sValue: the first matching result
|
292
|
+
function autoFill(q, sValue){
|
293
|
+
// autofill in the complete box w/the first match as long as the user hasn't entered in more data
|
294
|
+
// if the last user key pressed was backspace, don't autofill
|
295
|
+
if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
|
296
|
+
// fill in the value (keep the case the user has typed)
|
297
|
+
$input.val($input.val() + sValue.substring(lastWord(previousValue).length));
|
298
|
+
// select the portion of the value not typed by the user (so the next character will erase)
|
299
|
+
$(input).selection(previousValue.length, previousValue.length + sValue.length);
|
300
|
+
}
|
301
|
+
};
|
302
|
+
|
303
|
+
function hideResults() {
|
304
|
+
clearTimeout(timeout);
|
305
|
+
timeout = setTimeout(hideResultsNow, 200);
|
306
|
+
};
|
307
|
+
|
308
|
+
function hideResultsNow() {
|
309
|
+
var wasVisible = select.visible();
|
310
|
+
select.hide();
|
311
|
+
clearTimeout(timeout);
|
312
|
+
stopLoading();
|
313
|
+
if (options.mustMatch) {
|
314
|
+
// call search and run callback
|
315
|
+
$input.search(
|
316
|
+
function (result){
|
317
|
+
// if no value found, clear the input box
|
318
|
+
if( !result ) {
|
319
|
+
if (options.multiple) {
|
320
|
+
var words = trimWords($input.val()).slice(0, -1);
|
321
|
+
$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
|
322
|
+
}
|
323
|
+
else {
|
324
|
+
$input.val( "" );
|
325
|
+
$input.trigger("result", null);
|
326
|
+
}
|
327
|
+
}
|
328
|
+
}
|
329
|
+
);
|
330
|
+
}
|
331
|
+
};
|
332
|
+
|
333
|
+
function receiveData(q, data) {
|
334
|
+
if ( data && data.length && hasFocus ) {
|
335
|
+
stopLoading();
|
336
|
+
select.display(data, q);
|
337
|
+
autoFill(q, data[0].value);
|
338
|
+
select.show();
|
339
|
+
} else {
|
340
|
+
hideResultsNow();
|
341
|
+
}
|
342
|
+
};
|
343
|
+
|
344
|
+
function request(term, success, failure) {
|
345
|
+
if (!options.matchCase)
|
346
|
+
term = term.toLowerCase();
|
347
|
+
var data = cache.load(term);
|
348
|
+
// recieve the cached data
|
349
|
+
if (data && data.length) {
|
350
|
+
success(term, data);
|
351
|
+
// if an AJAX url has been supplied, try loading the data now
|
352
|
+
} else if( (typeof options.url == "string") && (options.url.length > 0) ){
|
353
|
+
|
354
|
+
var extraParams = {
|
355
|
+
timestamp: +new Date()
|
356
|
+
};
|
357
|
+
$.each(options.extraParams, function(key, param) {
|
358
|
+
extraParams[key] = typeof param == "function" ? param() : param;
|
359
|
+
});
|
360
|
+
|
361
|
+
$.ajax({
|
362
|
+
// try to leverage ajaxQueue plugin to abort previous requests
|
363
|
+
mode: "abort",
|
364
|
+
// limit abortion to this input
|
365
|
+
port: "autocomplete" + input.name,
|
366
|
+
dataType: options.dataType,
|
367
|
+
url: options.url,
|
368
|
+
data: $.extend({
|
369
|
+
q: lastWord(term),
|
370
|
+
limit: options.max
|
371
|
+
}, extraParams),
|
372
|
+
success: function(data) {
|
373
|
+
var parsed = options.parse && options.parse(data) || parse(data);
|
374
|
+
cache.add(term, parsed);
|
375
|
+
success(term, parsed);
|
376
|
+
}
|
377
|
+
});
|
378
|
+
} else {
|
379
|
+
// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
|
380
|
+
select.emptyList();
|
381
|
+
failure(term);
|
382
|
+
}
|
383
|
+
};
|
384
|
+
|
385
|
+
function parse(data) {
|
386
|
+
var parsed = [];
|
387
|
+
var rows = data.split("\n");
|
388
|
+
for (var i=0; i < rows.length; i++) {
|
389
|
+
var row = $.trim(rows[i]);
|
390
|
+
if (row) {
|
391
|
+
row = row.split("|");
|
392
|
+
parsed[parsed.length] = {
|
393
|
+
data: row,
|
394
|
+
value: row[0],
|
395
|
+
result: options.formatResult && options.formatResult(row, row[0]) || row[0]
|
396
|
+
};
|
397
|
+
}
|
398
|
+
}
|
399
|
+
return parsed;
|
400
|
+
};
|
401
|
+
|
402
|
+
function stopLoading() {
|
403
|
+
$input.removeClass(options.loadingClass);
|
404
|
+
};
|
405
|
+
|
406
|
+
};
|
407
|
+
|
408
|
+
$.Autocompleter.defaults = {
|
409
|
+
inputClass: "ac_input",
|
410
|
+
resultsClass: "ac_results",
|
411
|
+
loadingClass: "ac_loading",
|
412
|
+
minChars: 1,
|
413
|
+
delay: 400,
|
414
|
+
matchCase: false,
|
415
|
+
matchSubset: true,
|
416
|
+
matchContains: false,
|
417
|
+
cacheLength: 10,
|
418
|
+
max: 100,
|
419
|
+
mustMatch: false,
|
420
|
+
extraParams: {},
|
421
|
+
selectFirst: true,
|
422
|
+
formatItem: function(row) { return row[0]; },
|
423
|
+
formatMatch: null,
|
424
|
+
autoFill: false,
|
425
|
+
width: 0,
|
426
|
+
multiple: false,
|
427
|
+
multipleSeparator: ", ",
|
428
|
+
highlight: function(value, term) {
|
429
|
+
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
|
430
|
+
},
|
431
|
+
scroll: true,
|
432
|
+
scrollHeight: 180
|
433
|
+
};
|
434
|
+
|
435
|
+
$.Autocompleter.Cache = function(options) {
|
436
|
+
|
437
|
+
var data = {};
|
438
|
+
var length = 0;
|
439
|
+
|
440
|
+
function matchSubset(s, sub) {
|
441
|
+
if (!options.matchCase)
|
442
|
+
s = s.toLowerCase();
|
443
|
+
var i = s.indexOf(sub);
|
444
|
+
if (options.matchContains == "word"){
|
445
|
+
i = s.toLowerCase().search("\\b" + sub.toLowerCase());
|
446
|
+
}
|
447
|
+
if (i == -1) return false;
|
448
|
+
return i == 0 || options.matchContains;
|
449
|
+
};
|
450
|
+
|
451
|
+
function add(q, value) {
|
452
|
+
if (length > options.cacheLength){
|
453
|
+
flush();
|
454
|
+
}
|
455
|
+
if (!data[q]){
|
456
|
+
length++;
|
457
|
+
}
|
458
|
+
data[q] = value;
|
459
|
+
}
|
460
|
+
|
461
|
+
function populate(){
|
462
|
+
if( !options.data ) return false;
|
463
|
+
// track the matches
|
464
|
+
var stMatchSets = {},
|
465
|
+
nullData = 0;
|
466
|
+
|
467
|
+
// no url was specified, we need to adjust the cache length to make sure it fits the local data store
|
468
|
+
if( !options.url ) options.cacheLength = 1;
|
469
|
+
|
470
|
+
// track all options for minChars = 0
|
471
|
+
stMatchSets[""] = [];
|
472
|
+
|
473
|
+
// loop through the array and create a lookup structure
|
474
|
+
for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
|
475
|
+
var rawValue = options.data[i];
|
476
|
+
// if rawValue is a string, make an array otherwise just reference the array
|
477
|
+
rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
|
478
|
+
|
479
|
+
var value = options.formatMatch(rawValue, i+1, options.data.length);
|
480
|
+
if ( value === false )
|
481
|
+
continue;
|
482
|
+
|
483
|
+
var firstChar = value.charAt(0).toLowerCase();
|
484
|
+
// if no lookup array for this character exists, look it up now
|
485
|
+
if( !stMatchSets[firstChar] )
|
486
|
+
stMatchSets[firstChar] = [];
|
487
|
+
|
488
|
+
// if the match is a string
|
489
|
+
var row = {
|
490
|
+
value: value,
|
491
|
+
data: rawValue,
|
492
|
+
result: options.formatResult && options.formatResult(rawValue) || value
|
493
|
+
};
|
494
|
+
|
495
|
+
// push the current match into the set list
|
496
|
+
stMatchSets[firstChar].push(row);
|
497
|
+
|
498
|
+
// keep track of minChars zero items
|
499
|
+
if ( nullData++ < options.max ) {
|
500
|
+
stMatchSets[""].push(row);
|
501
|
+
}
|
502
|
+
};
|
503
|
+
|
504
|
+
// add the data items to the cache
|
505
|
+
$.each(stMatchSets, function(i, value) {
|
506
|
+
// increase the cache size
|
507
|
+
options.cacheLength++;
|
508
|
+
// add to the cache
|
509
|
+
add(i, value);
|
510
|
+
});
|
511
|
+
}
|
512
|
+
|
513
|
+
// populate any existing data
|
514
|
+
setTimeout(populate, 25);
|
515
|
+
|
516
|
+
function flush(){
|
517
|
+
data = {};
|
518
|
+
length = 0;
|
519
|
+
}
|
520
|
+
|
521
|
+
return {
|
522
|
+
flush: flush,
|
523
|
+
add: add,
|
524
|
+
populate: populate,
|
525
|
+
load: function(q) {
|
526
|
+
if (!options.cacheLength || !length)
|
527
|
+
return null;
|
528
|
+
/*
|
529
|
+
* if dealing w/local data and matchContains than we must make sure
|
530
|
+
* to loop through all the data collections looking for matches
|
531
|
+
*/
|
532
|
+
if( !options.url && options.matchContains ){
|
533
|
+
// track all matches
|
534
|
+
var csub = [];
|
535
|
+
// loop through all the data grids for matches
|
536
|
+
for( var k in data ){
|
537
|
+
// don't search through the stMatchSets[""] (minChars: 0) cache
|
538
|
+
// this prevents duplicates
|
539
|
+
if( k.length > 0 ){
|
540
|
+
var c = data[k];
|
541
|
+
$.each(c, function(i, x) {
|
542
|
+
// if we've got a match, add it to the array
|
543
|
+
if (matchSubset(x.value, q)) {
|
544
|
+
csub.push(x);
|
545
|
+
}
|
546
|
+
});
|
547
|
+
}
|
548
|
+
}
|
549
|
+
return csub;
|
550
|
+
} else
|
551
|
+
// if the exact item exists, use it
|
552
|
+
if (data[q]){
|
553
|
+
return data[q];
|
554
|
+
} else
|
555
|
+
if (options.matchSubset) {
|
556
|
+
for (var i = q.length - 1; i >= options.minChars; i--) {
|
557
|
+
var c = data[q.substr(0, i)];
|
558
|
+
if (c) {
|
559
|
+
var csub = [];
|
560
|
+
$.each(c, function(i, x) {
|
561
|
+
if (matchSubset(x.value, q)) {
|
562
|
+
csub[csub.length] = x;
|
563
|
+
}
|
564
|
+
});
|
565
|
+
return csub;
|
566
|
+
}
|
567
|
+
}
|
568
|
+
}
|
569
|
+
return null;
|
570
|
+
}
|
571
|
+
};
|
572
|
+
};
|
573
|
+
|
574
|
+
$.Autocompleter.Select = function (options, input, select, config) {
|
575
|
+
var CLASSES = {
|
576
|
+
ACTIVE: "ac_over"
|
577
|
+
};
|
578
|
+
|
579
|
+
var listItems,
|
580
|
+
active = -1,
|
581
|
+
data,
|
582
|
+
term = "",
|
583
|
+
needsInit = true,
|
584
|
+
element,
|
585
|
+
list;
|
586
|
+
|
587
|
+
// Create results
|
588
|
+
function init() {
|
589
|
+
if (!needsInit)
|
590
|
+
return;
|
591
|
+
element = $("<div/>")
|
592
|
+
.hide()
|
593
|
+
.addClass(options.resultsClass)
|
594
|
+
.css("position", "absolute")
|
595
|
+
.appendTo(document.body);
|
596
|
+
|
597
|
+
list = $("<ul/>").appendTo(element).mouseover( function(event) {
|
598
|
+
if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
|
599
|
+
active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
|
600
|
+
$(target(event)).addClass(CLASSES.ACTIVE);
|
601
|
+
}
|
602
|
+
}).click(function(event) {
|
603
|
+
$(target(event)).addClass(CLASSES.ACTIVE);
|
604
|
+
select();
|
605
|
+
// TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
|
606
|
+
input.focus();
|
607
|
+
return false;
|
608
|
+
}).mousedown(function() {
|
609
|
+
config.mouseDownOnSelect = true;
|
610
|
+
}).mouseup(function() {
|
611
|
+
config.mouseDownOnSelect = false;
|
612
|
+
});
|
613
|
+
|
614
|
+
if( options.width > 0 )
|
615
|
+
element.css("width", options.width);
|
616
|
+
|
617
|
+
needsInit = false;
|
618
|
+
}
|
619
|
+
|
620
|
+
function target(event) {
|
621
|
+
var element = event.target;
|
622
|
+
while(element && element.tagName != "LI")
|
623
|
+
element = element.parentNode;
|
624
|
+
// more fun with IE, sometimes event.target is empty, just ignore it then
|
625
|
+
if(!element)
|
626
|
+
return [];
|
627
|
+
return element;
|
628
|
+
}
|
629
|
+
|
630
|
+
function moveSelect(step) {
|
631
|
+
listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
|
632
|
+
movePosition(step);
|
633
|
+
var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
|
634
|
+
if(options.scroll) {
|
635
|
+
var offset = 0;
|
636
|
+
listItems.slice(0, active).each(function() {
|
637
|
+
offset += this.offsetHeight;
|
638
|
+
});
|
639
|
+
if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
|
640
|
+
list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
|
641
|
+
} else if(offset < list.scrollTop()) {
|
642
|
+
list.scrollTop(offset);
|
643
|
+
}
|
644
|
+
}
|
645
|
+
};
|
646
|
+
|
647
|
+
function movePosition(step) {
|
648
|
+
active += step;
|
649
|
+
if (active < 0) {
|
650
|
+
active = listItems.size() - 1;
|
651
|
+
} else if (active >= listItems.size()) {
|
652
|
+
active = 0;
|
653
|
+
}
|
654
|
+
}
|
655
|
+
|
656
|
+
function limitNumberOfItems(available) {
|
657
|
+
return options.max && options.max < available
|
658
|
+
? options.max
|
659
|
+
: available;
|
660
|
+
}
|
661
|
+
|
662
|
+
function fillList() {
|
663
|
+
list.empty();
|
664
|
+
var max = limitNumberOfItems(data.length);
|
665
|
+
for (var i=0; i < max; i++) {
|
666
|
+
if (!data[i])
|
667
|
+
continue;
|
668
|
+
var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
|
669
|
+
if ( formatted === false )
|
670
|
+
continue;
|
671
|
+
var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
|
672
|
+
$.data(li, "ac_data", data[i]);
|
673
|
+
}
|
674
|
+
listItems = list.find("li");
|
675
|
+
if ( options.selectFirst ) {
|
676
|
+
listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
|
677
|
+
active = 0;
|
678
|
+
}
|
679
|
+
// apply bgiframe if available
|
680
|
+
if ( $.fn.bgiframe )
|
681
|
+
list.bgiframe();
|
682
|
+
}
|
683
|
+
|
684
|
+
return {
|
685
|
+
display: function(d, q) {
|
686
|
+
init();
|
687
|
+
data = d;
|
688
|
+
term = q;
|
689
|
+
fillList();
|
690
|
+
},
|
691
|
+
next: function() {
|
692
|
+
moveSelect(1);
|
693
|
+
},
|
694
|
+
prev: function() {
|
695
|
+
moveSelect(-1);
|
696
|
+
},
|
697
|
+
pageUp: function() {
|
698
|
+
if (active != 0 && active - 8 < 0) {
|
699
|
+
moveSelect( -active );
|
700
|
+
} else {
|
701
|
+
moveSelect(-8);
|
702
|
+
}
|
703
|
+
},
|
704
|
+
pageDown: function() {
|
705
|
+
if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
|
706
|
+
moveSelect( listItems.size() - 1 - active );
|
707
|
+
} else {
|
708
|
+
moveSelect(8);
|
709
|
+
}
|
710
|
+
},
|
711
|
+
hide: function() {
|
712
|
+
element && element.hide();
|
713
|
+
listItems && listItems.removeClass(CLASSES.ACTIVE);
|
714
|
+
active = -1;
|
715
|
+
},
|
716
|
+
visible : function() {
|
717
|
+
return element && element.is(":visible");
|
718
|
+
},
|
719
|
+
current: function() {
|
720
|
+
return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
|
721
|
+
},
|
722
|
+
show: function() {
|
723
|
+
var offset = $(input).offset();
|
724
|
+
element.css({
|
725
|
+
width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
|
726
|
+
top: offset.top + input.offsetHeight,
|
727
|
+
left: offset.left
|
728
|
+
}).show();
|
729
|
+
if(options.scroll) {
|
730
|
+
list.scrollTop(0);
|
731
|
+
list.css({
|
732
|
+
maxHeight: options.scrollHeight,
|
733
|
+
overflow: 'auto'
|
734
|
+
});
|
735
|
+
|
736
|
+
if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
|
737
|
+
var listHeight = 0;
|
738
|
+
listItems.each(function() {
|
739
|
+
listHeight += this.offsetHeight;
|
740
|
+
});
|
741
|
+
var scrollbarsVisible = listHeight > options.scrollHeight;
|
742
|
+
list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
|
743
|
+
if (!scrollbarsVisible) {
|
744
|
+
// IE doesn't recalculate width when scrollbar disappears
|
745
|
+
listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
|
746
|
+
}
|
747
|
+
}
|
748
|
+
|
749
|
+
}
|
750
|
+
},
|
751
|
+
selected: function() {
|
752
|
+
var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
|
753
|
+
return selected && selected.length && $.data(selected[0], "ac_data");
|
754
|
+
},
|
755
|
+
emptyList: function (){
|
756
|
+
list && list.empty();
|
757
|
+
},
|
758
|
+
unbind: function() {
|
759
|
+
element && element.remove();
|
760
|
+
}
|
761
|
+
};
|
762
|
+
};
|
763
|
+
|
764
|
+
$.fn.selection = function(start, end) {
|
765
|
+
if (start !== undefined) {
|
766
|
+
return this.each(function() {
|
767
|
+
if( this.createTextRange ){
|
768
|
+
var selRange = this.createTextRange();
|
769
|
+
if (end === undefined || start == end) {
|
770
|
+
selRange.move("character", start);
|
771
|
+
selRange.select();
|
772
|
+
} else {
|
773
|
+
selRange.collapse(true);
|
774
|
+
selRange.moveStart("character", start);
|
775
|
+
selRange.moveEnd("character", end);
|
776
|
+
selRange.select();
|
777
|
+
}
|
778
|
+
} else if( this.setSelectionRange ){
|
779
|
+
this.setSelectionRange(start, end);
|
780
|
+
} else if( this.selectionStart ){
|
781
|
+
this.selectionStart = start;
|
782
|
+
this.selectionEnd = end;
|
783
|
+
}
|
784
|
+
});
|
785
|
+
}
|
786
|
+
var field = this[0];
|
787
|
+
if ( field.createTextRange ) {
|
788
|
+
var range = document.selection.createRange(),
|
789
|
+
orig = field.value,
|
790
|
+
teststring = "<->",
|
791
|
+
textLength = range.text.length;
|
792
|
+
range.text = teststring;
|
793
|
+
var caretAt = field.value.indexOf(teststring);
|
794
|
+
field.value = orig;
|
795
|
+
this.selection(caretAt, caretAt + textLength);
|
796
|
+
return {
|
797
|
+
start: caretAt,
|
798
|
+
end: caretAt + textLength
|
799
|
+
}
|
800
|
+
} else if( field.selectionStart !== undefined ){
|
801
|
+
return {
|
802
|
+
start: field.selectionStart,
|
803
|
+
end: field.selectionEnd
|
804
|
+
}
|
805
|
+
}
|
806
|
+
};
|
807
|
+
|
808
|
+
})(jQuery);
|