card 1.98.0 → 1.99.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/VERSION +1 -1
- data/config/locales/de.yml +7 -7
- data/config/locales/en.yml +7 -7
- data/config/locales/es.yml +7 -7
- data/db/migrate/20190929202325_rename_present_in_reference_table.rb +9 -0
- data/db/migrate_core_cards/20150610180019_add_recaptcha_key_and_admin_info_cards.rb +3 -3
- data/db/migrate_core_cards/20160801143221_change_bootstrap_card_type_to_scss.rb +1 -1
- data/db/migrate_core_cards/20160804112510_reorganize_scripts.rb +1 -1
- data/db/migrate_core_cards/20160908154210_add_trash_card.rb +1 -1
- data/db/migrate_core_cards/20180508210903_add_json_type.rb +3 -3
- data/db/migrate_core_cards/20180712042655_head_rule.rb +1 -1
- data/db/migrate_core_cards/{20180905061536_migrate_layouts.rb → 20180905061537_migrate_layouts.rb} +12 -1
- data/db/migrate_core_cards/20190204195039_add_rule_card.rb +3 -0
- data/db/migrate_core_cards/20190320091257_upgrade_recaptcha_to_v3.rb +5 -6
- data/db/migrate_core_cards/20190417142612_reorganize_scripts_2.rb +3 -3
- data/db/migrate_core_cards/20190502130029_add_shark_and_help_desk_role.rb +4 -5
- data/db/migrate_core_cards/20190618110446_add_dropdown_divider.rb +1 -1
- data/db/migrate_core_cards/20190710090209_homepage_tweaks.rb +17 -0
- data/db/migrate_core_cards/20190718140126_add_guides.rb +19 -0
- data/db/migrate_core_cards/20190820155833_update_cardtype_type_structure.rb +7 -0
- data/db/migrate_core_cards/20190822093633_move_help_text_to_code.rb +38 -0
- data/db/migrate_core_cards/20190823220018_cleanup_for_decko_1_0.rb +21 -0
- data/db/migrate_core_cards/20190826132738_add_more_guides.rb +7 -0
- data/db/migrate_core_cards/20190829093961_cardtype_grouping.rb +16 -0
- data/db/migrate_core_cards/20190829205148_remove_add_help.rb +14 -0
- data/db/migrate_core_cards/20190830131820_setting_settings_aside.rb +17 -0
- data/db/migrate_core_cards/20190902161223_add_style_media.rb +7 -0
- data/db/migrate_core_cards/20190902193208_input_type.rb +22 -0
- data/db/migrate_core_cards/20190904174403_token_upgrade.rb +14 -0
- data/db/migrate_core_cards/20190909104250_add_cardtype_input_types.rb +10 -0
- data/db/migrate_core_cards/20190918200115_ensure_description_card.rb +13 -0
- data/db/migrate_core_cards/20191008201046_fixture_fix.rb +9 -0
- data/db/migrate_core_cards/data/cards.yml +12 -8
- data/db/migrate_core_cards/data/cards/Xaccount +22 -0
- data/db/migrate_core_cards/data/cards/Xaccount_setting-Xright-Xstructure +9 -2
- data/db/migrate_core_cards/data/cards/Xgetting_started +5 -5
- data/db/migrate_core_cards/data/cards/{Xgetting_started-link → Xgetting_started_link} +0 -0
- data/db/migrate_core_cards/data/cards/Xmain_menu +1 -1
- data/db/migrate_core_cards/data/cards/Xstructure-Xright-Xguide +12 -0
- data/db/migrate_core_cards/data/cards/administrator-dashboard +5 -0
- data/db/migrate_core_cards/data/cards/anyone_signed_in-dashboard +0 -2
- data/db/migrate_core_cards/data/cards/cardtype-Xtype-Xguide +24 -0
- data/db/migrate_core_cards/data/cards/cardtype-Xtype-Xstructure +3 -3
- data/db/migrate_core_cards/data/cards/shark-dashboard +2 -2
- data/db/migrate_core_cards/data/mailer/password_reset_email.html +6 -3
- data/db/migrate_core_cards/data/mailer/password_reset_email.txt +1 -1
- data/db/migrate_core_cards/data/mailer/verification_email.html +5 -2
- data/db/migrate_core_cards/data/mailer/verification_email.txt +2 -1
- data/db/schema.rb +1 -1
- data/db/seed/README.md +1 -1
- data/db/seed/new/card_actions.yml +2904 -3448
- data/db/seed/new/card_acts.yml +2 -2
- data/db/seed/new/card_references.yml +3124 -3215
- data/db/seed/new/cards.yml +4199 -5156
- data/db/seed/new/schema_migrations.yml +2 -0
- data/db/seed/new/schema_migrations_core_cards.yml +81 -37
- data/db/seed/test/fixtures/card_actions.yml +4136 -4688
- data/db/seed/test/fixtures/card_acts.yml +503 -509
- data/db/seed/test/fixtures/card_changes.yml +66 -66
- data/db/seed/test/fixtures/card_references.yml +4083 -4174
- data/db/seed/test/fixtures/cards.yml +4220 -5429
- data/db/seed/test/fixtures/schema_migrations.yml +2 -0
- data/db/seed/test/fixtures/schema_migrations_core_cards.yml +81 -37
- data/db/{seed/test/seed.rb → test_seed.rb} +13 -11
- data/db/version.txt +1 -1
- data/lib/card/act_manager.rb +15 -45
- data/lib/card/act_manager/event_delay.rb +48 -0
- data/lib/card/act_manager/stage_director.rb +2 -2
- data/lib/card/act_manager/stage_director/phases.rb +3 -6
- data/lib/card/auth.rb +1 -0
- data/lib/card/auth/current.rb +30 -27
- data/lib/card/auth/setup.rb +13 -12
- data/lib/card/auth/token.rb +38 -0
- data/lib/card/content.rb +34 -7
- data/lib/card/content/clean.rb +2 -1
- data/lib/card/content/truncate.rb +2 -0
- data/lib/card/dirty.rb +2 -1
- data/lib/card/env/success.rb +1 -14
- data/lib/card/error.rb +3 -1
- data/lib/card/format.rb +4 -1
- data/lib/card/format/content.rb +2 -2
- data/lib/card/format/error.rb +3 -2
- data/lib/card/format/nest.rb +1 -1
- data/lib/card/format/nesting.rb +2 -2
- data/lib/card/format/nesting/mode.rb +15 -15
- data/lib/card/migration.rb +3 -5
- data/lib/card/mod/loader.rb +5 -0
- data/lib/card/model/save_helper.rb +2 -0
- data/lib/card/query.rb +1 -0
- data/lib/card/query/abstract_query/tie.rb +2 -2
- data/lib/card/query/card_query/match_attributes.rb +19 -1
- data/lib/card/query/card_query/reference_attributes.rb +4 -2
- data/lib/card/query/reference_query.rb +1 -1
- data/lib/card/seed_consts.rb +1 -1
- data/lib/card/set/event/delayed_event.rb +2 -0
- data/lib/card/set/format/abstract_format.rb +3 -5
- data/lib/card/set/format/abstract_format/view_opts.rb +1 -1
- data/lib/card/set/required_field.rb +8 -3
- data/lib/card/set_pattern.rb +10 -0
- data/lib/card/tasks/card/file_card_creator.rb +6 -1
- data/lib/card/tasks/card/file_card_creator/abstract_file_card.rb +5 -0
- data/lib/card/tasks/card/file_card_creator/script_card.rb +2 -0
- data/lib/card/view/cache/stub.rb +3 -20
- data/lib/card/view/options.rb +4 -3
- data/lib/card/view/options/voo_api.rb +1 -1
- data/lib/cardio.rb +7 -1
- data/lib/cardio/schema.rb +18 -14
- data/mod/Modfile +1 -0
- data/mod/account/set/abstract/account_field.rb +15 -0
- data/mod/account/set/abstract/accounted.rb +15 -0
- data/mod/account/set/all/account.rb +3 -4
- data/mod/account/set/right/account.rb +23 -155
- data/mod/account/set/right/account/events.rb +98 -0
- data/mod/account/set/right/account/views.rb +65 -0
- data/mod/account/set/right/api_key.rb +48 -0
- data/mod/account/set/right/email.rb +2 -2
- data/mod/account/set/right/password.rb +6 -9
- data/mod/account/set/right/salt.rb +5 -1
- data/mod/account/set/right/status.rb +10 -1
- data/mod/account/set/self/signin.rb +3 -3
- data/mod/account/set/type/role.rb +4 -0
- data/mod/account/set/type/signup.rb +31 -160
- data/mod/account/{template → set}/type/signup/core.haml +0 -0
- data/mod/account/set/type/signup/views.rb +93 -0
- data/mod/account/set/type/user.rb +16 -27
- data/mod/account/set/type/user/setup_help.haml +10 -0
- data/mod/account/spec/set/all/account_spec.rb +84 -98
- data/mod/account/spec/set/right/account_spec.rb +40 -34
- data/mod/account/spec/set/self/signin_spec.rb +2 -2
- data/mod/account/spec/set/type/signup_spec.rb +40 -77
- data/mod/ace_editor/db/migrate_core_cards/{20160805112548_delete_ace_help_card.rb → 20180805112548_delete_ace_help_card.rb} +1 -1
- data/mod/admin/set/self/debugger.rb +3 -0
- data/mod/admin/set/self/trash.rb +1 -1
- data/mod/basic_formats/set/all/all_css.rb +1 -1
- data/mod/basic_formats/set/all/all_csv.rb +1 -1
- data/mod/basic_formats/set/all/base.rb +19 -60
- data/mod/basic_formats/set/self/head.rb +1 -1
- data/mod/basic_types/set/type/html.rb +7 -3
- data/mod/basic_types/set/type/json.rb +1 -1
- data/mod/basic_types/set/type/plain_text.rb +1 -1
- data/mod/{standard → basic_types}/spec/set/type/html_spec.rb +6 -6
- data/mod/basic_types/spec/set/type/plain_text_spec.rb +7 -2
- data/mod/bootstrap/db/migrate_core_cards/20170719163733_update_bootswatch_themes_to_4_beta.rb +3 -3
- data/mod/bootstrap/db/migrate_core_cards/20180423160231_migrate_customized_bootstrap_skin.rb +2 -2
- data/mod/bootstrap/db/migrate_core_cards/20180423170283_add_type_bootswatch_skin.rb +1 -1
- data/mod/bootstrap/db/migrate_core_cards/lib/skin.rb +1 -1
- data/mod/bootstrap/lib/javascript/script_load_select2.js.coffee +27 -18
- data/mod/bootstrap/lib/stylesheets/style_bootstrap_cards.scss +19 -9
- data/mod/bootstrap/set/abstract/bootswatch_theme/html_views.rb +1 -1
- data/mod/bootstrap/set/all/bootstrap/helper.rb +9 -4
- data/mod/bootstrap/set/all/bootstrap/tabs.rb +1 -1
- data/mod/bootstrap/set/type/customized_bootswatch_skin.rb +1 -1
- data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors.rb +1 -1
- data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors/{editor.haml → input.haml} +0 -0
- data/mod/bootstrap/spec/set/all/bootstrap/bootstrap_builder_spec.rb +1 -1
- data/mod/bootstrap/spec/set/all/bootstrap/form_spec.rb +2 -2
- data/mod/carrierwave/lib/carrier_wave/file_card_uploader.rb +8 -2
- data/mod/carrierwave/set/abstract/attachment.rb +2 -3
- data/mod/carrierwave/set/abstract/attachment/storage_type.rb +1 -2
- data/mod/carrierwave/set/abstract/attachment/upload_cache.rb +1 -2
- data/mod/carrierwave/set/self/favicon.rb +5 -0
- data/mod/carrierwave/set/self/new_file.rb +1 -1
- data/mod/carrierwave/set/self/new_image.rb +1 -1
- data/mod/carrierwave/set/type/file.rb +1 -1
- data/mod/carrierwave/set/type/image.rb +2 -2
- data/mod/carrierwave/set/type/image/html_views.rb +0 -35
- data/mod/carrierwave/spec/set/type/image_spec.rb +1 -1
- data/mod/core/chunk/link.rb +4 -2
- data/mod/core/chunk/view_stub.rb +5 -4
- data/mod/core/set/abstract/code_file.rb +1 -1
- data/mod/core/set/all/abort.rb +1 -0
- data/mod/core/set/all/codename.rb +2 -1
- data/mod/core/set/all/content.rb +59 -0
- data/mod/core/set/all/event_conditions.rb +33 -7
- data/mod/core/set/all/fetch_helper.rb +4 -1
- data/mod/core/set/all/location_history.rb +1 -1
- data/mod/core/set/all/name.rb +1 -1
- data/mod/core/set/all/name_events.rb +3 -2
- data/mod/core/set/all/permissions.rb +6 -36
- data/mod/core/set/all/references.rb +12 -5
- data/mod/core/set/all/rename.rb +3 -2
- data/mod/core/set/all/rules.rb +0 -5
- data/mod/core/set/all/update_read_rules.rb +1 -19
- data/mod/core/set_pattern/03_type.rb +4 -0
- data/mod/core/set_pattern/07_right.rb +4 -0
- data/mod/core/set_pattern/08_type_plus_right.rb +4 -0
- data/mod/core/set_pattern/09_self.rb +4 -0
- data/mod/core/spec/chunk/link_spec.rb +6 -0
- data/mod/core/spec/chunk/nest_spec.rb +2 -2
- data/mod/core/spec/set/all/event_conditions_spec.rb +36 -38
- data/mod/core/spec/set/all/name_events_spec.rb +1 -1
- data/mod/core/spec/set/all/permissions_spec.rb +1 -11
- data/mod/core/spec/set/all/rules_spec.rb +6 -16
- data/mod/date/set/all/calendar.rb +1 -1
- data/mod/date/set/self/datepicker.rb +6 -0
- data/mod/date/set/type/date.rb +1 -1
- data/mod/date/spec/set/type/date_spec.rb +1 -1
- data/mod/date/vendor/moment/CHANGELOG.md +8 -0
- data/mod/date/vendor/moment/Moment.js.nuspec +5 -5
- data/mod/date/vendor/moment/component.json +1 -1
- data/mod/date/vendor/moment/locale/az.js +1 -1
- data/mod/date/vendor/moment/locale/be.js +1 -1
- data/mod/date/vendor/moment/locale/pa-in.js +1 -1
- data/mod/date/vendor/moment/meteor/moment.js +1 -1
- data/mod/date/vendor/moment/meteor/package.js +1 -1
- data/mod/date/vendor/moment/min/locales.js +28 -28
- data/mod/date/vendor/moment/min/locales.min.js +1 -1
- data/mod/date/vendor/moment/min/moment-with-locales.js +33 -33
- data/mod/date/vendor/moment/min/moment-with-locales.min.js +1 -1
- data/mod/date/vendor/moment/min/moment.min.js +1 -1
- data/mod/date/vendor/moment/min/tests.js +48 -11
- data/mod/date/vendor/moment/moment.js +5 -5
- data/mod/date/vendor/moment/package.json +2 -2
- data/mod/date/vendor/moment/src/lib/create/from-string.js +1 -1
- data/mod/date/vendor/moment/src/lib/units/day-of-week.js +3 -3
- data/mod/date/vendor/moment/src/locale/az.js +1 -1
- data/mod/date/vendor/moment/src/locale/be.js +1 -1
- data/mod/date/vendor/moment/src/locale/pa-in.js +1 -1
- data/mod/date/vendor/moment/src/moment.js +2 -2
- data/mod/date/vendor/moment/src/test/locale/az.js +5 -5
- data/mod/date/vendor/moment/src/test/locale/be.js +3 -0
- data/mod/date/vendor/moment/src/test/locale/pa-in.js +3 -3
- data/mod/date/vendor/moment/src/test/moment/locale.js +33 -0
- data/mod/date/vendor/moment/src/test/moment/start_end_of.js +1 -1
- data/mod/date/vendor/moment/src/test/moment/weeks.js +2 -2
- data/mod/date/vendor/tempusdominus/Gruntfile.js +7 -49
- data/mod/date/vendor/tempusdominus/build/css/tempusdominus-bootstrap-4.css +3 -1
- data/mod/date/vendor/tempusdominus/build/css/tempusdominus-bootstrap-4.min.css +3 -1
- data/mod/date/vendor/tempusdominus/build/js/tempusdominus-bootstrap-4.js +128 -116
- data/mod/date/vendor/tempusdominus/build/js/tempusdominus-bootstrap-4.min.js +3 -3
- data/mod/date/vendor/tempusdominus/composer.json +3 -3
- data/mod/date/vendor/tempusdominus/docs/Changelog/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/ContributorsGuide/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/Events/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/Extras/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/FAQ/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/Functions/index.html +20 -36
- data/mod/date/vendor/tempusdominus/docs/Installing/index.html +30 -50
- data/mod/date/vendor/tempusdominus/docs/Options/index.html +21 -37
- data/mod/date/vendor/tempusdominus/docs/Usage/index.html +20 -40
- data/mod/date/vendor/tempusdominus/docs/css/base.css +1682 -0
- data/mod/date/vendor/tempusdominus/docs/css/tempusdominus-bootstrap-4.css +3 -1
- data/mod/date/vendor/tempusdominus/docs/index.html +26 -41
- data/mod/date/vendor/tempusdominus/docs/js/tempusdominus-bootstrap-4.js +127 -115
- data/mod/date/vendor/tempusdominus/docs/search/search_index.json +11 -16
- data/mod/date/vendor/tempusdominus/docs/sitemap.xml +10 -10
- data/mod/date/vendor/tempusdominus/docs/theme/base.html +11 -12
- data/mod/date/vendor/tempusdominus/docs/theme/css/base.css +1682 -0
- data/mod/date/vendor/tempusdominus/docs/theme/css/tempusdominus-bootstrap-4.css +3 -1
- data/mod/date/vendor/tempusdominus/docs/theme/js/tempusdominus-bootstrap-4.js +127 -115
- data/mod/date/vendor/tempusdominus/docs/theme/toc.html +1 -0
- data/mod/date/vendor/tempusdominus/package-lock.json +4085 -8197
- data/mod/date/vendor/tempusdominus/package.json +17 -19
- data/mod/date/vendor/tempusdominus/src/docs/Installing.md +12 -18
- data/mod/date/vendor/tempusdominus/src/docs/Options.md +1 -1
- data/mod/date/vendor/tempusdominus/src/docs/Usage.md +0 -2
- data/mod/date/vendor/tempusdominus/src/docs/index.md +7 -5
- data/mod/date/vendor/tempusdominus/src/docs/theme/base.html +11 -12
- data/mod/date/vendor/tempusdominus/src/docs/theme/css/base.css +1682 -0
- data/mod/date/vendor/tempusdominus/src/docs/theme/css/tempusdominus-bootstrap-4.css +3 -1
- data/mod/date/vendor/tempusdominus/src/docs/theme/js/tempusdominus-bootstrap-4.js +127 -115
- data/mod/date/vendor/tempusdominus/src/docs/theme/toc.html +1 -0
- data/mod/date/vendor/tempusdominus/src/js/tempusdominus-bootstrap-4.js +32 -12
- data/mod/date/vendor/tempusdominus/src/sass/_tempusdominus-bootstrap-4.scss +4 -0
- data/mod/date/vendor/tempusdominus/src/sass/tempusdominus-bootstrap-4-build.scss +2 -2
- data/mod/edit/set/all/bridge.rb +4 -1
- data/mod/edit/set/all/bridge/account_section.rb +16 -0
- data/mod/edit/set/all/bridge/bridge_pills.rb +47 -0
- data/mod/edit/set/all/bridge/related_section.rb +34 -0
- data/mod/edit/set/all/bridge/tab_views.rb +13 -40
- data/mod/edit/set/all/bridge/tab_visibility.rb +6 -2
- data/mod/edit/set/all/edit_content.rb +12 -3
- data/mod/edit/set/all/edit_inline.rb +15 -8
- data/mod/edit/set/all/edit_name.rb +5 -7
- data/mod/edit/set/all/edit_type.rb +84 -11
- data/mod/edit/set/all/editing.rb +7 -3
- data/mod/edit/set/all/editor.rb +28 -15
- data/mod/edit/set/all/form.rb +34 -74
- data/mod/edit/set/all/form_buttons.rb +12 -3
- data/mod/edit/set/all/formgroup.rb +5 -5
- data/mod/edit/set/all/nest_editor.rb +20 -4
- data/mod/edit/set/all/nest_editor/_help.haml +7 -0
- data/mod/edit/set/all/nest_editor/nest_editor.haml +3 -2
- data/mod/edit/set/all/new.rb +65 -3
- data/mod/edit/set/all/overlay_guide.haml +7 -0
- data/mod/edit/set/all/overlay_guide.rb +9 -0
- data/mod/edit/set/all/template_nest.rb +42 -0
- data/mod/edit/set/type/list.rb +15 -0
- data/mod/edit/set/type/plain_text.rb +13 -0
- data/mod/edit/set/type/pointer.rb +11 -0
- data/mod/edit/spec/set/all/bridge/tab_views_spec.rb +1 -1
- data/mod/edit/spec/set/all/nest_editor_spec.rb +1 -1
- data/mod/email/set/all/email_html.rb +2 -2
- data/mod/email/set/all/email_text.rb +2 -2
- data/mod/follow/lib/card/follower_stash.rb +1 -1
- data/mod/follow/set/all/follow/followed_by.rb +1 -1
- data/mod/follow/set/all/notify/base_views.rb +4 -6
- data/mod/follow/set/right/following.rb +1 -1
- data/mod/follow/set/self/follow_defaults.rb +1 -1
- data/mod/follow/set/type/cardtype.rb +6 -0
- data/mod/follow/set/type_plus_right/user/follow.rb +1 -1
- data/mod/history/lib/card/act/act_renderer.rb +1 -1
- data/mod/history/lib/card/action.rb +2 -1
- data/mod/history/set/all/history_bridge.rb +0 -1
- data/mod/history/spec/set/all/history/views_spec.rb +1 -1
- data/mod/item/set/all/bar.rb +15 -7
- data/mod/machines/file/all_script_machine_output/file.js +72 -38108
- data/mod/machines/file/all_style_machine_output/file.css +4 -4
- data/mod/machines/file/script_html5shiv_printshiv_machine_output/file.js +1 -1
- data/mod/machines/lib/javascript/decko/bridge.js.coffee +4 -0
- data/mod/machines/lib/javascript/decko/card_menu.js.coffee +11 -0
- data/mod/machines/lib/javascript/decko/decko.js.coffee +12 -3
- data/mod/machines/lib/javascript/decko/name_editor.js.coffee +1 -1
- data/mod/machines/lib/javascript/decko/nest_editor.js.coffee +3 -1
- data/mod/machines/lib/javascript/decko/nest_editor_name.js.coffee +29 -6
- data/mod/machines/lib/javascript/decko/overlay.js.coffee +6 -2
- data/mod/machines/lib/javascript/decko/slot.js.coffee +12 -2
- data/mod/machines/lib/javascript/decko/slotter.js.coffee +8 -0
- data/mod/machines/lib/javascript/decko/upload.js.coffee +1 -1
- data/mod/machines/lib/stylesheets/style_cards.scss +57 -52
- data/mod/machines/lib/stylesheets/style_jquery_ui_smoothness.css +13 -13
- data/mod/machines/set/abstract/script.rb +1 -1
- data/mod/machines/set/type/css.rb +1 -1
- data/mod/machines/spec/set/type/css_spec.rb +14 -14
- data/mod/machines/spec/shared_examples/machine_input.rb +6 -10
- data/mod/media/lib/stylesheets/style_image_box.scss +79 -0
- data/mod/{utility → media}/set/abstract/media.rb +0 -0
- data/mod/{utility → media}/set/abstract/media/media_snippet.haml +0 -0
- data/mod/media/set/self/style_media.rb +6 -0
- data/mod/media/set/type/image.rb +38 -0
- data/mod/{utility → media}/spec/set/abstract/media_spec.rb +0 -0
- data/mod/navbar/set/abstract/{roles_dropdown.rb → account_dropdown.rb} +8 -2
- data/mod/navbar/set/right/enabled_roles.rb +7 -9
- data/mod/navbar/set/self/account_links.rb +4 -3
- data/mod/navbar/spec/set/self/account_links_spec.rb +31 -0
- data/mod/pointer/lib/javascript/script_pointer_config.js.coffee +13 -0
- data/mod/pointer/lib/javascript/script_pointer_list_editor.js.coffee +7 -2
- data/mod/pointer/set/abstract/02_pointer/html_views.rb +16 -7
- data/mod/pointer/set/abstract/02_pointer/html_views/checkbox_input.haml +1 -2
- data/mod/pointer/set/abstract/02_pointer/html_views/list_input.haml +1 -2
- data/mod/pointer/set/abstract/02_pointer/html_views/list_item.haml +2 -0
- data/mod/pointer/set/abstract/02_pointer/html_views/radio_input.haml +1 -2
- data/mod/pointer/set/abstract/02_pointer/options_api.rb +6 -13
- data/mod/pointer/set/right/{options.rb → content_options.rb} +0 -0
- data/mod/pointer/set/type/link_list.rb +23 -6
- data/mod/pointer/set/type/link_list/link_list_input.haml +24 -0
- data/mod/pointer/set/type/mirrored_list.rb +1 -1
- data/mod/pointer/spec/set/abstract/pointer/html_views_spec.rb +20 -18
- data/mod/pointer/spec/set/abstract/pointer/options_api_spec.rb +2 -1
- data/mod/pointer/spec/set/self/input_options_spec.rb +1 -1
- data/mod/rules/set/right/self.rb +3 -0
- data/mod/rules/set/rule/bar_view.rb +88 -0
- data/mod/rules/set/rule/bridge_rules_editor.rb +5 -10
- data/mod/rules/set/rule/editor.rb +40 -113
- data/mod/rules/set/rule/html_views.rb +13 -0
- data/mod/rules/set/rule/quick_editor.rb +39 -0
- data/mod/rules/set/rule/{editor → quick_editor}/quick_edit.haml +0 -0
- data/mod/rules/set/rule/{editor → quick_editor}/set_info.haml +1 -1
- data/mod/rules/set/rule/rule_form/buttons.rb +3 -1
- data/mod/rules/set/rule/rule_form/form_elements.rb +2 -2
- data/mod/rules/set/rule/rule_form/rule_set_radio.rb +3 -6
- data/mod/rules/set/rule/rule_form/set_selection.rb +3 -10
- data/mod/rules/set/rule/rules.rb +10 -1
- data/mod/rules/set/type/set.rb +37 -20
- data/mod/rules/set/type/set/html_views.rb +17 -35
- data/mod/rules/set/type/set/html_views/group_panel.haml +1 -1
- data/mod/rules/set/type/set/html_views/rule_lists.rb +42 -0
- data/mod/rules/set/type/set/html_views/template.rb +1 -32
- data/mod/rules/set/type/set/rules_filter.rb +24 -10
- data/mod/rules/set/type/set/setting_lists.rb +18 -25
- data/mod/rules/spec/set/rule/bar_view_spec.rb +15 -0
- data/mod/rules/spec/set/rule/editor_spec.rb +15 -1
- data/mod/rules/spec/set/type/set/html_views_spec.rb +0 -13
- data/mod/rules/spec/set/type/set/setting_lists_spec.rb +17 -0
- data/mod/rules/spec/set/type/set_spec.rb +3 -8
- data/mod/search/set/abstract/03_filter/form_helper.rb +11 -9
- data/mod/search/set/abstract/search/views.rb +2 -2
- data/mod/search/set/right/children.rb +4 -0
- data/mod/search/set/right/created.rb +3 -0
- data/mod/search/set/right/edited.rb +3 -0
- data/mod/search/set/right/editors.rb +3 -0
- data/mod/search/set/right/follow.rb +3 -0
- data/mod/search/set/right/linked_to_by.rb +3 -0
- data/mod/search/set/right/links_to.rb +3 -0
- data/mod/search/set/right/mates.rb +3 -0
- data/mod/search/set/right/nested_by.rb +3 -0
- data/mod/search/set/right/nests.rb +3 -0
- data/mod/search/set/right/referred_to_by.rb +3 -0
- data/mod/search/set/right/refers_to.rb +3 -0
- data/mod/search/set/self/search.rb +3 -1
- data/mod/search/set/type/search_type.rb +6 -5
- data/mod/settings/lib/card/setting.rb +17 -4
- data/mod/settings/set/abstract/permission.rb +6 -2
- data/mod/settings/set/all/supports_content_options.rb +7 -0
- data/mod/settings/set/right/content_option_view.rb +10 -0
- data/mod/settings/set/right/content_options.rb +18 -0
- data/mod/settings/set/right/default.rb +18 -2
- data/mod/settings/set/right/guide.rb +8 -0
- data/mod/settings/set/right/help.rb +2 -1
- data/mod/settings/set/right/input_type.rb +35 -0
- data/mod/settings/set/right/read.rb +1 -1
- data/mod/settings/set/right/script.rb +6 -0
- data/mod/settings/set/right/structure.rb +7 -1
- data/mod/settings/set/right/style.rb +2 -2
- data/mod/settings/set/right/style/{editor.haml → input.haml} +0 -0
- data/mod/settings/set/self/autoname.rb +3 -1
- data/mod/settings/set/self/captcha.rb +4 -1
- data/mod/settings/set/self/content_option_view.rb +10 -0
- data/mod/settings/set/self/content_options.rb +10 -0
- data/mod/settings/set/self/create.rb +2 -1
- data/mod/settings/set/self/default.rb +1 -1
- data/mod/settings/set/self/delete.rb +2 -1
- data/mod/settings/set/self/guide.rb +3 -0
- data/mod/settings/set/self/head.rb +3 -1
- data/mod/settings/set/self/help.rb +3 -1
- data/mod/settings/set/self/input_type.rb +13 -0
- data/mod/settings/set/self/layout.rb +3 -1
- data/mod/settings/set/self/on_create.rb +2 -1
- data/mod/settings/set/self/on_delete.rb +2 -1
- data/mod/settings/set/self/on_update.rb +2 -1
- data/mod/settings/set/self/read.rb +2 -1
- data/mod/settings/set/self/structure.rb +3 -1
- data/mod/settings/set/self/style.rb +3 -1
- data/mod/settings/set/self/table_of_contents.rb +4 -1
- data/mod/settings/set/self/thanks.rb +3 -1
- data/mod/settings/set/self/update.rb +2 -1
- data/mod/settings/set/type/setting.rb +15 -37
- data/mod/settings/spec/set/right/comment_spec.rb +0 -27
- data/mod/settings/spec/set/right/create_spec.rb +1 -1
- data/mod/settings/spec/set/right/structure_spec.rb +13 -10
- data/mod/settings/spec/set/type/setting_spec.rb +1 -8
- data/mod/solid_cache/set/right/solid_cache.rb +3 -3
- data/mod/standard/set/all/comment.rb +2 -1
- data/mod/standard/set/all/error.rb +2 -2
- data/mod/standard/set/all/path.rb +7 -7
- data/mod/standard/set/all/rich_html/content.rb +41 -17
- data/mod/standard/set/all/rich_html/error.rb +16 -24
- data/mod/standard/set/all/rich_html/html_views/guide.rb +51 -0
- data/mod/standard/set/all/rich_html/html_views/help.rb +23 -5
- data/mod/standard/set/all/rich_html/html_views/info.rb +1 -1
- data/mod/standard/set/all/rich_html/menu.rb +50 -2
- data/mod/standard/set/all/rich_html/overlay.rb +24 -2
- data/mod/standard/set/all/rich_html/title.rb +3 -3
- data/mod/standard/set/right/discussion.rb +8 -2
- data/mod/standard/set/right/head.rb +4 -0
- data/mod/standard/set/right/type_plus_right.rb +4 -0
- data/mod/standard/set/self/cardtype.rb +42 -0
- data/mod/standard/set/self/sidebar.rb +5 -0
- data/mod/standard/set/type/basic.rb +2 -2
- data/mod/standard/set/type/cardtype.rb +25 -11
- data/mod/standard/set/type/number.rb +1 -1
- data/mod/standard/set/type/phrase.rb +1 -1
- data/mod/standard/set/type/toggle.rb +9 -1
- data/mod/standard/set/type/uri.rb +1 -1
- data/mod/standard/spec/set/all/error_spec.rb +1 -1
- data/mod/standard/spec/set/type/cardtype_spec.rb +4 -3
- data/mod/standard/spec/set/type/number_spec.rb +1 -1
- data/mod/standard/spec/set/type/phrase_spec.rb +1 -1
- data/mod/standard/spec/set/type/toggle_spec.rb +3 -4
- data/mod/standard/spec/set/type/uri_spec.rb +1 -1
- data/mod/tinymce_editor/lib/javascript/script_tinymce.js +2 -2
- data/mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee +4 -2
- data/mod/tinymce_editor/public/assets/tinymce/jquery.tinymce.min.js +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/advlist/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/anchor/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autolink/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autoresize/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autosave/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/bbcode/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/charmap/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/code/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/codesample/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/colorpicker/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/contextmenu/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/directionality/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/js/emojis.js +8941 -8941
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/fullpage/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/fullscreen/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/help/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/hr/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/image/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/imagetools/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/importcss/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/insertdatetime/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/legacyoutput/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/link/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/lists/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/media/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/nonbreaking/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/noneditable/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/pagebreak/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/paste/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/preview/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/print/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/quickbars/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/save/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/searchreplace/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/spellchecker/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/tabfocus/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/table/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/template/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/textcolor/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/textpattern/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/toc/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualblocks/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualchars/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/plugins/wordcount/plugin.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/skins/content/default/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/content/document/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/content/writer/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.mobile.min.css +7 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/skin.min.css +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -1
- data/mod/tinymce_editor/public/assets/tinymce/themes/mobile/theme.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/themes/silver/theme.min.js +2 -2
- data/mod/tinymce_editor/public/assets/tinymce/tinymce.min.js +2 -2
- data/mod/tinymce_editor/set/self/tiny_mce.rb +7 -0
- metadata +147 -119
- data/db/migrate_core_cards/20190710090207_homepage_tweaks.rb +0 -12
- data/db/migrate_core_cards/data/cards/eagle-description +0 -1
- data/mod/account/set/right/token.rb +0 -54
- data/mod/account/spec/set/right/token_spec.rb +0 -23
- data/mod/bootstrap/set/abstract/bootswatch_theme/thumbnail.haml +0 -10
- data/mod/date/vendor/tempusdominus/src/nuget/NuGet.exe +0 -0
- data/mod/date/vendor/tempusdominus/src/nuget/Tempus.Dominus.Bootstrap.4.nuspec +0 -29
- data/mod/rules/set/rule/table.rb +0 -27
- data/mod/rules/set/rule/table_row.rb +0 -63
- data/mod/rules/set/type/set/html_views/nest_rules.rb +0 -14
- data/mod/rules/set/type/set/html_views/rules_bridge.rb +0 -21
- data/mod/rules/set/type/set/html_views/rules_table.haml +0 -11
- data/mod/rules/set/type/set/html_views/template/template_editor.haml +0 -6
- data/mod/rules/spec/set/rule/table_row_spec.rb +0 -9
- data/mod/rules/spec/set/rule/table_spec.rb +0 -15
- data/mod/settings/set/right/add_help.rb +0 -1
- data/mod/settings/set/self/accountable.rb +0 -3
- data/mod/settings/set/self/add_help.rb +0 -2
- data/mod/settings/set/self/input.rb +0 -3
- data/mod/settings/set/self/options.rb +0 -4
- data/mod/settings/set/self/options_label.rb +0 -4
- data/mod/settings/spec/set/right/add_help_spec.rb +0 -5
- data/mod/tinymce_editor/public/assets/tinymce/plugins/codesample/css/prism.css +0 -138
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/help/img/logo.png +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualblocks/css/visualblocks.css +0 -154
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/content.inline.min.css +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/content.min.css +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/content.mobile.min.css +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.svg +0 -63
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.svg +0 -131
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/object.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/skin.min.css +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/skin.min.css.map +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/skin.mobile.min.css +0 -2
- data/mod/tinymce_editor/public/assets/tinymce/themes/inlite/theme.min.js +0 -1
- data/mod/tinymce_editor/public/assets/tinymce/themes/modern/theme.min.js +0 -1
@@ -1,12 +1,12 @@
|
|
1
1
|
//! moment.js
|
2
|
-
//! version : 2.22.
|
2
|
+
//! version : 2.22.2
|
3
3
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
4
4
|
//! license : MIT
|
5
5
|
//! momentjs.com
|
6
6
|
|
7
7
|
import { hooks as moment, setHookCallback } from './lib/utils/hooks';
|
8
8
|
|
9
|
-
moment.version = '2.22.
|
9
|
+
moment.version = '2.22.2';
|
10
10
|
|
11
11
|
import {
|
12
12
|
min,
|
@@ -119,7 +119,7 @@ test('format week', function (assert) {
|
|
119
119
|
|
120
120
|
test('from', function (assert) {
|
121
121
|
var start = moment([2007, 1, 28]);
|
122
|
-
assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), 'birneçə
|
122
|
+
assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), 'birneçə saniyə', '44 seconds = a few seconds');
|
123
123
|
assert.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), 'bir dəqiqə', '45 seconds = a minute');
|
124
124
|
assert.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), 'bir dəqiqə', '89 seconds = a minute');
|
125
125
|
assert.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), '2 dəqiqə', '90 seconds = 2 minutes');
|
@@ -149,16 +149,16 @@ test('from', function (assert) {
|
|
149
149
|
});
|
150
150
|
|
151
151
|
test('suffix', function (assert) {
|
152
|
-
assert.equal(moment(30000).from(0), 'birneçə
|
153
|
-
assert.equal(moment(0).from(30000), 'birneçə
|
152
|
+
assert.equal(moment(30000).from(0), 'birneçə saniyə sonra', 'prefix');
|
153
|
+
assert.equal(moment(0).from(30000), 'birneçə saniyə əvvəl', 'suffix');
|
154
154
|
});
|
155
155
|
|
156
156
|
test('now from now', function (assert) {
|
157
|
-
assert.equal(moment().fromNow(), 'birneçə
|
157
|
+
assert.equal(moment().fromNow(), 'birneçə saniyə əvvəl', 'now from now should display as in the past');
|
158
158
|
});
|
159
159
|
|
160
160
|
test('fromNow', function (assert) {
|
161
|
-
assert.equal(moment().add({s: 30}).fromNow(), 'birneçə
|
161
|
+
assert.equal(moment().add({s: 30}).fromNow(), 'birneçə saniyə sonra', 'in a few seconds');
|
162
162
|
assert.equal(moment().add({d: 5}).fromNow(), '5 gün sonra', 'in 5 days');
|
163
163
|
});
|
164
164
|
|
@@ -264,3 +264,6 @@ test('weeks year starting sunday formatted', function (assert) {
|
|
264
264
|
assert.equal(moment([2012, 0, 9]).format('w ww wo'), '3 03 3-і', 'Jan 9 2012 should be week 3');
|
265
265
|
});
|
266
266
|
|
267
|
+
test('calendar should format', function (assert) {
|
268
|
+
assert.equal(moment('2018-04-13').calendar(moment('2018-04-16')), 'У мінулую пятніцу ў 00:00', 'calendar should handle day of week');
|
269
|
+
});
|
@@ -165,11 +165,11 @@ test('calendar next week', function (assert) {
|
|
165
165
|
var i, m;
|
166
166
|
for (i = 2; i < 7; i++) {
|
167
167
|
m = moment().add({d: i});
|
168
|
-
assert.equal(m.calendar(), m.format('dddd[,] LT'), 'Today + ' + i + ' days current time');
|
168
|
+
assert.equal(m.calendar(), m.format('[ਅਗਲਾ] dddd[,] LT'), 'Today + ' + i + ' days current time');
|
169
169
|
m.hours(0).minutes(0).seconds(0).milliseconds(0);
|
170
|
-
assert.equal(m.calendar(), m.format('dddd[,] LT'), 'Today + ' + i + ' days beginning of day');
|
170
|
+
assert.equal(m.calendar(), m.format('[ਅਗਲਾ] dddd[,] LT'), 'Today + ' + i + ' days beginning of day');
|
171
171
|
m.hours(23).minutes(59).seconds(59).milliseconds(999);
|
172
|
-
assert.equal(m.calendar(), m.format('dddd[,] LT'), 'Today + ' + i + ' days end of day');
|
172
|
+
assert.equal(m.calendar(), m.format('[ਅਗਲਾ] dddd[,] LT'), 'Today + ' + i + ' days end of day');
|
173
173
|
}
|
174
174
|
});
|
175
175
|
|
@@ -471,6 +471,39 @@ test('moment().lang with missing key doesn\'t change locale', function (assert)
|
|
471
471
|
'preserve global locale in case of bad locale id');
|
472
472
|
});
|
473
473
|
|
474
|
+
test('when in strict mode with inexact parsing, treat periods in short weekdays literally, not as the regex-period', function (assert) {
|
475
|
+
moment.defineLocale('periods-in-short-weekdays', {
|
476
|
+
weekdays : 'Monday_Tuesday_Wednesday_Thursday_Friday_Saturday_Sunday'.split('_'),
|
477
|
+
weekdaysShort : 'mon_t...s_wed_thurs_fri_sat_sun'.split('_'),
|
478
|
+
weekdaysParseExact : false
|
479
|
+
});
|
480
|
+
|
481
|
+
moment().locale('periods-in-short-weekdays');
|
482
|
+
assert.equal(moment('thurs', 'ddd', true).format('dddd'), 'Thursday');
|
483
|
+
});
|
484
|
+
|
485
|
+
test('when in strict mode with inexact parsing, treat periods in full weekdays literally, not as the regex-period', function (assert) {
|
486
|
+
moment.defineLocale('periods-in-full-weekdays', {
|
487
|
+
weekdays : 'Monday_T....day_Wednesday_Thursday_Friday_Saturday_Sunday'.split('_'),
|
488
|
+
weekdaysShort : 'mon_tues_wed_thurs_fri_sat_sun'.split('_'),
|
489
|
+
weekdaysParseExact : false
|
490
|
+
});
|
491
|
+
|
492
|
+
moment().locale('periods-in-full-weekdays');
|
493
|
+
assert.equal(moment('Thursday', 'dddd', true).format('ddd'), 'thurs');
|
494
|
+
});
|
495
|
+
|
496
|
+
test('when in strict mode with inexact parsing, treat periods in min-weekdays literally, not as the regex-period', function (assert) {
|
497
|
+
moment.defineLocale('periods-in-min-weekdays', {
|
498
|
+
weekdays : 'Monday_Tuesday_Wednesday_Thursday_Friday_Saturday_Sunday'.split('_'),
|
499
|
+
weekdaysMin : 'mon_t...s_wed_thurs_fri_sat_sun'.split('_'),
|
500
|
+
weekdaysParseExact : false
|
501
|
+
});
|
502
|
+
|
503
|
+
moment().locale('periods-in-min-weekdays');
|
504
|
+
assert.equal(moment('thurs', 'dd', true).format('dddd'), 'Thursday');
|
505
|
+
});
|
506
|
+
|
474
507
|
|
475
508
|
// TODO: Enable this after fixing pl months parse hack hack
|
476
509
|
// test('monthsParseExact', function (assert) {
|
@@ -289,7 +289,7 @@ test('start of second', function (assert) {
|
|
289
289
|
assert.equal(m.date(), 2, 'keep the day');
|
290
290
|
assert.equal(m.hours(), 3, 'keep the hours');
|
291
291
|
assert.equal(m.minutes(), 4, 'keep the minutes');
|
292
|
-
assert.equal(m.seconds(), 5, 'keep the
|
292
|
+
assert.equal(m.seconds(), 5, 'keep the seconds');
|
293
293
|
assert.equal(m.milliseconds(), 0, 'strip out the milliseconds');
|
294
294
|
});
|
295
295
|
|
@@ -6,7 +6,7 @@ module('weeks');
|
|
6
6
|
test('day of year', function (assert) {
|
7
7
|
assert.equal(moment([2000, 0, 1]).dayOfYear(), 1, 'Jan 1 2000 should be day 1 of the year');
|
8
8
|
assert.equal(moment([2000, 1, 28]).dayOfYear(), 59, 'Feb 28 2000 should be day 59 of the year');
|
9
|
-
assert.equal(moment([2000, 1, 29]).dayOfYear(), 60, 'Feb
|
9
|
+
assert.equal(moment([2000, 1, 29]).dayOfYear(), 60, 'Feb 29 2000 should be day 60 of the year');
|
10
10
|
assert.equal(moment([2000, 11, 31]).dayOfYear(), 366, 'Dec 31 2000 should be day 366 of the year');
|
11
11
|
assert.equal(moment([2001, 0, 1]).dayOfYear(), 1, 'Jan 1 2001 should be day 1 of the year');
|
12
12
|
assert.equal(moment([2001, 1, 28]).dayOfYear(), 59, 'Feb 28 2001 should be day 59 of the year');
|
@@ -17,7 +17,7 @@ test('day of year', function (assert) {
|
|
17
17
|
test('day of year setters', function (assert) {
|
18
18
|
assert.equal(moment([2000, 0, 1]).dayOfYear(200).dayOfYear(), 200, 'Setting Jan 1 2000 day of the year to 200 should work');
|
19
19
|
assert.equal(moment([2000, 1, 28]).dayOfYear(200).dayOfYear(), 200, 'Setting Feb 28 2000 day of the year to 200 should work');
|
20
|
-
assert.equal(moment([2000, 1, 29]).dayOfYear(200).dayOfYear(), 200, 'Setting Feb
|
20
|
+
assert.equal(moment([2000, 1, 29]).dayOfYear(200).dayOfYear(), 200, 'Setting Feb 29 2000 day of the year to 200 should work');
|
21
21
|
assert.equal(moment([2000, 11, 31]).dayOfYear(200).dayOfYear(), 200, 'Setting Dec 31 2000 day of the year to 200 should work');
|
22
22
|
assert.equal(moment().dayOfYear(1).dayOfYear(), 1, 'Setting day of the year to 1 should work');
|
23
23
|
assert.equal(moment().dayOfYear(59).dayOfYear(), 59, 'Setting day of the year to 59 should work');
|
@@ -1,3 +1,5 @@
|
|
1
|
+
const sass = require('node-sass'), tildeImporter = require('grunt-sass-tilde-importer');
|
2
|
+
|
1
3
|
module.exports = function (grunt) {
|
2
4
|
grunt.initConfig({
|
3
5
|
pkg: grunt.file.readJSON('package.json'),
|
@@ -46,44 +48,6 @@ module.exports = function (grunt) {
|
|
46
48
|
},
|
47
49
|
target: ['Gruntfile.js', 'src/js/*.js', 'test/*.js']
|
48
50
|
},
|
49
|
-
env: {
|
50
|
-
paris: {
|
51
|
-
TZ: 'Europe/Paris' // sets env for phantomJS https://github.com/ariya/phantomjs/issues/10379#issuecomment-36058589
|
52
|
-
}
|
53
|
-
},
|
54
|
-
connect: {
|
55
|
-
server: {
|
56
|
-
options: {
|
57
|
-
port: 8099
|
58
|
-
}
|
59
|
-
}
|
60
|
-
},
|
61
|
-
jasmine: {
|
62
|
-
customTemplate: {
|
63
|
-
src: 'src/js/*.js',
|
64
|
-
options: {
|
65
|
-
specs: 'test/*Spec.js',
|
66
|
-
helpers: 'test/*Helper.js',
|
67
|
-
host: 'http://127.0.0.1:8099',
|
68
|
-
vendor: [
|
69
|
-
'node_modules/jquery/dist/jquery.min.js',
|
70
|
-
'node_modules/moment/min/moment-with-locales.min.js',
|
71
|
-
'node_modules/moment-timezone/moment-timezone.js'
|
72
|
-
],
|
73
|
-
display: 'none',
|
74
|
-
summary: 'true'
|
75
|
-
}
|
76
|
-
}
|
77
|
-
},
|
78
|
-
nugetpack: {
|
79
|
-
core: {
|
80
|
-
src: 'src/nuget/Tempus.Dominus.Core.nuspec',
|
81
|
-
dest: 'build/nuget',
|
82
|
-
options: {
|
83
|
-
version: '<%= pkg.version %>'
|
84
|
-
}
|
85
|
-
}
|
86
|
-
},
|
87
51
|
babel: {
|
88
52
|
dev: {
|
89
53
|
options: {
|
@@ -135,7 +99,8 @@ module.exports = function (grunt) {
|
|
135
99
|
options: {
|
136
100
|
cleancss: true,
|
137
101
|
compress: true,
|
138
|
-
|
102
|
+
implementation: sass,
|
103
|
+
importer: tildeImporter
|
139
104
|
},
|
140
105
|
files: {
|
141
106
|
'build/css/<%= pkg.name %>.min.css': 'src/sass/<%= pkg.name %>-build.scss'
|
@@ -143,7 +108,8 @@ module.exports = function (grunt) {
|
|
143
108
|
},
|
144
109
|
development: {
|
145
110
|
options: {
|
146
|
-
|
111
|
+
importer: tildeImporter,
|
112
|
+
implementation: sass
|
147
113
|
},
|
148
114
|
files: {
|
149
115
|
'build/css/<%= pkg.name %>.css': 'src/sass/<%= pkg.name %>-build.scss'
|
@@ -186,11 +152,6 @@ module.exports = function (grunt) {
|
|
186
152
|
});
|
187
153
|
|
188
154
|
grunt.loadTasks('tasks');
|
189
|
-
|
190
|
-
grunt.loadNpmTasks('grunt-env');
|
191
|
-
grunt.loadNpmTasks('grunt-contrib-connect');
|
192
|
-
grunt.loadNpmTasks('grunt-contrib-jasmine');
|
193
|
-
grunt.loadNpmTasks('grunt-nuget');
|
194
155
|
grunt.loadNpmTasks('grunt-mkdocs');
|
195
156
|
|
196
157
|
require('load-grunt-tasks')(grunt);
|
@@ -206,8 +167,6 @@ module.exports = function (grunt) {
|
|
206
167
|
|
207
168
|
grunt.registerTask('build:style', ['sass', 'stamp:css', 'copy']);
|
208
169
|
|
209
|
-
grunt.registerTask('test', ['build', 'env:paris', 'connect', 'jasmine']);
|
210
|
-
|
211
170
|
grunt.registerTask('copy', 'Generate docs', function () {
|
212
171
|
grunt.file.copy('build/js/tempusdominus-bootstrap-4.js', 'src/docs/theme/js/tempusdominus-bootstrap-4.js');
|
213
172
|
grunt.file.copy('build/css/tempusdominus-bootstrap-4.css', 'src/docs/theme/css/tempusdominus-bootstrap-4.css');
|
@@ -223,8 +182,7 @@ module.exports = function (grunt) {
|
|
223
182
|
grunt.task.run([
|
224
183
|
'bump_version:' + version,
|
225
184
|
'build:travis',
|
226
|
-
'docs'
|
227
|
-
//'nugetpack' //todo not ready
|
185
|
+
'docs'
|
228
186
|
]);
|
229
187
|
});
|
230
188
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*@preserve
|
2
|
-
* Tempus Dominus Bootstrap4 v5.
|
2
|
+
* Tempus Dominus Bootstrap4 v5.1.2 (https://tempusdominus.github.io/bootstrap-4/)
|
3
3
|
* Copyright 2016-2018 Jonathan Peterson
|
4
4
|
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
|
5
5
|
*/
|
@@ -66,6 +66,8 @@
|
|
66
66
|
.bootstrap-datetimepicker-widget.dropdown-menu.float-right:after {
|
67
67
|
left: auto;
|
68
68
|
right: 7px; }
|
69
|
+
.bootstrap-datetimepicker-widget.dropdown-menu.wider {
|
70
|
+
width: 16rem; }
|
69
71
|
.bootstrap-datetimepicker-widget .list-unstyled {
|
70
72
|
margin: 0; }
|
71
73
|
.bootstrap-datetimepicker-widget a[data-action] {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*@preserve
|
2
|
-
* Tempus Dominus Bootstrap4 v5.
|
2
|
+
* Tempus Dominus Bootstrap4 v5.1.2 (https://tempusdominus.github.io/bootstrap-4/)
|
3
3
|
* Copyright 2016-2018 Jonathan Peterson
|
4
4
|
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
|
5
5
|
*/
|
@@ -66,6 +66,8 @@
|
|
66
66
|
.bootstrap-datetimepicker-widget.dropdown-menu.float-right:after {
|
67
67
|
left: auto;
|
68
68
|
right: 7px; }
|
69
|
+
.bootstrap-datetimepicker-widget.dropdown-menu.wider {
|
70
|
+
width: 16rem; }
|
69
71
|
.bootstrap-datetimepicker-widget .list-unstyled {
|
70
72
|
margin: 0; }
|
71
73
|
.bootstrap-datetimepicker-widget a[data-action] {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*@preserve
|
2
|
-
* Tempus Dominus Bootstrap4 v5.
|
2
|
+
* Tempus Dominus Bootstrap4 v5.1.2 (https://tempusdominus.github.io/bootstrap-4/)
|
3
3
|
* Copyright 2016-2018 Jonathan Peterson
|
4
4
|
* Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE)
|
5
5
|
*/
|
@@ -38,13 +38,11 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
38
38
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
39
39
|
|
40
40
|
// ReSharper disable once InconsistentNaming
|
41
|
-
var DateTimePicker = function (
|
41
|
+
var DateTimePicker = function ($, moment) {
|
42
42
|
// ReSharper disable InconsistentNaming
|
43
43
|
var NAME = 'datetimepicker',
|
44
|
-
VERSION = '5.0.0-alpha7',
|
45
44
|
DATA_KEY = '' + NAME,
|
46
45
|
EVENT_KEY = '.' + DATA_KEY,
|
47
|
-
EMIT_EVENT_KEY = DATA_KEY + '.',
|
48
46
|
DATA_API_KEY = '.data-api',
|
49
47
|
Selector = {
|
50
48
|
DATA_TOGGLE: '[data-toggle="' + DATA_KEY + '"]'
|
@@ -60,12 +58,63 @@ var DateTimePicker = function ($) {
|
|
60
58
|
FOCUS: 'focus' + EVENT_KEY,
|
61
59
|
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
|
62
60
|
//emitted
|
63
|
-
UPDATE:
|
64
|
-
ERROR:
|
65
|
-
HIDE:
|
66
|
-
SHOW:
|
61
|
+
UPDATE: 'update' + EVENT_KEY,
|
62
|
+
ERROR: 'error' + EVENT_KEY,
|
63
|
+
HIDE: 'hide' + EVENT_KEY,
|
64
|
+
SHOW: 'show' + EVENT_KEY
|
67
65
|
},
|
68
|
-
|
66
|
+
DatePickerModes = [{
|
67
|
+
CLASS_NAME: 'days',
|
68
|
+
NAV_FUNCTION: 'M',
|
69
|
+
NAV_STEP: 1
|
70
|
+
}, {
|
71
|
+
CLASS_NAME: 'months',
|
72
|
+
NAV_FUNCTION: 'y',
|
73
|
+
NAV_STEP: 1
|
74
|
+
}, {
|
75
|
+
CLASS_NAME: 'years',
|
76
|
+
NAV_FUNCTION: 'y',
|
77
|
+
NAV_STEP: 10
|
78
|
+
}, {
|
79
|
+
CLASS_NAME: 'decades',
|
80
|
+
NAV_FUNCTION: 'y',
|
81
|
+
NAV_STEP: 100
|
82
|
+
}],
|
83
|
+
KeyMap = {
|
84
|
+
'up': 38,
|
85
|
+
38: 'up',
|
86
|
+
'down': 40,
|
87
|
+
40: 'down',
|
88
|
+
'left': 37,
|
89
|
+
37: 'left',
|
90
|
+
'right': 39,
|
91
|
+
39: 'right',
|
92
|
+
'tab': 9,
|
93
|
+
9: 'tab',
|
94
|
+
'escape': 27,
|
95
|
+
27: 'escape',
|
96
|
+
'enter': 13,
|
97
|
+
13: 'enter',
|
98
|
+
'pageUp': 33,
|
99
|
+
33: 'pageUp',
|
100
|
+
'pageDown': 34,
|
101
|
+
34: 'pageDown',
|
102
|
+
'shift': 16,
|
103
|
+
16: 'shift',
|
104
|
+
'control': 17,
|
105
|
+
17: 'control',
|
106
|
+
'space': 32,
|
107
|
+
32: 'space',
|
108
|
+
't': 84,
|
109
|
+
84: 't',
|
110
|
+
'delete': 46,
|
111
|
+
46: 'delete'
|
112
|
+
},
|
113
|
+
ViewModes = ['times', 'days', 'months', 'years', 'decades'],
|
114
|
+
keyState = {},
|
115
|
+
keyPressHandled = {};
|
116
|
+
|
117
|
+
var Default = {
|
69
118
|
timeZone: '',
|
70
119
|
format: false,
|
71
120
|
dayViewHeaderFormat: 'MMMM YYYY',
|
@@ -75,7 +124,7 @@ var DateTimePicker = function ($) {
|
|
75
124
|
maxDate: false,
|
76
125
|
useCurrent: true,
|
77
126
|
collapse: true,
|
78
|
-
locale:
|
127
|
+
locale: moment.locale(),
|
79
128
|
defaultDate: false,
|
80
129
|
disabledDates: false,
|
81
130
|
enabledDates: false,
|
@@ -230,6 +279,9 @@ var DateTimePicker = function ($) {
|
|
230
279
|
return true;
|
231
280
|
},
|
232
281
|
enter: function enter() {
|
282
|
+
if (!this.widget) {
|
283
|
+
return false;
|
284
|
+
}
|
233
285
|
this.hide();
|
234
286
|
return true;
|
235
287
|
},
|
@@ -250,6 +302,9 @@ var DateTimePicker = function ($) {
|
|
250
302
|
return true;
|
251
303
|
},
|
252
304
|
t: function t() {
|
305
|
+
if (!this.widget) {
|
306
|
+
return false;
|
307
|
+
}
|
253
308
|
this.date(this.getMoment());
|
254
309
|
return true;
|
255
310
|
},
|
@@ -269,59 +324,8 @@ var DateTimePicker = function ($) {
|
|
269
324
|
viewDate: false,
|
270
325
|
allowMultidate: false,
|
271
326
|
multidateSeparator: ','
|
272
|
-
}
|
273
|
-
DatePickerModes = [{
|
274
|
-
CLASS_NAME: 'days',
|
275
|
-
NAV_FUNCTION: 'M',
|
276
|
-
NAV_STEP: 1
|
277
|
-
}, {
|
278
|
-
CLASS_NAME: 'months',
|
279
|
-
NAV_FUNCTION: 'y',
|
280
|
-
NAV_STEP: 1
|
281
|
-
}, {
|
282
|
-
CLASS_NAME: 'years',
|
283
|
-
NAV_FUNCTION: 'y',
|
284
|
-
NAV_STEP: 10
|
285
|
-
}, {
|
286
|
-
CLASS_NAME: 'decades',
|
287
|
-
NAV_FUNCTION: 'y',
|
288
|
-
NAV_STEP: 100
|
289
|
-
}],
|
290
|
-
KeyMap = {
|
291
|
-
'up': 38,
|
292
|
-
38: 'up',
|
293
|
-
'down': 40,
|
294
|
-
40: 'down',
|
295
|
-
'left': 37,
|
296
|
-
37: 'left',
|
297
|
-
'right': 39,
|
298
|
-
39: 'right',
|
299
|
-
'tab': 9,
|
300
|
-
9: 'tab',
|
301
|
-
'escape': 27,
|
302
|
-
27: 'escape',
|
303
|
-
'enter': 13,
|
304
|
-
13: 'enter',
|
305
|
-
'pageUp': 33,
|
306
|
-
33: 'pageUp',
|
307
|
-
'pageDown': 34,
|
308
|
-
34: 'pageDown',
|
309
|
-
'shift': 16,
|
310
|
-
16: 'shift',
|
311
|
-
'control': 17,
|
312
|
-
17: 'control',
|
313
|
-
'space': 32,
|
314
|
-
32: 'space',
|
315
|
-
't': 84,
|
316
|
-
84: 't',
|
317
|
-
'delete': 46,
|
318
|
-
46: 'delete'
|
319
|
-
},
|
320
|
-
ViewModes = ['times', 'days', 'months', 'years', 'decades'],
|
321
|
-
keyState = {},
|
322
|
-
keyPressHandled = {};
|
327
|
+
};
|
323
328
|
|
324
|
-
var MinViewModeNumber = 0;
|
325
329
|
// ReSharper restore InconsistentNaming
|
326
330
|
|
327
331
|
// ReSharper disable once DeclarationHides
|
@@ -346,6 +350,7 @@ var DateTimePicker = function ($) {
|
|
346
350
|
this.actualFormat = null;
|
347
351
|
this.parseFormats = null;
|
348
352
|
this.currentViewMode = null;
|
353
|
+
this.MinViewModeNumber = 0;
|
349
354
|
|
350
355
|
this._int();
|
351
356
|
}
|
@@ -380,9 +385,9 @@ var DateTimePicker = function ($) {
|
|
380
385
|
this._initFormatting();
|
381
386
|
|
382
387
|
if (this.input !== undefined && this.input.is('input') && this.input.val().trim().length !== 0) {
|
383
|
-
this._setValue(this._parseInputDate(this.input.val().trim()));
|
388
|
+
this._setValue(this._parseInputDate(this.input.val().trim()), 0);
|
384
389
|
} else if (this._options.defaultDate && this.input !== undefined && this.input.attr('placeholder') === undefined) {
|
385
|
-
this._setValue(this._options.defaultDate);
|
390
|
+
this._setValue(this._options.defaultDate, 0);
|
386
391
|
}
|
387
392
|
if (this._options.inline) {
|
388
393
|
this.show();
|
@@ -499,7 +504,7 @@ var DateTimePicker = function ($) {
|
|
499
504
|
};
|
500
505
|
|
501
506
|
DateTimePicker.prototype._hasTimeZone = function _hasTimeZone() {
|
502
|
-
return
|
507
|
+
return moment.tz !== undefined && this._options.timeZone !== undefined && this._options.timeZone !== null && this._options.timeZone !== '';
|
503
508
|
};
|
504
509
|
|
505
510
|
DateTimePicker.prototype._isEnabled = function _isEnabled(granularity) {
|
@@ -520,6 +525,9 @@ var DateTimePicker = function ($) {
|
|
520
525
|
return this.actualFormat.indexOf('m') !== -1;
|
521
526
|
case 's':
|
522
527
|
return this.actualFormat.indexOf('s') !== -1;
|
528
|
+
case 'a':
|
529
|
+
case 'A':
|
530
|
+
return this.actualFormat.toLowerCase().indexOf('a') !== -1;
|
523
531
|
default:
|
524
532
|
return false;
|
525
533
|
}
|
@@ -553,7 +561,7 @@ var DateTimePicker = function ($) {
|
|
553
561
|
};
|
554
562
|
|
555
563
|
DateTimePicker.prototype._notifyEvent = function _notifyEvent(e) {
|
556
|
-
if (e.type === DateTimePicker.Event.CHANGE && e.date && e.date.isSame(e.oldDate) || !e.date && !e.oldDate) {
|
564
|
+
if (e.type === DateTimePicker.Event.CHANGE && (e.date && e.date.isSame(e.oldDate)) || !e.date && !e.oldDate) {
|
557
565
|
return;
|
558
566
|
}
|
559
567
|
this._element.trigger(e);
|
@@ -575,7 +583,7 @@ var DateTimePicker = function ($) {
|
|
575
583
|
return;
|
576
584
|
}
|
577
585
|
if (dir) {
|
578
|
-
this.currentViewMode = Math.max(MinViewModeNumber, Math.min(3, this.currentViewMode + dir));
|
586
|
+
this.currentViewMode = Math.max(this.MinViewModeNumber, Math.min(3, this.currentViewMode + dir));
|
579
587
|
}
|
580
588
|
this.widget.find('.datepicker > div').hide().filter('.datepicker-' + DatePickerModes[this.currentViewMode].CLASS_NAME).show();
|
581
589
|
};
|
@@ -638,7 +646,7 @@ var DateTimePicker = function ($) {
|
|
638
646
|
|
639
647
|
DateTimePicker.prototype._parseInputDate = function _parseInputDate(inputDate) {
|
640
648
|
if (this._options.parseInputDate === undefined) {
|
641
|
-
if (!
|
649
|
+
if (!moment.isMoment(inputDate)) {
|
642
650
|
inputDate = this.getMoment(inputDate);
|
643
651
|
}
|
644
652
|
} else {
|
@@ -690,7 +698,7 @@ var DateTimePicker = function ($) {
|
|
690
698
|
}
|
691
699
|
|
692
700
|
if (handler) {
|
693
|
-
if (handler.call(this
|
701
|
+
if (handler.call(this)) {
|
694
702
|
e.stopPropagation();
|
695
703
|
e.preventDefault();
|
696
704
|
}
|
@@ -751,16 +759,16 @@ var DateTimePicker = function ($) {
|
|
751
759
|
this.use24Hours = this.actualFormat.toLowerCase().indexOf('a') < 1 && this.actualFormat.replace(/\[.*?]/g, '').indexOf('h') < 1;
|
752
760
|
|
753
761
|
if (this._isEnabled('y')) {
|
754
|
-
MinViewModeNumber = 2;
|
762
|
+
this.MinViewModeNumber = 2;
|
755
763
|
}
|
756
764
|
if (this._isEnabled('M')) {
|
757
|
-
MinViewModeNumber = 1;
|
765
|
+
this.MinViewModeNumber = 1;
|
758
766
|
}
|
759
767
|
if (this._isEnabled('d')) {
|
760
|
-
MinViewModeNumber = 0;
|
768
|
+
this.MinViewModeNumber = 0;
|
761
769
|
}
|
762
770
|
|
763
|
-
this.currentViewMode = Math.max(MinViewModeNumber, this.currentViewMode);
|
771
|
+
this.currentViewMode = Math.max(this.MinViewModeNumber, this.currentViewMode);
|
764
772
|
|
765
773
|
if (!this.unset) {
|
766
774
|
this._setValue(this._dates[0], 0);
|
@@ -782,13 +790,13 @@ var DateTimePicker = function ($) {
|
|
782
790
|
var returnMoment = void 0;
|
783
791
|
|
784
792
|
if (d === undefined || d === null) {
|
785
|
-
returnMoment =
|
793
|
+
returnMoment = moment(); //TODO should this use format? and locale?
|
786
794
|
} else if (this._hasTimeZone()) {
|
787
795
|
// There is a string to parse and a default time zone
|
788
796
|
// parse with the tz function which takes a default time zone if it is not in the format string
|
789
|
-
returnMoment =
|
797
|
+
returnMoment = moment.tz(d, this.parseFormats, this._options.locale, this._options.useStrict, this._options.timeZone);
|
790
798
|
} else {
|
791
|
-
returnMoment =
|
799
|
+
returnMoment = moment(d, this.parseFormats, this._options.locale, this._options.useStrict);
|
792
800
|
}
|
793
801
|
|
794
802
|
if (this._hasTimeZone()) {
|
@@ -842,7 +850,7 @@ var DateTimePicker = function ($) {
|
|
842
850
|
}
|
843
851
|
}
|
844
852
|
|
845
|
-
if (newDate !== null && typeof newDate !== 'string' && !
|
853
|
+
if (newDate !== null && typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {
|
846
854
|
throw new TypeError('date() parameter must be one of [null, string, moment or Date]');
|
847
855
|
}
|
848
856
|
|
@@ -850,9 +858,6 @@ var DateTimePicker = function ($) {
|
|
850
858
|
};
|
851
859
|
|
852
860
|
DateTimePicker.prototype.format = function format(newFormat) {
|
853
|
-
///<summary>test su</summary>
|
854
|
-
///<param name="newFormat">info about para</param>
|
855
|
-
///<returns type="string|boolean">returns foo</returns>
|
856
861
|
if (arguments.length === 0) {
|
857
862
|
return this._options.format;
|
858
863
|
}
|
@@ -1093,10 +1098,12 @@ var DateTimePicker = function ($) {
|
|
1093
1098
|
return this._options.locale;
|
1094
1099
|
}
|
1095
1100
|
|
1096
|
-
if (!
|
1101
|
+
if (!moment.localeData(_locale)) {
|
1097
1102
|
throw new TypeError('locale() locale ' + _locale + ' is not loaded from moment locales!');
|
1098
1103
|
}
|
1099
1104
|
|
1105
|
+
this._options.locale = _locale;
|
1106
|
+
|
1100
1107
|
for (var i = 0; i < this._dates.length; i++) {
|
1101
1108
|
this._dates[i].locale(this._options.locale);
|
1102
1109
|
}
|
@@ -1228,7 +1235,7 @@ var DateTimePicker = function ($) {
|
|
1228
1235
|
}
|
1229
1236
|
|
1230
1237
|
this._options.viewMode = _viewMode;
|
1231
|
-
this.currentViewMode = Math.max(DateTimePicker.ViewModes.indexOf(_viewMode) - 1,
|
1238
|
+
this.currentViewMode = Math.max(DateTimePicker.ViewModes.indexOf(_viewMode) - 1, this.MinViewModeNumber);
|
1232
1239
|
|
1233
1240
|
this._showMode();
|
1234
1241
|
};
|
@@ -1465,7 +1472,7 @@ var DateTimePicker = function ($) {
|
|
1465
1472
|
return true;
|
1466
1473
|
}
|
1467
1474
|
|
1468
|
-
if (typeof newDate !== 'string' && !
|
1475
|
+
if (typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {
|
1469
1476
|
throw new TypeError('viewDate() parameter must be one of [string, moment or Date]');
|
1470
1477
|
}
|
1471
1478
|
|
@@ -1503,16 +1510,6 @@ var DateTimePicker = function ($) {
|
|
1503
1510
|
* @return {string}
|
1504
1511
|
*/
|
1505
1512
|
|
1506
|
-
}, {
|
1507
|
-
key: 'VERSION',
|
1508
|
-
get: function get() {
|
1509
|
-
return VERSION;
|
1510
|
-
}
|
1511
|
-
|
1512
|
-
/**
|
1513
|
-
* @return {string}
|
1514
|
-
*/
|
1515
|
-
|
1516
1513
|
}, {
|
1517
1514
|
key: 'DATA_KEY',
|
1518
1515
|
get: function get() {
|
@@ -1548,16 +1545,6 @@ var DateTimePicker = function ($) {
|
|
1548
1545
|
get: function get() {
|
1549
1546
|
return ViewModes;
|
1550
1547
|
}
|
1551
|
-
|
1552
|
-
/**
|
1553
|
-
* @return {number}
|
1554
|
-
*/
|
1555
|
-
|
1556
|
-
}, {
|
1557
|
-
key: 'MinViewModeNumber',
|
1558
|
-
get: function get() {
|
1559
|
-
return MinViewModeNumber;
|
1560
|
-
}
|
1561
1548
|
}, {
|
1562
1549
|
key: 'Event',
|
1563
1550
|
get: function get() {
|
@@ -1572,6 +1559,9 @@ var DateTimePicker = function ($) {
|
|
1572
1559
|
key: 'Default',
|
1573
1560
|
get: function get() {
|
1574
1561
|
return Default;
|
1562
|
+
},
|
1563
|
+
set: function set(value) {
|
1564
|
+
Default = value;
|
1575
1565
|
}
|
1576
1566
|
}, {
|
1577
1567
|
key: 'ClassName',
|
@@ -1584,7 +1574,7 @@ var DateTimePicker = function ($) {
|
|
1584
1574
|
}();
|
1585
1575
|
|
1586
1576
|
return DateTimePicker;
|
1587
|
-
}(jQuery);
|
1577
|
+
}(jQuery, moment);
|
1588
1578
|
|
1589
1579
|
//noinspection JSUnusedGlobalSymbols
|
1590
1580
|
/* global DateTimePicker */
|
@@ -1754,12 +1744,21 @@ var TempusDominusBootstrap4 = function ($) {
|
|
1754
1744
|
}).append($('<span>').addClass(this._options.icons.today))));
|
1755
1745
|
}
|
1756
1746
|
if (!this._options.sideBySide && this._hasDate() && this._hasTime()) {
|
1747
|
+
var title = void 0,
|
1748
|
+
icon = void 0;
|
1749
|
+
if (this._options.viewMode === 'times') {
|
1750
|
+
title = this._options.tooltips.selectDate;
|
1751
|
+
icon = this._options.icons.date;
|
1752
|
+
} else {
|
1753
|
+
title = this._options.tooltips.selectTime;
|
1754
|
+
icon = this._options.icons.time;
|
1755
|
+
}
|
1757
1756
|
row.push($('<td>').append($('<a>').attr({
|
1758
1757
|
href: '#',
|
1759
1758
|
tabindex: '-1',
|
1760
1759
|
'data-action': 'togglePicker',
|
1761
|
-
'title':
|
1762
|
-
}).append($('<span>').addClass(
|
1760
|
+
'title': title
|
1761
|
+
}).append($('<span>').addClass(icon))));
|
1763
1762
|
}
|
1764
1763
|
if (this._options.buttons.showClear) {
|
1765
1764
|
row.push($('<td>').append($('<a>').attr({
|
@@ -1814,13 +1813,13 @@ var TempusDominusBootstrap4 = function ($) {
|
|
1814
1813
|
content.append(toolbar);
|
1815
1814
|
}
|
1816
1815
|
if (this._hasDate()) {
|
1817
|
-
content.append($('<li>').addClass(this._options.collapse && this._hasTime() ? 'collapse' : '').addClass(this._options.collapse && this._hasTime() && this._options.viewMode === '
|
1816
|
+
content.append($('<li>').addClass(this._options.collapse && this._hasTime() ? 'collapse' : '').addClass(this._options.collapse && this._hasTime() && this._options.viewMode === 'times' ? '' : 'show').append(dateView));
|
1818
1817
|
}
|
1819
1818
|
if (this._options.toolbarPlacement === 'default') {
|
1820
1819
|
content.append(toolbar);
|
1821
1820
|
}
|
1822
1821
|
if (this._hasTime()) {
|
1823
|
-
content.append($('<li>').addClass(this._options.collapse && this._hasDate() ? 'collapse' : '').addClass(this._options.collapse && this._hasDate() && this._options.viewMode === '
|
1822
|
+
content.append($('<li>').addClass(this._options.collapse && this._hasDate() ? 'collapse' : '').addClass(this._options.collapse && this._hasDate() && this._options.viewMode === 'times' ? 'show' : '').append(timeView));
|
1824
1823
|
}
|
1825
1824
|
if (this._options.toolbarPlacement === 'bottom') {
|
1826
1825
|
content.append(toolbar);
|
@@ -1988,12 +1987,12 @@ var TempusDominusBootstrap4 = function ($) {
|
|
1988
1987
|
yearsViewHeader.eq(2).addClass('disabled');
|
1989
1988
|
}
|
1990
1989
|
|
1991
|
-
html += '<span data-action="selectYear" class="year old">' + (startYear.year() - 1) + '</span>';
|
1990
|
+
html += '<span data-action="selectYear" class="year old' + (!this._isValid(startYear, 'y') ? ' disabled' : '') + '">' + (startYear.year() - 1) + '</span>';
|
1992
1991
|
while (!startYear.isAfter(endYear, 'y')) {
|
1993
1992
|
html += '<span data-action="selectYear" class="year' + (startYear.isSame(this._getLastPickedDate(), 'y') && !this.unset ? ' active' : '') + (!this._isValid(startYear, 'y') ? ' disabled' : '') + '">' + startYear.year() + '</span>';
|
1994
1993
|
startYear.add(1, 'y');
|
1995
1994
|
}
|
1996
|
-
html += '<span data-action="selectYear" class="year old">' + startYear.year() + '</span>';
|
1995
|
+
html += '<span data-action="selectYear" class="year old' + (!this._isValid(startYear, 'y') ? ' disabled' : '') + '">' + startYear.year() + '</span>';
|
1997
1996
|
|
1998
1997
|
yearsView.find('td').html(html);
|
1999
1998
|
};
|
@@ -2233,7 +2232,7 @@ var TempusDominusBootstrap4 = function ($) {
|
|
2233
2232
|
{
|
2234
2233
|
var month = $(e.target).closest('tbody').find('span').index($(e.target));
|
2235
2234
|
this._viewDate.month(month);
|
2236
|
-
if (this.currentViewMode ===
|
2235
|
+
if (this.currentViewMode === this.MinViewModeNumber) {
|
2237
2236
|
this._setValue(lastPicked.clone().year(this._viewDate.year()).month(this._viewDate.month()), this._getLastPickedDateIndex());
|
2238
2237
|
if (!this._options.inline) {
|
2239
2238
|
this.hide();
|
@@ -2249,7 +2248,7 @@ var TempusDominusBootstrap4 = function ($) {
|
|
2249
2248
|
{
|
2250
2249
|
var year = parseInt($(e.target).text(), 10) || 0;
|
2251
2250
|
this._viewDate.year(year);
|
2252
|
-
if (this.currentViewMode ===
|
2251
|
+
if (this.currentViewMode === this.MinViewModeNumber) {
|
2253
2252
|
this._setValue(lastPicked.clone().year(this._viewDate.year()), this._getLastPickedDateIndex());
|
2254
2253
|
if (!this._options.inline) {
|
2255
2254
|
this.hide();
|
@@ -2265,7 +2264,7 @@ var TempusDominusBootstrap4 = function ($) {
|
|
2265
2264
|
{
|
2266
2265
|
var _year = parseInt($(e.target).data('selection'), 10) || 0;
|
2267
2266
|
this._viewDate.year(_year);
|
2268
|
-
if (this.currentViewMode ===
|
2267
|
+
if (this.currentViewMode === this.MinViewModeNumber) {
|
2269
2268
|
this._setValue(lastPicked.clone().year(this._viewDate.year()), this._getLastPickedDateIndex());
|
2270
2269
|
if (!this._options.inline) {
|
2271
2270
|
this.hide();
|
@@ -2286,8 +2285,21 @@ var TempusDominusBootstrap4 = function ($) {
|
|
2286
2285
|
if ($(e.target).is('.new')) {
|
2287
2286
|
day.add(1, 'M');
|
2288
2287
|
}
|
2289
|
-
|
2290
|
-
|
2288
|
+
|
2289
|
+
var selectDate = day.date(parseInt($(e.target).text(), 10)),
|
2290
|
+
index = 0;
|
2291
|
+
if (this._options.allowMultidate) {
|
2292
|
+
index = this._datesFormatted.indexOf(selectDate.format('YYYY-MM-DD'));
|
2293
|
+
if (index !== -1) {
|
2294
|
+
this._setValue(null, index); //deselect multidate
|
2295
|
+
} else {
|
2296
|
+
this._setValue(selectDate, this._getLastPickedDateIndex() + 1);
|
2297
|
+
}
|
2298
|
+
} else {
|
2299
|
+
this._setValue(selectDate, this._getLastPickedDateIndex());
|
2300
|
+
}
|
2301
|
+
|
2302
|
+
if (!this._hasTime() && !this._options.keepOpen && !this._options.inline && !this._options.allowMultidate) {
|
2291
2303
|
this.hide();
|
2292
2304
|
}
|
2293
2305
|
break;
|
@@ -2751,7 +2763,7 @@ var TempusDominusBootstrap4 = function ($) {
|
|
2751
2763
|
if (!config._options.allowInputToggle) {
|
2752
2764
|
return;
|
2753
2765
|
}
|
2754
|
-
TempusDominusBootstrap4._jQueryInterface.call($target,
|
2766
|
+
TempusDominusBootstrap4._jQueryInterface.call($target, 'show', event);
|
2755
2767
|
});
|
2756
2768
|
|
2757
2769
|
$.fn[DateTimePicker.NAME] = TempusDominusBootstrap4._jQueryInterface;
|