backlog 0.37.2 → 0.41.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/History.txt +128 -0
- data/README.txt +4 -2
- data/bin/backlog +1 -1
- data/lib/array_helper.rb +4 -4
- data/{vendor/plugins → lib}/backlog_jira/README +0 -0
- data/{vendor/plugins → lib}/backlog_jira/Rakefile +0 -0
- data/{vendor/plugins → lib}/backlog_jira/generators/backlog_jira/backlog_jira_generator.rb +0 -0
- data/{vendor/plugins → lib}/backlog_jira/generators/backlog_jira/templates/migration.rb +0 -0
- data/{vendor/plugins → lib}/backlog_jira/generators/history_model/history_model_generator.rb +0 -0
- data/{vendor/plugins → lib}/backlog_jira/generators/history_model/templates/fixtures.yml +0 -0
- data/{vendor/plugins → lib}/backlog_jira/generators/history_model/templates/functional_test.rb +0 -0
- data/{vendor/plugins → lib}/backlog_jira/generators/history_model/templates/model.rb +0 -0
- data/{vendor/plugins → lib}/backlog_jira/generators/history_model/templates/unit_test.rb +0 -0
- data/lib/backlog_jira/init.rb +66 -0
- data/{vendor/plugins → lib}/backlog_jira/install.rb +0 -0
- data/{vendor/plugins → lib}/backlog_jira/lib/backlog_jira.rb +0 -0
- data/{vendor/plugins → lib}/backlog_jira/lib/tasks/backlog_jira_tasks.rake +0 -0
- data/{vendor/plugins → lib}/backlog_jira/test/backlog_jira_test.rb +0 -0
- data/{vendor/plugins → lib}/backlog_jira/uninstall.rb +0 -0
- data/lib/big_decimal_yaml_fix.rb +16 -25
- data/lib/tasks/backup.rake +18 -18
- data/lib/time_extras.rb +6 -6
- data/lib/user_system.rb +41 -38
- data/lib/version_from_history.rb +2 -2
- metadata +196 -749
- data/Capfile +0 -2
- data/Gemfile +0 -34
- data/Gemfile.lock +0 -139
- data/MODIFICATIONS.txt +0 -13
- data/Manifest.txt +0 -0
- data/README_LOGIN_SUGAR +0 -194
- data/Rakefile +0 -73
- data/Rakefile~ +0 -73
- data/Screenshot.png +0 -0
- data/app/controllers/absences_controller.rb +0 -67
- data/app/controllers/application_controller.rb +0 -185
- data/app/controllers/application_controller.rb.rails2 +0 -186
- data/app/controllers/customers_controller.rb +0 -51
- data/app/controllers/dashboard_controller.rb +0 -17
- data/app/controllers/estimates_controller.rb +0 -49
- data/app/controllers/groups_controller.rb +0 -65
- data/app/controllers/parties_controller.rb +0 -33
- data/app/controllers/periods_controller.rb +0 -242
- data/app/controllers/projects_controller.rb +0 -185
- data/app/controllers/public_holidays_controller.rb +0 -70
- data/app/controllers/search_controller.rb +0 -15
- data/app/controllers/task_files_controller.rb +0 -19
- data/app/controllers/tasks_controller.rb +0 -305
- data/app/controllers/user_controller.rb +0 -251
- data/app/controllers/welcome_controller.rb +0 -29
- data/app/controllers/work_locks_controller.rb +0 -88
- data/app/controllers/works_controller.rb +0 -383
- data/app/helpers/absences_helper.rb +0 -2
- data/app/helpers/application_helper.rb +0 -119
- data/app/helpers/application_helper.rb.rails2 +0 -118
- data/app/helpers/customers_helper.rb +0 -2
- data/app/helpers/dashboard_helper.rb +0 -2
- data/app/helpers/estimates_helper.rb +0 -2
- data/app/helpers/groups_helper.rb +0 -2
- data/app/helpers/parties_helper.rb +0 -2
- data/app/helpers/periods_helper.rb +0 -57
- data/app/helpers/projects_helper.rb +0 -74
- data/app/helpers/public_holidays_helper.rb +0 -2
- data/app/helpers/search_helper.rb +0 -2
- data/app/helpers/task_files_helper.rb +0 -2
- data/app/helpers/tasks_helper.rb +0 -2
- data/app/helpers/user_helper.rb +0 -53
- data/app/helpers/welcome_helper.rb +0 -2
- data/app/helpers/work_locks_helper.rb +0 -2
- data/app/helpers/works_helper.rb +0 -5
- data/app/mailers/user_notify.rb +0 -76
- data/app/models/absence.rb +0 -27
- data/app/models/chart.rb +0 -5
- data/app/models/clock.rb +0 -14
- data/app/models/configuration.rb +0 -2
- data/app/models/customer.rb +0 -2
- data/app/models/estimate.rb +0 -17
- data/app/models/group.rb +0 -16
- data/app/models/party.rb +0 -27
- data/app/models/period.rb +0 -251
- data/app/models/project.rb +0 -49
- data/app/models/public_holiday.rb +0 -13
- data/app/models/report_filter.rb +0 -29
- data/app/models/search_result.rb +0 -8
- data/app/models/sidebar.rb +0 -41
- data/app/models/task.rb +0 -425
- data/app/models/task_file.rb +0 -7
- data/app/models/task_notify.rb +0 -27
- data/app/models/user.rb +0 -146
- data/app/models/work.rb +0 -191
- data/app/models/work_lock.rb +0 -11
- data/app/models/work_lock_nagger.rb +0 -60
- data/app/models/work_lock_notify.rb +0 -43
- data/app/models/works_report_filter.rb +0 -27
- data/app/views/absences/_form.rhtml +0 -10
- data/app/views/absences/edit.rhtml +0 -9
- data/app/views/absences/list.rhtml +0 -25
- data/app/views/absences/new.rhtml +0 -8
- data/app/views/absences/show.rhtml +0 -8
- data/app/views/customers/_form.rhtml +0 -7
- data/app/views/customers/_name_list.rhtml +0 -5
- data/app/views/customers/edit.rhtml +0 -9
- data/app/views/customers/list.rhtml +0 -28
- data/app/views/customers/new.rhtml +0 -8
- data/app/views/customers/show.rhtml +0 -8
- data/app/views/dashboard/show.rhtml +0 -24
- data/app/views/display_notice.rjs +0 -1
- data/app/views/groups/_form.rhtml +0 -7
- data/app/views/groups/edit.rhtml +0 -57
- data/app/views/groups/list.rhtml +0 -26
- data/app/views/groups/new.rhtml +0 -7
- data/app/views/groups/set_member.rjs +0 -1
- data/app/views/layouts/_headers.rhtml +0 -24
- data/app/views/layouts/_left_top.rhtml +0 -33
- data/app/views/layouts/_notice.rhtml +0 -12
- data/app/views/layouts/_shortcuts.rhtml +0 -22
- data/app/views/layouts/_shortcuts_js.rhtml +0 -19
- data/app/views/layouts/mwrt002.html.erb +0 -44
- data/app/views/layouts/wide.rhtml +0 -23
- data/app/views/periods/_burn_down_chart.rhtml +0 -9
- data/app/views/periods/_form.rhtml +0 -74
- data/app/views/periods/_link.rhtml +0 -3
- data/app/views/periods/_show_active.rhtml +0 -61
- data/app/views/periods/_sidebar_block.rhtml +0 -11
- data/app/views/periods/_title.rhtml +0 -18
- data/app/views/periods/edit.rhtml +0 -10
- data/app/views/periods/finish_task.rjs +0 -4
- data/app/views/periods/move_task_to_period.rjs +0 -4
- data/app/views/periods/new.rhtml +0 -9
- data/app/views/periods/order.rjs +0 -0
- data/app/views/periods/reopen_task.rjs +0 -6
- data/app/views/periods/show.rhtml +0 -56
- data/app/views/projects/_buttons.rhtml +0 -4
- data/app/views/projects/_form.rhtml +0 -44
- data/app/views/projects/_name_list.rhtml +0 -5
- data/app/views/projects/edit.rhtml +0 -14
- data/app/views/projects/finish_task.rjs +0 -3
- data/app/views/projects/list.rhtml +0 -16
- data/app/views/projects/move_task_to_period.rjs +0 -3
- data/app/views/projects/new.rhtml +0 -11
- data/app/views/projects/reopen_task.rjs +0 -3
- data/app/views/projects/show.rhtml +0 -39
- data/app/views/public_holidays/_form.rhtml +0 -7
- data/app/views/public_holidays/edit.rhtml +0 -9
- data/app/views/public_holidays/list.rhtml +0 -25
- data/app/views/public_holidays/new.rhtml +0 -8
- data/app/views/public_holidays/show.rhtml +0 -8
- data/app/views/redirect.rjs +0 -1
- data/app/views/search/results.rhtml +0 -40
- data/app/views/task_notify/invite.en.html.erb +0 -13
- data/app/views/task_notify/invite.no.html.erb +0 -13
- data/app/views/tasks/_backlog_header.rhtml +0 -17
- data/app/views/tasks/_completed.rhtml +0 -18
- data/app/views/tasks/_fields_header.rhtml +0 -13
- data/app/views/tasks/_form.rhtml +0 -125
- data/app/views/tasks/_invite.rjs +0 -1
- data/app/views/tasks/_period_header.rhtml +0 -1
- data/app/views/tasks/_task.rhtml +0 -116
- data/app/views/tasks/_update.rjs +0 -2
- data/app/views/tasks/edit.rhtml +0 -81
- data/app/views/tasks/grab.rhtml +0 -9
- data/app/views/tasks/invite.rhtml +0 -9
- data/app/views/tasks/list.rhtml +0 -77
- data/app/views/tasks/list_started.rhtml +0 -62
- data/app/views/tasks/new.rhtml +0 -10
- data/app/views/tasks/notes.rhtml +0 -12
- data/app/views/tasks/start_work.rjs +0 -1
- data/app/views/tasks/update_estimate.rjs +0 -3
- data/app/views/user/_edit.rhtml +0 -31
- data/app/views/user/_password.rhtml +0 -21
- data/app/views/user/change_password.rhtml +0 -19
- data/app/views/user/delete.rhtml +0 -14
- data/app/views/user/edit.rhtml +0 -154
- data/app/views/user/forgot_password.rhtml +0 -19
- data/app/views/user/login.rhtml +0 -33
- data/app/views/user/logout.rhtml +0 -8
- data/app/views/user/set_group.rjs +0 -1
- data/app/views/user/signup.rhtml +0 -15
- data/app/views/user/toggle_work_lock_monitoring.rjs +0 -2
- data/app/views/user/welcome.rhtml +0 -8
- data/app/views/user_notify/change_password.en.html.erb +0 -10
- data/app/views/user_notify/change_password.no.html.erb +0 -10
- data/app/views/user_notify/forgot_password.en.html.erb +0 -11
- data/app/views/user_notify/forgot_password.no.html.erb +0 -11
- data/app/views/user_notify/monitoring.en.html.erb +0 -3
- data/app/views/user_notify/monitoring.no.html.erb +0 -3
- data/app/views/user_notify/monitoring_invitation.en.html.erb +0 -7
- data/app/views/user_notify/monitoring_invitation.no.html.erb +0 -7
- data/app/views/user_notify/signup.en.html.erb +0 -12
- data/app/views/user_notify/signup.no.html.erb +0 -12
- data/app/views/work_lock_notify/lock.en.html.erb +0 -7
- data/app/views/work_lock_notify/lock.no.html.erb +0 -7
- data/app/views/work_lock_notify/nag.en.html.erb +0 -6
- data/app/views/work_lock_notify/nag.no.html.erb +0 -7
- data/app/views/work_locks/_form.rhtml +0 -10
- data/app/views/work_locks/edit.rhtml +0 -9
- data/app/views/work_locks/list.rhtml +0 -25
- data/app/views/work_locks/new.rhtml +0 -8
- data/app/views/work_locks/show.rhtml +0 -8
- data/app/views/works/_buttons.rhtml +0 -2
- data/app/views/works/_description_list.rhtml +0 -5
- data/app/views/works/_form.rhtml +0 -107
- data/app/views/works/_new_row.rhtml +0 -141
- data/app/views/works/_row.rhtml +0 -115
- data/app/views/works/_row_field.rhtml +0 -17
- data/app/views/works/_task_id_list.rhtml +0 -5
- data/app/views/works/_weekly_work_sheet_buttons.rhtml +0 -22
- data/app/views/works/daily_work_sheet.rhtml +0 -108
- data/app/views/works/edit.rhtml +0 -11
- data/app/views/works/list.rhtml +0 -148
- data/app/views/works/list_excel.rhtml +0 -114
- data/app/views/works/new.rhtml +0 -12
- data/app/views/works/show.rhtml +0 -10
- data/app/views/works/timeliste.rhtml +0 -884
- data/app/views/works/update_new_row.rjs +0 -28
- data/app/views/works/update_row.rjs +0 -18
- data/app/views/works/update_time.rjs +0 -3
- data/app/views/works/weekly_work_sheet.rhtml +0 -64
- data/app/views/works/weekly_work_sheet_details.rhtml +0 -102
- data/backlog.gemspec +0 -44
- data/config.ru +0 -4
- data/config/application.rb +0 -11
- data/config/boot.rb +0 -13
- data/config/database.yml +0 -15
- data/config/database.yml~ +0 -17
- data/config/environment.rb +0 -100
- data/config/environments/development.rb +0 -30
- data/config/environments/development.rb.rails2 +0 -26
- data/config/environments/production.rb +0 -33
- data/config/environments/test.rb +0 -24
- data/config/environments/user_environment.rb +0 -21
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/inflections.rb +0 -10
- data/config/initializers/jdbc.rb +0 -7
- data/config/initializers/mime_types.rb +0 -5
- data/config/initializers/secret_token.rb +0 -7
- data/config/initializers/session_store.rb +0 -8
- data/config/locales/en.yml +0 -200
- data/config/locales/no.yml +0 -193
- data/config/mime_types.yaml +0 -1
- data/config/routes.rb +0 -5
- data/config/war.rb +0 -27
- data/config/warble.rb +0 -84
- data/cruise_build.sh +0 -14
- data/cruise_config.rb +0 -5
- data/db/migrate/001_create_tasks.rb +0 -22
- data/db/migrate/003_add_estimation_points.rb +0 -16
- data/db/migrate/004_add_period.rb +0 -63
- data/db/migrate/005_add_field_work_started_at.rb +0 -9
- data/db/migrate/006_works_data_fix.rb +0 -13
- data/db/migrate/007_add_task_created_at.rb +0 -23
- data/db/migrate/008_add_backlog_options.rb +0 -13
- data/db/migrate/009_add_subtasks.rb +0 -29
- data/db/migrate/010_add_work_start.rb +0 -9
- data/db/migrate/011_login_sugar.rb +0 -21
- data/db/migrate/012_add_resolution.rb +0 -12
- data/db/migrate/013_create_estimates.rb +0 -20
- data/db/migrate/014_add_customer_option.rb +0 -11
- data/db/migrate/015_add_user_option.rb +0 -33
- data/db/migrate/016_add_invoicable_flag.rb +0 -11
- data/db/migrate/017_increase_backlog_name_limit.rb +0 -10
- data/db/migrate/018_create_groups.rb +0 -118
- data/db/migrate/019_remove_unique_index_for_period_position.rb +0 -9
- data/db/migrate/020_create_task_files.rb +0 -17
- data/db/migrate/021_create_work_accounts.rb +0 -111
- data/db/migrate/022_remove_track_done_flag.rb +0 -9
- data/db/migrate/023_add_indices_for_burn_down_chart.rb +0 -13
- data/db/migrate/024_add_sprint_option.rb +0 -10
- data/db/migrate/025_add_simple_auditing_of_tasks.rb +0 -11
- data/db/migrate/026_add_users_to_tasks.rb +0 -14
- data/db/migrate/027_create_work_locks.rb +0 -25
- data/db/migrate/028_create_absences.rb +0 -34
- data/db/migrate/029_add_work_comments.rb +0 -9
- data/db/migrate/030_create_public_holidays.rb +0 -11
- data/db/migrate/031_expand_work_done_precision.rb +0 -9
- data/db/migrate/20100720124707_merge_work_account_into_backlog.rb +0 -74
- data/db/migrate/20101006092700_rename_backlogs_to_projects.rb +0 -22
- data/db/migrate/20101006092700_rename_backlogs_to_projects.rb~ +0 -22
- data/db/schema.rb +0 -159
- data/db/seeds.rb +0 -7
- data/db/test.db +0 -0
- data/etc/backlog.conf +0 -32
- data/ext/mkrf_conf.rb +0 -26
- data/lib/class_table_inheritance.rb +0 -224
- data/lib/postgresql-8.2-504.jdbc4.jar +0 -0
- data/lib/tasks/jdbc.rake +0 -8
- data/lib/url_for_fix.rb +0 -30
- data/nbproject/private/config.properties +0 -0
- data/nbproject/private/private.properties +0 -1
- data/nbproject/private/private.xml +0 -4
- data/nbproject/private/rake-t.txt +0 -95
- data/nbproject/project.properties +0 -4
- data/nbproject/project.xml +0 -9
- data/public/404.html +0 -26
- data/public/422.html +0 -26
- data/public/500.html +0 -26
- data/public/Frav/303/246rsskjema.xls +0 -0
- data/public/applets/bsf.jar +0 -0
- data/public/applets/jruby.jar +0 -0
- data/public/favicon.ico +0 -0
- data/public/images/add.png +0 -0
- data/public/images/add.svg +0 -70
- data/public/images/ajax-loading.gif +0 -0
- data/public/images/appunti_architetto_franc_01.svg +0 -92
- data/public/images/arrow-down.gif +0 -0
- data/public/images/arrow-up.gif +0 -0
- data/public/images/arrow07_2.png +0 -0
- data/public/images/arrow07_4.png +0 -0
- data/public/images/arrow_down.png +0 -0
- data/public/images/arrow_down.svg +0 -59
- data/public/images/arrow_left.png +0 -0
- data/public/images/arrow_left.svg +0 -59
- data/public/images/arrow_right.png +0 -0
- data/public/images/arrow_right.svg +0 -59
- data/public/images/arrow_up.png +0 -0
- data/public/images/arrow_up.svg +0 -59
- data/public/images/black-70.png +0 -0
- data/public/images/black.png +0 -0
- data/public/images/blank.jpg +0 -0
- data/public/images/blank.png +0 -0
- data/public/images/cestino_pieno_architetto_01.svg +0 -470
- data/public/images/checkmark.png +0 -0
- data/public/images/checkmark_org.png +0 -0
- data/public/images/clipboard.png +0 -0
- data/public/images/clipboard.svg +0 -62
- data/public/images/construction_hammer_jon__01.svg +0 -116
- data/public/images/delete.png +0 -0
- data/public/images/email.png +0 -0
- data/public/images/email_grey.png +0 -0
- data/public/images/eraser.png +0 -0
- data/public/images/eraser_org.png +0 -0
- data/public/images/ernes_stop.png +0 -0
- data/public/images/ernes_stop_org.png +0 -0
- data/public/images/flag_red.png +0 -0
- data/public/images/flag_yellow.png +0 -0
- data/public/images/grab.png +0 -0
- data/public/images/grab_gray.png +0 -0
- data/public/images/group.png +0 -0
- data/public/images/hammer.png +0 -0
- data/public/images/header.jpg +0 -0
- data/public/images/nextlabel.gif +0 -0
- data/public/images/pagebak.jpg +0 -0
- data/public/images/paper3.svg +0 -54
- data/public/images/period.png +0 -0
- data/public/images/period_org.png +0 -0
- data/public/images/person.org.png +0 -0
- data/public/images/prevlabel.gif +0 -0
- data/public/images/question.svg +0 -56
- data/public/images/rails.png +0 -0
- data/public/images/refresh.png +0 -0
- data/public/images/rmagick.gif +0 -0
- data/public/images/rmagick_270.gif +0 -0
- data/public/images/tabella_architetto_franc_01.svg +0 -105
- data/public/images/task.png +0 -0
- data/public/images/text-x-generic.png +0 -0
- data/public/images/user group.png +0 -0
- data/public/images/user.png +0 -0
- data/public/images/view_fullscreen.png +0 -0
- data/public/images/work_account.png +0 -0
- data/public/javascripts/application.js +0 -2
- data/public/javascripts/builder.js +0 -136
- data/public/javascripts/controls.js +0 -965
- data/public/javascripts/dragdrop.js +0 -974
- data/public/javascripts/effects.js +0 -1123
- data/public/javascripts/lightwindow.js +0 -1921
- data/public/javascripts/prototype.js +0 -6001
- data/public/javascripts/rails.js +0 -175
- data/public/javascripts/ruby.js +0 -46
- data/public/javascripts/scriptaculous.js +0 -58
- data/public/javascripts/slider.js +0 -275
- data/public/javascripts/sound.js +0 -55
- data/public/javascripts/unittest.js +0 -568
- data/public/javascripts/zapatec/utils/transport.js +0 -2217
- data/public/javascripts/zapatec/utils/utils.js +0 -1799
- data/public/javascripts/zapatec/utils/zapatec.js +0 -90
- data/public/javascripts/zapatec/utils/zpeventdriven.js +0 -212
- data/public/javascripts/zapatec/utils/zpwidget.js +0 -729
- data/public/javascripts/zapatec/zpcal/lang/calendar-no.js +0 -124
- data/public/javascripts/zapatec/zpcal/src/calendar-core.js +0 -2878
- data/public/javascripts/zapatec/zpcal/src/calendar-date-core.js +0 -348
- data/public/javascripts/zapatec/zpcal/src/calendar-setup.js +0 -360
- data/public/javascripts/zapatec/zpcal/src/calendar.js +0 -35
- data/public/robots.txt +0 -5
- data/public/stylesheets/backlog.css +0 -135
- data/public/stylesheets/lightwindow.css +0 -376
- data/public/stylesheets/mwrt002.css +0 -54
- data/public/stylesheets/mwrt002MAC.css +0 -3
- data/public/stylesheets/mwrt002NN.css +0 -3
- data/public/stylesheets/scaffold.css +0 -74
- data/public/stylesheets/user.css +0 -74
- data/public/stylesheets/zpcal/themes/green.css +0 -153
- data/public/stylesheets/zpcal/themes/layouts/layout-2d.css +0 -134
- data/public/stylesheets/zpcal/themes/layouts/layout-common.css +0 -74
- data/public/stylesheets/zpcal/themes/menuarrow.gif +0 -0
- data/public/stylesheets/zpcal/themes/scroller-down.gif +0 -0
- data/public/stylesheets/zpcal/themes/scroller-up.gif +0 -0
- data/script/rails +0 -6
- data/test/client/login.rb +0 -23
- data/test/client/login_test.rb +0 -64
- data/test/client/setup.rb +0 -25
- data/test/fixtures/absences.yml +0 -11
- data/test/fixtures/configurations.yml +0 -5
- data/test/fixtures/customers.yml +0 -7
- data/test/fixtures/estimates.yml +0 -10
- data/test/fixtures/groups.yml +0 -6
- data/test/fixtures/groups_users.yml +0 -3
- data/test/fixtures/parties.yml +0 -32
- data/test/fixtures/periods.yml +0 -24
- data/test/fixtures/projects.yml +0 -8
- data/test/fixtures/public_holidays.yml +0 -7
- data/test/fixtures/task_files.yml +0 -13
- data/test/fixtures/tasks.yml +0 -82
- data/test/fixtures/users.yml +0 -59
- data/test/fixtures/work_lock_subscriptions.yml +0 -7
- data/test/fixtures/work_locks.yml +0 -11
- data/test/fixtures/works.yml +0 -47
- data/test/functional/absences_controller_test.rb +0 -93
- data/test/functional/customers_controller_test.rb +0 -93
- data/test/functional/dashboard_controller_test.rb +0 -18
- data/test/functional/estimates_controller_test.rb +0 -40
- data/test/functional/groups_controller_test.rb +0 -120
- data/test/functional/parties_controller_test.rb +0 -35
- data/test/functional/periods_controller_test.rb +0 -297
- data/test/functional/projects_controller_test.rb +0 -152
- data/test/functional/public_holidays_controller_test.rb +0 -93
- data/test/functional/search_controller_test.rb +0 -24
- data/test/functional/task_files_controller_test.rb +0 -29
- data/test/functional/tasks_controller_test.rb +0 -229
- data/test/functional/user_controller_test.rb +0 -261
- data/test/functional/welcome_controller_test.rb +0 -62
- data/test/functional/work_locks_controller_test.rb +0 -93
- data/test/functional/works_controller_test.rb +0 -220
- data/test/integration/user_system_test.rb +0 -95
- data/test/mocks/test/clock.rb +0 -14
- data/test/performance/browsing_test.rb +0 -9
- data/test/performance/common.rb +0 -91
- data/test/performance/jetty_test.rb +0 -15
- data/test/performance/server_test.rb +0 -17
- data/test/test_helper.rb +0 -119
- data/test/test_helper.rb~ +0 -121
- data/test/unit/absence_test.rb +0 -29
- data/test/unit/big_decimal_yaml_fix_test.rb +0 -15
- data/test/unit/configuration_test.rb +0 -10
- data/test/unit/customer_test.rb +0 -10
- data/test/unit/estimate_test.rb +0 -10
- data/test/unit/group_test.rb +0 -10
- data/test/unit/party_test.rb +0 -10
- data/test/unit/period_test.rb +0 -9
- data/test/unit/public_holiday_test.rb +0 -10
- data/test/unit/task_file_test.rb +0 -10
- data/test/unit/task_test.rb +0 -73
- data/test/unit/time_of_day_test.rb +0 -23
- data/test/unit/user_test.rb +0 -148
- data/test/unit/work_lock_subscription_test.rb +0 -10
- data/test/unit/work_lock_test.rb +0 -10
- data/test/unit/work_test.rb +0 -81
- data/vendor/plugins/acts_as_list/README +0 -23
- data/vendor/plugins/acts_as_list/init.rb +0 -3
- data/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +0 -256
- data/vendor/plugins/acts_as_list/test/list_test.rb +0 -332
- data/vendor/plugins/acts_as_tree/README +0 -26
- data/vendor/plugins/acts_as_tree/Rakefile +0 -22
- data/vendor/plugins/acts_as_tree/init.rb +0 -1
- data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +0 -96
- data/vendor/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +0 -219
- data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
- data/vendor/plugins/assert_cookie/MIT-LICENSE +0 -7
- data/vendor/plugins/assert_cookie/README +0 -6
- data/vendor/plugins/assert_cookie/Rakefile +0 -21
- data/vendor/plugins/assert_cookie/init.rb +0 -1
- data/vendor/plugins/assert_cookie/lib/assert_cookie.rb +0 -73
- data/vendor/plugins/assert_cookie/meta.yml +0 -7
- data/vendor/plugins/assert_cookie/test/test_assert_cookie.rb +0 -124
- data/vendor/plugins/assert_cookie/test/test_helper.rb +0 -31
- data/vendor/plugins/auto_complete/README +0 -23
- data/vendor/plugins/auto_complete/Rakefile +0 -22
- data/vendor/plugins/auto_complete/init.rb +0 -2
- data/vendor/plugins/auto_complete/lib/auto_complete.rb +0 -47
- data/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +0 -143
- data/vendor/plugins/auto_complete/test/auto_complete_test.rb +0 -67
- data/vendor/plugins/backlog_jira/init.rb +0 -66
- data/vendor/plugins/dynamic_form/MIT-LICENSE +0 -20
- data/vendor/plugins/dynamic_form/README +0 -13
- data/vendor/plugins/dynamic_form/Rakefile +0 -10
- data/vendor/plugins/dynamic_form/dynamic_form.gemspec +0 -12
- data/vendor/plugins/dynamic_form/init.rb +0 -1
- data/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb +0 -300
- data/vendor/plugins/dynamic_form/lib/action_view/locale/en.yml +0 -8
- data/vendor/plugins/dynamic_form/lib/dynamic_form.rb +0 -5
- data/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb +0 -42
- data/vendor/plugins/dynamic_form/test/dynamic_form_test.rb +0 -370
- data/vendor/plugins/dynamic_form/test/test_helper.rb +0 -9
- data/vendor/plugins/has_history/README +0 -12
- data/vendor/plugins/has_history/Rakefile +0 -22
- data/vendor/plugins/has_history/generators/history_migration/history_migration_generator.rb +0 -30
- data/vendor/plugins/has_history/generators/history_migration/templates/migration.rb +0 -14
- data/vendor/plugins/has_history/generators/history_model/history_model_generator.rb +0 -39
- data/vendor/plugins/has_history/generators/history_model/templates/fixtures.yml +0 -17
- data/vendor/plugins/has_history/generators/history_model/templates/functional_test.rb +0 -129
- data/vendor/plugins/has_history/generators/history_model/templates/migration.rb +0 -14
- data/vendor/plugins/has_history/generators/history_model/templates/model.rb +0 -4
- data/vendor/plugins/has_history/generators/history_model/templates/unit_test.rb +0 -75
- data/vendor/plugins/has_history/init.rb +0 -5
- data/vendor/plugins/has_history/install.rb +0 -1
- data/vendor/plugins/has_history/lib/has_history.rb +0 -178
- data/vendor/plugins/has_history/lib/tasks/has_history_tasks.rake +0 -4
- data/vendor/plugins/has_history/test/has_history_test.rb +0 -31
- data/vendor/plugins/has_history/test/ignorant_master.rb +0 -3
- data/vendor/plugins/has_history/test/ignorant_master_history.rb +0 -4
- data/vendor/plugins/has_history/test/lone_master.rb +0 -42
- data/vendor/plugins/has_history/test/paired_master.rb +0 -5
- data/vendor/plugins/has_history/test/paired_master_history.rb +0 -5
- data/vendor/plugins/has_history/test/test_helper.rb +0 -154
- data/vendor/plugins/has_history/uninstall.rb +0 -1
- data/vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb +0 -432
- data/vendor/plugins/prototype_legacy_helper/test/test_prototype_helper.rb +0 -297
- data/vendor/plugins/rails_time/MIT-LICENSE +0 -20
- data/vendor/plugins/rails_time/README +0 -28
- data/vendor/plugins/rails_time/init.rb +0 -2
- data/vendor/plugins/rails_time/lib/activerecord_time_extension.rb +0 -28
- data/vendor/plugins/rails_time/lib/time_of_day.rb +0 -88
- data/vendor/plugins/rails_time/test/database.yml +0 -18
- data/vendor/plugins/rails_time/test/debug.log +0 -1
- data/vendor/plugins/rails_time/test/rails_time_test.rb +0 -122
- data/vendor/plugins/rails_time/test/schema.rb +0 -10
- data/vendor/plugins/rails_time/test/test_helper.rb +0 -17
- data/vendor/plugins/verification/MIT-LICENSE +0 -20
- data/vendor/plugins/verification/README +0 -34
- data/vendor/plugins/verification/Rakefile +0 -22
- data/vendor/plugins/verification/init.rb +0 -3
- data/vendor/plugins/verification/lib/action_controller/verification.rb +0 -132
- data/vendor/plugins/verification/test/test_helper.rb +0 -18
- data/vendor/plugins/verification/test/verification_test.rb +0 -270
- data/vendor/plugins/will_paginate/LICENSE +0 -18
- data/vendor/plugins/will_paginate/README +0 -138
- data/vendor/plugins/will_paginate/Rakefile +0 -27
- data/vendor/plugins/will_paginate/init.rb +0 -4
- data/vendor/plugins/will_paginate/lib/will_paginate.rb +0 -61
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +0 -132
- data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +0 -80
- data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +0 -181
- data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +0 -206
- data/vendor/plugins/will_paginate/test/array_pagination_test.rb +0 -131
- data/vendor/plugins/will_paginate/test/boot.rb +0 -23
- data/vendor/plugins/will_paginate/test/console +0 -9
- data/vendor/plugins/will_paginate/test/finder_test.rb +0 -290
- data/vendor/plugins/will_paginate/test/fixtures/admin.rb +0 -3
- data/vendor/plugins/will_paginate/test/fixtures/developer.rb +0 -11
- data/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml +0 -13
- data/vendor/plugins/will_paginate/test/fixtures/project.rb +0 -15
- data/vendor/plugins/will_paginate/test/fixtures/projects.yml +0 -7
- data/vendor/plugins/will_paginate/test/fixtures/replies.yml +0 -34
- data/vendor/plugins/will_paginate/test/fixtures/reply.rb +0 -5
- data/vendor/plugins/will_paginate/test/fixtures/schema.rb +0 -38
- data/vendor/plugins/will_paginate/test/fixtures/topic.rb +0 -4
- data/vendor/plugins/will_paginate/test/fixtures/topics.yml +0 -30
- data/vendor/plugins/will_paginate/test/fixtures/user.rb +0 -2
- data/vendor/plugins/will_paginate/test/fixtures/users.yml +0 -35
- data/vendor/plugins/will_paginate/test/helper.rb +0 -25
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb +0 -23
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb +0 -67
- data/vendor/plugins/will_paginate/test/lib/load_fixtures.rb +0 -13
- data/vendor/plugins/will_paginate/test/pagination_test.rb +0 -240
@@ -1,348 +0,0 @@
|
|
1
|
-
/* $Id: calendar-date-core.js 4806 2006-10-18 13:34:39Z slip $ */
|
2
|
-
/**
|
3
|
-
*
|
4
|
-
* Copyright (c) 2004-2006 by Zapatec, Inc.
|
5
|
-
* http://www.zapatec.com
|
6
|
-
* 1700 MLK Way, Berkeley, California,
|
7
|
-
* 94709, U.S.A.
|
8
|
-
* All rights reserved.
|
9
|
-
*/
|
10
|
-
|
11
|
-
// BEGIN: DATE OBJECT PATCHES
|
12
|
-
|
13
|
-
/** \defgroup DateExtras Augmenting the Date object with some utility functions
|
14
|
-
* and variables.
|
15
|
-
*/
|
16
|
-
//@{
|
17
|
-
|
18
|
-
Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; /**< Number of days in each month */
|
19
|
-
|
20
|
-
Date.SECOND = 1000; /**< One second has 1000 milliseconds. */
|
21
|
-
Date.MINUTE = 60 * Date.SECOND; /**< One minute has 60 seconds. */
|
22
|
-
Date.HOUR = 60 * Date.MINUTE; /**< One hour has 60 minutes. */
|
23
|
-
Date.DAY = 24 * Date.HOUR; /**< One day has 24 hours. */
|
24
|
-
Date.WEEK = 7 * Date.DAY; /**< One week has 7 days. */
|
25
|
-
|
26
|
-
/** Returns the number of days in the month. The \em month parameter is
|
27
|
-
* optional; if not passed, the current month of \b this Date object is
|
28
|
-
* assumed.
|
29
|
-
*
|
30
|
-
* @param month [int, optional] the month number, 0 for January.
|
31
|
-
*/
|
32
|
-
Date.prototype.getMonthDays = function(month) {
|
33
|
-
var year = this.getFullYear();
|
34
|
-
if (typeof month == "undefined") {
|
35
|
-
month = this.getMonth();
|
36
|
-
}
|
37
|
-
if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
|
38
|
-
return 29;
|
39
|
-
} else {
|
40
|
-
return Date._MD[month];
|
41
|
-
}
|
42
|
-
};
|
43
|
-
|
44
|
-
/** Returns the number of the current day in the current year. */
|
45
|
-
Date.prototype.getDayOfYear = function() {
|
46
|
-
var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
|
47
|
-
var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
|
48
|
-
var time = now - then;
|
49
|
-
return Math.floor(time / Date.DAY);
|
50
|
-
};
|
51
|
-
|
52
|
-
/** Returns the number of the week in year, as defined in ISO 8601. */
|
53
|
-
Date.prototype.getWeekNumber = function() {
|
54
|
-
var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
|
55
|
-
var DoW = d.getDay();
|
56
|
-
d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
|
57
|
-
var ms = d.valueOf(); // GMT
|
58
|
-
d.setMonth(0);
|
59
|
-
d.setDate(4); // Thu in Week 1
|
60
|
-
return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
|
61
|
-
};
|
62
|
-
|
63
|
-
/** Checks dates equality. Checks time too. */
|
64
|
-
Date.prototype.equalsTo = function(date) {
|
65
|
-
return ((this.getFullYear() == date.getFullYear()) &&
|
66
|
-
(this.getMonth() == date.getMonth()) &&
|
67
|
-
(this.getDate() == date.getDate()) &&
|
68
|
-
(this.getHours() == date.getHours()) &&
|
69
|
-
(this.getMinutes() == date.getMinutes()));
|
70
|
-
};
|
71
|
-
|
72
|
-
/** Checks dates equality. Ignores time. */
|
73
|
-
Date.prototype.dateEqualsTo = function(date) {
|
74
|
-
return ((this.getFullYear() == date.getFullYear()) &&
|
75
|
-
(this.getMonth() == date.getMonth()) &&
|
76
|
-
(this.getDate() == date.getDate()));
|
77
|
-
};
|
78
|
-
|
79
|
-
/** Set only the year, month, date parts (keep existing time) */
|
80
|
-
Date.prototype.setDateOnly = function(date) {
|
81
|
-
var tmp = new Date(date);
|
82
|
-
this.setDate(1);
|
83
|
-
this.setFullYear(tmp.getFullYear());
|
84
|
-
this.setMonth(tmp.getMonth());
|
85
|
-
this.setDate(tmp.getDate());
|
86
|
-
};
|
87
|
-
|
88
|
-
/** Prints the date in a string according to the given format.
|
89
|
-
*
|
90
|
-
* The format (\b str) may contain the following specialties:
|
91
|
-
*
|
92
|
-
* - %%a - Abbreviated weekday name
|
93
|
-
* - %%A - Full weekday name
|
94
|
-
* - %%b - Abbreviated month name
|
95
|
-
* - %%B - Full month name
|
96
|
-
* - %%C - Century number
|
97
|
-
* - %%d - The day of the month (00 .. 31)
|
98
|
-
* - %%e - The day of the month (0 .. 31)
|
99
|
-
* - %%H - Hour (00 .. 23)
|
100
|
-
* - %%I - Hour (01 .. 12)
|
101
|
-
* - %%j - The day of the year (000 .. 366)
|
102
|
-
* - %%k - Hour (0 .. 23)
|
103
|
-
* - %%l - Hour (1 .. 12)
|
104
|
-
* - %%m - Month (01 .. 12)
|
105
|
-
* - %%M - Minute (00 .. 59)
|
106
|
-
* - %%n - A newline character
|
107
|
-
* - %%p - "PM" or "AM"
|
108
|
-
* - %%P - "pm" or "am"
|
109
|
-
* - %%S - Second (00 .. 59)
|
110
|
-
* - %%s - Number of seconds since Epoch
|
111
|
-
* - %%t - A tab character
|
112
|
-
* - %%W - The week number (as per ISO 8601)
|
113
|
-
* - %%u - The day of week (1 .. 7, 1 = Monday)
|
114
|
-
* - %%w - The day of week (0 .. 6, 0 = Sunday)
|
115
|
-
* - %%y - Year without the century (00 .. 99)
|
116
|
-
* - %%Y - Year including the century (ex. 1979)
|
117
|
-
* - %%% - A literal %% character
|
118
|
-
*
|
119
|
-
* They are almost the same as for the POSIX strftime function.
|
120
|
-
*
|
121
|
-
* @param str [string] the format to print date in.
|
122
|
-
*/
|
123
|
-
Date.prototype.print = function (str) {
|
124
|
-
var m = this.getMonth();
|
125
|
-
var d = this.getDate();
|
126
|
-
var y = this.getFullYear();
|
127
|
-
var wn = this.getWeekNumber();
|
128
|
-
var w = this.getDay();
|
129
|
-
var s = {};
|
130
|
-
var hr = this.getHours();
|
131
|
-
var pm = (hr >= 12);
|
132
|
-
var ir = (pm) ? (hr - 12) : hr;
|
133
|
-
var dy = this.getDayOfYear();
|
134
|
-
if (ir == 0)
|
135
|
-
ir = 12;
|
136
|
-
var min = this.getMinutes();
|
137
|
-
var sec = this.getSeconds();
|
138
|
-
s["%a"] = Zapatec.Calendar.i18n(w, "sdn"); // abbreviated weekday name [FIXME: I18N]
|
139
|
-
s["%A"] = Zapatec.Calendar.i18n(w, "dn"); // full weekday name
|
140
|
-
s["%b"] = Zapatec.Calendar.i18n(m, "smn"); // abbreviated month name [FIXME: I18N]
|
141
|
-
s["%B"] = Zapatec.Calendar.i18n(m, "mn"); // full month name
|
142
|
-
// FIXME: %c : preferred date and time representation for the current locale
|
143
|
-
s["%C"] = 1 + Math.floor(y / 100); // the century number
|
144
|
-
s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
|
145
|
-
s["%e"] = d; // the day of the month (range 1 to 31)
|
146
|
-
// FIXME: %D : american date style: %m/%d/%y
|
147
|
-
// FIXME: %E, %F, %G, %g, %h (man strftime)
|
148
|
-
s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
|
149
|
-
s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
|
150
|
-
s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
|
151
|
-
s["%k"] = hr ? hr : "0"; // hour, range 0 to 23 (24h format)
|
152
|
-
s["%l"] = ir; // hour, range 1 to 12 (12h format)
|
153
|
-
s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
|
154
|
-
s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
|
155
|
-
s["%n"] = "\n"; // a newline character
|
156
|
-
s["%p"] = pm ? "PM" : "AM";
|
157
|
-
s["%P"] = pm ? "pm" : "am";
|
158
|
-
// FIXME: %r : the time in am/pm notation %I:%M:%S %p
|
159
|
-
// FIXME: %R : the time in 24-hour notation %H:%M
|
160
|
-
s["%s"] = Math.floor(this.getTime() / 1000);
|
161
|
-
s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
|
162
|
-
s["%t"] = "\t"; // a tab character
|
163
|
-
// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
|
164
|
-
s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
|
165
|
-
s["%u"] = (w == 0) ? 7 : w; // the day of the week (range 1 to 7, 1 = MON)
|
166
|
-
s["%w"] = w ? w : "0"; // the day of the week (range 0 to 6, 0 = SUN)
|
167
|
-
// FIXME: %x : preferred date representation for the current locale without the time
|
168
|
-
// FIXME: %X : preferred time representation for the current locale without the date
|
169
|
-
s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
|
170
|
-
s["%Y"] = y; // year with the century
|
171
|
-
s["%%"] = "%"; // a literal '%' character
|
172
|
-
|
173
|
-
var re = /%./g;
|
174
|
-
var a = str.match(re);
|
175
|
-
for (var i = 0; i < a.length; i++) {
|
176
|
-
var tmp = s[a[i]];
|
177
|
-
if (tmp) {
|
178
|
-
re = new RegExp(a[i], 'g');
|
179
|
-
str = str.replace(re, tmp);
|
180
|
-
}
|
181
|
-
}
|
182
|
-
|
183
|
-
return str;
|
184
|
-
};
|
185
|
-
|
186
|
-
/**
|
187
|
-
* Parses a date from a string in the specified format.
|
188
|
-
*
|
189
|
-
* @param str [string] the date as a string
|
190
|
-
* @param fmt [string] the format to try to parse the date in
|
191
|
-
*
|
192
|
-
* @return [Date] a date object containing the parsed date or \b null if for
|
193
|
-
* some reason the date couldn't be parsed.
|
194
|
-
*/
|
195
|
-
Date.parseDate = function (str, fmt) {
|
196
|
-
// Konqueror
|
197
|
-
if (!str)
|
198
|
-
return new Date();
|
199
|
-
var y = 0;
|
200
|
-
var m = -1;
|
201
|
-
var d = 0;
|
202
|
-
var a = str.split(/\W+/);
|
203
|
-
var b = fmt.split(/[^A-Za-z0-9_%]+/);
|
204
|
-
var i = 0, j = 0;
|
205
|
-
var hr = 0;
|
206
|
-
var min = 0;
|
207
|
-
var sec = 0;
|
208
|
-
for (i = 0; i < a.length; ++i) {
|
209
|
-
if (!a[i])
|
210
|
-
continue;
|
211
|
-
switch (b[i]) {
|
212
|
-
case "%d":
|
213
|
-
case "%e":
|
214
|
-
d = parseInt(a[i], 10);
|
215
|
-
break;
|
216
|
-
|
217
|
-
case "%m":
|
218
|
-
m = parseInt(a[i], 10) - 1;
|
219
|
-
break;
|
220
|
-
|
221
|
-
case "%Y":
|
222
|
-
case "%y":
|
223
|
-
y = parseInt(a[i], 10);
|
224
|
-
(y < 100) && (y += (y > 29) ? 1900 : 2000);
|
225
|
-
break;
|
226
|
-
|
227
|
-
case "%b":
|
228
|
-
for (j = 0; j < 12; ++j)
|
229
|
-
if (Zapatec.Calendar.i18n(j, "smn").toLowerCase() == a[i].toLowerCase()) {
|
230
|
-
m = j;
|
231
|
-
break;
|
232
|
-
}
|
233
|
-
break;
|
234
|
-
|
235
|
-
case "%B":
|
236
|
-
for (j = 0; j < 12; ++j)
|
237
|
-
if (Zapatec.Calendar.i18n(j, "mn").toLowerCase() == a[i].toLowerCase()) {
|
238
|
-
m = j;
|
239
|
-
break;
|
240
|
-
}
|
241
|
-
break;
|
242
|
-
|
243
|
-
case "%H":
|
244
|
-
case "%I":
|
245
|
-
case "%k":
|
246
|
-
case "%l":
|
247
|
-
hr = parseInt(a[i], 10);
|
248
|
-
break;
|
249
|
-
|
250
|
-
case "%P":
|
251
|
-
case "%p":
|
252
|
-
if (/pm/i.test(a[i]) && hr < 12)
|
253
|
-
hr += 12;
|
254
|
-
if (/am/i.test(a[i]) && hr == 12)
|
255
|
-
hr = 0;
|
256
|
-
break;
|
257
|
-
|
258
|
-
case "%M":
|
259
|
-
min = parseInt(a[i], 10);
|
260
|
-
break;
|
261
|
-
|
262
|
-
case "%S":
|
263
|
-
sec = parseInt(a[i], 10);
|
264
|
-
break;
|
265
|
-
}
|
266
|
-
}
|
267
|
-
//Fix for the mm/dd/yy bug
|
268
|
-
var validDate = !isNaN(y) && !isNaN(m) && !isNaN(d) && !isNaN(hr) && !isNaN(min) && !isNaN(sec);
|
269
|
-
if (!validDate) {return null;}
|
270
|
-
if (y != 0 && m != -1 && d != 0)
|
271
|
-
return new Date(y, m, d, hr, min, sec);
|
272
|
-
y = 0; m = -1; d = 0;
|
273
|
-
for (i = 0; i < a.length; ++i) {
|
274
|
-
if (a[i].search(/[a-zA-Z]+/) != -1) {
|
275
|
-
var t = -1;
|
276
|
-
for (j = 0; j < 12; ++j)
|
277
|
-
if (Zapatec.Calendar.i18n(j, "mn").substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {
|
278
|
-
t = j;
|
279
|
-
break;
|
280
|
-
}
|
281
|
-
if (t != -1) {
|
282
|
-
if (m != -1)
|
283
|
-
d = m+1;
|
284
|
-
m = t;
|
285
|
-
}
|
286
|
-
} else if (parseInt(a[i], 10) <= 12 && m == -1) {
|
287
|
-
m = a[i]-1;
|
288
|
-
} else if (parseInt(a[i], 10) > 31 && y == 0) {
|
289
|
-
y = parseInt(a[i], 10);
|
290
|
-
(y < 100) && (y += (y > 29) ? 1900 : 2000);
|
291
|
-
} else if (d == 0) {
|
292
|
-
d = a[i];
|
293
|
-
}
|
294
|
-
}
|
295
|
-
if (y == 0) {
|
296
|
-
var today = new Date();
|
297
|
-
y = today.getFullYear();
|
298
|
-
}
|
299
|
-
if (m != -1 && d != 0)
|
300
|
-
return new Date(y, m, d, hr, min, sec);
|
301
|
-
return null;
|
302
|
-
};
|
303
|
-
|
304
|
-
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear; /**< save a reference to the original setFullYear function */
|
305
|
-
|
306
|
-
/**
|
307
|
-
* This function replaces the original Date.setFullYear() with a "safer"
|
308
|
-
* function which makes sure that the month or date aren't modified (unless in
|
309
|
-
* the exceptional case where the date is February 29 but the new year doesn't
|
310
|
-
* contain it).
|
311
|
-
*
|
312
|
-
* @param y [int] the new year to move this date to
|
313
|
-
*/
|
314
|
-
Date.prototype.setFullYear = function(y) {
|
315
|
-
var d = new Date(this);
|
316
|
-
d.__msh_oldSetFullYear(y);
|
317
|
-
if (d.getMonth() != this.getMonth())
|
318
|
-
this.setDate(28);
|
319
|
-
this.__msh_oldSetFullYear(y);
|
320
|
-
};
|
321
|
-
|
322
|
-
/**
|
323
|
-
* This function compares only years, months and days of two date objects.
|
324
|
-
*
|
325
|
-
* @return [int] -1 if date1>date2, 1 if date2>date1 or 0 if they are equal
|
326
|
-
*
|
327
|
-
* @param date1 [Date] first date to compare
|
328
|
-
* @param date1 [Date] second date to compare
|
329
|
-
*/
|
330
|
-
Date.prototype.compareDatesOnly = function (date1,date2) {
|
331
|
-
var year1 = date1.getYear();
|
332
|
-
var year2 = date2.getYear();
|
333
|
-
var month1 = date1.getMonth();
|
334
|
-
var month2 = date2.getMonth();
|
335
|
-
var day1 = date1.getDate();
|
336
|
-
var day2 = date2.getDate();
|
337
|
-
if (year1 > year2) { return -1; }
|
338
|
-
if (year2 > year1) { return 1; } //years are equal
|
339
|
-
if (month1 > month2) { return -1; }
|
340
|
-
if (month2 > month1) { return 1; } //years and months are equal
|
341
|
-
if (day1 > day2) { return -1; }
|
342
|
-
if (day2 > day1) { return 1; } //days are equal
|
343
|
-
return 0;
|
344
|
-
}
|
345
|
-
|
346
|
-
//@}
|
347
|
-
|
348
|
-
// END: DATE OBJECT PATCHES
|
@@ -1,360 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* $Id: calendar-setup.js 4843 2006-10-20 13:08:09Z slip $
|
3
|
-
* The Zapatec DHTML Calendar
|
4
|
-
*
|
5
|
-
* Copyright (c) 2004-2006 by Zapatec, Inc.
|
6
|
-
* http://www.zapatec.com
|
7
|
-
* 1700 MLK Way, Berkeley, California,
|
8
|
-
* 94709, U.S.A.
|
9
|
-
* All rights reserved.
|
10
|
-
*
|
11
|
-
* Original version written by Mihai Bazon,
|
12
|
-
* http://www.bazon.net/mishoo/calendar.epl
|
13
|
-
*
|
14
|
-
* This file defines helper functions for setting up the calendar. They are
|
15
|
-
* intended to help non-programmers get a working calendar on their site
|
16
|
-
* quickly. This script should not be seen as part of the calendar. It just
|
17
|
-
* shows you what one can do with the calendar, while in the same time
|
18
|
-
* providing a quick and simple method for setting it up. If you need
|
19
|
-
* exhaustive customization of the calendar creation process feel free to
|
20
|
-
* modify this code to suit your needs (this is recommended and much better
|
21
|
-
* than modifying calendar.js itself).
|
22
|
-
*/
|
23
|
-
|
24
|
-
// $Id: calendar-setup.js 4843 2006-10-20 13:08:09Z slip $
|
25
|
-
|
26
|
-
//test for the right path
|
27
|
-
Zapatec.Setup = function () {};
|
28
|
-
Zapatec.Setup.test = true;
|
29
|
-
|
30
|
-
/**
|
31
|
-
* This function "patches" an input field (or other element) to use a calendar
|
32
|
-
* widget for date selection.
|
33
|
-
*
|
34
|
-
* Note that you can use the Zapatec DHTML Calendar Wizard and generate the code
|
35
|
-
* and modify the results.
|
36
|
-
* The "params" is a single object that can have the following properties:
|
37
|
-
*
|
38
|
-
* \code
|
39
|
-
* prop. name | description
|
40
|
-
* -------------------------------------------------------------------------------------------------
|
41
|
-
* inputField | the ID of an input field to store the date
|
42
|
-
* displayArea | the ID of a DIV or other element to show the date
|
43
|
-
* button | ID of a button or other element that will trigger the calendar
|
44
|
-
* eventName | event that will trigger the calendar, without the "on" prefix (default: "click")
|
45
|
-
* closeEventName| event that will close the calendar (i.e. one can use "focus" for eventName and "blur" for closeEventName)
|
46
|
-
* ifFormat | date format that will be stored in the input field
|
47
|
-
* daFormat | the date format that will be used to display the date in displayArea
|
48
|
-
* singleClick | (true/false) wether the calendar is in single click mode or not (default: true)
|
49
|
-
* firstDay | numeric: 0 to 6. "0" means display Sunday first, "1" means display Monday first, etc.
|
50
|
-
* align | alignment (default: "Br"); if you don't know what's this see the calendar documentation
|
51
|
-
* range | array with 2 elements. Default: [1900.0, 2999.12] -- the range of years available
|
52
|
-
* weekNumbers | (true/false) if it's true (default) the calendar will display week numbers
|
53
|
-
* flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
|
54
|
-
* flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
|
55
|
-
* disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
|
56
|
-
* onSelect | function that gets called when a date is selected. You don't _have_ to supply this (the default is generally okay)
|
57
|
-
* onClose | function that gets called when the calendar is closed. [default]
|
58
|
-
* onUpdate | function that gets called after the date is updated in the input field. Receives a reference to the calendar.
|
59
|
-
* date | the date that the calendar will be initially displayed to
|
60
|
-
* showsTime | default: false; if true the calendar will include a time selector
|
61
|
-
* timeFormat | the time format; can be "12" or "24", default is "12"
|
62
|
-
* electric | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
|
63
|
-
* sortOrder | ("asc"(ending)/"desc"(ending)/"none"). If "asc" (default), order of the multiple dates (when multiple dates is on) will be sorted in ascending order. Otherwise, it will be sorted in descending order. "none" means no sorting is needed.
|
64
|
-
* step | configures the step of the years in drop-down boxes; default: 2
|
65
|
-
* position | configures the calendar absolute position; default: null
|
66
|
-
* cache | if "true" (but default: "false") it will reuse the same calendar object, where possible
|
67
|
-
* showOthers | if "true" (but default: "false") it will show days from other months too
|
68
|
-
* saveDate | if set (default unset) will save a cookie for this duration.
|
69
|
-
* numberMonths | Have the calendar display multiple months
|
70
|
-
* controlMonth | When displaying multiple months, this will be the control month. Default 1.
|
71
|
-
* vertical | When displaying multiple months, months can progress in a vertical or horizontal way. Horizontal is the default.
|
72
|
-
* monthsInRow | When displaying multiple months how many months in a horizontal row. Works both in vertical and horizontal mode. Default numberMonths
|
73
|
-
* fdowClick | Allow click on Days of Week 1st day
|
74
|
-
* titleHtml | Html you can put in title of calendar
|
75
|
-
* noHelp | Disables "?" button in your calendar
|
76
|
-
* noCloseButton | Disables "X" button in your calendar
|
77
|
-
* disableYearNav| Disables year navigation buttons
|
78
|
-
*
|
79
|
-
* \endcode
|
80
|
-
*
|
81
|
-
* None of them is required, they all have default values. However, if you
|
82
|
-
* pass none of "inputField", "displayArea" or "button" you'll get a warning
|
83
|
-
* saying "nothing to setup".
|
84
|
-
*/
|
85
|
-
Zapatec.Calendar.setup = function (params) {
|
86
|
-
paramsList = ["id"];
|
87
|
-
function param_default(pname, def) {
|
88
|
-
if (typeof params[pname] == "undefined") {
|
89
|
-
params[pname] = def;
|
90
|
-
}
|
91
|
-
paramsList.push(pname);
|
92
|
-
};
|
93
|
-
params.id = Zapatec.Utils.generateID("calendar");
|
94
|
-
param_default("inputField", null);
|
95
|
-
param_default("displayArea", null);
|
96
|
-
param_default("button", null);
|
97
|
-
param_default("eventName", "click");
|
98
|
-
param_default("closeEventName", null);
|
99
|
-
param_default("ifFormat", "%Y/%m/%d");
|
100
|
-
param_default("daFormat", "%Y/%m/%d");
|
101
|
-
param_default("singleClick", true);
|
102
|
-
param_default("disableFunc", null);
|
103
|
-
param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined
|
104
|
-
param_default("dateText", null);
|
105
|
-
param_default("firstDay", null);
|
106
|
-
param_default("align", "Br");
|
107
|
-
param_default("range", [1900, 2999]);
|
108
|
-
param_default("weekNumbers", true);
|
109
|
-
param_default("flat", null);
|
110
|
-
param_default("flatCallback", null);
|
111
|
-
param_default("onSelect", null);
|
112
|
-
param_default("onClose", null);
|
113
|
-
param_default("onUpdate", null);
|
114
|
-
param_default("date", null);
|
115
|
-
param_default("showsTime", false);
|
116
|
-
param_default("sortOrder", "asc");
|
117
|
-
param_default("timeFormat", "24");
|
118
|
-
param_default("timeInterval", null);
|
119
|
-
param_default("electric", true);
|
120
|
-
param_default("step", 2);
|
121
|
-
param_default("position", null);
|
122
|
-
param_default("cache", false);
|
123
|
-
param_default("showOthers", false);
|
124
|
-
param_default("multiple", null);
|
125
|
-
param_default("saveDate", null);
|
126
|
-
param_default("fdowClick", false);
|
127
|
-
param_default("titleHtml", null);
|
128
|
-
param_default("noHelp", false);
|
129
|
-
param_default("noCloseButton", false);
|
130
|
-
param_default("disableYearNav", false);
|
131
|
-
param_default("disableFdowChange", false);
|
132
|
-
if (params.weekNumbers) {
|
133
|
-
params.disableFdowChange = true;
|
134
|
-
}
|
135
|
-
param_default("disableDrag", false);
|
136
|
-
param_default("numberMonths", 1);
|
137
|
-
if ((params.numberMonths > 12) || (params.numberMonths < 1)) {
|
138
|
-
params.numberMonths = 1;
|
139
|
-
}
|
140
|
-
if (params.numberMonths > 1) {
|
141
|
-
params.showOthers = false;
|
142
|
-
}
|
143
|
-
params.numberMonths = parseInt(params.numberMonths, 10);
|
144
|
-
param_default("controlMonth", 1);
|
145
|
-
if ((params.controlMonth > params.numberMonths) || (params.controlMonth < 1)) {
|
146
|
-
params.controlMonth = 1;
|
147
|
-
}
|
148
|
-
params.controlMonth = parseInt(params.controlMonth, 10);
|
149
|
-
param_default("vertical", false);
|
150
|
-
if (params.monthsInRow > params.numberMonths) {
|
151
|
-
params.monthsInRow = params.numberMonths;
|
152
|
-
}
|
153
|
-
param_default("monthsInRow", params.numberMonths);
|
154
|
-
params.monthsInRow = parseInt(params.monthsInRow, 10);
|
155
|
-
param_default("multiple", false);
|
156
|
-
if (params.multiple) {
|
157
|
-
params.singleClick = false;
|
158
|
-
}
|
159
|
-
|
160
|
-
var tmp = ["inputField", "displayArea", "button"];
|
161
|
-
for (var i in tmp) {
|
162
|
-
if (typeof params[tmp[i]] == "string") {
|
163
|
-
params[tmp[i]] = document.getElementById(params[tmp[i]]);
|
164
|
-
}
|
165
|
-
}
|
166
|
-
if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) {
|
167
|
-
alert("Calendar.setup '" + params.id + "':\n Nothing to setup (no fields found). Please check your code");
|
168
|
-
return false;
|
169
|
-
}
|
170
|
-
if (((params.timeInterval) && ((params.timeInterval !== Math.floor(params.timeInterval)) || ((60 % params.timeInterval !== 0) && (params.timeInterval % 60 !== 0)))) || (params.timeInterval > 360)) {
|
171
|
-
alert("'" + params.id + "': timeInterval option can only have the following number of minutes:\n1, 2, 3, 4, 5, 6, 10, 15, 30, 60, 120, 180, 240, 300, 360 ");
|
172
|
-
params.timeInterval = null;
|
173
|
-
}
|
174
|
-
if (params.date && !Date.parse(params.date)) {
|
175
|
-
alert("'" + params.id + "' Start Date Invalid: " + params.date + ".\nSee date option.\nDefaulting to today.");
|
176
|
-
params.date = null;
|
177
|
-
}
|
178
|
-
if (params.saveDate) { //If saveDate is on We're saving the date in a cookie
|
179
|
-
param_default("cookiePrefix", window.location.href + "--" + params.button.id);
|
180
|
-
//fetch the cookie
|
181
|
-
var cookieName = params.cookiePrefix;
|
182
|
-
var newdate = Zapatec.Utils.getCookie(cookieName);
|
183
|
-
if (newdate != null) { //if there's a cookie
|
184
|
-
//set the value of the text field
|
185
|
-
document.getElementById(params.inputField.id).value = newdate;
|
186
|
-
}
|
187
|
-
}
|
188
|
-
|
189
|
-
for(var ii in params) {
|
190
|
-
if (Zapatec.Utils.arrIndexOf(paramsList, ii) == -1) {
|
191
|
-
alert("Wrong config option: " + ii);
|
192
|
-
}
|
193
|
-
}
|
194
|
-
function onSelect(cal) {
|
195
|
-
var p = cal.params;
|
196
|
-
var update = (cal.dateClicked || p.electric);
|
197
|
-
if (update && p.flat) {
|
198
|
-
if (typeof p.flatCallback == "function")
|
199
|
-
{
|
200
|
-
if (!p.multiple) //User can call function submitFlatDates directly in Calendar object to handle the submission of multiple dates.
|
201
|
-
p.flatCallback(cal);
|
202
|
-
} else
|
203
|
-
alert("'" + cal.id + "': No flatCallback given -- doing nothing.");
|
204
|
-
return false;
|
205
|
-
}
|
206
|
-
if (update && p.inputField) {
|
207
|
-
p.inputField.value = cal.currentDate.print(p.ifFormat);
|
208
|
-
if (typeof p.inputField.onchange == "function")
|
209
|
-
p.inputField.onchange();
|
210
|
-
}
|
211
|
-
if (update && p.displayArea)
|
212
|
-
p.displayArea.innerHTML = cal.currentDate.print(p.daFormat);
|
213
|
-
if (update && p.singleClick && cal.dateClicked)
|
214
|
-
cal.callCloseHandler();
|
215
|
-
if (update && typeof p.onUpdate == "function")
|
216
|
-
p.onUpdate(cal);
|
217
|
-
if (p.saveDate) { //save date in cookie
|
218
|
-
//unique name of the cookie is the name of the button + href
|
219
|
-
var cookieName = p.cookiePrefix;
|
220
|
-
Zapatec.Utils.writeCookie(cookieName, p.inputField.value, null, '/', p.saveDate);
|
221
|
-
}
|
222
|
-
};
|
223
|
-
|
224
|
-
if (params.flat != null) {
|
225
|
-
if (typeof params.flat == "string")
|
226
|
-
params.flat = document.getElementById(params.flat);
|
227
|
-
if (!params.flat) {
|
228
|
-
alert("Calendar.setup '" + params.id + "':\n Flat specified but can't find parent.");
|
229
|
-
return false;
|
230
|
-
}
|
231
|
-
var cal = new Zapatec.Calendar(params.firstDay, params.date, params.onSelect || onSelect);
|
232
|
-
cal.id = params.id;
|
233
|
-
cal.disableFdowClick = params.disableFdowChange;
|
234
|
-
cal.showsOtherMonths = params.showOthers;
|
235
|
-
cal.showsTime = params.showsTime;
|
236
|
-
cal.time24 = (params.timeFormat == "24");
|
237
|
-
cal.timeInterval = params.timeInterval;
|
238
|
-
cal.params = params;
|
239
|
-
cal.weekNumbers = params.weekNumbers;
|
240
|
-
cal.sortOrder = params.sortOrder.toLowerCase();
|
241
|
-
cal.setRange(params.range[0], params.range[1]);
|
242
|
-
cal.setDateStatusHandler(params.dateStatusFunc);
|
243
|
-
cal.getDateText = params.dateText;
|
244
|
-
cal.numberMonths = params.numberMonths;
|
245
|
-
cal.controlMonth = params.controlMonth;
|
246
|
-
cal.vertical = params.vertical;
|
247
|
-
cal.yearStep = params.step;
|
248
|
-
cal.monthsInRow = params.monthsInRow;
|
249
|
-
cal.helpButton = !params.noHelp;
|
250
|
-
cal.closeButton = !params.noCloseButton;
|
251
|
-
cal.yearNav = !params.disableYearNav;
|
252
|
-
if (params.ifFormat) {
|
253
|
-
cal.setDateFormat(params.ifFormat);
|
254
|
-
}
|
255
|
-
|
256
|
-
if (params.inputField && params.inputField.type == "text" && typeof params.inputField.value == "string") {
|
257
|
-
cal.parseDate(params.inputField.value);
|
258
|
-
}
|
259
|
-
|
260
|
-
if (params.multiple) {
|
261
|
-
cal.setMultipleDates(params.multiple);
|
262
|
-
}
|
263
|
-
cal.create(params.flat);
|
264
|
-
cal.show();
|
265
|
-
return cal;
|
266
|
-
}
|
267
|
-
|
268
|
-
var triggerEl = params.button || params.displayArea || params.inputField;
|
269
|
-
triggerEl["on" + params.eventName] = function() {
|
270
|
-
var dateEl = params.inputField || params.displayArea;
|
271
|
-
//FIX for Enter key!
|
272
|
-
if (triggerEl.blur) {triggerEl.blur();}
|
273
|
-
var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
|
274
|
-
var mustCreate = false;
|
275
|
-
var cal = window.calendar;
|
276
|
-
|
277
|
-
// Exit if calendar is NOT hidden and user tries to create another calendar (Click or SpaceBar)
|
278
|
-
// Rev 1.9 - this needs to be integrated, it broke the multiple month feature
|
279
|
-
//if (cal && !cal.hidden) return false;
|
280
|
-
|
281
|
-
if (!(cal && params.cache)) {
|
282
|
-
window.calendar = cal = new Zapatec.Calendar(params.firstDay,
|
283
|
-
params.date,
|
284
|
-
params.onSelect || onSelect,
|
285
|
-
params.onClose || function(cal) {
|
286
|
-
if (params.cache)
|
287
|
-
cal.hide();
|
288
|
-
else
|
289
|
-
cal.destroy();
|
290
|
-
});
|
291
|
-
cal.id = params.id;
|
292
|
-
cal.disableFdowClick = params.disableFdowChange;
|
293
|
-
cal.showsTime = params.showsTime;
|
294
|
-
cal.time24 = (params.timeFormat == "24");
|
295
|
-
cal.timeInterval = params.timeInterval;
|
296
|
-
cal.weekNumbers = params.weekNumbers;
|
297
|
-
cal.numberMonths = params.numberMonths;
|
298
|
-
cal.controlMonth = params.controlMonth;
|
299
|
-
cal.vertical = params.vertical;
|
300
|
-
cal.monthsInRow = params.monthsInRow;
|
301
|
-
cal.historyDateFormat = params.ifFormat || params.daFormat;
|
302
|
-
cal.helpButton = !params.noHelp;
|
303
|
-
cal.disableDrag = params.disableDrag;
|
304
|
-
cal.closeButton = !params.noCloseButton;
|
305
|
-
cal.yearNav = !params.disableYearNav;
|
306
|
-
mustCreate = true;
|
307
|
-
} else {
|
308
|
-
if (params.date)
|
309
|
-
cal.setDate(params.date);
|
310
|
-
cal.hide();
|
311
|
-
}
|
312
|
-
|
313
|
-
if (params.multiple) {
|
314
|
-
cal.setMultipleDates(params.multiple);
|
315
|
-
}
|
316
|
-
|
317
|
-
cal.showsOtherMonths = params.showOthers;
|
318
|
-
cal.yearStep = params.step;
|
319
|
-
cal.setRange(params.range[0], params.range[1]);
|
320
|
-
cal.params = params;
|
321
|
-
cal.setDateStatusHandler(params.dateStatusFunc);
|
322
|
-
cal.getDateText = params.dateText;
|
323
|
-
cal.setDateFormat(dateFmt);
|
324
|
-
if (mustCreate)
|
325
|
-
cal.create();
|
326
|
-
if (dateEl) {
|
327
|
-
var dateValue;
|
328
|
-
//figure out if the it's in value or innerHTML
|
329
|
-
if (dateEl.value) {
|
330
|
-
dateValue = dateEl.value;
|
331
|
-
} else {
|
332
|
-
dateValue = dateEl.innerHTML;
|
333
|
-
}
|
334
|
-
if (dateValue != "") { //if there is a date to initialize from
|
335
|
-
var parsedDate = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt);
|
336
|
-
//This check for when webmaster initializes the box with something like
|
337
|
-
//"check in"
|
338
|
-
if (parsedDate != null) { //if it's parsable
|
339
|
-
cal.setDate(parsedDate);
|
340
|
-
}
|
341
|
-
}
|
342
|
-
}
|
343
|
-
if (!params.position)
|
344
|
-
cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
|
345
|
-
else
|
346
|
-
cal.showAt(params.position[0], params.position[1]);
|
347
|
-
return false;
|
348
|
-
};
|
349
|
-
|
350
|
-
if (params.closeEventName) {
|
351
|
-
triggerEl["on" + params.closeEventName] = function() {
|
352
|
-
if (window.calendar)
|
353
|
-
window.calendar.callCloseHandler();
|
354
|
-
};
|
355
|
-
}
|
356
|
-
|
357
|
-
return cal;
|
358
|
-
};
|
359
|
-
|
360
|
-
|