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,1413 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery UI 0.6.6
|
3
|
+
*
|
4
|
+
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
5
|
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
6
|
+
* and GPL (GPL-LICENSE.txt) licenses.
|
7
|
+
*
|
8
|
+
* http://docs.jquery.com/UI
|
9
|
+
*/
|
10
|
+
;jQuery.ui || (function($) {
|
11
|
+
|
12
|
+
var _remove = $.fn.remove,
|
13
|
+
isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9);
|
14
|
+
|
15
|
+
//Helper functions and ui object
|
16
|
+
$.ui = {
|
17
|
+
version: "0.6.6",
|
18
|
+
|
19
|
+
// $.ui.plugin is deprecated. Use the proxy pattern instead.
|
20
|
+
plugin: {
|
21
|
+
add: function(module, option, set) {
|
22
|
+
var proto = $.ui[module].prototype;
|
23
|
+
for(var i in set) {
|
24
|
+
proto.plugins[i] = proto.plugins[i] || [];
|
25
|
+
proto.plugins[i].push([option, set[i]]);
|
26
|
+
}
|
27
|
+
},
|
28
|
+
call: function(instance, name, args) {
|
29
|
+
var set = instance.plugins[name];
|
30
|
+
if(!set || !instance.element[0].parentNode) { return; }
|
31
|
+
|
32
|
+
for (var i = 0; i < set.length; i++) {
|
33
|
+
if (instance.options[set[i][0]]) {
|
34
|
+
set[i][1].apply(instance.element, args);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
|
40
|
+
contains: function(a, b) {
|
41
|
+
return document.compareDocumentPosition
|
42
|
+
? a.compareDocumentPosition(b) & 16
|
43
|
+
: a !== b && a.contains(b);
|
44
|
+
},
|
45
|
+
|
46
|
+
hasScroll: function(el, a) {
|
47
|
+
|
48
|
+
//If overflow is hidden, the element might have extra content, but the user wants to hide it
|
49
|
+
if ($(el).css('overflow') == 'hidden') { return false; }
|
50
|
+
|
51
|
+
var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
|
52
|
+
has = false;
|
53
|
+
|
54
|
+
if (el[scroll] > 0) { return true; }
|
55
|
+
|
56
|
+
// TODO: determine which cases actually cause this to happen
|
57
|
+
// if the element doesn't have the scroll set, see if it's possible to
|
58
|
+
// set the scroll
|
59
|
+
el[scroll] = 1;
|
60
|
+
has = (el[scroll] > 0);
|
61
|
+
el[scroll] = 0;
|
62
|
+
return has;
|
63
|
+
},
|
64
|
+
|
65
|
+
isOverAxis: function(x, reference, size) {
|
66
|
+
//Determines when x coordinate is over "b" element axis
|
67
|
+
return (x > reference) && (x < (reference + size));
|
68
|
+
},
|
69
|
+
|
70
|
+
isOver: function(y, x, top, left, height, width) {
|
71
|
+
//Determines when x, y coordinates is over "b" element
|
72
|
+
return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
|
73
|
+
},
|
74
|
+
|
75
|
+
keyCode: {
|
76
|
+
BACKSPACE: 8,
|
77
|
+
CAPS_LOCK: 20,
|
78
|
+
COMMA: 188,
|
79
|
+
CONTROL: 17,
|
80
|
+
DELETE: 46,
|
81
|
+
DOWN: 40,
|
82
|
+
END: 35,
|
83
|
+
ENTER: 13,
|
84
|
+
ESCAPE: 27,
|
85
|
+
HOME: 36,
|
86
|
+
INSERT: 45,
|
87
|
+
LEFT: 37,
|
88
|
+
NUMPAD_ADD: 107,
|
89
|
+
NUMPAD_DECIMAL: 110,
|
90
|
+
NUMPAD_DIVIDE: 111,
|
91
|
+
NUMPAD_ENTER: 108,
|
92
|
+
NUMPAD_MULTIPLY: 106,
|
93
|
+
NUMPAD_SUBTRACT: 109,
|
94
|
+
PAGE_DOWN: 34,
|
95
|
+
PAGE_UP: 33,
|
96
|
+
PERIOD: 190,
|
97
|
+
RIGHT: 39,
|
98
|
+
SHIFT: 16,
|
99
|
+
SPACE: 32,
|
100
|
+
TAB: 9,
|
101
|
+
UP: 38
|
102
|
+
}
|
103
|
+
};
|
104
|
+
|
105
|
+
// WAI-ARIA normalization
|
106
|
+
if (isFF2) {
|
107
|
+
var attr = $.attr,
|
108
|
+
removeAttr = $.fn.removeAttr,
|
109
|
+
ariaNS = "http://www.w3.org/2005/07/aaa",
|
110
|
+
ariaState = /^aria-/,
|
111
|
+
ariaRole = /^wairole:/;
|
112
|
+
|
113
|
+
$.attr = function(elem, name, value) {
|
114
|
+
var set = value !== undefined;
|
115
|
+
|
116
|
+
return (name == 'role'
|
117
|
+
? (set
|
118
|
+
? attr.call(this, elem, name, "wairole:" + value)
|
119
|
+
: (attr.apply(this, arguments) || "").replace(ariaRole, ""))
|
120
|
+
: (ariaState.test(name)
|
121
|
+
? (set
|
122
|
+
? elem.setAttributeNS(ariaNS,
|
123
|
+
name.replace(ariaState, "aaa:"), value)
|
124
|
+
: attr.call(this, elem, name.replace(ariaState, "aaa:")))
|
125
|
+
: attr.apply(this, arguments)));
|
126
|
+
};
|
127
|
+
|
128
|
+
$.fn.removeAttr = function(name) {
|
129
|
+
return (ariaState.test(name)
|
130
|
+
? this.each(function() {
|
131
|
+
this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
|
132
|
+
}) : removeAttr.call(this, name));
|
133
|
+
};
|
134
|
+
}
|
135
|
+
|
136
|
+
//jQuery plugins
|
137
|
+
$.fn.extend({
|
138
|
+
remove: function() {
|
139
|
+
// Safari has a native remove event which actually removes DOM elements,
|
140
|
+
// so we have to use triggerHandler instead of trigger (#3037).
|
141
|
+
$("*", this).add(this).each(function() {
|
142
|
+
$(this).triggerHandler("remove");
|
143
|
+
});
|
144
|
+
return _remove.apply(this, arguments );
|
145
|
+
},
|
146
|
+
|
147
|
+
enableSelection: function() {
|
148
|
+
return this
|
149
|
+
.attr('unselectable', 'off')
|
150
|
+
.css('MozUserSelect', '')
|
151
|
+
.unbind('selectstart.ui');
|
152
|
+
},
|
153
|
+
|
154
|
+
disableSelection: function() {
|
155
|
+
return this
|
156
|
+
.attr('unselectable', 'on')
|
157
|
+
.css('MozUserSelect', 'none')
|
158
|
+
.bind('selectstart.ui', function() { return false; });
|
159
|
+
},
|
160
|
+
|
161
|
+
scrollParent: function() {
|
162
|
+
var scrollParent;
|
163
|
+
if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
|
164
|
+
scrollParent = this.parents().filter(function() {
|
165
|
+
return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
|
166
|
+
}).eq(0);
|
167
|
+
} else {
|
168
|
+
scrollParent = this.parents().filter(function() {
|
169
|
+
return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
|
170
|
+
}).eq(0);
|
171
|
+
}
|
172
|
+
|
173
|
+
return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
|
174
|
+
}
|
175
|
+
});
|
176
|
+
|
177
|
+
|
178
|
+
//Additional selectors
|
179
|
+
$.extend($.expr[':'], {
|
180
|
+
data: function(elem, i, match) {
|
181
|
+
return !!$.data(elem, match[3]);
|
182
|
+
},
|
183
|
+
|
184
|
+
focusable: function(element) {
|
185
|
+
var nodeName = element.nodeName.toLowerCase(),
|
186
|
+
tabIndex = $.attr(element, 'tabindex');
|
187
|
+
return (/input|select|textarea|button|object/.test(nodeName)
|
188
|
+
? !element.disabled
|
189
|
+
: 'a' == nodeName || 'area' == nodeName
|
190
|
+
? element.href || !isNaN(tabIndex)
|
191
|
+
: !isNaN(tabIndex))
|
192
|
+
// the element and all of its ancestors must be visible
|
193
|
+
// the browser may report that the area is hidden
|
194
|
+
&& !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
|
195
|
+
},
|
196
|
+
|
197
|
+
tabbable: function(element) {
|
198
|
+
var tabIndex = $.attr(element, 'tabindex');
|
199
|
+
return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
|
200
|
+
}
|
201
|
+
});
|
202
|
+
|
203
|
+
|
204
|
+
// $.widget is a factory to create jQuery plugins
|
205
|
+
// taking some boilerplate code out of the plugin code
|
206
|
+
function getter(namespace, plugin, method, args) {
|
207
|
+
function getMethods(type) {
|
208
|
+
var methods = $[namespace][plugin][type] || [];
|
209
|
+
return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
|
210
|
+
}
|
211
|
+
|
212
|
+
var methods = getMethods('getter');
|
213
|
+
if (args.length == 1 && typeof args[0] == 'string') {
|
214
|
+
methods = methods.concat(getMethods('getterSetter'));
|
215
|
+
}
|
216
|
+
return ($.inArray(method, methods) != -1);
|
217
|
+
}
|
218
|
+
|
219
|
+
$.widget = function(name, prototype) {
|
220
|
+
var namespace = name.split(".")[0];
|
221
|
+
name = name.split(".")[1];
|
222
|
+
|
223
|
+
// create plugin method
|
224
|
+
$.fn[name] = function(options) {
|
225
|
+
var isMethodCall = (typeof options == 'string'),
|
226
|
+
args = Array.prototype.slice.call(arguments, 1);
|
227
|
+
|
228
|
+
// prevent calls to internal methods
|
229
|
+
if (isMethodCall && options.substring(0, 1) == '_') {
|
230
|
+
return this;
|
231
|
+
}
|
232
|
+
|
233
|
+
// handle getter methods
|
234
|
+
if (isMethodCall && getter(namespace, name, options, args)) {
|
235
|
+
var instance = $.data(this[0], name);
|
236
|
+
return (instance ? instance[options].apply(instance, args)
|
237
|
+
: undefined);
|
238
|
+
}
|
239
|
+
|
240
|
+
// handle initialization and non-getter methods
|
241
|
+
return this.each(function() {
|
242
|
+
var instance = $.data(this, name);
|
243
|
+
|
244
|
+
// constructor
|
245
|
+
(!instance && !isMethodCall &&
|
246
|
+
$.data(this, name, new $[namespace][name](this, options))._init());
|
247
|
+
|
248
|
+
// method call
|
249
|
+
(instance && isMethodCall && $.isFunction(instance[options]) &&
|
250
|
+
instance[options].apply(instance, args));
|
251
|
+
});
|
252
|
+
};
|
253
|
+
|
254
|
+
// create widget constructor
|
255
|
+
$[namespace] = $[namespace] || {};
|
256
|
+
$[namespace][name] = function(element, options) {
|
257
|
+
var self = this;
|
258
|
+
|
259
|
+
this.namespace = namespace;
|
260
|
+
this.widgetName = name;
|
261
|
+
this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
|
262
|
+
this.widgetBaseClass = namespace + '-' + name;
|
263
|
+
|
264
|
+
this.options = $.extend({},
|
265
|
+
$.widget.defaults,
|
266
|
+
$[namespace][name].defaults,
|
267
|
+
$.metadata && $.metadata.get(element)[name],
|
268
|
+
options);
|
269
|
+
|
270
|
+
this.element = $(element)
|
271
|
+
.bind('setData.' + name, function(event, key, value) {
|
272
|
+
if (event.target == element) {
|
273
|
+
return self._setData(key, value);
|
274
|
+
}
|
275
|
+
})
|
276
|
+
.bind('getData.' + name, function(event, key) {
|
277
|
+
if (event.target == element) {
|
278
|
+
return self._getData(key);
|
279
|
+
}
|
280
|
+
})
|
281
|
+
.bind('remove', function() {
|
282
|
+
return self.destroy();
|
283
|
+
});
|
284
|
+
};
|
285
|
+
|
286
|
+
// add widget prototype
|
287
|
+
$[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
|
288
|
+
|
289
|
+
// TODO: merge getter and getterSetter properties from widget prototype
|
290
|
+
// and plugin prototype
|
291
|
+
$[namespace][name].getterSetter = 'option';
|
292
|
+
};
|
293
|
+
|
294
|
+
$.widget.prototype = {
|
295
|
+
_init: function() {},
|
296
|
+
destroy: function() {
|
297
|
+
this.element.removeData(this.widgetName)
|
298
|
+
.removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled')
|
299
|
+
.removeAttr('aria-disabled');
|
300
|
+
},
|
301
|
+
|
302
|
+
option: function(key, value) {
|
303
|
+
var options = key,
|
304
|
+
self = this;
|
305
|
+
|
306
|
+
if (typeof key == "string") {
|
307
|
+
if (value === undefined) {
|
308
|
+
return this._getData(key);
|
309
|
+
}
|
310
|
+
options = {};
|
311
|
+
options[key] = value;
|
312
|
+
}
|
313
|
+
|
314
|
+
$.each(options, function(key, value) {
|
315
|
+
self._setData(key, value);
|
316
|
+
});
|
317
|
+
},
|
318
|
+
_getData: function(key) {
|
319
|
+
return this.options[key];
|
320
|
+
},
|
321
|
+
_setData: function(key, value) {
|
322
|
+
this.options[key] = value;
|
323
|
+
|
324
|
+
if (key == 'disabled') {
|
325
|
+
this.element
|
326
|
+
[value ? 'addClass' : 'removeClass'](
|
327
|
+
this.widgetBaseClass + '-disabled' + ' ' +
|
328
|
+
this.namespace + '-state-disabled')
|
329
|
+
.attr("aria-disabled", value);
|
330
|
+
}
|
331
|
+
},
|
332
|
+
|
333
|
+
enable: function() {
|
334
|
+
this._setData('disabled', false);
|
335
|
+
},
|
336
|
+
disable: function() {
|
337
|
+
this._setData('disabled', true);
|
338
|
+
},
|
339
|
+
|
340
|
+
_trigger: function(type, event, data) {
|
341
|
+
var callback = this.options[type],
|
342
|
+
eventName = (type == this.widgetEventPrefix
|
343
|
+
? type : this.widgetEventPrefix + type);
|
344
|
+
|
345
|
+
event = $.Event(event);
|
346
|
+
event.type = eventName;
|
347
|
+
|
348
|
+
// copy original event properties over to the new event
|
349
|
+
// this would happen if we could call $.event.fix instead of $.Event
|
350
|
+
// but we don't have a way to force an event to be fixed multiple times
|
351
|
+
if (event.originalEvent) {
|
352
|
+
for (var i = $.event.props.length, prop; i;) {
|
353
|
+
prop = $.event.props[--i];
|
354
|
+
event[prop] = event.originalEvent[prop];
|
355
|
+
}
|
356
|
+
}
|
357
|
+
|
358
|
+
this.element.trigger(event, data);
|
359
|
+
|
360
|
+
return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false
|
361
|
+
|| event.isDefaultPrevented());
|
362
|
+
}
|
363
|
+
};
|
364
|
+
|
365
|
+
$.widget.defaults = {
|
366
|
+
disabled: false
|
367
|
+
};
|
368
|
+
|
369
|
+
|
370
|
+
/** Mouse Interaction Plugin **/
|
371
|
+
|
372
|
+
$.ui.mouse = {
|
373
|
+
_mouseInit: function() {
|
374
|
+
var self = this;
|
375
|
+
|
376
|
+
this.element
|
377
|
+
.bind('mousedown.'+this.widgetName, function(event) {
|
378
|
+
return self._mouseDown(event);
|
379
|
+
})
|
380
|
+
.bind('click.'+this.widgetName, function(event) {
|
381
|
+
if(self._preventClickEvent) {
|
382
|
+
self._preventClickEvent = false;
|
383
|
+
event.stopImmediatePropagation();
|
384
|
+
return false;
|
385
|
+
}
|
386
|
+
});
|
387
|
+
|
388
|
+
// Prevent text selection in IE
|
389
|
+
if ($.browser.msie) {
|
390
|
+
this._mouseUnselectable = this.element.attr('unselectable');
|
391
|
+
this.element.attr('unselectable', 'on');
|
392
|
+
}
|
393
|
+
|
394
|
+
this.started = false;
|
395
|
+
},
|
396
|
+
|
397
|
+
// TODO: make sure destroying one instance of mouse doesn't mess with
|
398
|
+
// other instances of mouse
|
399
|
+
_mouseDestroy: function() {
|
400
|
+
this.element.unbind('.'+this.widgetName);
|
401
|
+
|
402
|
+
// Restore text selection in IE
|
403
|
+
($.browser.msie
|
404
|
+
&& this.element.attr('unselectable', this._mouseUnselectable));
|
405
|
+
},
|
406
|
+
|
407
|
+
_mouseDown: function(event) {
|
408
|
+
// don't let more than one widget handle mouseStart
|
409
|
+
// TODO: figure out why we have to use originalEvent
|
410
|
+
event.originalEvent = event.originalEvent || {};
|
411
|
+
if (event.originalEvent.mouseHandled) { return; }
|
412
|
+
|
413
|
+
// we may have missed mouseup (out of window)
|
414
|
+
(this._mouseStarted && this._mouseUp(event));
|
415
|
+
|
416
|
+
this._mouseDownEvent = event;
|
417
|
+
|
418
|
+
var self = this,
|
419
|
+
btnIsLeft = (event.which == 1),
|
420
|
+
elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
|
421
|
+
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
|
422
|
+
return true;
|
423
|
+
}
|
424
|
+
|
425
|
+
this.mouseDelayMet = !this.options.delay;
|
426
|
+
if (!this.mouseDelayMet) {
|
427
|
+
this._mouseDelayTimer = setTimeout(function() {
|
428
|
+
self.mouseDelayMet = true;
|
429
|
+
}, this.options.delay);
|
430
|
+
}
|
431
|
+
|
432
|
+
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
|
433
|
+
this._mouseStarted = (this._mouseStart(event) !== false);
|
434
|
+
if (!this._mouseStarted) {
|
435
|
+
event.preventDefault();
|
436
|
+
return true;
|
437
|
+
}
|
438
|
+
}
|
439
|
+
|
440
|
+
// these delegates are required to keep context
|
441
|
+
this._mouseMoveDelegate = function(event) {
|
442
|
+
return self._mouseMove(event);
|
443
|
+
};
|
444
|
+
this._mouseUpDelegate = function(event) {
|
445
|
+
return self._mouseUp(event);
|
446
|
+
};
|
447
|
+
$(document)
|
448
|
+
.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
449
|
+
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
450
|
+
|
451
|
+
// preventDefault() is used to prevent the selection of text here -
|
452
|
+
// however, in Safari, this causes select boxes not to be selectable
|
453
|
+
// anymore, so this fix is needed
|
454
|
+
($.browser.safari || event.preventDefault());
|
455
|
+
|
456
|
+
event.originalEvent.mouseHandled = true;
|
457
|
+
return true;
|
458
|
+
},
|
459
|
+
|
460
|
+
_mouseMove: function(event) {
|
461
|
+
// IE mouseup check - mouseup happened when mouse was out of window
|
462
|
+
if ($.browser.msie && !event.button) {
|
463
|
+
return this._mouseUp(event);
|
464
|
+
}
|
465
|
+
|
466
|
+
if (this._mouseStarted) {
|
467
|
+
this._mouseDrag(event);
|
468
|
+
return event.preventDefault();
|
469
|
+
}
|
470
|
+
|
471
|
+
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
|
472
|
+
this._mouseStarted =
|
473
|
+
(this._mouseStart(this._mouseDownEvent, event) !== false);
|
474
|
+
(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
|
475
|
+
}
|
476
|
+
|
477
|
+
return !this._mouseStarted;
|
478
|
+
},
|
479
|
+
|
480
|
+
_mouseUp: function(event) {
|
481
|
+
$(document)
|
482
|
+
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
483
|
+
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
484
|
+
|
485
|
+
if (this._mouseStarted) {
|
486
|
+
this._mouseStarted = false;
|
487
|
+
this._preventClickEvent = (event.target == this._mouseDownEvent.target);
|
488
|
+
this._mouseStop(event);
|
489
|
+
}
|
490
|
+
|
491
|
+
return false;
|
492
|
+
},
|
493
|
+
|
494
|
+
_mouseDistanceMet: function(event) {
|
495
|
+
return (Math.max(
|
496
|
+
Math.abs(this._mouseDownEvent.pageX - event.pageX),
|
497
|
+
Math.abs(this._mouseDownEvent.pageY - event.pageY)
|
498
|
+
) >= this.options.distance
|
499
|
+
);
|
500
|
+
},
|
501
|
+
|
502
|
+
_mouseDelayMet: function(event) {
|
503
|
+
return this.mouseDelayMet;
|
504
|
+
},
|
505
|
+
|
506
|
+
// These are placeholder methods, to be overriden by extending plugin
|
507
|
+
_mouseStart: function(event) {},
|
508
|
+
_mouseDrag: function(event) {},
|
509
|
+
_mouseStop: function(event) {},
|
510
|
+
_mouseCapture: function(event) { return true; }
|
511
|
+
};
|
512
|
+
|
513
|
+
$.ui.mouse.defaults = {
|
514
|
+
cancel: null,
|
515
|
+
distance: 1,
|
516
|
+
delay: 0
|
517
|
+
};
|
518
|
+
|
519
|
+
})(jQuery);
|
520
|
+
/*
|
521
|
+
jQuery utils - 0.6.6
|
522
|
+
http://code.google.com/p/jquery-utils/
|
523
|
+
|
524
|
+
(c) Maxime Haineault <haineault@gmail.com>
|
525
|
+
http://haineault.com
|
526
|
+
|
527
|
+
MIT License (http://www.opensource.org/licenses/mit-license.php
|
528
|
+
|
529
|
+
*/
|
530
|
+
|
531
|
+
(function($){
|
532
|
+
$.extend($.expr[':'], {
|
533
|
+
// case insensitive version of :contains
|
534
|
+
icontains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;}
|
535
|
+
});
|
536
|
+
|
537
|
+
$.iterators = {
|
538
|
+
getText: function() { return $(this).text(); },
|
539
|
+
parseInt: function(v){ return parseInt(v, 10); }
|
540
|
+
};
|
541
|
+
|
542
|
+
$.extend({
|
543
|
+
|
544
|
+
// Returns a range object
|
545
|
+
// Author: Matthias Miller
|
546
|
+
// Site: http://blog.outofhanwell.com/2006/03/29/javascript-range-function/
|
547
|
+
range: function() {
|
548
|
+
if (!arguments.length) { return []; }
|
549
|
+
var min, max, step;
|
550
|
+
if (arguments.length == 1) {
|
551
|
+
min = 0;
|
552
|
+
max = arguments[0]-1;
|
553
|
+
step = 1;
|
554
|
+
}
|
555
|
+
else {
|
556
|
+
// default step to 1 if it's zero or undefined
|
557
|
+
min = arguments[0];
|
558
|
+
max = arguments[1]-1;
|
559
|
+
step = arguments[2] || 1;
|
560
|
+
}
|
561
|
+
// convert negative steps to positive and reverse min/max
|
562
|
+
if (step < 0 && min >= max) {
|
563
|
+
step *= -1;
|
564
|
+
var tmp = min;
|
565
|
+
min = max;
|
566
|
+
max = tmp;
|
567
|
+
min += ((max-min) % step);
|
568
|
+
}
|
569
|
+
var a = [];
|
570
|
+
for (var i = min; i <= max; i += step) { a.push(i); }
|
571
|
+
return a;
|
572
|
+
},
|
573
|
+
|
574
|
+
// Taken from ui.core.js.
|
575
|
+
// Why are you keeping this gem for yourself guys ? :|
|
576
|
+
keyCode: {
|
577
|
+
BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, CONTROL: 17, DELETE: 46, DOWN: 40,
|
578
|
+
END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37,
|
579
|
+
NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108,
|
580
|
+
NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33,
|
581
|
+
PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38
|
582
|
+
},
|
583
|
+
|
584
|
+
keyIs: function(k, e) {
|
585
|
+
return parseInt($.keyCode[k.toUpperCase()], 10) == parseInt((typeof(e) == 'number' )? e: e.keyCode, 10);
|
586
|
+
},
|
587
|
+
|
588
|
+
// Redirect to a specified url
|
589
|
+
redirect: function(url) {
|
590
|
+
window.location.href = url;
|
591
|
+
return url;
|
592
|
+
},
|
593
|
+
|
594
|
+
// Stop event shorthand
|
595
|
+
stop: function(e, preventDefault, stopPropagation) {
|
596
|
+
if (preventDefault) { e.preventDefault(); }
|
597
|
+
if (stopPropagation) { e.stopPropagation(); }
|
598
|
+
return preventDefault && false || true;
|
599
|
+
},
|
600
|
+
|
601
|
+
// Returns the basename of a path
|
602
|
+
basename: function(path) {
|
603
|
+
var t = path.split('/');
|
604
|
+
return t[t.length] === '' && s || t.slice(0, t.length).join('/');
|
605
|
+
},
|
606
|
+
|
607
|
+
// Returns the filename of a path
|
608
|
+
filename: function(path) {
|
609
|
+
return path.split('/').pop();
|
610
|
+
},
|
611
|
+
|
612
|
+
// Returns a formated file size
|
613
|
+
filesizeformat: function(bytes, suffixes){
|
614
|
+
var b = parseInt(bytes, 10);
|
615
|
+
var s = suffixes || ['byte', 'bytes', 'KB', 'MB', 'GB'];
|
616
|
+
if (isNaN(b) || b === 0) { return '0 ' + s[0]; }
|
617
|
+
if (b == 1) { return '1 ' + s[0]; }
|
618
|
+
if (b < 1024) { return b.toFixed(2) + ' ' + s[1]; }
|
619
|
+
if (b < 1048576) { return (b / 1024).toFixed(2) + ' ' + s[2]; }
|
620
|
+
if (b < 1073741824) { return (b / 1048576).toFixed(2) + ' '+ s[3]; }
|
621
|
+
else { return (b / 1073741824).toFixed(2) + ' '+ s[4]; }
|
622
|
+
},
|
623
|
+
|
624
|
+
fileExtension: function(s) {
|
625
|
+
var tokens = s.split('.');
|
626
|
+
return tokens[tokens.length-1] || false;
|
627
|
+
},
|
628
|
+
|
629
|
+
// Returns true if an object is a String
|
630
|
+
isString: function(o) {
|
631
|
+
return typeof(o) == 'string' && true || false;
|
632
|
+
},
|
633
|
+
|
634
|
+
// Returns true if an object is a RegExp
|
635
|
+
isRegExp: function(o) {
|
636
|
+
return o && o.constructor.toString().indexOf('RegExp()') != -1 || false;
|
637
|
+
},
|
638
|
+
|
639
|
+
// Returns true if an object is an array
|
640
|
+
// Mark Miller - http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=916
|
641
|
+
isArray: function(o) {
|
642
|
+
if (!o) { return false; }
|
643
|
+
return o.constructor && Object.prototype.toString.apply(o.constructor.prototype) === '[object Array]';
|
644
|
+
},
|
645
|
+
|
646
|
+
isObject: function(o) {
|
647
|
+
return (typeof(o) == 'object');
|
648
|
+
},
|
649
|
+
|
650
|
+
// Convert input to currency (two decimal fixed number)
|
651
|
+
toCurrency: function(i) {
|
652
|
+
i = parseFloat(i, 10).toFixed(2);
|
653
|
+
return (i=='NaN') ? '0.00' : i;
|
654
|
+
},
|
655
|
+
|
656
|
+
/*--------------------------------------------------------------------
|
657
|
+
* javascript method: "pxToEm"
|
658
|
+
* by:
|
659
|
+
Scott Jehl (scott@filamentgroup.com)
|
660
|
+
Maggie Wachs (maggie@filamentgroup.com)
|
661
|
+
http://www.filamentgroup.com
|
662
|
+
*
|
663
|
+
* Copyright (c) 2008 Filament Group
|
664
|
+
* Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
|
665
|
+
*
|
666
|
+
* Description: pxToEm converts a pixel value to ems depending on inherited font size.
|
667
|
+
* Article: http://www.filamentgroup.com/lab/retaining_scalable_interfaces_with_pixel_to_em_conversion/
|
668
|
+
* Demo: http://www.filamentgroup.com/examples/pxToEm/
|
669
|
+
*
|
670
|
+
* Options:
|
671
|
+
scope: string or jQuery selector for font-size scoping
|
672
|
+
reverse: Boolean, true reverses the conversion to em-px
|
673
|
+
* Dependencies: jQuery library
|
674
|
+
* Usage Example: myPixelValue.pxToEm(); or myPixelValue.pxToEm({'scope':'#navigation', reverse: true});
|
675
|
+
*
|
676
|
+
* Version: 2.1, 18.12.2008
|
677
|
+
* Changelog:
|
678
|
+
* 08.02.2007 initial Version 1.0
|
679
|
+
* 08.01.2008 - fixed font-size calculation for IE
|
680
|
+
* 18.12.2008 - removed native object prototyping to stay in jQuery's spirit, jsLinted (Maxime Haineault <haineault@gmail.com>)
|
681
|
+
--------------------------------------------------------------------*/
|
682
|
+
|
683
|
+
pxToEm: function(i, settings){
|
684
|
+
//set defaults
|
685
|
+
settings = jQuery.extend({
|
686
|
+
scope: 'body',
|
687
|
+
reverse: false
|
688
|
+
}, settings);
|
689
|
+
|
690
|
+
var pxVal = (i === '') ? 0 : parseFloat(i);
|
691
|
+
var scopeVal;
|
692
|
+
var getWindowWidth = function(){
|
693
|
+
var de = document.documentElement;
|
694
|
+
return self.innerWidth || (de && de.clientWidth) || document.body.clientWidth;
|
695
|
+
};
|
696
|
+
|
697
|
+
/* When a percentage-based font-size is set on the body, IE returns that percent of the window width as the font-size.
|
698
|
+
For example, if the body font-size is 62.5% and the window width is 1000px, IE will return 625px as the font-size.
|
699
|
+
When this happens, we calculate the correct body font-size (%) and multiply it by 16 (the standard browser font size)
|
700
|
+
to get an accurate em value. */
|
701
|
+
|
702
|
+
if (settings.scope == 'body' && $.browser.msie && (parseFloat($('body').css('font-size')) / getWindowWidth()).toFixed(1) > 0.0) {
|
703
|
+
var calcFontSize = function(){
|
704
|
+
return (parseFloat($('body').css('font-size'))/getWindowWidth()).toFixed(3) * 16;
|
705
|
+
};
|
706
|
+
scopeVal = calcFontSize();
|
707
|
+
}
|
708
|
+
else { scopeVal = parseFloat(jQuery(settings.scope).css("font-size")); }
|
709
|
+
|
710
|
+
var result = (settings.reverse === true) ? (pxVal * scopeVal).toFixed(2) + 'px' : (pxVal / scopeVal).toFixed(2) + 'em';
|
711
|
+
return result;
|
712
|
+
}
|
713
|
+
});
|
714
|
+
|
715
|
+
$.extend($.fn, {
|
716
|
+
// Select a text range in a textarea
|
717
|
+
selectRange: function(start, end){
|
718
|
+
// use only the first one since only one input can be focused
|
719
|
+
if ($(this).get(0).createTextRange) {
|
720
|
+
var range = $(this).get(0).createTextRange();
|
721
|
+
range.collapse(true);
|
722
|
+
range.moveEnd('character', end);
|
723
|
+
range.moveStart('character', start);
|
724
|
+
range.select();
|
725
|
+
}
|
726
|
+
else if ($(this).get(0).setSelectionRange) {
|
727
|
+
$(this).bind('focus', function(e){
|
728
|
+
e.preventDefault();
|
729
|
+
}).get(0).setSelectionRange(start, end);
|
730
|
+
}
|
731
|
+
return $(this);
|
732
|
+
},
|
733
|
+
|
734
|
+
/*--------------------------------------------------------------------
|
735
|
+
* JQuery Plugin: "EqualHeights"
|
736
|
+
* by: Scott Jehl, Todd Parker, Maggie Costello Wachs (http://www.filamentgroup.com)
|
737
|
+
*
|
738
|
+
* Copyright (c) 2008 Filament Group
|
739
|
+
* Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
|
740
|
+
*
|
741
|
+
* Description: Compares the heights or widths of the top-level children of a provided element
|
742
|
+
and sets their min-height to the tallest height (or width to widest width). Sets in em units
|
743
|
+
by default if pxToEm() method is available.
|
744
|
+
* Dependencies: jQuery library, pxToEm method (article:
|
745
|
+
http://www.filamentgroup.com/lab/retaining_scalable_interfaces_with_pixel_to_em_conversion/)
|
746
|
+
* Usage Example: $(element).equalHeights();
|
747
|
+
Optional: to set min-height in px, pass a true argument: $(element).equalHeights(true);
|
748
|
+
* Version: 2.1, 18.12.2008
|
749
|
+
*
|
750
|
+
* Note: Changed pxToEm call to call $.pxToEm instead, jsLinted (Maxime Haineault <haineault@gmail.com>)
|
751
|
+
--------------------------------------------------------------------*/
|
752
|
+
|
753
|
+
equalHeights: function(px){
|
754
|
+
$(this).each(function(){
|
755
|
+
var currentTallest = 0;
|
756
|
+
$(this).children().each(function(i){
|
757
|
+
if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
|
758
|
+
});
|
759
|
+
if (!px || !$.pxToEm) { currentTallest = $.pxToEm(currentTallest); } //use ems unless px is specified
|
760
|
+
// for ie6, set height since min-height isn't supported
|
761
|
+
if ($.browser.msie && $.browser.version == 6.0) { $(this).children().css({'height': currentTallest}); }
|
762
|
+
$(this).children().css({'min-height': currentTallest});
|
763
|
+
});
|
764
|
+
return this;
|
765
|
+
},
|
766
|
+
|
767
|
+
// Copyright (c) 2009 James Padolsey
|
768
|
+
// http://james.padolsey.com/javascript/jquery-delay-plugin/
|
769
|
+
delay: function(time, callback){
|
770
|
+
jQuery.fx.step.delay = function(){};
|
771
|
+
return this.animate({delay:1}, time, callback);
|
772
|
+
}
|
773
|
+
});
|
774
|
+
})(jQuery);
|
775
|
+
/*
|
776
|
+
jQuery strings - 0.3
|
777
|
+
http://code.google.com/p/jquery-utils/
|
778
|
+
|
779
|
+
(c) Maxime Haineault <haineault@gmail.com>
|
780
|
+
http://haineault.com
|
781
|
+
|
782
|
+
MIT License (http://www.opensource.org/licenses/mit-license.php)
|
783
|
+
|
784
|
+
Implementation of Python3K advanced string formatting
|
785
|
+
http://www.python.org/dev/peps/pep-3101/
|
786
|
+
|
787
|
+
Documentation: http://code.google.com/p/jquery-utils/wiki/StringFormat
|
788
|
+
|
789
|
+
*/
|
790
|
+
(function($){
|
791
|
+
var strings = {
|
792
|
+
strConversion: {
|
793
|
+
// tries to translate any objects type into string gracefully
|
794
|
+
__repr: function(i){
|
795
|
+
switch(this.__getType(i)) {
|
796
|
+
case 'array':case 'date':case 'number':
|
797
|
+
return i.toString();
|
798
|
+
case 'object':
|
799
|
+
var o = [];
|
800
|
+
for (x=0; x<i.length; i++) { o.push(i+': '+ this.__repr(i[x])); }
|
801
|
+
return o.join(', ');
|
802
|
+
case 'string':
|
803
|
+
return i;
|
804
|
+
default:
|
805
|
+
return i;
|
806
|
+
}
|
807
|
+
},
|
808
|
+
// like typeof but less vague
|
809
|
+
__getType: function(i) {
|
810
|
+
if (!i || !i.constructor) { return typeof(i); }
|
811
|
+
var match = i.constructor.toString().match(/Array|Number|String|Object|Date/);
|
812
|
+
return match && match[0].toLowerCase() || typeof(i);
|
813
|
+
},
|
814
|
+
//+ Jonas Raoni Soares Silva
|
815
|
+
//@ http://jsfromhell.com/string/pad [v1.0]
|
816
|
+
__pad: function(str, l, s, t){
|
817
|
+
var p = s || ' ';
|
818
|
+
var o = str;
|
819
|
+
if (l - str.length > 0) {
|
820
|
+
o = new Array(Math.ceil(l / p.length)).join(p).substr(0, t = !t ? l : t == 1 ? 0 : Math.ceil(l / 2)) + str + p.substr(0, l - t);
|
821
|
+
}
|
822
|
+
return o;
|
823
|
+
},
|
824
|
+
__getInput: function(arg, args) {
|
825
|
+
var key = arg.getKey();
|
826
|
+
switch(this.__getType(args)){
|
827
|
+
case 'object': // Thanks to Jonathan Works for the patch
|
828
|
+
var keys = key.split('.');
|
829
|
+
var obj = args;
|
830
|
+
for(var subkey = 0; subkey < keys.length; subkey++){
|
831
|
+
obj = obj[keys[subkey]];
|
832
|
+
}
|
833
|
+
if (typeof(obj) != 'undefined') {
|
834
|
+
if (strings.strConversion.__getType(obj) == 'array') {
|
835
|
+
return arg.getFormat().match(/\.\*/) && obj[1] || obj;
|
836
|
+
}
|
837
|
+
return obj;
|
838
|
+
}
|
839
|
+
else {
|
840
|
+
// TODO: try by numerical index
|
841
|
+
}
|
842
|
+
break;
|
843
|
+
case 'array':
|
844
|
+
key = parseInt(key, 10);
|
845
|
+
if (arg.getFormat().match(/\.\*/) && typeof args[key+1] != 'undefined') { return args[key+1]; }
|
846
|
+
else if (typeof args[key] != 'undefined') { return args[key]; }
|
847
|
+
else { return key; }
|
848
|
+
break;
|
849
|
+
}
|
850
|
+
return '{'+key+'}';
|
851
|
+
},
|
852
|
+
__formatToken: function(token, args) {
|
853
|
+
var arg = new Argument(token, args);
|
854
|
+
return strings.strConversion[arg.getFormat().slice(-1)](this.__getInput(arg, args), arg);
|
855
|
+
},
|
856
|
+
|
857
|
+
// Signed integer decimal.
|
858
|
+
d: function(input, arg){
|
859
|
+
var o = parseInt(input, 10); // enforce base 10
|
860
|
+
var p = arg.getPaddingLength();
|
861
|
+
if (p) { return this.__pad(o.toString(), p, arg.getPaddingString(), 0); }
|
862
|
+
else { return o; }
|
863
|
+
},
|
864
|
+
// Signed integer decimal.
|
865
|
+
i: function(input, args){
|
866
|
+
return this.d(input, args);
|
867
|
+
},
|
868
|
+
// Unsigned octal
|
869
|
+
o: function(input, arg){
|
870
|
+
var o = input.toString(8);
|
871
|
+
if (arg.isAlternate()) { o = this.__pad(o, o.length+1, '0', 0); }
|
872
|
+
return this.__pad(o, arg.getPaddingLength(), arg.getPaddingString(), 0);
|
873
|
+
},
|
874
|
+
// Unsigned decimal
|
875
|
+
u: function(input, args) {
|
876
|
+
return Math.abs(this.d(input, args));
|
877
|
+
},
|
878
|
+
// Unsigned hexadecimal (lowercase)
|
879
|
+
x: function(input, arg){
|
880
|
+
var o = parseInt(input, 10).toString(16);
|
881
|
+
o = this.__pad(o, arg.getPaddingLength(), arg.getPaddingString(),0);
|
882
|
+
return arg.isAlternate() ? '0x'+o : o;
|
883
|
+
},
|
884
|
+
// Unsigned hexadecimal (uppercase)
|
885
|
+
X: function(input, arg){
|
886
|
+
return this.x(input, arg).toUpperCase();
|
887
|
+
},
|
888
|
+
// Floating point exponential format (lowercase)
|
889
|
+
e: function(input, arg){
|
890
|
+
return parseFloat(input, 10).toExponential(arg.getPrecision());
|
891
|
+
},
|
892
|
+
// Floating point exponential format (uppercase)
|
893
|
+
E: function(input, arg){
|
894
|
+
return this.e(input, arg).toUpperCase();
|
895
|
+
},
|
896
|
+
// Floating point decimal format
|
897
|
+
f: function(input, arg){
|
898
|
+
return this.__pad(parseFloat(input, 10).toFixed(arg.getPrecision()), arg.getPaddingLength(), arg.getPaddingString(),0);
|
899
|
+
},
|
900
|
+
// Floating point decimal format (alias)
|
901
|
+
F: function(input, args){
|
902
|
+
return this.f(input, args);
|
903
|
+
},
|
904
|
+
// Floating point format. Uses exponential format if exponent is greater than -4 or less than precision, decimal format otherwise
|
905
|
+
g: function(input, arg){
|
906
|
+
var o = parseFloat(input, 10);
|
907
|
+
return (o.toString().length > 6) ? Math.round(o.toExponential(arg.getPrecision())): o;
|
908
|
+
},
|
909
|
+
// Floating point format. Uses exponential format if exponent is greater than -4 or less than precision, decimal format otherwise
|
910
|
+
G: function(input, args){
|
911
|
+
return this.g(input, args);
|
912
|
+
},
|
913
|
+
// Single character (accepts integer or single character string).
|
914
|
+
c: function(input, args) {
|
915
|
+
var match = input.match(/\w|\d/);
|
916
|
+
return match && match[0] || '';
|
917
|
+
},
|
918
|
+
// String (converts any JavaScript object to anotated format)
|
919
|
+
r: function(input, args) {
|
920
|
+
return this.__repr(input);
|
921
|
+
},
|
922
|
+
// String (converts any JavaScript object using object.toString())
|
923
|
+
s: function(input, args) {
|
924
|
+
return input.toString && input.toString() || ''+input;
|
925
|
+
}
|
926
|
+
},
|
927
|
+
|
928
|
+
format: function(str, args) {
|
929
|
+
var end = 0;
|
930
|
+
var start = 0;
|
931
|
+
var match = false;
|
932
|
+
var buffer = [];
|
933
|
+
var token = '';
|
934
|
+
var tmp = (str||'').split('');
|
935
|
+
for(start=0; start < tmp.length; start++) {
|
936
|
+
if (tmp[start] == '{' && tmp[start+1] !='{') {
|
937
|
+
end = str.indexOf('}', start);
|
938
|
+
token = tmp.slice(start+1, end).join('');
|
939
|
+
if (tmp[start-1] != '{' && tmp[end+1] != '}') {
|
940
|
+
var tokenArgs = (typeof arguments[1] != 'object')? arguments2Array(arguments, 2): args || [];
|
941
|
+
buffer.push(strings.strConversion.__formatToken(token, tokenArgs));
|
942
|
+
}
|
943
|
+
else {
|
944
|
+
buffer.push(token);
|
945
|
+
}
|
946
|
+
}
|
947
|
+
else if (start > end || buffer.length < 1) { buffer.push(tmp[start]); }
|
948
|
+
}
|
949
|
+
return (buffer.length > 1)? buffer.join(''): buffer[0];
|
950
|
+
},
|
951
|
+
|
952
|
+
calc: function(str, args) {
|
953
|
+
return eval(format(str, args));
|
954
|
+
},
|
955
|
+
|
956
|
+
repeat: function(s, n) {
|
957
|
+
return new Array(n+1).join(s);
|
958
|
+
},
|
959
|
+
|
960
|
+
UTF8encode: function(s) {
|
961
|
+
return unescape(encodeURIComponent(s));
|
962
|
+
},
|
963
|
+
|
964
|
+
UTF8decode: function(s) {
|
965
|
+
return decodeURIComponent(escape(s));
|
966
|
+
},
|
967
|
+
|
968
|
+
tpl: function() {
|
969
|
+
var out = '', render = true;
|
970
|
+
// Set
|
971
|
+
// $.tpl('ui.test', ['<span>', helloWorld ,'</span>']);
|
972
|
+
if (arguments.length == 2 && $.isArray(arguments[1])) {
|
973
|
+
this[arguments[0]] = arguments[1].join('');
|
974
|
+
return jQuery;
|
975
|
+
}
|
976
|
+
// $.tpl('ui.test', '<span>hello world</span>');
|
977
|
+
if (arguments.length == 2 && $.isString(arguments[1])) {
|
978
|
+
this[arguments[0]] = arguments[1];
|
979
|
+
return jQuery;
|
980
|
+
}
|
981
|
+
// Call
|
982
|
+
// $.tpl('ui.test');
|
983
|
+
if (arguments.length == 1) {
|
984
|
+
return $(this[arguments[0]]);
|
985
|
+
}
|
986
|
+
// $.tpl('ui.test', false);
|
987
|
+
if (arguments.length == 2 && arguments[1] == false) {
|
988
|
+
return this[arguments[0]];
|
989
|
+
}
|
990
|
+
// $.tpl('ui.test', {value:blah});
|
991
|
+
if (arguments.length == 2 && $.isObject(arguments[1])) {
|
992
|
+
return $($.format(this[arguments[0]], arguments[1]));
|
993
|
+
}
|
994
|
+
// $.tpl('ui.test', {value:blah}, false);
|
995
|
+
if (arguments.length == 3 && $.isObject(arguments[1])) {
|
996
|
+
return (arguments[2] == true)
|
997
|
+
? $.format(this[arguments[0]], arguments[1])
|
998
|
+
: $($.format(this[arguments[0]], arguments[1]));
|
999
|
+
}
|
1000
|
+
}
|
1001
|
+
};
|
1002
|
+
|
1003
|
+
var Argument = function(arg, args) {
|
1004
|
+
this.__arg = arg;
|
1005
|
+
this.__args = args;
|
1006
|
+
this.__max_precision = parseFloat('1.'+ (new Array(32)).join('1'), 10).toString().length-3;
|
1007
|
+
this.__def_precision = 6;
|
1008
|
+
this.getString = function(){
|
1009
|
+
return this.__arg;
|
1010
|
+
};
|
1011
|
+
this.getKey = function(){
|
1012
|
+
return this.__arg.split(':')[0];
|
1013
|
+
};
|
1014
|
+
this.getFormat = function(){
|
1015
|
+
var match = this.getString().split(':');
|
1016
|
+
return (match && match[1])? match[1]: 's';
|
1017
|
+
};
|
1018
|
+
this.getPrecision = function(){
|
1019
|
+
var match = this.getFormat().match(/\.(\d+|\*)/g);
|
1020
|
+
if (!match) { return this.__def_precision; }
|
1021
|
+
else {
|
1022
|
+
match = match[0].slice(1);
|
1023
|
+
if (match != '*') { return parseInt(match, 10); }
|
1024
|
+
else if(strings.strConversion.__getType(this.__args) == 'array') {
|
1025
|
+
return this.__args[1] && this.__args[0] || this.__def_precision;
|
1026
|
+
}
|
1027
|
+
else if(strings.strConversion.__getType(this.__args) == 'object') {
|
1028
|
+
return this.__args[this.getKey()] && this.__args[this.getKey()][0] || this.__def_precision;
|
1029
|
+
}
|
1030
|
+
else { return this.__def_precision; }
|
1031
|
+
}
|
1032
|
+
};
|
1033
|
+
this.getPaddingLength = function(){
|
1034
|
+
var match = false;
|
1035
|
+
if (this.isAlternate()) {
|
1036
|
+
match = this.getString().match(/0?#0?(\d+)/);
|
1037
|
+
if (match && match[1]) { return parseInt(match[1], 10); }
|
1038
|
+
}
|
1039
|
+
match = this.getString().match(/(0|\.)(\d+|\*)/g);
|
1040
|
+
return match && parseInt(match[0].slice(1), 10) || 0;
|
1041
|
+
};
|
1042
|
+
this.getPaddingString = function(){
|
1043
|
+
var o = '';
|
1044
|
+
if (this.isAlternate()) { o = ' '; }
|
1045
|
+
// 0 take precedence on alternate format
|
1046
|
+
if (this.getFormat().match(/#0|0#|^0|\.\d+/)) { o = '0'; }
|
1047
|
+
return o;
|
1048
|
+
};
|
1049
|
+
this.getFlags = function(){
|
1050
|
+
var match = this.getString().matc(/^(0|\#|\-|\+|\s)+/);
|
1051
|
+
return match && match[0].split('') || [];
|
1052
|
+
};
|
1053
|
+
this.isAlternate = function() {
|
1054
|
+
return !!this.getFormat().match(/^0?#/);
|
1055
|
+
};
|
1056
|
+
};
|
1057
|
+
|
1058
|
+
var arguments2Array = function(args, shift) {
|
1059
|
+
var o = [];
|
1060
|
+
for (l=args.length, x=(shift || 0)-1; x<l;x++) { o.push(args[x]); }
|
1061
|
+
return o;
|
1062
|
+
};
|
1063
|
+
$.extend(strings);
|
1064
|
+
})(jQuery);
|
1065
|
+
/*
|
1066
|
+
jQuery ui.dropslide - 0.4
|
1067
|
+
http://code.google.com/p/jquery-utils/
|
1068
|
+
|
1069
|
+
(c) Maxime Haineault <haineault@gmail.com>
|
1070
|
+
http://haineault.com
|
1071
|
+
|
1072
|
+
MIT License (http://www.opensource.org/licenses/mit-license.php
|
1073
|
+
|
1074
|
+
*/
|
1075
|
+
|
1076
|
+
(function($) {
|
1077
|
+
$.widget('ui.dropslide', $.extend({}, $.ui.mouse, {
|
1078
|
+
getter: 'showLevel showNextLevel getSelection',
|
1079
|
+
_init: function() {
|
1080
|
+
var widget = this;
|
1081
|
+
this.wrapper = this.element.next();
|
1082
|
+
|
1083
|
+
this.element.bind(this.options.trigger +'.dropslide', function(){
|
1084
|
+
widget.show();
|
1085
|
+
});
|
1086
|
+
this.wrapper
|
1087
|
+
.data('dropslide', this)
|
1088
|
+
.css({width:this.options.width})
|
1089
|
+
.find('li, li ol li')
|
1090
|
+
.bind('mouseover.dropslide', function(e){
|
1091
|
+
$(this).siblings().removeClass('hover')
|
1092
|
+
.find('ol').hide().end()
|
1093
|
+
.find('span').removeClass('ui-state-hover').end();
|
1094
|
+
$(this).find('ol').show().end().addClass('hover').children(0).addClass('ui-state-hover');
|
1095
|
+
widget.showNextLevel();
|
1096
|
+
})
|
1097
|
+
.bind('click.dropslide', function(e){
|
1098
|
+
$(widget.element).triggerHandler('dropslideclick', [e, widget], widget.options.click);
|
1099
|
+
$(widget.element).triggerHandler('select', [e, widget], widget.options.select);
|
1100
|
+
}).end()
|
1101
|
+
.find('ol')
|
1102
|
+
.bind('mousemove.dropslide', function(e){
|
1103
|
+
return widget._redraw();
|
1104
|
+
})
|
1105
|
+
.addClass('ui-widget ui-helper-clearfix ui-helper-reset')
|
1106
|
+
.hide().end()
|
1107
|
+
.find('span').addClass('ui-state-default ui-corner-all');
|
1108
|
+
|
1109
|
+
this._redraw();
|
1110
|
+
},
|
1111
|
+
|
1112
|
+
// show specified level, id is the DOM position
|
1113
|
+
showLevel: function(id) {
|
1114
|
+
var ols = this.wrapper.find('ol');
|
1115
|
+
var ds = this;
|
1116
|
+
if (id == 0) {
|
1117
|
+
ols.eq(0).css('left', this.element.position().left);
|
1118
|
+
this.wrapper.css('top', ds.element.position().top + ds.element.height() + ds.options.top);
|
1119
|
+
this.wrapper.css('z-index', 1000);
|
1120
|
+
}
|
1121
|
+
setTimeout(function() {
|
1122
|
+
ols.removeClass('active').eq(id).addClass('active').show(ds.options.animSpeed);
|
1123
|
+
}, ds.options.showDelay);
|
1124
|
+
},
|
1125
|
+
|
1126
|
+
// guess what it does
|
1127
|
+
showNextLevel: function() {
|
1128
|
+
this.wrapper.find('ol.active')
|
1129
|
+
.removeClass('active')
|
1130
|
+
.next('ol').addClass('active').show(this.options.animSpeed);
|
1131
|
+
},
|
1132
|
+
|
1133
|
+
getSelection: function(level) {
|
1134
|
+
return level
|
1135
|
+
&& this.wrapper.find('ol').eq(level).find('li span.ui-state-hover')
|
1136
|
+
|| $.makeArray(this.wrapper.find('span.ui-state-hover').map($.iterators.getText));
|
1137
|
+
},
|
1138
|
+
|
1139
|
+
// essentially reposition each ol
|
1140
|
+
_redraw: function() {
|
1141
|
+
var prevLI ,prevOL, nextOL, pos = false;
|
1142
|
+
var offset = this.element.position().left + this.options.left;
|
1143
|
+
var ols = $(this.wrapper).find('ol');
|
1144
|
+
|
1145
|
+
$(this.wrapper).css({
|
1146
|
+
top: this.element.position().top + this.element.height() + this.options.top,
|
1147
|
+
left: this.element.position().left
|
1148
|
+
});
|
1149
|
+
|
1150
|
+
// reposition each ol
|
1151
|
+
ols.each(function(i) {
|
1152
|
+
prevOL = $(this).prevAll('ol:visible:first');
|
1153
|
+
if (prevOL.get(0)) {
|
1154
|
+
prevLI = prevOL.find('li.hover').get(0) && prevOL.find('li.hover') || prevOL.find('li:first');
|
1155
|
+
$(this).css('margin-left', prevLI.position().left);
|
1156
|
+
}
|
1157
|
+
});
|
1158
|
+
},
|
1159
|
+
|
1160
|
+
// show level 0 (shortcut)
|
1161
|
+
show: function(e) {
|
1162
|
+
this.showLevel(0);
|
1163
|
+
},
|
1164
|
+
|
1165
|
+
// hide all levels
|
1166
|
+
hide: function() {
|
1167
|
+
var widget = this;
|
1168
|
+
setTimeout(function() {
|
1169
|
+
widget.wrapper.find('ol').hide();
|
1170
|
+
}, widget.options.hideDelay);
|
1171
|
+
},
|
1172
|
+
|
1173
|
+
activate: function(e) {
|
1174
|
+
this.element.focus();
|
1175
|
+
this.show(this.options.animSpeed);
|
1176
|
+
},
|
1177
|
+
|
1178
|
+
destroy: function(e) {
|
1179
|
+
this.wrapper.remove();
|
1180
|
+
}
|
1181
|
+
}));
|
1182
|
+
|
1183
|
+
$.ui.dropslide.defaults = {
|
1184
|
+
// options
|
1185
|
+
tree: false,
|
1186
|
+
trigger: 'mouseover',
|
1187
|
+
top: 6,
|
1188
|
+
left: 0,
|
1189
|
+
showDelay: 0,
|
1190
|
+
hideDelay: 0,
|
1191
|
+
animSpeed: 0,
|
1192
|
+
// events
|
1193
|
+
select: function() {},
|
1194
|
+
click: function(e, ui) { ui.hide(); }
|
1195
|
+
};
|
1196
|
+
})(jQuery);
|
1197
|
+
/*
|
1198
|
+
jQuery ui.timepickr - 0.6.6
|
1199
|
+
http://code.google.com/p/jquery-utils/
|
1200
|
+
|
1201
|
+
(c) Maxime Haineault <haineault@gmail.com>
|
1202
|
+
http://haineault.com
|
1203
|
+
|
1204
|
+
MIT License (http://www.opensource.org/licenses/mit-license.php
|
1205
|
+
|
1206
|
+
Note: if you want the original experimental plugin checkout the rev 224
|
1207
|
+
|
1208
|
+
Dependencies
|
1209
|
+
------------
|
1210
|
+
- jquery.utils.js
|
1211
|
+
- jquery.strings.js
|
1212
|
+
- jquery.ui.js
|
1213
|
+
- ui.dropslide.js
|
1214
|
+
|
1215
|
+
*/
|
1216
|
+
|
1217
|
+
(function($) {
|
1218
|
+
$.tpl('timepickr.menu', '<span class="ui-helper-reset ui-dropslide ui-timepickr ui-widget" />');
|
1219
|
+
$.tpl('timepickr.row', '<ol class="ui-timepickr" />');
|
1220
|
+
$.tpl('timepickr.button', '<li class="{className:s}"><span>{label:s}</span></li>');
|
1221
|
+
|
1222
|
+
$.widget('ui.timepickr', {
|
1223
|
+
_init: function() {
|
1224
|
+
var ui = this;
|
1225
|
+
var menu = ui._buildMenu();
|
1226
|
+
var element = ui.element;
|
1227
|
+
element.data('timepickr.initialValue', element.val());
|
1228
|
+
menu.insertAfter(ui.element);
|
1229
|
+
element
|
1230
|
+
.addClass('ui-timepickr')
|
1231
|
+
.dropslide(ui.options.dropslide)
|
1232
|
+
.bind('select', ui.select);
|
1233
|
+
|
1234
|
+
element.blur(function(e) {
|
1235
|
+
$(this).dropslide('hide');
|
1236
|
+
if (ui.options.resetOnBlur) {
|
1237
|
+
$(this).val($(this).data('timepickr.initialValue'));
|
1238
|
+
}
|
1239
|
+
});
|
1240
|
+
|
1241
|
+
if (ui.options.val) {
|
1242
|
+
element.val(this.options.val);
|
1243
|
+
}
|
1244
|
+
|
1245
|
+
if (ui.options.handle) {
|
1246
|
+
$(this.options.handle).click(function() {
|
1247
|
+
$(element).dropslide('show');
|
1248
|
+
});
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
if (ui.options.resetOnBlur) {
|
1252
|
+
menu.find('li > span').bind('mousedown.timepickr', function(){
|
1253
|
+
$(element).data('timepickr.initialValue', $(element).val());
|
1254
|
+
});
|
1255
|
+
}
|
1256
|
+
if (ui.options.updateLive) {
|
1257
|
+
menu.find('li').bind('mouseover.timepickr', function() {
|
1258
|
+
$(element).timepickr('update');
|
1259
|
+
});
|
1260
|
+
}
|
1261
|
+
var hrs = menu.find('ol:eq(1)').find('li:first').addClass('hover').find('span').addClass('ui-state-hover').end().end();
|
1262
|
+
var min = menu.find('ol:eq(2)').find('li:first').addClass('hover').find('span').addClass('ui-state-hover').end().end();
|
1263
|
+
var sec = menu.find('ol:eq(3)').find('li:first').addClass('hover').find('span').addClass('ui-state-hover').end().end();
|
1264
|
+
|
1265
|
+
if (this.options.convention === 24) {
|
1266
|
+
var day = menu.find('ol:eq(0) li:eq(0)');
|
1267
|
+
var night = menu.find('ol:eq(0) li:eq(1)');
|
1268
|
+
var dayHours = hrs.find('li').slice(0, 12);
|
1269
|
+
var nightHours = hrs.find('li').slice(12, 24);
|
1270
|
+
var index = 0;
|
1271
|
+
var selectHr = function(id) {
|
1272
|
+
hrs.find('li').removeClass('hover');
|
1273
|
+
hrs.find('span').removeClass('ui-state-hover');
|
1274
|
+
hrs.find('li').eq(id).addClass('hover').find('span').addClass('ui-state-hover')
|
1275
|
+
};
|
1276
|
+
|
1277
|
+
day.mouseover(function() {
|
1278
|
+
nightHours.hide();
|
1279
|
+
dayHours.show(0);
|
1280
|
+
index = hrs.find('li.hover').data('id') || hrs.find('li:first').data('id');
|
1281
|
+
selectHr(index > 11 && index - 12 || index);
|
1282
|
+
element.dropslide('redraw');
|
1283
|
+
});
|
1284
|
+
|
1285
|
+
night.mouseover(function() {
|
1286
|
+
dayHours.hide();
|
1287
|
+
nightHours.show(0);
|
1288
|
+
index = hrs.find('li.hover').data('id') || hrs.find('li:first').data('id');
|
1289
|
+
selectHr(index < 12 && index + 12 || index);
|
1290
|
+
element.dropslide('redraw');
|
1291
|
+
});
|
1292
|
+
}
|
1293
|
+
element.dropslide('redraw');
|
1294
|
+
element.data('timepickr', this);
|
1295
|
+
},
|
1296
|
+
|
1297
|
+
update: function() {
|
1298
|
+
var frmt = this.options.convention === 24 && 'format24' || 'format12';
|
1299
|
+
var val = {
|
1300
|
+
h: this.getValue('hour'),
|
1301
|
+
m: this.getValue('minute'),
|
1302
|
+
s: this.getValue('second'),
|
1303
|
+
prefix: this.getValue('prefix'),
|
1304
|
+
suffix: this.getValue('suffix')
|
1305
|
+
};
|
1306
|
+
var o = $.format(this.options[frmt], val);
|
1307
|
+
|
1308
|
+
$(this.element).val(o);
|
1309
|
+
},
|
1310
|
+
|
1311
|
+
select: function(e) {
|
1312
|
+
var dropslide = $(this).data('dropslide');
|
1313
|
+
$(dropslide.element).timepickr('update');
|
1314
|
+
e.stopPropagation();
|
1315
|
+
},
|
1316
|
+
|
1317
|
+
getHour: function() {
|
1318
|
+
return this.getValue('hour');
|
1319
|
+
},
|
1320
|
+
|
1321
|
+
getMinute: function() {
|
1322
|
+
return this.getValue('minute');
|
1323
|
+
},
|
1324
|
+
|
1325
|
+
getSecond: function() {
|
1326
|
+
return this.getValue('second');
|
1327
|
+
},
|
1328
|
+
|
1329
|
+
getValue: function(type) {
|
1330
|
+
return $('.ui-timepickr.'+ type +'.hover', this.element.next()).text();
|
1331
|
+
},
|
1332
|
+
|
1333
|
+
activate: function() {
|
1334
|
+
this.element.dropslide('activate');
|
1335
|
+
},
|
1336
|
+
|
1337
|
+
destroy: function() {
|
1338
|
+
this.element.dropslide('destroy');
|
1339
|
+
},
|
1340
|
+
|
1341
|
+
/* UI private methods */
|
1342
|
+
|
1343
|
+
_createButton: function(i, format, className) {
|
1344
|
+
var o = format && $.format(format, i) || i;
|
1345
|
+
var cn = className && 'ui-timepickr '+ className || 'ui-timepickr';
|
1346
|
+
return $.tpl('timepickr.button', {className: cn, label: o}).data('id', i);
|
1347
|
+
},
|
1348
|
+
|
1349
|
+
_createRow: function(range, format, className) {
|
1350
|
+
var row = $.tpl('timepickr.row');
|
1351
|
+
var button = this._createButton;
|
1352
|
+
// Thanks to Christoph Müller-Spengler for the bug report
|
1353
|
+
$.each(range, function(idx, val){
|
1354
|
+
row.append(button(val, format || false, className || false));
|
1355
|
+
});
|
1356
|
+
return row;
|
1357
|
+
},
|
1358
|
+
|
1359
|
+
_getRanges12: function() {
|
1360
|
+
var o = [], opt = this.options;
|
1361
|
+
if (opt.hours) { o.push(this._createRow($.range(1, 13), '{0:0.2d}', 'hour')); }
|
1362
|
+
if (opt.minutes) { o.push(this._createRow(opt.rangeMin, '{0:0.2d}', 'minute')); }
|
1363
|
+
if (opt.seconds) { o.push(this._createRow(opt.rangeSec, '{0:0.2d}', 'second')); }
|
1364
|
+
if (opt.suffix) { o.push(this._createRow(opt.suffix, false, 'suffix')); }
|
1365
|
+
return o;
|
1366
|
+
},
|
1367
|
+
|
1368
|
+
_getRanges24: function() {
|
1369
|
+
var o = [], opt = this.options;
|
1370
|
+
o.push(this._createRow(opt.prefix, false, 'prefix')); // prefix is required in 24h mode
|
1371
|
+
if (opt.hours) { o.push(this._createRow($.range(0, 24), '{0:0.2d}', 'hour')); }
|
1372
|
+
if (opt.minutes) { o.push(this._createRow(opt.rangeMin, '{0:0.2d}', 'minute')); }
|
1373
|
+
if (opt.seconds) { o.push(this._createRow(opt.rangeSec, '{0:0.2d}', 'second')); }
|
1374
|
+
return o;
|
1375
|
+
},
|
1376
|
+
|
1377
|
+
_buildMenu: function() {
|
1378
|
+
var menu = $.tpl('timepickr.menu');
|
1379
|
+
var ranges = this.options.convention === 24
|
1380
|
+
&& this._getRanges24() || this._getRanges12();
|
1381
|
+
|
1382
|
+
$.each(ranges, function(idx, val){
|
1383
|
+
menu.append(val);
|
1384
|
+
});
|
1385
|
+
return menu;
|
1386
|
+
}
|
1387
|
+
});
|
1388
|
+
|
1389
|
+
// These properties are shared accross every instances of timepickr
|
1390
|
+
$.extend($.ui.timepickr, {
|
1391
|
+
version: '0.6.6',
|
1392
|
+
eventPrefix: '',
|
1393
|
+
getter: '',
|
1394
|
+
defaults: {
|
1395
|
+
convention: 24, // 24, 12
|
1396
|
+
dropslide: { trigger: 'focus' },
|
1397
|
+
format12: '{h:02.d}:{m:02.d} {suffix:s}',
|
1398
|
+
format24: '{h:02.d}:{m:02.d}',
|
1399
|
+
handle: false,
|
1400
|
+
hours: true,
|
1401
|
+
minutes: true,
|
1402
|
+
seconds: false,
|
1403
|
+
prefix: ['am', 'pm'],
|
1404
|
+
suffix: ['am', 'pm'],
|
1405
|
+
rangeMin: $.range(0, 60, 15),
|
1406
|
+
rangeSec: $.range(0, 60, 15),
|
1407
|
+
updateLive: true,
|
1408
|
+
resetOnBlur: true,
|
1409
|
+
val: false
|
1410
|
+
}
|
1411
|
+
});
|
1412
|
+
|
1413
|
+
})(jQuery);
|