spiderfw 0.5.13 → 0.5.14
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +11 -0
- data/Rakefile +7 -4
- data/VERSION +1 -1
- data/apps/admin/_init.rb +9 -0
- data/apps/admin/controllers/admin_controller.rb +12 -0
- data/apps/admin/widgets/dashboard_widget/dashboard_widget.rb +8 -0
- data/apps/app_server/app_server.rb +11 -1
- data/apps/app_server/config/options.rb +4 -0
- data/apps/app_server/controllers/app_server_controller.rb +47 -9
- data/apps/app_server/lib/app.rb +3 -1
- data/apps/app_server/lib/git_app.rb +16 -0
- data/apps/app_server/views/app_list.shtml +1 -1
- data/apps/cas_server/config/options.rb +4 -0
- data/apps/cas_server/controllers/mixins/cas_login_mixin.rb +192 -31
- data/apps/cas_server/lib/cas.rb +31 -9
- data/apps/core/auth/_init.rb +2 -2
- data/apps/core/auth/config/options.rb +6 -0
- data/apps/core/auth/controllers/login_controller.rb +1 -1
- data/apps/core/auth/controllers/mixins/auth_helper.rb +6 -1
- data/apps/core/auth/data/locale/it/LC_MESSAGES/spider_auth.mo +0 -0
- data/apps/core/auth/lib/login_authenticator.rb +12 -1
- data/apps/core/auth/lib/rbac.rb +25 -0
- data/apps/core/auth/models/group.rb +3 -8
- data/apps/core/auth/models/login_user.rb +11 -1
- data/apps/core/auth/models/mixins/rbac_provider.rb +60 -0
- data/apps/core/auth/po/it/spider_auth.po +19 -3
- data/apps/core/auth/po/spider_auth.pot +18 -2
- data/apps/core/auth/views/login.shtml +1 -0
- data/apps/core/components/_init.rb +2 -0
- data/apps/core/components/assets.rb +112 -0
- data/apps/core/components/po/it/spider_components.po +20 -6
- data/apps/core/components/po/spider_components.pot +16 -4
- data/apps/core/components/public/css/grid/1140.css +80 -0
- data/apps/core/components/public/css/grid/ie.css +43 -0
- data/apps/core/components/public/css/grid/layout.css +32 -0
- data/apps/core/components/public/css/grid/mobile.css +26 -0
- data/apps/core/components/public/css/grid/smallerscreen.css +3 -0
- data/apps/core/components/public/css/grid/typeimg.css +72 -0
- data/apps/core/components/public/js/jquery/{jquery-1.4.2.js → jquery-1.4.3.js} +1524 -881
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/button_bg.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/datepicker.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/icon_sprite.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/progress_bar.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/slider_h_bg.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/slider_handles.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/slider_v_bg.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/tab_bg.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/the_gradient.gif +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/ui-anim_basic_16x16.gif +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/css/Aristo/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/smoothness → jquery-ui-1.8.4/css/Aristo}/images/ui-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-icons_228ef1_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-icons_ef8c08_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/images/ui-icons_ffd27a_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/css/ui-lightness → jquery-ui-1.8.4/css/Aristo}/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 → jquery-ui-1.8.4/css/Aristo/jquery-ui.custom.css} +249 -135
- data/apps/core/components/public/js/jquery/{jquery-ui → jquery-ui-1.8.4}/development-bundle/AUTHORS.txt +2 -2
- data/apps/core/components/public/js/jquery/{jquery-ui → jquery-ui-1.8.4}/development-bundle/GPL-LICENSE.txt +0 -0
- data/apps/core/components/public/js/jquery/{jquery-ui → jquery-ui-1.8.4}/development-bundle/MIT-LICENSE.txt +1 -1
- data/apps/core/components/public/js/jquery/{jquery-ui → jquery-ui-1.8.4}/development-bundle/ui/i18n/jquery-ui-i18n.js +516 -111
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-af.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ar.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ar.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-az.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-bg.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-bg.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-bs.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ca.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ca.js} +7 -3
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-cs.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-cs.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-da.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-da.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-de.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-de.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-el.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-el.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-en-GB.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-eo.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-eo.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-es.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-es.js} +7 -3
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-et.js +23 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-eu.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-fa.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fa.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-fi.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fi.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fo.js +23 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fr-CH.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-fr.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-fr.js} +7 -3
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-he.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-he.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-hr.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-hr.js} +8 -4
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-hu.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-hu.js} +8 -4
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-hy.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-hy.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-id.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-id.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-is.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-is.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-it.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-it.js} +10 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ja.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ja.js} +5 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ko.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ko.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-lt.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-lt.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-lv.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-lv.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ms.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ms.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-nl.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-nl.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-no.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-no.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-pl.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-pl.js} +7 -3
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-pt-BR.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-pt-BR.js} +9 -5
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ro.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ro.js} +7 -3
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-ru.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ru.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sk.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sk.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sl.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sl.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sq.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sq.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr-SR.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sr-SR.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sr.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sr.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-sv.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-sv.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-ta.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-th.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-th.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-tr.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-tr.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-uk.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-uk.js} +10 -12
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-vi.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-CN.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-zh-CN.js} +6 -2
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-zh-HK.js +23 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/i18n/ui.datepicker-zh-TW.js → jquery-ui-1.8.4/development-bundle/ui/i18n/jquery.ui.datepicker-zh-TW.js} +6 -2
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.blind.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.blind.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.bounce.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.bounce.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.clip.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.clip.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.core.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.core.js} +390 -221
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.drop.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.drop.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.explode.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.explode.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.fold.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.fold.js} +6 -6
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.effects.highlight.js +50 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.effects.pulsate.js +51 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.scale.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.scale.js} +29 -31
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.shake.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.shake.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.slide.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.slide.js} +6 -6
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/effects.transfer.js → jquery-ui-1.8.4/development-bundle/ui/jquery.effects.transfer.js} +6 -6
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.accordion.js +598 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.autocomplete.js +550 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.button.js +365 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.core.js +281 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.datepicker.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.datepicker.js} +343 -247
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.dialog.js +827 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.draggable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.draggable.js} +107 -76
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.droppable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.droppable.js} +48 -45
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.mouse.js +151 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.position.js +233 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.progressbar.js +94 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.resizable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.resizable.js} +73 -61
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.selectable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.selectable.js} +42 -33
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.slider.js +680 -0
- data/apps/core/components/public/js/jquery/{jquery-ui/development-bundle/ui/ui.sortable.js → jquery-ui-1.8.4/development-bundle/ui/jquery.ui.sortable.js} +136 -84
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.tabs.js +757 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/ui/jquery.ui.widget.js +237 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.8.4/development-bundle/version.txt +1 -0
- data/apps/core/components/public/js/jquery/patches/jquery-ui/jquery.ui.autocomplete-001.patch +17 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.datalink.js +258 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.json.js +178 -0
- data/apps/core/components/public/js/plugins/sortable.js +96 -72
- data/apps/core/components/public/js/spider.js +108 -50
- data/apps/core/components/public/js/utils.i18n.json +1 -0
- data/apps/core/components/public/js/utils.js +27 -0
- data/apps/core/components/widgets/admin/admin.rb +1 -1
- data/apps/core/components/widgets/admin/admin.shtml +1 -0
- data/apps/core/components/widgets/crud/crud.rb +6 -2
- data/apps/core/components/widgets/crud/crud.shtml +1 -0
- data/apps/core/components/widgets/list/list.rb +1 -1
- data/apps/core/components/widgets/list/list.shtml +2 -2
- data/apps/core/components/widgets/search_table/search_table.shtml +1 -1
- data/apps/core/components/widgets/switcher/switcher.rb +5 -1
- data/apps/core/components/widgets/table/table.rb +18 -3
- data/apps/core/components/widgets/table/table.shtml +1 -1
- data/apps/core/components/widgets/tabs/tabs.rb +0 -1
- data/apps/core/forms/_init.rb +3 -1
- data/apps/core/forms/public/ckeditor/adapters/jquery.js +6 -0
- data/apps/core/forms/public/ckeditor/ckeditor.js +137 -0
- data/apps/core/forms/public/ckeditor/images/spacer.gif +0 -0
- data/apps/core/forms/public/ckeditor/lang/_languages.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/_translationstatus.txt +60 -0
- data/apps/core/forms/public/ckeditor/lang/af.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ar.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/bg.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/bn.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/bs.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ca.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/cs.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/cy.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/da.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/de.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/el.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/en-au.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/en-ca.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/en-gb.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/en.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/eo.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/es.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/et.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/eu.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fa.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fi.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fo.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fr-ca.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/fr.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/gl.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/gu.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/he.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/hi.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/hr.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/hu.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/is.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/it.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ja.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/km.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ko.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/lt.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/lv.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/mn.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ms.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/nb.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/nl.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/no.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/pl.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/pt-br.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/pt.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ro.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/ru.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sk.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sl.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sr-latn.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sr.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/sv.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/th.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/tr.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/uk.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/vi.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/zh-cn.js +6 -0
- data/apps/core/forms/public/ckeditor/lang/zh.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/a11yhelp/lang/en.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/a11yhelp/lang/he.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/about/dialogs/about.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/autogrow/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/clipboard/dialogs/paste.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/colordialog/dialogs/colordialog.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/apps/core/forms/public/ckeditor/plugins/div/dialogs/div.js +8 -0
- data/apps/core/forms/public/ckeditor/plugins/find/dialogs/find.js +9 -0
- data/apps/core/forms/public/ckeditor/plugins/flash/dialogs/flash.js +9 -0
- data/apps/core/forms/public/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/button.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/checkbox.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/form.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/hiddenfield.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/radio.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/select.js +9 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/textarea.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/dialogs/textfield.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/iframedialog/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/image/dialogs/image.js +13 -0
- data/apps/core/forms/public/ckeditor/plugins/link/dialogs/anchor.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/link/dialogs/link.js +11 -0
- data/apps/core/forms/public/ckeditor/plugins/link/images/anchor.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/liststyle/dialogs/liststyle.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/pastefromword/filter/default.js +10 -0
- data/apps/core/forms/public/ckeditor/plugins/pastetext/dialogs/pastetext.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/scayt/dialogs/options.js +8 -0
- data/apps/core/forms/public/ckeditor/plugins/scayt/dialogs/toolbar.css +6 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/dialogs/smiley.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/specialchar/dialogs/specialchar.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/styles/styles/default.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/table/dialogs/table.js +9 -0
- data/apps/core/forms/public/ckeditor/plugins/tableresize/plugin.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/tabletools/dialogs/tableCell.js +8 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/dialogs/templates.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/templates/default.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/dialogs/uicolor.js +7 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/lang/en.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/lang/he.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/plugin.js +6 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/uicolor.gif +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/assets/yui.css +6 -0
- data/apps/core/forms/public/ckeditor/plugins/uicolor/yui/yui.js +76 -0
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/wsc.css +6 -0
- data/apps/core/forms/public/ckeditor/plugins/wsc/dialogs/wsc.js +7 -0
- data/apps/core/forms/public/ckeditor/skins/kama/dialog.css +9 -0
- data/apps/core/forms/public/ckeditor/skins/kama/editor.css +12 -0
- data/apps/core/forms/public/ckeditor/skins/kama/icons.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/icons_rtl.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/mini.gif +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/noimage.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/sprites.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/apps/core/forms/public/ckeditor/skins/kama/skin.js +7 -0
- data/apps/core/forms/public/ckeditor/skins/kama/templates.css +6 -0
- data/apps/core/forms/public/ckeditor/themes/default/theme.js +8 -0
- data/apps/core/forms/public/css/form.css +3 -0
- data/apps/core/forms/public/file_input.js +1 -1
- data/apps/core/forms/public/html_area.js +55 -0
- data/apps/core/forms/public/search_select.js +46 -19
- data/apps/core/forms/public/select.js +11 -5
- data/apps/core/forms/widgets/form/form.rb +22 -6
- data/apps/core/forms/widgets/form/form.shtml +2 -0
- data/apps/core/forms/widgets/inputs/date_time/date_time.rb +6 -1
- data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +1 -0
- data/apps/core/forms/widgets/inputs/html_area/html_area.rb +51 -0
- data/apps/core/forms/widgets/inputs/html_area/html_area.shtml +13 -0
- data/apps/core/forms/widgets/inputs/search_select/search_select.rb +8 -10
- data/apps/core/forms/widgets/inputs/search_select/search_select.shtml +7 -7
- data/apps/core/forms/widgets/inputs/select/select.rb +15 -9
- data/apps/core/forms/widgets/inputs/select/select.shtml +1 -1
- data/apps/core/forms/widgets/inputs/time_span/time_span.rb +42 -0
- data/apps/core/forms/widgets/inputs/time_span/time_span.shtml +8 -0
- data/apps/master/_init.rb +18 -0
- data/apps/master/cmd.rb +57 -0
- data/apps/master/config/options.rb +6 -0
- data/apps/master/controllers/login_controller.rb +22 -0
- data/apps/master/controllers/master_controller.rb +261 -10
- data/apps/master/controllers/scout_controller.rb +121 -0
- data/apps/master/controllers/servant_controller.rb +16 -0
- data/apps/master/data/locale/it/LC_MESSAGES/spider_master.mo +0 -0
- data/apps/master/lib/resource.rb +7 -0
- data/apps/master/lib/resources/db_resource.rb +7 -0
- data/apps/master/lib/scout_plugin.rb +89 -0
- data/apps/master/lib/site_type.rb +24 -0
- data/apps/master/master.rb +40 -0
- data/apps/master/models/admin.rb +35 -0
- data/apps/master/models/command.rb +17 -0
- data/apps/master/models/customer.rb +20 -1
- data/apps/master/models/resource.rb +1 -0
- data/apps/master/models/scout_alert.rb +30 -0
- data/apps/master/models/scout_average.rb +23 -0
- data/apps/master/models/scout_error.rb +30 -0
- data/apps/master/models/scout_plugin_info.rb +11 -0
- data/apps/master/models/scout_plugin_instance.rb +303 -0
- data/apps/master/models/scout_plugin_trigger.rb +285 -0
- data/apps/master/models/scout_report.rb +31 -0
- data/apps/master/models/scout_report_field.rb +26 -0
- data/apps/master/models/servant.rb +82 -6
- data/apps/master/plugins/resources/apache/apache.rb +9 -0
- data/apps/master/plugins/resources/mysql/mysql.rb +45 -0
- data/apps/master/plugins/site_types/spider/spider.rb +11 -0
- data/apps/master/po/it/spider_master.po +352 -0
- data/apps/master/po/spider_master.pot +331 -0
- data/apps/master/public/css/img/web.png +0 -0
- data/apps/master/public/css/login.css +51 -0
- data/apps/master/public/css/master.css +290 -0
- data/apps/master/public/css/reset.css +23 -0
- data/apps/master/public/js/charts.js +84 -0
- data/apps/master/public/js/master.js +3 -0
- data/apps/master/templates/email/alert.html.erb +14 -0
- data/apps/master/templates/email/alert.text.erb +4 -0
- data/apps/master/views/admin.layout.shtml +14 -0
- data/apps/master/views/admin.shtml +5 -0
- data/apps/master/views/customer.shtml +37 -14
- data/apps/master/views/customers.shtml +9 -7
- data/apps/master/views/login.layout.shtml +13 -0
- data/apps/master/views/master.layout.shtml +26 -3
- data/apps/master/views/plugin_data.shtml +30 -0
- data/apps/master/views/plugin_edit.shtml +41 -0
- data/apps/master/views/plugin_instance.shtml +43 -0
- data/apps/master/views/servant.shtml +74 -0
- data/apps/master/views/servants.shtml +4 -0
- data/apps/master/views/site.shtml +3 -0
- data/apps/master/views/site_edit.shtml +17 -0
- data/apps/master/views/trigger_edit.shtml +100 -0
- data/apps/messenger/_init.rb +27 -1
- data/apps/messenger/backends/email/smtp.rb +76 -0
- data/apps/messenger/backends/sms/smstools.rb +46 -0
- data/apps/messenger/config/options.rb +28 -2
- data/apps/messenger/controllers/mixins/messenger_helper.rb +9 -5
- data/apps/messenger/lib/email_backend.rb +14 -0
- data/apps/messenger/lib/sms_backend.rb +14 -0
- data/apps/messenger/messenger.rb +32 -41
- data/apps/messenger/models/email.rb +2 -0
- data/apps/messenger/models/message.rb +37 -15
- data/apps/messenger/models/sms.rb +15 -0
- data/apps/servant/bin/spider-servant.rb +2 -1
- data/apps/servant/cmd.rb +62 -0
- data/apps/servant/controllers/servant_controller.rb +12 -0
- data/apps/servant/lib/resource.rb +3 -0
- data/apps/servant/lib/resources/db/mysql.rb +4 -0
- data/apps/servant/lib/resources/db.rb +1 -0
- data/apps/servant/lib/servant.rb +9 -3
- data/apps/worker/cmd.rb +1 -1
- data/apps/worker/models/job.rb +5 -2
- data/apps/worker/worker.rb +7 -5
- data/blueprints/install/config.ru +0 -1
- data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
- data/lib/spiderfw/app.rb +77 -5
- data/lib/spiderfw/cache/template_cache.rb +15 -5
- data/lib/spiderfw/cmd/cmd.rb +2 -0
- data/lib/spiderfw/cmd/commands/app.rb +159 -0
- data/lib/spiderfw/cmd/commands/config.rb +16 -0
- data/lib/spiderfw/cmd/commands/content.rb +1 -1
- data/lib/spiderfw/cmd/commands/create.rb +13 -0
- data/lib/spiderfw/cmd/commands/model.rb +5 -1
- data/lib/spiderfw/cmd/commands/setup.rb +44 -10
- data/lib/spiderfw/cmd/commands/webserver.rb +15 -1
- data/lib/spiderfw/config/configuration.rb +19 -2
- data/lib/spiderfw/config/configuration_editor.rb +197 -0
- data/lib/spiderfw/config/options/spider.rb +48 -22
- data/lib/spiderfw/{static_content.rb → content_utils.rb} +23 -1
- data/lib/spiderfw/controller/controller.rb +8 -5
- data/lib/spiderfw/controller/controller_mixin.rb +39 -3
- data/lib/spiderfw/controller/cookies.rb +0 -3
- data/lib/spiderfw/controller/dispatcher.rb +1 -1
- data/lib/spiderfw/controller/first_responder.rb +1 -0
- data/lib/spiderfw/controller/home_controller.rb +10 -1
- data/lib/spiderfw/controller/http_controller.rb +105 -6
- data/lib/spiderfw/controller/mixins/http_mixin.rb +0 -1
- data/lib/spiderfw/controller/mixins/static_content.rb +35 -12
- data/lib/spiderfw/controller/mixins/visual.rb +125 -72
- data/lib/spiderfw/controller/request.rb +13 -1
- data/lib/spiderfw/controller/response.rb +14 -8
- data/lib/spiderfw/controller/scene.rb +5 -0
- data/lib/spiderfw/controller/session/file_session.rb +1 -1
- data/lib/spiderfw/create.rb +17 -0
- data/lib/spiderfw/home.rb +20 -8
- data/lib/spiderfw/http/adapters/mongrel.rb +24 -15
- data/lib/spiderfw/http/adapters/rack.rb +8 -3
- data/lib/spiderfw/http/adapters/webrick.rb +1 -0
- data/lib/spiderfw/http/server.rb +1 -0
- data/lib/spiderfw/i18n/cldr.rb +8 -1
- data/lib/spiderfw/i18n/i18n.rb +3 -4
- data/lib/spiderfw/i18n/javascript_parser.rb +54 -0
- data/lib/spiderfw/model/base_model.rb +550 -120
- data/lib/spiderfw/model/condition.rb +11 -2
- data/lib/spiderfw/model/data_type.rb +1 -1
- data/lib/spiderfw/model/datatypes/bool.rb +3 -1
- data/lib/spiderfw/model/datatypes/decimal.rb +4 -0
- data/lib/spiderfw/model/datatypes/password.rb +1 -0
- data/lib/spiderfw/model/datatypes/time_span.rb +26 -0
- data/lib/spiderfw/model/datatypes.rb +1 -0
- data/lib/spiderfw/model/element.rb +29 -28
- data/lib/spiderfw/model/extended_models/managed.rb +15 -0
- data/lib/spiderfw/model/identity_mapper.rb +89 -10
- data/lib/spiderfw/model/inline_model.rb +20 -2
- data/lib/spiderfw/model/integrated_element.rb +41 -0
- data/lib/spiderfw/model/mappers/db_mapper.rb +31 -27
- data/lib/spiderfw/model/mappers/hash_mapper.rb +9 -2
- data/lib/spiderfw/model/mappers/mapper.rb +105 -50
- data/lib/spiderfw/model/mappers/vfs/flat_file.rb +1 -1
- data/lib/spiderfw/model/mixins/state_machine.rb +6 -0
- data/lib/spiderfw/model/mixins/tree.rb +20 -4
- data/lib/spiderfw/model/mixins/versioned.rb +440 -67
- data/lib/spiderfw/model/model.rb +78 -17
- data/lib/spiderfw/model/model_hash.rb +2 -2
- data/lib/spiderfw/model/query.rb +17 -0
- data/lib/spiderfw/model/query_set.rb +86 -14
- data/lib/spiderfw/model/storage/base_storage.rb +1 -0
- data/lib/spiderfw/model/storage/db/adapters/mysql.rb +44 -15
- data/lib/spiderfw/model/storage/db/adapters/oracle.rb +8 -7
- data/lib/spiderfw/model/storage/db/connectors/oci8.rb +7 -1
- data/lib/spiderfw/model/storage/db/db_schema.rb +13 -0
- data/lib/spiderfw/model/storage/db/db_storage.rb +25 -5
- data/lib/spiderfw/model/unit_of_work.rb +96 -15
- data/lib/spiderfw/requires.rb +9 -1
- data/lib/spiderfw/setup/app_manager.rb +81 -0
- data/lib/spiderfw/setup/app_server_client.rb +59 -0
- data/lib/spiderfw/setup/setup_task.rb +68 -6
- data/lib/spiderfw/setup/spider_setup_wizard.rb +375 -0
- data/lib/spiderfw/site.rb +53 -0
- data/lib/spiderfw/templates/blocks/attr_if.rb +2 -2
- data/lib/spiderfw/templates/blocks/comment.rb +7 -2
- data/lib/spiderfw/templates/blocks/each.rb +1 -1
- data/lib/spiderfw/templates/blocks/html.rb +7 -0
- data/lib/spiderfw/templates/blocks/layout_assets.rb +20 -0
- data/lib/spiderfw/templates/blocks/output.rb +18 -0
- data/lib/spiderfw/templates/blocks/text.rb +17 -19
- data/lib/spiderfw/templates/blocks/widget.rb +4 -2
- data/lib/spiderfw/templates/layout.rb +269 -2
- data/lib/spiderfw/templates/template.rb +279 -46
- data/lib/spiderfw/templates/template_blocks.rb +31 -37
- data/lib/spiderfw/utils/events/event_source.rb +54 -0
- data/lib/spiderfw/utils/json.rb +39 -0
- data/lib/spiderfw/utils/logger.rb +186 -23
- data/lib/spiderfw/utils/memory.rb +30 -0
- data/lib/spiderfw/utils/monkey/date_time.rb +32 -2
- data/lib/spiderfw/utils/monkey/module.rb +16 -0
- data/lib/spiderfw/utils/monkey/object.rb +8 -0
- data/lib/spiderfw/utils/ordered_hash.rb +148 -0
- data/lib/spiderfw/utils/profiling.rb +36 -0
- data/lib/spiderfw/utils/secure_random.rb +223 -0
- data/lib/spiderfw/version.rb +1 -1
- data/lib/spiderfw/widget/widget.rb +143 -51
- data/lib/spiderfw/widget/widget_plugin.rb +13 -2
- data/lib/spiderfw.rb +117 -35
- data/spider.gemspec +1 -1
- metadata +506 -255
- data/apps/core/components/public/js/jquery/jquery-1.3.2.js +0 -4376
- data/apps/core/components/public/js/jquery/jquery-1.4.2-min.js +0 -154
- 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_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_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 +0 -406
- 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-icons_222222_256x240.png +0 -0
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/ChangeLog.txt +0 -20
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/META.json +0 -32
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.js +0 -100
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.min.js +0 -10
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/jquery.bgiframe.pack.js +0 -10
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/bgiframe/test/index.html +0 -197
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.js +0 -97
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.min.js +0 -10
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/cookie/jquery.cookie.pack.js +0 -10
- 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 +0 -159
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testrunner.js +0 -780
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/qunit/testsuite.css +0 -120
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/external/simulate/jquery.simulate.js +0 -152
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/jquery-1.3.2.js +0 -4376
- 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 +0 -9
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.all.css +0 -2
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.base.css +0 -8
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.core.css +0 -37
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.datepicker.css +0 -62
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.dialog.css +0 -13
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.progressbar.css +0 -4
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.resizable.css +0 -13
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.slider.css +0 -17
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.tabs.css +0 -11
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/base/ui.theme.css +0 -245
- 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 +0 -406
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.accordion.css +0 -9
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.all.css +0 -2
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.base.css +0 -8
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.core.css +0 -37
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.datepicker.css +0 -62
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.dialog.css +0 -13
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.progressbar.css +0 -4
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.resizable.css +0 -13
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.slider.css +0 -17
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.tabs.css +0 -11
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/themes/ui-lightness/ui.theme.css +0 -247
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.highlight.js +0 -48
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/effects.pulsate.js +0 -56
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.js +0 -9133
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.accordion.js +0 -477
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.core.js +0 -519
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.dialog.js +0 -671
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.progressbar.js +0 -116
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.slider.js +0 -558
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/ui/ui.tabs.js +0 -685
- data/apps/core/components/public/js/jquery/jquery-ui/development-bundle/version.txt +0 -1
- data/apps/core/components/public/js/jquery/jquery-ui/index.html +0 -367
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-1.3.2.min.js +0 -19
- data/apps/core/components/public/js/jquery/jquery-ui/js/jquery-ui-1.7.2.custom.min.js +0 -298
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/changelog.txt +0 -27
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.css +0 -48
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.js +0 -808
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.min.js +0 -13
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/jquery.autocomplete.pack.js +0 -12
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.ajaxQueue.js +0 -116
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.bgiframe.min.js +0 -10
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/jquery.js +0 -3558
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox-compressed.js +0 -10
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/lib/thickbox.css +0 -163
- data/apps/core/components/public/js/jquery/plugins/jquery-autocomplete/todo +0 -166
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.js +0 -187
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.min.js +0 -1
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.spider.1.0.js +0 -193
- data/apps/core/forms/widgets/inputs/subform/subform.rb +0 -10
- data/apps/core/forms/widgets/inputs/subform/subform.shtml +0 -5
- data/apps/hippo/_init.rb +0 -10
- data/apps/hippo/models/mixins/hippo_struct.rb +0 -226
- data/apps/hippo/models/security_group.rb +0 -21
- data/apps/hippo/models/security_user.rb +0 -29
- data/apps/hippo/script/converti_strutture.rb +0 -335
- data/data/locale/it/LC_MESSAGES/cms.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_files.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_images.mo +0 -0
- data/lib/spiderfw/utils/monkey/hpricot_compat.rb +0 -0
- data/lib/spiderfw/utils/setup_task.rb +0 -35
- data/lib/spiderfw/utils/test_case.rb +0 -24
- /data/apps/core/components/public/js/jquery/{jquery-ui/css/smoothness → jquery-ui-1.8.4/css/Aristo}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- /data/apps/{messenger/lib/backends/email/smtp.rb → servant/lib/commands/discovery.rb} +0 -0
@@ -1,21 +1,21 @@
|
|
1
1
|
/*
|
2
|
-
* jQuery UI Datepicker 1.
|
2
|
+
* jQuery UI Datepicker 1.8.4
|
3
3
|
*
|
4
|
-
* Copyright
|
5
|
-
* Dual licensed under the MIT
|
6
|
-
*
|
4
|
+
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
5
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6
|
+
* http://jquery.org/license
|
7
7
|
*
|
8
8
|
* http://docs.jquery.com/UI/Datepicker
|
9
9
|
*
|
10
10
|
* Depends:
|
11
|
-
* ui.core.js
|
11
|
+
* jquery.ui.core.js
|
12
12
|
*/
|
13
|
+
(function( $, undefined ) {
|
13
14
|
|
14
|
-
(
|
15
|
-
|
16
|
-
$.extend($.ui, { datepicker: { version: "1.7.2" } });
|
15
|
+
$.extend($.ui, { datepicker: { version: "1.8.4" } });
|
17
16
|
|
18
17
|
var PROP_NAME = 'datepicker';
|
18
|
+
var dpuuid = new Date().getTime();
|
19
19
|
|
20
20
|
/* Date picker manager.
|
21
21
|
Use the singleton instance of this class, $.datepicker, to interact with the date picker.
|
@@ -50,14 +50,17 @@ function Datepicker() {
|
|
50
50
|
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
|
51
51
|
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
|
52
52
|
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
|
53
|
+
weekHeader: 'Wk', // Column header for week of the year
|
53
54
|
dateFormat: 'mm/dd/yy', // See format options on parseDate
|
54
55
|
firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
|
55
|
-
isRTL: false // True if right-to-left language, false if left-to-right
|
56
|
+
isRTL: false, // True if right-to-left language, false if left-to-right
|
57
|
+
showMonthAfterYear: false, // True if the year select precedes month, false for month then year
|
58
|
+
yearSuffix: '' // Additional text to append to the year in the month headers
|
56
59
|
};
|
57
60
|
this._defaults = { // Global defaults for all the date picker instances
|
58
61
|
showOn: 'focus', // 'focus' for popup on focus,
|
59
62
|
// 'button' for trigger button, or 'both' for either
|
60
|
-
showAnim: '
|
63
|
+
showAnim: 'fadeIn', // Name of jQuery animation for popup
|
61
64
|
showOptions: {}, // Options for enhanced animations
|
62
65
|
defaultDate: null, // Used when field is blank: actual date,
|
63
66
|
// +/-number for offset from today, null for today
|
@@ -71,10 +74,12 @@ function Datepicker() {
|
|
71
74
|
gotoCurrent: false, // True if today link goes back to current selection instead
|
72
75
|
changeMonth: false, // True if month can be selected directly, false if only prev/next
|
73
76
|
changeYear: false, // True if year can be selected directly, false if only prev/next
|
74
|
-
|
75
|
-
|
76
|
-
//
|
77
|
+
yearRange: 'c-10:c+10', // Range of years to display in drop-down,
|
78
|
+
// either relative to today's year (-nn:+nn), relative to currently displayed year
|
79
|
+
// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
|
77
80
|
showOtherMonths: false, // True to show dates in other months, false to leave blank
|
81
|
+
selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
|
82
|
+
showWeek: false, // True to show week of the year, false to not show it
|
78
83
|
calculateWeek: this.iso8601Week, // How to calculate the week of the year,
|
79
84
|
// takes a Date and returns the number of the week for it
|
80
85
|
shortYearCutoff: '+10', // Short year values < this are in the current century,
|
@@ -82,7 +87,7 @@ function Datepicker() {
|
|
82
87
|
// string value starting with '+' for current year + value
|
83
88
|
minDate: null, // The earliest selectable date, or null for no limit
|
84
89
|
maxDate: null, // The latest selectable date, or null for no limit
|
85
|
-
duration: '
|
90
|
+
duration: 'fast', // Duration of display/closure
|
86
91
|
beforeShowDay: null, // Function that takes a date and returns an array with
|
87
92
|
// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
|
88
93
|
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
|
@@ -98,7 +103,8 @@ function Datepicker() {
|
|
98
103
|
altField: '', // Selector for an alternate field to store selected dates into
|
99
104
|
altFormat: '', // The date format to use for the alternate field
|
100
105
|
constrainInput: true, // The input is constrained by the current date format
|
101
|
-
showButtonPanel: false // True to show button panel, false to not show it
|
106
|
+
showButtonPanel: false, // True to show button panel, false to not show it
|
107
|
+
autoSize: false // True to size the input for the date format, false to leave as is
|
102
108
|
};
|
103
109
|
$.extend(this._defaults, this.regional['']);
|
104
110
|
this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>');
|
@@ -113,6 +119,11 @@ $.extend(Datepicker.prototype, {
|
|
113
119
|
if (this.debug)
|
114
120
|
console.log.apply('', arguments);
|
115
121
|
},
|
122
|
+
|
123
|
+
// TODO rename to "widget" when switching to widget factory
|
124
|
+
_widgetDatepicker: function() {
|
125
|
+
return this.dpDiv;
|
126
|
+
},
|
116
127
|
|
117
128
|
/* Override the default settings for all instances of the date picker.
|
118
129
|
@param settings object - the new settings to use as defaults (anonymous object)
|
@@ -141,8 +152,10 @@ $.extend(Datepicker.prototype, {
|
|
141
152
|
}
|
142
153
|
var nodeName = target.nodeName.toLowerCase();
|
143
154
|
var inline = (nodeName == 'div' || nodeName == 'span');
|
144
|
-
if (!target.id)
|
145
|
-
|
155
|
+
if (!target.id) {
|
156
|
+
this.uuid += 1;
|
157
|
+
target.id = 'dp' + this.uuid;
|
158
|
+
}
|
146
159
|
var inst = this._newInst($(target), inline);
|
147
160
|
inst.settings = $.extend({}, settings || {}, inlineSettings || {});
|
148
161
|
if (nodeName == 'input') {
|
@@ -154,7 +167,7 @@ $.extend(Datepicker.prototype, {
|
|
154
167
|
|
155
168
|
/* Create a new instance object. */
|
156
169
|
_newInst: function(target, inline) {
|
157
|
-
var id = target[0].id.replace(/([
|
170
|
+
var id = target[0].id.replace(/([^A-Za-z0-9_])/g, '\\\\$1'); // escape jQuery meta chars
|
158
171
|
return {id: id, input: target, // associated target
|
159
172
|
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
|
160
173
|
drawMonth: 0, drawYear: 0, // month being drawn
|
@@ -170,12 +183,31 @@ $.extend(Datepicker.prototype, {
|
|
170
183
|
inst.trigger = $([]);
|
171
184
|
if (input.hasClass(this.markerClassName))
|
172
185
|
return;
|
186
|
+
this._attachments(input, inst);
|
187
|
+
input.addClass(this.markerClassName).keydown(this._doKeyDown).
|
188
|
+
keypress(this._doKeyPress).keyup(this._doKeyUp).
|
189
|
+
bind("setData.datepicker", function(event, key, value) {
|
190
|
+
inst.settings[key] = value;
|
191
|
+
}).bind("getData.datepicker", function(event, key) {
|
192
|
+
return this._get(inst, key);
|
193
|
+
});
|
194
|
+
this._autoSize(inst);
|
195
|
+
$.data(target, PROP_NAME, inst);
|
196
|
+
},
|
197
|
+
|
198
|
+
/* Make attachments based on settings. */
|
199
|
+
_attachments: function(input, inst) {
|
173
200
|
var appendText = this._get(inst, 'appendText');
|
174
201
|
var isRTL = this._get(inst, 'isRTL');
|
202
|
+
if (inst.append)
|
203
|
+
inst.append.remove();
|
175
204
|
if (appendText) {
|
176
205
|
inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
|
177
206
|
input[isRTL ? 'before' : 'after'](inst.append);
|
178
207
|
}
|
208
|
+
input.unbind('focus', this._showDatepicker);
|
209
|
+
if (inst.trigger)
|
210
|
+
inst.trigger.remove();
|
179
211
|
var showOn = this._get(inst, 'showOn');
|
180
212
|
if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
|
181
213
|
input.focus(this._showDatepicker);
|
@@ -190,20 +222,39 @@ $.extend(Datepicker.prototype, {
|
|
190
222
|
{ src:buttonImage, alt:buttonText, title:buttonText })));
|
191
223
|
input[isRTL ? 'before' : 'after'](inst.trigger);
|
192
224
|
inst.trigger.click(function() {
|
193
|
-
if ($.datepicker._datepickerShowing && $.datepicker._lastInput ==
|
225
|
+
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
|
194
226
|
$.datepicker._hideDatepicker();
|
195
227
|
else
|
196
|
-
$.datepicker._showDatepicker(
|
228
|
+
$.datepicker._showDatepicker(input[0]);
|
197
229
|
return false;
|
198
230
|
});
|
199
231
|
}
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
232
|
+
},
|
233
|
+
|
234
|
+
/* Apply the maximum length for the date format. */
|
235
|
+
_autoSize: function(inst) {
|
236
|
+
if (this._get(inst, 'autoSize') && !inst.inline) {
|
237
|
+
var date = new Date(2009, 12 - 1, 20); // Ensure double digits
|
238
|
+
var dateFormat = this._get(inst, 'dateFormat');
|
239
|
+
if (dateFormat.match(/[DM]/)) {
|
240
|
+
var findMax = function(names) {
|
241
|
+
var max = 0;
|
242
|
+
var maxI = 0;
|
243
|
+
for (var i = 0; i < names.length; i++) {
|
244
|
+
if (names[i].length > max) {
|
245
|
+
max = names[i].length;
|
246
|
+
maxI = i;
|
247
|
+
}
|
248
|
+
}
|
249
|
+
return maxI;
|
250
|
+
};
|
251
|
+
date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
|
252
|
+
'monthNames' : 'monthNamesShort'))));
|
253
|
+
date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
|
254
|
+
'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());
|
255
|
+
}
|
256
|
+
inst.input.attr('size', this._formatDate(inst, date).length);
|
257
|
+
}
|
207
258
|
},
|
208
259
|
|
209
260
|
/* Attach an inline date picker to a div. */
|
@@ -218,26 +269,27 @@ $.extend(Datepicker.prototype, {
|
|
218
269
|
return this._get(inst, key);
|
219
270
|
});
|
220
271
|
$.data(target, PROP_NAME, inst);
|
221
|
-
this._setDate(inst, this._getDefaultDate(inst));
|
272
|
+
this._setDate(inst, this._getDefaultDate(inst), true);
|
222
273
|
this._updateDatepicker(inst);
|
223
274
|
this._updateAlternate(inst);
|
224
275
|
},
|
225
276
|
|
226
277
|
/* Pop-up the date picker in a "dialog" box.
|
227
278
|
@param input element - ignored
|
228
|
-
@param
|
229
|
-
@param onSelect function - the function
|
279
|
+
@param date string or Date - the initial date to display
|
280
|
+
@param onSelect function - the function to call when a date is selected
|
230
281
|
@param settings object - update the dialog date picker instance's settings (anonymous object)
|
231
282
|
@param pos int[2] - coordinates for the dialog's position within the screen or
|
232
283
|
event - with x/y coordinates or
|
233
284
|
leave empty for default (screen centre)
|
234
285
|
@return the manager object */
|
235
|
-
_dialogDatepicker: function(input,
|
286
|
+
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
|
236
287
|
var inst = this._dialogInst; // internal instance
|
237
288
|
if (!inst) {
|
238
|
-
|
289
|
+
this.uuid += 1;
|
290
|
+
var id = 'dp' + this.uuid;
|
239
291
|
this._dialogInput = $('<input type="text" id="' + id +
|
240
|
-
'"
|
292
|
+
'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
|
241
293
|
this._dialogInput.keydown(this._doKeyDown);
|
242
294
|
$('body').append(this._dialogInput);
|
243
295
|
inst = this._dialogInst = this._newInst(this._dialogInput, false);
|
@@ -245,12 +297,13 @@ $.extend(Datepicker.prototype, {
|
|
245
297
|
$.data(this._dialogInput[0], PROP_NAME, inst);
|
246
298
|
}
|
247
299
|
extendRemove(inst.settings, settings || {});
|
248
|
-
this.
|
300
|
+
date = (date && date.constructor == Date ? this._formatDate(inst, date) : date);
|
301
|
+
this._dialogInput.val(date);
|
249
302
|
|
250
303
|
this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
|
251
304
|
if (!this._pos) {
|
252
|
-
var browserWidth =
|
253
|
-
var browserHeight =
|
305
|
+
var browserWidth = document.documentElement.clientWidth;
|
306
|
+
var browserHeight = document.documentElement.clientHeight;
|
254
307
|
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
255
308
|
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
256
309
|
this._pos = // should use actual width/height below
|
@@ -258,7 +311,7 @@ $.extend(Datepicker.prototype, {
|
|
258
311
|
}
|
259
312
|
|
260
313
|
// move input on screen for focus, but hidden behind dialog
|
261
|
-
this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px');
|
314
|
+
this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');
|
262
315
|
inst.settings.onSelect = onSelect;
|
263
316
|
this._inDialog = true;
|
264
317
|
this.dpDiv.addClass(this._dialogClass);
|
@@ -285,7 +338,8 @@ $.extend(Datepicker.prototype, {
|
|
285
338
|
$target.removeClass(this.markerClassName).
|
286
339
|
unbind('focus', this._showDatepicker).
|
287
340
|
unbind('keydown', this._doKeyDown).
|
288
|
-
unbind('keypress', this._doKeyPress)
|
341
|
+
unbind('keypress', this._doKeyPress).
|
342
|
+
unbind('keyup', this._doKeyUp);
|
289
343
|
} else if (nodeName == 'div' || nodeName == 'span')
|
290
344
|
$target.removeClass(this.markerClassName).empty();
|
291
345
|
},
|
@@ -386,10 +440,12 @@ $.extend(Datepicker.prototype, {
|
|
386
440
|
}
|
387
441
|
if (inst) {
|
388
442
|
if (this._curInst == inst) {
|
389
|
-
this._hideDatepicker(
|
443
|
+
this._hideDatepicker();
|
390
444
|
}
|
391
|
-
var date = this._getDateDatepicker(target);
|
445
|
+
var date = this._getDateDatepicker(target, true);
|
392
446
|
extendRemove(inst.settings, settings);
|
447
|
+
this._attachments($(target), inst);
|
448
|
+
this._autoSize(inst);
|
393
449
|
this._setDateDatepicker(target, date);
|
394
450
|
this._updateDatepicker(inst);
|
395
451
|
}
|
@@ -411,25 +467,24 @@ $.extend(Datepicker.prototype, {
|
|
411
467
|
|
412
468
|
/* Set the dates for a jQuery selection.
|
413
469
|
@param target element - the target input field or division or span
|
414
|
-
@param date Date - the new date
|
415
|
-
|
416
|
-
_setDateDatepicker: function(target, date, endDate) {
|
470
|
+
@param date Date - the new date */
|
471
|
+
_setDateDatepicker: function(target, date) {
|
417
472
|
var inst = this._getInst(target);
|
418
473
|
if (inst) {
|
419
|
-
this._setDate(inst, date
|
474
|
+
this._setDate(inst, date);
|
420
475
|
this._updateDatepicker(inst);
|
421
476
|
this._updateAlternate(inst);
|
422
477
|
}
|
423
478
|
},
|
424
479
|
|
425
480
|
/* Get the date(s) for the first entry in a jQuery selection.
|
426
|
-
@param target
|
427
|
-
@
|
428
|
-
|
429
|
-
_getDateDatepicker: function(target) {
|
481
|
+
@param target element - the target input field or division or span
|
482
|
+
@param noDefault boolean - true if no default date is to be used
|
483
|
+
@return Date - the current date */
|
484
|
+
_getDateDatepicker: function(target, noDefault) {
|
430
485
|
var inst = this._getInst(target);
|
431
486
|
if (inst && !inst.inline)
|
432
|
-
this._setDateFromField(inst);
|
487
|
+
this._setDateFromField(inst, noDefault);
|
433
488
|
return (inst ? this._getDate(inst) : null);
|
434
489
|
},
|
435
490
|
|
@@ -441,17 +496,18 @@ $.extend(Datepicker.prototype, {
|
|
441
496
|
inst._keyEvent = true;
|
442
497
|
if ($.datepicker._datepickerShowing)
|
443
498
|
switch (event.keyCode) {
|
444
|
-
case 9:
|
499
|
+
case 9: $.datepicker._hideDatepicker();
|
500
|
+
handled = false;
|
445
501
|
break; // hide on tab out
|
446
|
-
case 13: var sel = $('td.' + $.datepicker._dayOverClass
|
447
|
-
'
|
502
|
+
case 13: var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv).
|
503
|
+
add($('td.' + $.datepicker._currentClass, inst.dpDiv));
|
448
504
|
if (sel[0])
|
449
505
|
$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
|
450
506
|
else
|
451
|
-
$.datepicker._hideDatepicker(
|
507
|
+
$.datepicker._hideDatepicker();
|
452
508
|
return false; // don't submit the form
|
453
509
|
break; // select the value on enter
|
454
|
-
case 27: $.datepicker._hideDatepicker(
|
510
|
+
case 27: $.datepicker._hideDatepicker();
|
455
511
|
break; // hide on escape
|
456
512
|
case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
457
513
|
-$.datepicker._get(inst, 'stepBigMonths') :
|
@@ -512,6 +568,27 @@ $.extend(Datepicker.prototype, {
|
|
512
568
|
}
|
513
569
|
},
|
514
570
|
|
571
|
+
/* Synchronise manual entry and field/alternate field. */
|
572
|
+
_doKeyUp: function(event) {
|
573
|
+
var inst = $.datepicker._getInst(event.target);
|
574
|
+
if (inst.input.val() != inst.lastVal) {
|
575
|
+
try {
|
576
|
+
var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
|
577
|
+
(inst.input ? inst.input.val() : null),
|
578
|
+
$.datepicker._getFormatConfig(inst));
|
579
|
+
if (date) { // only if valid
|
580
|
+
$.datepicker._setDateFromField(inst);
|
581
|
+
$.datepicker._updateAlternate(inst);
|
582
|
+
$.datepicker._updateDatepicker(inst);
|
583
|
+
}
|
584
|
+
}
|
585
|
+
catch (event) {
|
586
|
+
$.datepicker.log(event);
|
587
|
+
}
|
588
|
+
}
|
589
|
+
return true;
|
590
|
+
},
|
591
|
+
|
515
592
|
/* Pop-up the date picker for a given input field.
|
516
593
|
@param input element - the input field attached to the date picker or
|
517
594
|
event - if triggered by focus */
|
@@ -522,9 +599,12 @@ $.extend(Datepicker.prototype, {
|
|
522
599
|
if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
|
523
600
|
return;
|
524
601
|
var inst = $.datepicker._getInst(input);
|
602
|
+
if ($.datepicker._curInst && $.datepicker._curInst != inst) {
|
603
|
+
$.datepicker._curInst.dpDiv.stop(true, true);
|
604
|
+
}
|
525
605
|
var beforeShow = $.datepicker._get(inst, 'beforeShow');
|
526
606
|
extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
|
527
|
-
|
607
|
+
inst.lastVal = null;
|
528
608
|
$.datepicker._lastInput = input;
|
529
609
|
$.datepicker._setDateFromField(inst);
|
530
610
|
if ($.datepicker._inDialog) // hide cursor
|
@@ -544,7 +624,6 @@ $.extend(Datepicker.prototype, {
|
|
544
624
|
}
|
545
625
|
var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
|
546
626
|
$.datepicker._pos = null;
|
547
|
-
inst.rangeStart = null;
|
548
627
|
// determine sizing offscreen
|
549
628
|
inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
|
550
629
|
$.datepicker._updateDatepicker(inst);
|
@@ -555,34 +634,36 @@ $.extend(Datepicker.prototype, {
|
|
555
634
|
'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
|
556
635
|
left: offset.left + 'px', top: offset.top + 'px'});
|
557
636
|
if (!inst.inline) {
|
558
|
-
var showAnim = $.datepicker._get(inst, 'showAnim')
|
637
|
+
var showAnim = $.datepicker._get(inst, 'showAnim');
|
559
638
|
var duration = $.datepicker._get(inst, 'duration');
|
560
639
|
var postProcess = function() {
|
561
640
|
$.datepicker._datepickerShowing = true;
|
562
|
-
|
563
|
-
|
564
|
-
|
641
|
+
var borders = $.datepicker._getBorders(inst.dpDiv);
|
642
|
+
inst.dpDiv.find('iframe.ui-datepicker-cover'). // IE6- only
|
643
|
+
css({left: -borders[0], top: -borders[1],
|
644
|
+
width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
|
565
645
|
};
|
646
|
+
inst.dpDiv.zIndex($(input).zIndex()+1);
|
566
647
|
if ($.effects && $.effects[showAnim])
|
567
648
|
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
|
568
649
|
else
|
569
|
-
inst.dpDiv[showAnim](duration, postProcess);
|
570
|
-
if (
|
650
|
+
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
|
651
|
+
if (!showAnim || !duration)
|
571
652
|
postProcess();
|
572
|
-
if (inst.input
|
573
|
-
inst.input
|
653
|
+
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
|
654
|
+
inst.input.focus();
|
574
655
|
$.datepicker._curInst = inst;
|
575
656
|
}
|
576
657
|
},
|
577
658
|
|
578
659
|
/* Generate the date picker content. */
|
579
660
|
_updateDatepicker: function(inst) {
|
580
|
-
var dims = {width: inst.dpDiv.width() + 4,
|
581
|
-
height: inst.dpDiv.height() + 4};
|
582
661
|
var self = this;
|
662
|
+
var borders = $.datepicker._getBorders(inst.dpDiv);
|
583
663
|
inst.dpDiv.empty().append(this._generateHTML(inst))
|
584
|
-
.find('iframe.ui-datepicker-cover')
|
585
|
-
css({
|
664
|
+
.find('iframe.ui-datepicker-cover') // IE6- only
|
665
|
+
.css({left: -borders[0], top: -borders[1],
|
666
|
+
width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
|
586
667
|
.end()
|
587
668
|
.find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
|
588
669
|
.bind('mouseout', function(){
|
@@ -605,17 +686,28 @@ $.extend(Datepicker.prototype, {
|
|
605
686
|
var numMonths = this._getNumberOfMonths(inst);
|
606
687
|
var cols = numMonths[1];
|
607
688
|
var width = 17;
|
608
|
-
if (cols > 1)
|
689
|
+
if (cols > 1)
|
609
690
|
inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
|
610
|
-
|
691
|
+
else
|
611
692
|
inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
|
612
|
-
}
|
613
693
|
inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
|
614
694
|
'Class']('ui-datepicker-multi');
|
615
695
|
inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
|
616
696
|
'Class']('ui-datepicker-rtl');
|
617
|
-
if (inst.
|
618
|
-
|
697
|
+
if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
|
698
|
+
inst.input.is(':visible') && !inst.input.is(':disabled'))
|
699
|
+
inst.input.focus();
|
700
|
+
},
|
701
|
+
|
702
|
+
/* Retrieve the size of left and top borders for an element.
|
703
|
+
@param elem (jQuery object) the element of interest
|
704
|
+
@return (number[2]) the left and top borders */
|
705
|
+
_getBorders: function(elem) {
|
706
|
+
var convert = function(value) {
|
707
|
+
return {thin: 1, medium: 2, thick: 3}[value] || value;
|
708
|
+
};
|
709
|
+
return [parseFloat(convert(elem.css('border-left-width'))),
|
710
|
+
parseFloat(convert(elem.css('border-top-width')))];
|
619
711
|
},
|
620
712
|
|
621
713
|
/* Check positioning to remain on screen. */
|
@@ -624,54 +716,53 @@ $.extend(Datepicker.prototype, {
|
|
624
716
|
var dpHeight = inst.dpDiv.outerHeight();
|
625
717
|
var inputWidth = inst.input ? inst.input.outerWidth() : 0;
|
626
718
|
var inputHeight = inst.input ? inst.input.outerHeight() : 0;
|
627
|
-
var viewWidth =
|
628
|
-
var viewHeight =
|
719
|
+
var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
|
720
|
+
var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
|
629
721
|
|
630
722
|
offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
|
631
723
|
offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
|
632
724
|
offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
|
633
725
|
|
634
726
|
// now check if datepicker is showing outside window viewport - move to a better place if so.
|
635
|
-
offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
|
636
|
-
|
727
|
+
offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
|
728
|
+
Math.abs(offset.left + dpWidth - viewWidth) : 0);
|
729
|
+
offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
|
730
|
+
Math.abs(dpHeight + inputHeight) : 0);
|
637
731
|
|
638
732
|
return offset;
|
639
733
|
},
|
640
734
|
|
641
735
|
/* Find an object's position on the screen. */
|
642
736
|
_findPos: function(obj) {
|
737
|
+
var inst = this._getInst(obj);
|
738
|
+
var isRTL = this._get(inst, 'isRTL');
|
643
739
|
while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
|
644
|
-
obj = obj
|
740
|
+
obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
|
645
741
|
}
|
646
742
|
var position = $(obj).offset();
|
647
743
|
return [position.left, position.top];
|
648
744
|
},
|
649
745
|
|
650
746
|
/* Hide the date picker from view.
|
651
|
-
@param input element - the input field attached to the date picker
|
652
|
-
|
653
|
-
_hideDatepicker: function(input, duration) {
|
747
|
+
@param input element - the input field attached to the date picker */
|
748
|
+
_hideDatepicker: function(input) {
|
654
749
|
var inst = this._curInst;
|
655
750
|
if (!inst || (input && inst != $.data(input, PROP_NAME)))
|
656
751
|
return;
|
657
|
-
if (inst.stayOpen)
|
658
|
-
this._selectDate('#' + inst.id, this._formatDate(inst,
|
659
|
-
inst.currentDay, inst.currentMonth, inst.currentYear));
|
660
|
-
inst.stayOpen = false;
|
661
752
|
if (this._datepickerShowing) {
|
662
|
-
duration = (duration != null ? duration : this._get(inst, 'duration'));
|
663
753
|
var showAnim = this._get(inst, 'showAnim');
|
754
|
+
var duration = this._get(inst, 'duration');
|
664
755
|
var postProcess = function() {
|
665
756
|
$.datepicker._tidyDialog(inst);
|
757
|
+
this._curInst = null;
|
666
758
|
};
|
667
|
-
if (
|
668
|
-
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'),
|
669
|
-
duration, postProcess);
|
759
|
+
if ($.effects && $.effects[showAnim])
|
760
|
+
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
|
670
761
|
else
|
671
|
-
inst.dpDiv[(
|
672
|
-
(showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))
|
673
|
-
if (
|
674
|
-
|
762
|
+
inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
|
763
|
+
(showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
|
764
|
+
if (!showAnim)
|
765
|
+
postProcess();
|
675
766
|
var onClose = this._get(inst, 'onClose');
|
676
767
|
if (onClose)
|
677
768
|
onClose.apply((inst.input ? inst.input[0] : null),
|
@@ -687,7 +778,6 @@ $.extend(Datepicker.prototype, {
|
|
687
778
|
}
|
688
779
|
this._inDialog = false;
|
689
780
|
}
|
690
|
-
this._curInst = null;
|
691
781
|
},
|
692
782
|
|
693
783
|
/* Tidy up after a dialog display. */
|
@@ -700,11 +790,12 @@ $.extend(Datepicker.prototype, {
|
|
700
790
|
if (!$.datepicker._curInst)
|
701
791
|
return;
|
702
792
|
var $target = $(event.target);
|
703
|
-
if (
|
793
|
+
if ($target[0].id != $.datepicker._mainDivId &&
|
794
|
+
$target.parents('#' + $.datepicker._mainDivId).length == 0 &&
|
704
795
|
!$target.hasClass($.datepicker.markerClassName) &&
|
705
796
|
!$target.hasClass($.datepicker._triggerClass) &&
|
706
797
|
$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
|
707
|
-
$.datepicker._hideDatepicker(
|
798
|
+
$.datepicker._hideDatepicker();
|
708
799
|
},
|
709
800
|
|
710
801
|
/* Adjust one of the date sub-fields. */
|
@@ -730,10 +821,10 @@ $.extend(Datepicker.prototype, {
|
|
730
821
|
inst.drawYear = inst.selectedYear = inst.currentYear;
|
731
822
|
}
|
732
823
|
else {
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
824
|
+
var date = new Date();
|
825
|
+
inst.selectedDay = date.getDate();
|
826
|
+
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
827
|
+
inst.drawYear = inst.selectedYear = date.getFullYear();
|
737
828
|
}
|
738
829
|
this._notifyChange(inst);
|
739
830
|
this._adjustDate(target);
|
@@ -755,8 +846,11 @@ $.extend(Datepicker.prototype, {
|
|
755
846
|
_clickMonthYear: function(id) {
|
756
847
|
var target = $(id);
|
757
848
|
var inst = this._getInst(target[0]);
|
758
|
-
if (inst.input && inst._selectingMonthYear
|
759
|
-
|
849
|
+
if (inst.input && inst._selectingMonthYear) {
|
850
|
+
setTimeout(function() {
|
851
|
+
inst.input.focus();
|
852
|
+
}, 0);
|
853
|
+
}
|
760
854
|
inst._selectingMonthYear = !inst._selectingMonthYear;
|
761
855
|
},
|
762
856
|
|
@@ -770,24 +864,14 @@ $.extend(Datepicker.prototype, {
|
|
770
864
|
inst.selectedDay = inst.currentDay = $('a', td).html();
|
771
865
|
inst.selectedMonth = inst.currentMonth = month;
|
772
866
|
inst.selectedYear = inst.currentYear = year;
|
773
|
-
if (inst.stayOpen) {
|
774
|
-
inst.endDay = inst.endMonth = inst.endYear = null;
|
775
|
-
}
|
776
867
|
this._selectDate(id, this._formatDate(inst,
|
777
868
|
inst.currentDay, inst.currentMonth, inst.currentYear));
|
778
|
-
if (inst.stayOpen) {
|
779
|
-
inst.rangeStart = this._daylightSavingAdjust(
|
780
|
-
new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
|
781
|
-
this._updateDatepicker(inst);
|
782
|
-
}
|
783
869
|
},
|
784
870
|
|
785
871
|
/* Erase the input field and hide the date picker. */
|
786
872
|
_clearDate: function(id) {
|
787
873
|
var target = $(id);
|
788
874
|
var inst = this._getInst(target[0]);
|
789
|
-
inst.stayOpen = false;
|
790
|
-
inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null;
|
791
875
|
this._selectDate(target, '');
|
792
876
|
},
|
793
877
|
|
@@ -806,11 +890,11 @@ $.extend(Datepicker.prototype, {
|
|
806
890
|
inst.input.trigger('change'); // fire the change event
|
807
891
|
if (inst.inline)
|
808
892
|
this._updateDatepicker(inst);
|
809
|
-
else
|
810
|
-
this._hideDatepicker(
|
893
|
+
else {
|
894
|
+
this._hideDatepicker();
|
811
895
|
this._lastInput = inst.input[0];
|
812
896
|
if (typeof(inst.input[0]) != 'object')
|
813
|
-
inst.input
|
897
|
+
inst.input.focus(); // restore focus
|
814
898
|
this._lastInput = null;
|
815
899
|
}
|
816
900
|
},
|
@@ -821,7 +905,7 @@ $.extend(Datepicker.prototype, {
|
|
821
905
|
if (altField) { // update alternate field too
|
822
906
|
var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
|
823
907
|
var date = this._getDate(inst);
|
824
|
-
dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
|
908
|
+
var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
|
825
909
|
$(altField).each(function() { $(this).val(dateStr); });
|
826
910
|
}
|
827
911
|
},
|
@@ -838,20 +922,13 @@ $.extend(Datepicker.prototype, {
|
|
838
922
|
@param date Date - the date to get the week for
|
839
923
|
@return number - the number of the week within the year that contains this date */
|
840
924
|
iso8601Week: function(date) {
|
841
|
-
var checkDate = new Date(date.
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
} else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year
|
849
|
-
firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
|
850
|
-
if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary
|
851
|
-
return 1;
|
852
|
-
}
|
853
|
-
}
|
854
|
-
return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date
|
925
|
+
var checkDate = new Date(date.getTime());
|
926
|
+
// Find Thursday of this week starting on Monday
|
927
|
+
checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
|
928
|
+
var time = checkDate.getTime();
|
929
|
+
checkDate.setMonth(0); // Compare with Jan 1
|
930
|
+
checkDate.setDate(1);
|
931
|
+
return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
|
855
932
|
},
|
856
933
|
|
857
934
|
/* Parse a string value into a date object.
|
@@ -892,34 +969,25 @@ $.extend(Datepicker.prototype, {
|
|
892
969
|
// Extract a number from the string value
|
893
970
|
var getNumber = function(match) {
|
894
971
|
lookAhead(match);
|
895
|
-
var
|
896
|
-
|
897
|
-
var
|
898
|
-
|
899
|
-
|
900
|
-
num = num * 10 + parseInt(value.charAt(iValue++),10);
|
901
|
-
size--;
|
902
|
-
}
|
903
|
-
if (size == origSize)
|
972
|
+
var size = (match == '@' ? 14 : (match == '!' ? 20 :
|
973
|
+
(match == 'y' ? 4 : (match == 'o' ? 3 : 2))));
|
974
|
+
var digits = new RegExp('^\\d{1,' + size + '}');
|
975
|
+
var num = value.substring(iValue).match(digits);
|
976
|
+
if (!num)
|
904
977
|
throw 'Missing number at position ' + iValue;
|
905
|
-
|
978
|
+
iValue += num[0].length;
|
979
|
+
return parseInt(num[0], 10);
|
906
980
|
};
|
907
981
|
// Extract a name from the string value and convert to an index
|
908
982
|
var getName = function(match, shortNames, longNames) {
|
909
983
|
var names = (lookAhead(match) ? longNames : shortNames);
|
910
|
-
var
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
while (size > 0 && iValue < value.length) {
|
916
|
-
name += value.charAt(iValue++);
|
917
|
-
for (var i = 0; i < names.length; i++)
|
918
|
-
if (name == names[i])
|
919
|
-
return i + 1;
|
920
|
-
size--;
|
984
|
+
for (var i = 0; i < names.length; i++) {
|
985
|
+
if (value.substr(iValue, names[i].length) == names[i]) {
|
986
|
+
iValue += names[i].length;
|
987
|
+
return i + 1;
|
988
|
+
}
|
921
989
|
}
|
922
|
-
throw 'Unknown name at position ' +
|
990
|
+
throw 'Unknown name at position ' + iValue;
|
923
991
|
};
|
924
992
|
// Confirm that a literal character matches the string value
|
925
993
|
var checkLiteral = function() {
|
@@ -960,6 +1028,12 @@ $.extend(Datepicker.prototype, {
|
|
960
1028
|
month = date.getMonth() + 1;
|
961
1029
|
day = date.getDate();
|
962
1030
|
break;
|
1031
|
+
case '!':
|
1032
|
+
var date = new Date((getNumber('!') - this._ticksTo1970) / 10000);
|
1033
|
+
year = date.getFullYear();
|
1034
|
+
month = date.getMonth() + 1;
|
1035
|
+
day = date.getDate();
|
1036
|
+
break;
|
963
1037
|
case "'":
|
964
1038
|
if (lookAhead("'"))
|
965
1039
|
checkLiteral();
|
@@ -1002,9 +1076,13 @@ $.extend(Datepicker.prototype, {
|
|
1002
1076
|
RFC_1123: 'D, d M yy',
|
1003
1077
|
RFC_2822: 'D, d M yy',
|
1004
1078
|
RSS: 'D, d M y', // RFC 822
|
1079
|
+
TICKS: '!',
|
1005
1080
|
TIMESTAMP: '@',
|
1006
1081
|
W3C: 'yy-mm-dd', // ISO 8601
|
1007
1082
|
|
1083
|
+
_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
|
1084
|
+
Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
|
1085
|
+
|
1008
1086
|
/* Format a date object into a string value.
|
1009
1087
|
The format can be combinations of the following:
|
1010
1088
|
d - day of month (no leading zero)
|
@@ -1020,6 +1098,7 @@ $.extend(Datepicker.prototype, {
|
|
1020
1098
|
y - year (two digit)
|
1021
1099
|
yy - year (four digit)
|
1022
1100
|
@ - Unix timestamp (ms since 01/01/1970)
|
1101
|
+
! - Windows ticks (100ns since 01/01/0001)
|
1023
1102
|
'...' - literal text
|
1024
1103
|
'' - single quote
|
1025
1104
|
|
@@ -1075,10 +1154,8 @@ $.extend(Datepicker.prototype, {
|
|
1075
1154
|
output += formatName('D', date.getDay(), dayNamesShort, dayNames);
|
1076
1155
|
break;
|
1077
1156
|
case 'o':
|
1078
|
-
|
1079
|
-
|
1080
|
-
doy += this._getDaysInMonth(date.getFullYear(), m);
|
1081
|
-
output += formatNumber('o', doy, 3);
|
1157
|
+
output += formatNumber('o',
|
1158
|
+
(date.getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000, 3);
|
1082
1159
|
break;
|
1083
1160
|
case 'm':
|
1084
1161
|
output += formatNumber('m', date.getMonth() + 1, 2);
|
@@ -1093,6 +1170,9 @@ $.extend(Datepicker.prototype, {
|
|
1093
1170
|
case '@':
|
1094
1171
|
output += date.getTime();
|
1095
1172
|
break;
|
1173
|
+
case '!':
|
1174
|
+
output += date.getTime() * 10000 + this._ticksTo1970;
|
1175
|
+
break;
|
1096
1176
|
case "'":
|
1097
1177
|
if (lookAhead("'"))
|
1098
1178
|
output += "'";
|
@@ -1110,6 +1190,13 @@ $.extend(Datepicker.prototype, {
|
|
1110
1190
|
_possibleChars: function (format) {
|
1111
1191
|
var chars = '';
|
1112
1192
|
var literal = false;
|
1193
|
+
// Check whether a format character is doubled
|
1194
|
+
var lookAhead = function(match) {
|
1195
|
+
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
|
1196
|
+
if (matches)
|
1197
|
+
iFormat++;
|
1198
|
+
return matches;
|
1199
|
+
};
|
1113
1200
|
for (var iFormat = 0; iFormat < format.length; iFormat++)
|
1114
1201
|
if (literal)
|
1115
1202
|
if (format.charAt(iFormat) == "'" && !lookAhead("'"))
|
@@ -1142,17 +1229,20 @@ $.extend(Datepicker.prototype, {
|
|
1142
1229
|
},
|
1143
1230
|
|
1144
1231
|
/* Parse existing date and initialise date picker. */
|
1145
|
-
_setDateFromField: function(inst) {
|
1232
|
+
_setDateFromField: function(inst, noDefault) {
|
1233
|
+
if (inst.input.val() == inst.lastVal) {
|
1234
|
+
return;
|
1235
|
+
}
|
1146
1236
|
var dateFormat = this._get(inst, 'dateFormat');
|
1147
|
-
var dates = inst.input ? inst.input.val() : null;
|
1148
|
-
|
1149
|
-
|
1237
|
+
var dates = inst.lastVal = inst.input ? inst.input.val() : null;
|
1238
|
+
var date, defaultDate;
|
1239
|
+
date = defaultDate = this._getDefaultDate(inst);
|
1150
1240
|
var settings = this._getFormatConfig(inst);
|
1151
1241
|
try {
|
1152
1242
|
date = this.parseDate(dateFormat, dates, settings) || defaultDate;
|
1153
1243
|
} catch (event) {
|
1154
1244
|
this.log(event);
|
1155
|
-
|
1245
|
+
dates = (noDefault ? '' : dates);
|
1156
1246
|
}
|
1157
1247
|
inst.selectedDay = date.getDate();
|
1158
1248
|
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
@@ -1165,23 +1255,27 @@ $.extend(Datepicker.prototype, {
|
|
1165
1255
|
|
1166
1256
|
/* Retrieve the default date shown on opening. */
|
1167
1257
|
_getDefaultDate: function(inst) {
|
1168
|
-
|
1169
|
-
|
1170
|
-
var maxDate = this._getMinMaxDate(inst, 'max');
|
1171
|
-
date = (minDate && date < minDate ? minDate : date);
|
1172
|
-
date = (maxDate && date > maxDate ? maxDate : date);
|
1173
|
-
return date;
|
1258
|
+
return this._restrictMinMax(inst,
|
1259
|
+
this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
|
1174
1260
|
},
|
1175
1261
|
|
1176
1262
|
/* A date may be specified as an exact value or a relative one. */
|
1177
|
-
_determineDate: function(date, defaultDate) {
|
1263
|
+
_determineDate: function(inst, date, defaultDate) {
|
1178
1264
|
var offsetNumeric = function(offset) {
|
1179
1265
|
var date = new Date();
|
1180
1266
|
date.setDate(date.getDate() + offset);
|
1181
1267
|
return date;
|
1182
1268
|
};
|
1183
|
-
var offsetString = function(offset
|
1184
|
-
|
1269
|
+
var offsetString = function(offset) {
|
1270
|
+
try {
|
1271
|
+
return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
|
1272
|
+
offset, $.datepicker._getFormatConfig(inst));
|
1273
|
+
}
|
1274
|
+
catch (e) {
|
1275
|
+
// Ignore
|
1276
|
+
}
|
1277
|
+
var date = (offset.toLowerCase().match(/^c/) ?
|
1278
|
+
$.datepicker._getDate(inst) : null) || new Date();
|
1185
1279
|
var year = date.getFullYear();
|
1186
1280
|
var month = date.getMonth();
|
1187
1281
|
var day = date.getDate();
|
@@ -1195,19 +1289,18 @@ $.extend(Datepicker.prototype, {
|
|
1195
1289
|
day += parseInt(matches[1],10) * 7; break;
|
1196
1290
|
case 'm' : case 'M' :
|
1197
1291
|
month += parseInt(matches[1],10);
|
1198
|
-
day = Math.min(day,
|
1292
|
+
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
|
1199
1293
|
break;
|
1200
1294
|
case 'y': case 'Y' :
|
1201
1295
|
year += parseInt(matches[1],10);
|
1202
|
-
day = Math.min(day,
|
1296
|
+
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
|
1203
1297
|
break;
|
1204
1298
|
}
|
1205
1299
|
matches = pattern.exec(offset);
|
1206
1300
|
}
|
1207
1301
|
return new Date(year, month, day);
|
1208
1302
|
};
|
1209
|
-
date = (date == null ? defaultDate :
|
1210
|
-
(typeof date == 'string' ? offsetString(date, this._getDaysInMonth) :
|
1303
|
+
date = (date == null ? defaultDate : (typeof date == 'string' ? offsetString(date) :
|
1211
1304
|
(typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date)));
|
1212
1305
|
date = (date && date.toString() == 'Invalid Date' ? defaultDate : date);
|
1213
1306
|
if (date) {
|
@@ -1232,15 +1325,15 @@ $.extend(Datepicker.prototype, {
|
|
1232
1325
|
},
|
1233
1326
|
|
1234
1327
|
/* Set the date(s) directly. */
|
1235
|
-
_setDate: function(inst, date,
|
1328
|
+
_setDate: function(inst, date, noChange) {
|
1236
1329
|
var clear = !(date);
|
1237
1330
|
var origMonth = inst.selectedMonth;
|
1238
1331
|
var origYear = inst.selectedYear;
|
1239
|
-
date = this._determineDate(date, new Date());
|
1332
|
+
date = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
|
1240
1333
|
inst.selectedDay = inst.currentDay = date.getDate();
|
1241
1334
|
inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
|
1242
1335
|
inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
|
1243
|
-
if (origMonth != inst.selectedMonth || origYear != inst.selectedYear)
|
1336
|
+
if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
|
1244
1337
|
this._notifyChange(inst);
|
1245
1338
|
this._adjustInstDate(inst);
|
1246
1339
|
if (inst.input) {
|
@@ -1268,11 +1361,10 @@ $.extend(Datepicker.prototype, {
|
|
1268
1361
|
var numMonths = this._getNumberOfMonths(inst);
|
1269
1362
|
var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
|
1270
1363
|
var stepMonths = this._get(inst, 'stepMonths');
|
1271
|
-
var stepBigMonths = this._get(inst, 'stepBigMonths');
|
1272
1364
|
var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
|
1273
1365
|
var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
|
1274
1366
|
new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
|
1275
|
-
var minDate = this._getMinMaxDate(inst, 'min'
|
1367
|
+
var minDate = this._getMinMaxDate(inst, 'min');
|
1276
1368
|
var maxDate = this._getMinMaxDate(inst, 'max');
|
1277
1369
|
var drawMonth = inst.drawMonth - showCurrentAtPos;
|
1278
1370
|
var drawYear = inst.drawYear;
|
@@ -1282,7 +1374,7 @@ $.extend(Datepicker.prototype, {
|
|
1282
1374
|
}
|
1283
1375
|
if (maxDate) {
|
1284
1376
|
var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
|
1285
|
-
maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate()));
|
1377
|
+
maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
|
1286
1378
|
maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
|
1287
1379
|
while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
|
1288
1380
|
drawMonth--;
|
@@ -1299,7 +1391,8 @@ $.extend(Datepicker.prototype, {
|
|
1299
1391
|
this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
|
1300
1392
|
this._getFormatConfig(inst)));
|
1301
1393
|
var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
|
1302
|
-
'<a class="ui-datepicker-prev ui-corner-all" onclick="
|
1394
|
+
'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
1395
|
+
'.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
|
1303
1396
|
' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
|
1304
1397
|
(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
|
1305
1398
|
var nextText = this._get(inst, 'nextText');
|
@@ -1307,19 +1400,23 @@ $.extend(Datepicker.prototype, {
|
|
1307
1400
|
this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
|
1308
1401
|
this._getFormatConfig(inst)));
|
1309
1402
|
var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
|
1310
|
-
'<a class="ui-datepicker-next ui-corner-all" onclick="
|
1403
|
+
'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
1404
|
+
'.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
|
1311
1405
|
' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
|
1312
1406
|
(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
|
1313
1407
|
var currentText = this._get(inst, 'currentText');
|
1314
1408
|
var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
|
1315
1409
|
currentText = (!navigationAsDateFormat ? currentText :
|
1316
1410
|
this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
|
1317
|
-
var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="
|
1411
|
+
var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
1412
|
+
'.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
|
1318
1413
|
var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
|
1319
|
-
(this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="
|
1414
|
+
(this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
1415
|
+
'.datepicker._gotoToday(\'#' + inst.id + '\');"' +
|
1320
1416
|
'>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
|
1321
1417
|
var firstDay = parseInt(this._get(inst, 'firstDay'),10);
|
1322
1418
|
firstDay = (isNaN(firstDay) ? 0 : firstDay);
|
1419
|
+
var showWeek = this._get(inst, 'showWeek');
|
1323
1420
|
var dayNames = this._get(inst, 'dayNames');
|
1324
1421
|
var dayNamesShort = this._get(inst, 'dayNamesShort');
|
1325
1422
|
var dayNamesMin = this._get(inst, 'dayNamesMin');
|
@@ -1327,9 +1424,8 @@ $.extend(Datepicker.prototype, {
|
|
1327
1424
|
var monthNamesShort = this._get(inst, 'monthNamesShort');
|
1328
1425
|
var beforeShowDay = this._get(inst, 'beforeShowDay');
|
1329
1426
|
var showOtherMonths = this._get(inst, 'showOtherMonths');
|
1427
|
+
var selectOtherMonths = this._get(inst, 'selectOtherMonths');
|
1330
1428
|
var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
|
1331
|
-
var endDate = inst.endDay ? this._daylightSavingAdjust(
|
1332
|
-
new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate;
|
1333
1429
|
var defaultDate = this._getDefaultDate(inst);
|
1334
1430
|
var html = '';
|
1335
1431
|
for (var row = 0; row < numMonths[0]; row++) {
|
@@ -1339,22 +1435,25 @@ $.extend(Datepicker.prototype, {
|
|
1339
1435
|
var cornerClass = ' ui-corner-all';
|
1340
1436
|
var calender = '';
|
1341
1437
|
if (isMultiMonth) {
|
1342
|
-
calender += '<div class="ui-datepicker-group
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1438
|
+
calender += '<div class="ui-datepicker-group';
|
1439
|
+
if (numMonths[1] > 1)
|
1440
|
+
switch (col) {
|
1441
|
+
case 0: calender += ' ui-datepicker-group-first';
|
1442
|
+
cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
|
1443
|
+
case numMonths[1]-1: calender += ' ui-datepicker-group-last';
|
1444
|
+
cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
|
1445
|
+
default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
|
1446
|
+
}
|
1348
1447
|
calender += '">';
|
1349
1448
|
}
|
1350
1449
|
calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
|
1351
1450
|
(/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
|
1352
1451
|
(/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
|
1353
1452
|
this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
|
1354
|
-
|
1453
|
+
row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
|
1355
1454
|
'</div><table class="ui-datepicker-calendar"><thead>' +
|
1356
1455
|
'<tr>';
|
1357
|
-
var thead = '';
|
1456
|
+
var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '');
|
1358
1457
|
for (var dow = 0; dow < 7; dow++) { // days of the week
|
1359
1458
|
var day = (dow + firstDay) % 7;
|
1360
1459
|
thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
|
@@ -1369,12 +1468,13 @@ $.extend(Datepicker.prototype, {
|
|
1369
1468
|
var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
|
1370
1469
|
for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
|
1371
1470
|
calender += '<tr>';
|
1372
|
-
var tbody = ''
|
1471
|
+
var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' +
|
1472
|
+
this._get(inst, 'calculateWeek')(printDate) + '</td>');
|
1373
1473
|
for (var dow = 0; dow < 7; dow++) { // create date picker days
|
1374
1474
|
var daySettings = (beforeShowDay ?
|
1375
1475
|
beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
|
1376
1476
|
var otherMonth = (printDate.getMonth() != drawMonth);
|
1377
|
-
var unselectable = otherMonth || !daySettings[0] ||
|
1477
|
+
var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
|
1378
1478
|
(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
|
1379
1479
|
tbody += '<td class="' +
|
1380
1480
|
((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
|
@@ -1385,18 +1485,17 @@ $.extend(Datepicker.prototype, {
|
|
1385
1485
|
' ' + this._dayOverClass : '') + // highlight selected day
|
1386
1486
|
(unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
|
1387
1487
|
(otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
|
1388
|
-
(printDate.getTime()
|
1389
|
-
' ' + this._currentClass : '') + // highlight selected day
|
1488
|
+
(printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
|
1390
1489
|
(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
|
1391
1490
|
((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
|
1392
|
-
(unselectable ? '' : ' onclick="
|
1393
|
-
inst.id + '\',' +
|
1394
|
-
(otherMonth
|
1491
|
+
(unselectable ? '' : ' onclick="DP_jQuery_' + dpuuid + '.datepicker._selectDay(\'#' +
|
1492
|
+
inst.id + '\',' + printDate.getMonth() + ',' + printDate.getFullYear() + ', this);return false;"') + '>' + // actions
|
1493
|
+
(otherMonth && !showOtherMonths ? ' ' : // display for other months
|
1395
1494
|
(unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
|
1396
1495
|
(printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
|
1397
|
-
(printDate.getTime()
|
1398
|
-
' ui-
|
1399
|
-
'" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display
|
1496
|
+
(printDate.getTime() == selectedDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
|
1497
|
+
(otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
|
1498
|
+
'" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
|
1400
1499
|
printDate.setDate(printDate.getDate() + 1);
|
1401
1500
|
printDate = this._daylightSavingAdjust(printDate);
|
1402
1501
|
}
|
@@ -1421,8 +1520,7 @@ $.extend(Datepicker.prototype, {
|
|
1421
1520
|
|
1422
1521
|
/* Generate the month and year header. */
|
1423
1522
|
_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
|
1424
|
-
|
1425
|
-
minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
|
1523
|
+
secondary, monthNames, monthNamesShort) {
|
1426
1524
|
var changeMonth = this._get(inst, 'changeMonth');
|
1427
1525
|
var changeYear = this._get(inst, 'changeYear');
|
1428
1526
|
var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
|
@@ -1430,13 +1528,13 @@ $.extend(Datepicker.prototype, {
|
|
1430
1528
|
var monthHtml = '';
|
1431
1529
|
// month selection
|
1432
1530
|
if (secondary || !changeMonth)
|
1433
|
-
monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>
|
1531
|
+
monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
|
1434
1532
|
else {
|
1435
1533
|
var inMinYear = (minDate && minDate.getFullYear() == drawYear);
|
1436
1534
|
var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
|
1437
1535
|
monthHtml += '<select class="ui-datepicker-month" ' +
|
1438
|
-
'onchange="
|
1439
|
-
'onclick="
|
1536
|
+
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
|
1537
|
+
'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
|
1440
1538
|
'>';
|
1441
1539
|
for (var month = 0; month < 12; month++) {
|
1442
1540
|
if ((!inMinYear || month >= minDate.getMonth()) &&
|
@@ -1448,30 +1546,27 @@ $.extend(Datepicker.prototype, {
|
|
1448
1546
|
monthHtml += '</select>';
|
1449
1547
|
}
|
1450
1548
|
if (!showMonthAfterYear)
|
1451
|
-
html += monthHtml + (
|
1549
|
+
html += monthHtml + (secondary || !(changeMonth && changeYear) ? ' ' : '');
|
1452
1550
|
// year selection
|
1453
1551
|
if (secondary || !changeYear)
|
1454
1552
|
html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
|
1455
1553
|
else {
|
1456
1554
|
// determine range of years to display
|
1457
1555
|
var years = this._get(inst, 'yearRange').split(':');
|
1458
|
-
var
|
1459
|
-
var
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
year = parseInt(years[0], 10);
|
1468
|
-
endYear = parseInt(years[1], 10);
|
1469
|
-
}
|
1556
|
+
var thisYear = new Date().getFullYear();
|
1557
|
+
var determineYear = function(value) {
|
1558
|
+
var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :
|
1559
|
+
(value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :
|
1560
|
+
parseInt(value, 10)));
|
1561
|
+
return (isNaN(year) ? thisYear : year);
|
1562
|
+
};
|
1563
|
+
var year = determineYear(years[0]);
|
1564
|
+
var endYear = Math.max(year, determineYear(years[1] || ''));
|
1470
1565
|
year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
|
1471
1566
|
endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
|
1472
1567
|
html += '<select class="ui-datepicker-year" ' +
|
1473
|
-
'onchange="
|
1474
|
-
'onclick="
|
1568
|
+
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
|
1569
|
+
'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
|
1475
1570
|
'>';
|
1476
1571
|
for (; year <= endYear; year++) {
|
1477
1572
|
html += '<option value="' + year + '"' +
|
@@ -1480,8 +1575,9 @@ $.extend(Datepicker.prototype, {
|
|
1480
1575
|
}
|
1481
1576
|
html += '</select>';
|
1482
1577
|
}
|
1578
|
+
html += this._get(inst, 'yearSuffix');
|
1483
1579
|
if (showMonthAfterYear)
|
1484
|
-
html += (secondary || changeMonth
|
1580
|
+
html += (secondary || !(changeMonth && changeYear) ? ' ' : '') + monthHtml;
|
1485
1581
|
html += '</div>'; // Close datepicker_header
|
1486
1582
|
return html;
|
1487
1583
|
},
|
@@ -1492,12 +1588,8 @@ $.extend(Datepicker.prototype, {
|
|
1492
1588
|
var month = inst.drawMonth + (period == 'M' ? offset : 0);
|
1493
1589
|
var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
|
1494
1590
|
(period == 'D' ? offset : 0);
|
1495
|
-
var date = this.
|
1496
|
-
|
1497
|
-
var minDate = this._getMinMaxDate(inst, 'min', true);
|
1498
|
-
var maxDate = this._getMinMaxDate(inst, 'max');
|
1499
|
-
date = (minDate && date < minDate ? minDate : date);
|
1500
|
-
date = (maxDate && date > maxDate ? maxDate : date);
|
1591
|
+
var date = this._restrictMinMax(inst,
|
1592
|
+
this._daylightSavingAdjust(new Date(year, month, day)));
|
1501
1593
|
inst.selectedDay = date.getDate();
|
1502
1594
|
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
1503
1595
|
inst.drawYear = inst.selectedYear = date.getFullYear();
|
@@ -1505,6 +1597,15 @@ $.extend(Datepicker.prototype, {
|
|
1505
1597
|
this._notifyChange(inst);
|
1506
1598
|
},
|
1507
1599
|
|
1600
|
+
/* Ensure a date is within any min/max bounds. */
|
1601
|
+
_restrictMinMax: function(inst, date) {
|
1602
|
+
var minDate = this._getMinMaxDate(inst, 'min');
|
1603
|
+
var maxDate = this._getMinMaxDate(inst, 'max');
|
1604
|
+
date = (minDate && date < minDate ? minDate : date);
|
1605
|
+
date = (maxDate && date > maxDate ? maxDate : date);
|
1606
|
+
return date;
|
1607
|
+
},
|
1608
|
+
|
1508
1609
|
/* Notify change of month/year. */
|
1509
1610
|
_notifyChange: function(inst) {
|
1510
1611
|
var onChange = this._get(inst, 'onChangeMonthYear');
|
@@ -1519,11 +1620,9 @@ $.extend(Datepicker.prototype, {
|
|
1519
1620
|
return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
|
1520
1621
|
},
|
1521
1622
|
|
1522
|
-
/* Determine the current maximum date - ensure no time components are set
|
1523
|
-
_getMinMaxDate: function(inst, minMax
|
1524
|
-
|
1525
|
-
return (!checkRange || !inst.rangeStart ? date :
|
1526
|
-
(!date || inst.rangeStart > date ? inst.rangeStart : date));
|
1623
|
+
/* Determine the current maximum date - ensure no time components are set. */
|
1624
|
+
_getMinMaxDate: function(inst, minMax) {
|
1625
|
+
return this._determineDate(inst, this._get(inst, minMax + 'Date'), null);
|
1527
1626
|
},
|
1528
1627
|
|
1529
1628
|
/* Find the number of days in a given month. */
|
@@ -1539,8 +1638,8 @@ $.extend(Datepicker.prototype, {
|
|
1539
1638
|
/* Determines if we should allow a "next/prev" month display change. */
|
1540
1639
|
_canAdjustMonth: function(inst, offset, curYear, curMonth) {
|
1541
1640
|
var numMonths = this._getNumberOfMonths(inst);
|
1542
|
-
var date = this._daylightSavingAdjust(new Date(
|
1543
|
-
|
1641
|
+
var date = this._daylightSavingAdjust(new Date(curYear,
|
1642
|
+
curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
|
1544
1643
|
if (offset < 0)
|
1545
1644
|
date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
|
1546
1645
|
return this._isInRange(inst, date);
|
@@ -1548,13 +1647,10 @@ $.extend(Datepicker.prototype, {
|
|
1548
1647
|
|
1549
1648
|
/* Is the given date in the accepted range? */
|
1550
1649
|
_isInRange: function(inst, date) {
|
1551
|
-
|
1552
|
-
var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust(
|
1553
|
-
new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay)));
|
1554
|
-
newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate);
|
1555
|
-
var minDate = newMinDate || this._getMinMaxDate(inst, 'min');
|
1650
|
+
var minDate = this._getMinMaxDate(inst, 'min');
|
1556
1651
|
var maxDate = this._getMinMaxDate(inst, 'max');
|
1557
|
-
return ((!minDate || date >= minDate) &&
|
1652
|
+
return ((!minDate || date.getTime() >= minDate.getTime()) &&
|
1653
|
+
(!maxDate || date.getTime() <= maxDate.getTime()));
|
1558
1654
|
},
|
1559
1655
|
|
1560
1656
|
/* Provide the configuration settings for formatting/parsing. */
|
@@ -1610,7 +1706,7 @@ $.fn.datepicker = function(options){
|
|
1610
1706
|
}
|
1611
1707
|
|
1612
1708
|
var otherArgs = Array.prototype.slice.call(arguments, 1);
|
1613
|
-
if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate'))
|
1709
|
+
if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
|
1614
1710
|
return $.datepicker['_' + options + 'Datepicker'].
|
1615
1711
|
apply($.datepicker, [this[0]].concat(otherArgs));
|
1616
1712
|
if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
|
@@ -1627,10 +1723,10 @@ $.fn.datepicker = function(options){
|
|
1627
1723
|
$.datepicker = new Datepicker(); // singleton instance
|
1628
1724
|
$.datepicker.initialized = false;
|
1629
1725
|
$.datepicker.uuid = new Date().getTime();
|
1630
|
-
$.datepicker.version = "1.
|
1726
|
+
$.datepicker.version = "1.8.4";
|
1631
1727
|
|
1632
1728
|
// Workaround for #4055
|
1633
1729
|
// Add another global to avoid noConflict issues with inline event handlers
|
1634
|
-
window
|
1730
|
+
window['DP_jQuery_' + dpuuid] = $;
|
1635
1731
|
|
1636
1732
|
})(jQuery);
|