diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f26ea347..517fe5cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,11 @@ on: push: branches: - master + - v2 pull_request: branches: - master + - v2 jobs: test: runs-on: ubuntu-latest diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0a3257b7..9525a6e3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,9 +1,13 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: + - master + - v2 pull_request: - branches: [ master ] + branches: + - master + - v2 schedule: - cron: '33 0 * * 3' jobs: diff --git a/babybuddy/static_src/js/babybuddy.js b/babybuddy/static_src/js/babybuddy.js index 98127e01..38525ad8 100644 --- a/babybuddy/static_src/js/babybuddy.js +++ b/babybuddy/static_src/js/babybuddy.js @@ -23,34 +23,48 @@ var BabyBuddy = function () { * * @type {{init: BabyBuddy.DatetimePicker.init}} */ -BabyBuddy.DatetimePicker = function ($, moment) { +BabyBuddy.DatetimePicker = function (moment) { return { init: function (element, options) { - var defaultOptions = { - buttons: { showToday: true, showClose: true }, - defaultDate: 'now', - focusOnShow: false, - format: 'L LT', - ignoreReadonly: true, - locale: moment.locale(), - useCurrent: false, - icons: { - time: 'icon-clock', - date: 'icon-calendar', - up: 'icon-arrow-up', - down: 'icon-arrow-down', - previous: 'icon-angle-circled-left', - next: 'icon-angle-circled-right', - today: 'icon-today', - clear: 'icon-delete', - close: 'icon-cancel' + let defaultOptions = { + display: { + buttons: { + close: true, + today: true, + }, + components: { + calendar: true, + clock: true, + date: true, + decades: true, + hours: true, + minutes: true, + month: true, + seconds: false, + useTwentyfourHour: false, + year: true, + }, + icons: { + clear: 'icon-delete', + close: 'icon-cancel', + date: 'icon-calendar', + down: 'icon-arrow-down', + next: 'icon-angle-circled-right', + previous: 'icon-angle-circled-left', + time: 'icon-clock', + today: 'icon-today', + up: 'icon-arrow-up', + }, + viewMode: 'clock', + }, + localization: { + locale: moment.locale(), }, - viewMode: 'times', }; - element.datetimepicker($.extend(defaultOptions, options)); + new tempusDominus.TempusDominus(element, Object.assign(defaultOptions, options)); } }; -}(jQuery, moment); +}(moment); /** * Pull to refresh. diff --git a/babybuddy/static_src/js/tags_editor.js b/babybuddy/static_src/js/tags_editor.js index 56be2277..f0b73e17 100644 --- a/babybuddy/static_src/js/tags_editor.js +++ b/babybuddy/static_src/js/tags_editor.js @@ -174,7 +174,7 @@ this.apiTagsUrl = widget.getAttribute('data-tags-url'); this.createTagInputs = widget.querySelector('.create-tag-inputs'); this.addTagInput = this.createTagInputs.querySelector('input[type="text"]'); - this.addTagButton = this.createTagInputs.querySelector('.btn-add-new-tag'); + this.addTagButton = this.createTagInputs.querySelector('#add-tag'); this.addTagInput.value = ""; diff --git a/babybuddy/static_src/scss/_functions.scss b/babybuddy/static_src/scss/_functions.scss deleted file mode 100644 index 0e8e00e6..00000000 --- a/babybuddy/static_src/scss/_functions.scss +++ /dev/null @@ -1,3 +0,0 @@ -@import '../../../node_modules/bootstrap/scss/functions'; - -// Baby Buddy site-wide custom functions. diff --git a/babybuddy/static_src/scss/_mixins.scss b/babybuddy/static_src/scss/_mixins.scss deleted file mode 100644 index b0d9583b..00000000 --- a/babybuddy/static_src/scss/_mixins.scss +++ /dev/null @@ -1,3 +0,0 @@ -@import '../../../node_modules/bootstrap/scss/mixins'; - -// Baby Buddy site-wide custom mixins. diff --git a/babybuddy/static_src/scss/_variables.scss b/babybuddy/static_src/scss/_variables.scss index 7d8f080a..7e0309ec 100644 --- a/babybuddy/static_src/scss/_variables.scss +++ b/babybuddy/static_src/scss/_variables.scss @@ -1,5 +1,136 @@ -@import 'functions'; -@import '../../../node_modules/bootstrap/scss/variables'; -@import 'themes/blueorange'; +@use 'sass:color'; -// Baby Buddy site-wide variables. +// Theme variables. + +// Color system + +$white: #fff; +$gray-100: #f8f9fa; +$gray-200: #e9ecef; +$gray-300: #dee2e6; +$gray-400: #ced4da; +$gray-500: #adb5bd; +$gray-600: #6c757d; +$gray-700: #495057; +$gray-800: #343a40; +$gray-900: #212529; +$black: #000; + +$primary: #37abe9; +$danger: #a72431; +$error: $danger; +$secondary: #ff8f00; +$warning: #ffbe42; +$success: #239556; +$debug: #5abccc; +$info: #44c4dd; +$light: $gray-100; +$dark: $gray-800; + + +// Body +// Settings for the `` element. + +$body-bg: $gray-900; +$body-color: $gray-400; + +// Links +// Style anchor elements. + +$link-color: $info; +$link-decoration: none; +$link-hover-color: color.adjust($link-color, $lightness: -15%); + + +// Components +// Define common padding and border radius sizes and more. + +$border-color: $gray-200; +$component-active-color: $gray-400; +$component-active-bg: $primary; + + +// Fonts +// Font, line-height, and color for body text, headings, and more. + +$text-muted: $gray-600 !default; +$blockquote-small-color: $gray-600 !default; +$hr-border-color: rgba($black, .1) !default; +$mark-bg: #fcf8e3 !default; + + +// Forms + +$input-bg: $white; +$input-disabled-bg: $gray-600; +$input-color: $black; +$input-border-color: rgba($gray-600, .15); +$input-group-addon-bg: $gray-500; + + +// Tables + +$table-cell-padding-y: 0.75rem; +$table-cell-padding-x: 0.75rem; +$table-striped-bg: $dark; + +// Dropdowns +// Dropdown menu container and contents. + +$dropdown-bg: $gray-700; +$dropdown-divider-bg: $gray-800; +$dropdown-link-color: $body-color; +$dropdown-link-hover-color: color.adjust($body-color, $lightness: -5%); +$dropdown-link-hover-bg: $primary; +$dropdown-link-active-color: $component-active-color; +$dropdown-link-active-bg: $component-active-bg; +$dropdown-header-color: color.adjust($body-color, $lightness: -25%); + + +// Pagination + +$pagination-color: $link-color; +$pagination-bg: $dark; +$pagination-border-color: color.adjust($dark, $lightness: 5%); + +$pagination-hover-color: $link-hover-color; +$pagination-hover-bg: $gray-900; +$pagination-hover-border-color: $gray-800; + +$pagination-active-color: $body-color; +$pagination-active-bg: $primary; +$pagination-active-border-color: $primary; + +$pagination-disabled-color: $gray-600; +$pagination-disabled-bg: $pagination-bg; +$pagination-disabled-border-color: $pagination-border-color; + + +// Cards + +$card-bg: $dark; +$card-cap-bg: rgba($light, .05); + + +// Progress bars + +$progress-bg: $gray-600; + + +// List group + +$list-group-bg: $dark; +$list-group-hover-bg: color.adjust($list-group-bg, $lightness: -5%); +$list-group-active-color: $component-active-color !default; +$list-group-active-bg: $component-active-bg !default; +$list-group-active-border-color: $list-group-active-bg !default; +$list-group-action-color: $gray-400; +$list-group-action-hover-color: $list-group-action-color; + + +// Breadcrumbs + +$breadcrumb-active-color: $gray-600; +$breadcrumb-bg: none; +$breadcrumb-padding-y: 0.75rem; +$breadcrumb-padding-x: 1rem; diff --git a/babybuddy/static_src/scss/babybuddy.scss b/babybuddy/static_src/scss/babybuddy.scss index bbe2a872..d9efb0c7 100644 --- a/babybuddy/static_src/scss/babybuddy.scss +++ b/babybuddy/static_src/scss/babybuddy.scss @@ -1,8 +1,7 @@ -@import 'functions'; @import 'variables'; -@import 'mixins'; @import '../../../node_modules/bootstrap/scss/bootstrap'; -@import '../../../node_modules/tempusdominus-bootstrap-4/src/sass/tempusdominus-bootstrap-4'; +@import '../../../node_modules/@eonasdan/tempus-dominus/src/sass/variables'; +@import '../../../node_modules/@eonasdan/tempus-dominus/src/sass/tempus-dominus'; @import '../../../**/static_src/scss/*'; @import '../fontello/css/babybuddy'; diff --git a/babybuddy/static_src/scss/forms.scss b/babybuddy/static_src/scss/forms.scss index 9ace10c2..6d64648a 100644 --- a/babybuddy/static_src/scss/forms.scss +++ b/babybuddy/static_src/scss/forms.scss @@ -1,3 +1,5 @@ +@use 'sass:map'; + // Baby Buddy form style customizations. // BB form fields do not follow typical BS4 style that enables this display. @@ -34,7 +36,7 @@ .input-group-text { background: none; border: 0; - color: theme-color('primary'); + color: map.get($theme-colors, 'primary'); padding-left: 0; padding-right: 0; } diff --git a/babybuddy/static_src/scss/global.scss b/babybuddy/static_src/scss/global.scss index d4e83835..2e395859 100644 --- a/babybuddy/static_src/scss/global.scss +++ b/babybuddy/static_src/scss/global.scss @@ -1,3 +1,5 @@ +@use 'sass:map'; + // Baby Buddy site-wide custom styles. // Remove extra margin below site breadcrumb. @@ -7,7 +9,7 @@ // Extra-small button. .btn-xs { - @include button-size(.2rem, .12rem, .75rem, 1, .2rem); + @include button-size(.2rem, .12rem, .75rem, .2rem); } // Right align main dropdown menu. @@ -18,33 +20,10 @@ // PullToRefresh elements. .ptr--ptr { - background: theme-color('dark'); + background: map.get($theme-colors, 'dark'); .ptr--text, .ptr--icon { // "!important" must be used to override inline styling from JS. - color: theme-color('light') !important; - } -} - -// Basic table of model instances. -.table-instances { - tr { - td, th { - vertical-align: middle; - } - - &.odd { - background: $table-accent-bg; - } - &.even { - background: none; - } - &.row-details { - td { - color: $gray-500; - padding-top: 0; - border-top: 0; - } - } + color: map.get($theme-colors, 'light') !important; } } @@ -55,5 +34,5 @@ // All modals .modal-content { - color: theme-color('dark'); + color: map.get($theme-colors, 'dark'); } \ No newline at end of file diff --git a/babybuddy/static_src/scss/themes/blueorange.scss b/babybuddy/static_src/scss/themes/blueorange.scss deleted file mode 100644 index 10deea22..00000000 --- a/babybuddy/static_src/scss/themes/blueorange.scss +++ /dev/null @@ -1,149 +0,0 @@ -@use 'sass:color'; - -// Blue Orange theme variables. - -// Color system - -$blue: #37abe9; -$indigo: #472395; -$purple: #712395; -$pink: #952393; -$red: #a72431; -$orange: #ff8f00; -$yellow: #ffbe42; -$green: #239556; -$teal: #5abccc; -$cyan: #44c4dd; - -$theme-colors: ( - primary: $blue, - secondary: $orange, - success: $green, - info: $cyan, - debug: $cyan, - warning: $yellow, - danger: $red, - error: $red, - light: $gray-100, - dark: $gray-800 -); - - -// Body -// Settings for the `` element. - -$body-bg: $gray-900; -$body-color: $gray-400; - - -// Links -// Style anchor elements. - -$link-color: theme-color('info'); -$link-hover-color: color.adjust($link-color, $lightness: -15%); - - -// Components -// Define common padding and border radius sizes and more. - -$border-color: $gray-200; -$component-active-color: $gray-400; -$component-active-bg: theme-color('primary'); - - -// Fonts -// Font, line-height, and color for body text, headings, and more. - -$text-muted: $gray-600 !default; -$blockquote-small-color: $gray-600 !default; -$hr-border-color: rgba($black, .1) !default; -$mark-bg: #fcf8e3 !default; - - -// Tables -// Customizes the `.table` component with basic values, each used across all table variations. - -$table-border-color: $gray-800; -$table-color: $body-color; -$table-head-bg: theme-color('primary'); -$table-hover-color: $body-color; -$table-inverse-bg: theme-color('primary'); -$table-accent-bg: rgba(theme-color('primary'), .1); - -// Forms - -$input-bg: $white; -$input-disabled-bg: $gray-600; -$input-color: $black; -$input-border-color: rgba($gray-600, .15); -$input-group-addon-bg: $gray-500; - - -// Dropdowns -// Dropdown menu container and contents. - -$dropdown-bg: $gray-700; -$dropdown-divider-bg: $gray-800; -$dropdown-link-color: $body-color; -$dropdown-link-hover-color: color.adjust($body-color, $lightness: -5%); -$dropdown-link-hover-bg: theme-color('primary'); -$dropdown-link-active-color: $component-active-color; -$dropdown-link-active-bg: $component-active-bg; -$dropdown-header-color: color.adjust($body-color, $lightness: -25%); - - -// Pagination - -$pagination-color: $link-color; -$pagination-bg: theme-color('dark'); -$pagination-border-color: color.adjust(theme-color('dark'), $lightness: 5%); - -$pagination-hover-color: $link-hover-color; -$pagination-hover-bg: $gray-900; -$pagination-hover-border-color: $gray-800; - -$pagination-active-color: $body-color; -$pagination-active-bg: theme-color('primary'); -$pagination-active-border-color: theme-color('primary'); - -$pagination-disabled-color: $gray-600; -$pagination-disabled-bg: $pagination-bg; -$pagination-disabled-border-color: $pagination-border-color; - - -// Jumbotron - -$jumbotron-bg: theme-color('dark'); - - -// Cards - -$card-bg: theme-color('dark'); -$card-cap-bg: rgba(theme-color('light'), .05); - - -// Progress bars - -$progress-bg: $gray-600; - - -// List group - -$list-group-bg: theme-color('dark'); -$list-group-hover-bg: color.adjust($list-group-bg, $lightness: -5%); -$list-group-active-color: $component-active-color !default; -$list-group-active-bg: $component-active-bg !default; -$list-group-active-border-color: $list-group-active-bg !default; -$list-group-action-color: $gray-400; -$list-group-action-hover-color: $list-group-action-color; - - -// Breadcrumbs - -$breadcrumb-bg: none; -$breadcrumb-active-color: $gray-600; - - -// Datetimepicker library (Tempus Dominus) - -$bs-datetimepicker-btn-hover-bg: $gray-800; diff --git a/babybuddy/templates/babybuddy/filter.html b/babybuddy/templates/babybuddy/filter.html index 84765a40..cc7f362b 100644 --- a/babybuddy/templates/babybuddy/filter.html +++ b/babybuddy/templates/babybuddy/filter.html @@ -8,14 +8,14 @@
{% if 'choice' or 'boolean' in field|field_type %} - {{ field|add_class:"custom-select custom-select-sm" }} + {{ field|add_class:"form-select form-select-sm" }} {% else %} {{ field|add_class:"form-control form-control-sm" }} {% endif %}
{% endfor %}
- + {% trans "Reset" %}
@@ -24,7 +24,7 @@

{% endblock %} diff --git a/babybuddy/templates/babybuddy/paginator.html b/babybuddy/templates/babybuddy/paginator.html index 20291bfa..d539e431 100644 --- a/babybuddy/templates/babybuddy/paginator.html +++ b/babybuddy/templates/babybuddy/paginator.html @@ -8,7 +8,7 @@
  • - {% trans "Previous" %} + {% trans "Previous" %}
  • {% endif %} @@ -25,7 +25,7 @@
  • - {% trans "Next" %} + {% trans "Next" %}
  • {% endif %} diff --git a/babybuddy/templates/babybuddy/user_form.html b/babybuddy/templates/babybuddy/user_form.html index 76377f6c..e9682476 100644 --- a/babybuddy/templates/babybuddy/user_form.html +++ b/babybuddy/templates/babybuddy/user_form.html @@ -12,7 +12,7 @@ {% block breadcrumbs %} {% if object %} - + {% else %} diff --git a/babybuddy/templates/babybuddy/user_list.html b/babybuddy/templates/babybuddy/user_list.html index e60f39c0..a44c5564 100644 --- a/babybuddy/templates/babybuddy/user_list.html +++ b/babybuddy/templates/babybuddy/user_list.html @@ -11,8 +11,8 @@

    Users

    {% include 'babybuddy/filter.html' %}
    - - +
    + diff --git a/babybuddy/templates/babybuddy/welcome.html b/babybuddy/templates/babybuddy/welcome.html index 8b6bacbb..b8224cc9 100644 --- a/babybuddy/templates/babybuddy/welcome.html +++ b/babybuddy/templates/babybuddy/welcome.html @@ -8,66 +8,76 @@ {% endblock %} {% block content %} -
    -

    {% trans "Welcome to Baby Buddy!" %}

    -

    - {% blocktrans trimmed%} - Learn about and predict baby's needs without (as much) - guess work by using Baby Buddy to track — - {% endblocktrans %} -

    -
    -
    -
    -
    - +
    +
    +

    {% trans "Welcome to Baby Buddy!" %}

    +

    + {% blocktrans trimmed%} + Learn about and predict baby's needs without (as much) + guess work by using Baby Buddy to track — + {% endblocktrans %} +

    +
    +
    +
    +
    +
    + +
    +
    +

    {% trans "Diaper Changes" %}

    +
    +
    -
    -

    {% trans "Diaper Changes" %}

    -
    -
    -
    -
    - -
    -
    -

    {% trans "Feedings" %}

    -
    -
    -
    -
    - -
    -
    -

    {% trans "Sleep" %}

    -
    -
    -
    -
    - -
    -
    -

    {% trans "Tummy Time" %}

    +
    +
    +
    + +
    +
    +

    {% trans "Feedings" %}

    +
    +
    +
    +
    +
    +
    + +
    +
    +

    {% trans "Sleep" %}

    +
    +
    +
    +
    +
    +
    + +
    +
    +

    {% trans "Tummy Time" %}

    +
    +
    +
    +

    + {% blocktrans trimmed %} + As the amount of entries grows, Baby Buddy will help parents + and caregivers to identify small patterns in baby's habits + using the dashboard and graphs. Baby Buddy is mobile-friendly + and uses a dark theme to help weary moms and dads with 2AM + feedings and changings. To get started, just click the button + below to add your first (or second, third, etc.) child! + {% endblocktrans %} +

    +

    + {% if perms.core.add_child %} + + {% trans "Add a Child" %} + + {% endif %} +

    -
    -

    - {% blocktrans trimmed %} - As the amount of entries grows, Baby Buddy will help parents - and caregivers to identify small patterns in baby's habits - using the dashboard and graphs. Baby Buddy is mobile-friendly - and uses a dark theme to help weary moms and dads with 2AM - feedings and changings. To get started, just click the button - below to add your first (or second, third, etc.) child! - {% endblocktrans %} -

    -

    - {% if perms.core.add_child %} - - {% trans "Add a Child" %} - - {% endif %} -

    {% endblock %} \ No newline at end of file diff --git a/babybuddy/templates/error/403_csrf_bad_origin.html b/babybuddy/templates/error/403_csrf_bad_origin.html index f9ef7c4f..c8179206 100644 --- a/babybuddy/templates/error/403_csrf_bad_origin.html +++ b/babybuddy/templates/error/403_csrf_bad_origin.html @@ -10,12 +10,14 @@ -
    -

    {% trans "How to Fix" %}

    - {% blocktrans trimmed with origin=origin %} - Add {{ origin }} to the CSRF_TRUSTED_ORIGINS - environment variable. If multiple origins are required separate - with commas. - {% endblocktrans %} +
    +
    +

    {% trans "How to Fix" %}

    + {% blocktrans trimmed with origin=origin %} + Add {{ origin }} to the CSRF_TRUSTED_ORIGINS + environment variable. If multiple origins are required separate + with commas. + {% endblocktrans %} +
    {% endblock %} diff --git a/babybuddy/templates/error/base.html b/babybuddy/templates/error/base.html index 164e279c..3b4b33c2 100644 --- a/babybuddy/templates/error/base.html +++ b/babybuddy/templates/error/base.html @@ -8,7 +8,7 @@
    - +
    {% block content %}{% endblock %} {% trans "Return to Baby Buddy" %} diff --git a/babybuddy/templates/registration/base.html b/babybuddy/templates/registration/base.html index 237c2441..b117ee0a 100644 --- a/babybuddy/templates/registration/base.html +++ b/babybuddy/templates/registration/base.html @@ -7,7 +7,7 @@
    -

    +

    Baby Buddy

    diff --git a/babybuddy/templates/registration/login.html b/babybuddy/templates/registration/login.html index 6cd707ba..eca41f44 100644 --- a/babybuddy/templates/registration/login.html +++ b/babybuddy/templates/registration/login.html @@ -8,23 +8,19 @@ -
    -
    {% trans "User" %} {% trans "First Name" %}
    - +
    + @@ -32,8 +32,7 @@ {% for bmi in object_list %} - {% cycle "odd" "even" as row_class silent %} - + {% if bmi.notes %} - + {% endif %} {% empty %} diff --git a/core/templates/core/child_confirm_delete.html b/core/templates/core/child_confirm_delete.html index 8e7b04dd..48f114a5 100644 --- a/core/templates/core/child_confirm_delete.html +++ b/core/templates/core/child_confirm_delete.html @@ -5,7 +5,7 @@ {% block breadcrumbs %} - + {% endblock %} diff --git a/core/templates/core/child_detail.html b/core/templates/core/child_detail.html index 081ae11e..84db3dda 100644 --- a/core/templates/core/child_detail.html +++ b/core/templates/core/child_detail.html @@ -5,7 +5,7 @@ {% block breadcrumbs %} - {% endblock %} diff --git a/core/templates/core/child_form.html b/core/templates/core/child_form.html index 0774a691..16725568 100644 --- a/core/templates/core/child_form.html +++ b/core/templates/core/child_form.html @@ -12,7 +12,7 @@ {% block breadcrumbs %} {% if object %} - + {% else %} @@ -32,10 +32,15 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/child_list.html b/core/templates/core/child_list.html index d612905b..ed944b3e 100644 --- a/core/templates/core/child_list.html +++ b/core/templates/core/child_list.html @@ -18,10 +18,10 @@ {% include 'babybuddy/filter.html' %}
    -
    {% trans "Actions" %} {% trans "Date" %}
    @@ -62,7 +61,7 @@
    {{ bmi.notes }}{{ bmi.notes }}
    - +
    + - + @@ -31,8 +31,12 @@ {% for child in object_list %} -
    {% trans "First Name" %} {% trans "Last Name" %} {% trans "Birth Date" %}
    - {% include "core/child_thumbnail.html" %} + + {% if child.picture %} + {% include "core/child_thumbnail.html" %} + {% else %} + + {% endif %} {{ child.first_name }} diff --git a/core/templates/core/diaperchange_form.html b/core/templates/core/diaperchange_form.html index 4ee5492e..98dd5ec1 100644 --- a/core/templates/core/diaperchange_form.html +++ b/core/templates/core/diaperchange_form.html @@ -31,8 +31,6 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/diaperchange_list.html b/core/templates/core/diaperchange_list.html index 09e6cf87..6e269641 100644 --- a/core/templates/core/diaperchange_list.html +++ b/core/templates/core/diaperchange_list.html @@ -18,8 +18,8 @@ {% include 'babybuddy/filter.html' %}
    - - +
    + @@ -34,8 +34,7 @@ {% for change in object_list %} - {% cycle "odd" "even" as row_class silent %} - + {% if change.notes %} - + {% endif %} {% empty %} diff --git a/core/templates/core/feeding_form.html b/core/templates/core/feeding_form.html index 0439817c..feed3c5f 100644 --- a/core/templates/core/feeding_form.html +++ b/core/templates/core/feeding_form.html @@ -31,12 +31,8 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/head_circumference_list.html b/core/templates/core/head_circumference_list.html index 88772556..0342168f 100644 --- a/core/templates/core/head_circumference_list.html +++ b/core/templates/core/head_circumference_list.html @@ -18,8 +18,8 @@ {% include 'babybuddy/filter.html' %}
    -
    {% trans "Actions" %} {% trans "Time" %}
    @@ -69,7 +68,7 @@
    {{ change.notes }}{{ change.notes }}
    - +
    + @@ -32,8 +32,7 @@ {% for head_circumference in object_list %} - {% cycle "odd" "even" as row_class silent %} - + {% if head_circumference.notes %} - + {% endif %} {% empty %} diff --git a/core/templates/core/height_form.html b/core/templates/core/height_form.html index 9c0892da..3a8119f6 100644 --- a/core/templates/core/height_form.html +++ b/core/templates/core/height_form.html @@ -31,9 +31,14 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/height_list.html b/core/templates/core/height_list.html index 2abb39f9..3ef6ad9e 100644 --- a/core/templates/core/height_list.html +++ b/core/templates/core/height_list.html @@ -18,8 +18,8 @@ {% include 'babybuddy/filter.html' %}
    -
    {% trans "Actions" %} {% trans "Date" %}
    @@ -62,7 +61,7 @@
    {{ head_circumference.notes }}{{ head_circumference.notes }}
    - +
    + @@ -32,8 +32,7 @@ {% for height in object_list %} - {% cycle "odd" "even" as row_class silent %} - + {% if height.notes %} - + {% endif %} {% empty %} diff --git a/core/templates/core/note_form.html b/core/templates/core/note_form.html index b475a104..a32ebcab 100644 --- a/core/templates/core/note_form.html +++ b/core/templates/core/note_form.html @@ -31,8 +31,6 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/note_list.html b/core/templates/core/note_list.html index 571e3d23..40f68578 100644 --- a/core/templates/core/note_list.html +++ b/core/templates/core/note_list.html @@ -18,8 +18,8 @@ {% include 'babybuddy/filter.html' %}
    -
    {% trans "Actions" %} {% trans "Date" %}
    @@ -62,7 +61,7 @@
    {{ height.notes }}{{ height.notes }}
    - +
    + diff --git a/core/templates/core/pumping_form.html b/core/templates/core/pumping_form.html index f25c9620..74ee0929 100644 --- a/core/templates/core/pumping_form.html +++ b/core/templates/core/pumping_form.html @@ -31,8 +31,6 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/pumping_list.html b/core/templates/core/pumping_list.html index a0f7fbf3..8edfc6a8 100644 --- a/core/templates/core/pumping_list.html +++ b/core/templates/core/pumping_list.html @@ -18,8 +18,8 @@ {% include 'babybuddy/filter.html' %}
    -
    {% trans "Actions" %} {% trans "Time" %}
    - +
    + @@ -32,8 +32,7 @@ {% for pumping in object_list %} - {% cycle "odd" "even" as row_class silent %} - + {% if pumping.notes %} - + {% endif %} {% empty %} diff --git a/core/templates/core/sleep_form.html b/core/templates/core/sleep_form.html index a81dec53..4306377b 100644 --- a/core/templates/core/sleep_form.html +++ b/core/templates/core/sleep_form.html @@ -31,12 +31,7 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/sleep_list.html b/core/templates/core/sleep_list.html index 23a2bc3d..2266574e 100644 --- a/core/templates/core/sleep_list.html +++ b/core/templates/core/sleep_list.html @@ -18,8 +18,8 @@ {% include 'babybuddy/filter.html' %}
    -
    {% trans "Actions" %} {% trans "Time" %}
    @@ -62,7 +61,7 @@
    {{ pumping.notes }}{{ pumping.notes }}
    - +
    + @@ -34,8 +34,7 @@ {% for sleep in object_list %} - {% cycle "odd" "even" as row_class silent %} - + {% if sleep.notes %} - + {% endif %} {% empty %} diff --git a/core/templates/core/temperature_form.html b/core/templates/core/temperature_form.html index 3ec470b9..db8c724d 100644 --- a/core/templates/core/temperature_form.html +++ b/core/templates/core/temperature_form.html @@ -31,8 +31,6 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/temperature_list.html b/core/templates/core/temperature_list.html index 93100178..75fec0b8 100644 --- a/core/templates/core/temperature_list.html +++ b/core/templates/core/temperature_list.html @@ -18,8 +18,8 @@ {% include 'babybuddy/filter.html' %}
    -
    {% trans "Actions" %} {% trans "Start" %}
    @@ -66,7 +65,7 @@
    {{ sleep.notes }}{{ sleep.notes }}
    - +
    + @@ -32,8 +32,7 @@ {% for temperature in object_list %} - {% cycle "odd" "even" as row_class silent %} - + {% if temperature.notes %} - + {% endif %} {% empty %} diff --git a/core/templates/core/timer_confirm_delete.html b/core/templates/core/timer_confirm_delete.html index 9c7e5673..50fd342e 100644 --- a/core/templates/core/timer_confirm_delete.html +++ b/core/templates/core/timer_confirm_delete.html @@ -7,7 +7,7 @@ {% block breadcrumbs %} - + {% endblock %} diff --git a/core/templates/core/timer_detail.html b/core/templates/core/timer_detail.html index 3f5821ae..fa373b50 100644 --- a/core/templates/core/timer_detail.html +++ b/core/templates/core/timer_detail.html @@ -6,86 +6,90 @@ {% block breadcrumbs %} - + {% endblock %} {% block content %} -
    +
    +
    +

    + {{ object.duration|hours }}h + {{ object.duration|minutes }}m + {{ object.duration|seconds }}s +

    -

    - {{ object.duration|hours }}h - {{ object.duration|minutes }}m - {{ object.duration|seconds }}s -

    - - {% if timer.child and CHILD_COUNT > 1 %} -

    - {{ timer.child }} -

    - {% endif %} - -

    - {% trans "Started" %} {{ object.start }} - {% if not object.active %} - / {% trans "Stopped" %} {{ object.end }} - {% endif %} -

    -

    - {% blocktrans trimmed with user=object.user_username %} - {{ timer }} created by {{ user }} - {% endblocktrans %} -

    - - {% if perms.core.add_feeding %} - - {% trans "Feeding" %} - - {% endif %} - - {% if perms.core.add_sleep %} - - {% trans "Sleep" %} - - {% endif %} - - {% if perms.core.add_tummytime %} - - {% trans "Tummy Time" %} - - {% endif %} - -
    - {% if perms.core.delete_timer %} - + {% if timer.child and CHILD_COUNT > 1 %} +

    + {{ timer.child }} +

    {% endif %} - {% if perms.core.change_timer %} - - - - {% csrf_token %} - - - - - {% if object.active %} -
    - {% csrf_token %} - - - +

    + {% trans "Started" %} {{ object.start }} + {% if not object.active %} + / {% trans "Stopped" %} {{ object.end }} {% endif %} - {% endif %} +

    +

    + {% blocktrans trimmed with user=object.user_username %} + {{ timer }} created by {{ user }} + {% endblocktrans %} +

    + +
    + {% if perms.core.add_feeding %} + + {% trans "Feeding" %} + + {% endif %} + + {% if perms.core.add_sleep %} + + {% trans "Sleep" %} + + {% endif %} + + {% if perms.core.add_tummytime %} + + {% trans "Tummy Time" %} + + {% endif %} +
    + +
    + {% if perms.core.delete_timer %} + + {% endif %} + + {% if perms.core.change_timer %} + + +
    + {% csrf_token %} + + + + + {% if object.active %} +
    + {% csrf_token %} + + + + {% endif %} + {% endif %} +
    {% endblock %} diff --git a/core/templates/core/timer_form.html b/core/templates/core/timer_form.html index 7c50b334..22e8b316 100644 --- a/core/templates/core/timer_form.html +++ b/core/templates/core/timer_form.html @@ -6,7 +6,7 @@ {% block breadcrumbs %} {% if object %} - + {% else %} @@ -26,8 +26,6 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/timer_list.html b/core/templates/core/timer_list.html index 30c69e00..df383838 100644 --- a/core/templates/core/timer_list.html +++ b/core/templates/core/timer_list.html @@ -18,8 +18,8 @@ {% include 'babybuddy/filter.html' %}
    -
    {% trans "Actions" %} {% trans "Time" %}
    @@ -62,7 +61,7 @@
    {{ temperature.notes }}{{ temperature.notes }}
    - +
    + diff --git a/core/templates/core/timer_nav.html b/core/templates/core/timer_nav.html index 6813a9b7..d439fd8d 100644 --- a/core/templates/core/timer_nav.html +++ b/core/templates/core/timer_nav.html @@ -4,13 +4,21 @@
    {% trans "Start" %} {% trans "Name" %}
    - +
    + diff --git a/core/templates/core/weight_form.html b/core/templates/core/weight_form.html index 10247d5c..8e3222f7 100644 --- a/core/templates/core/weight_form.html +++ b/core/templates/core/weight_form.html @@ -31,9 +31,14 @@ {% block javascript %} {% endblock %} \ No newline at end of file diff --git a/core/templates/core/weight_list.html b/core/templates/core/weight_list.html index c9bda834..11eec769 100644 --- a/core/templates/core/weight_list.html +++ b/core/templates/core/weight_list.html @@ -18,8 +18,8 @@ {% include 'babybuddy/filter.html' %}
    -
    {% trans "Actions" %} {% trans "Start" %}
    - +
    + @@ -32,8 +32,7 @@ {% for weight in object_list %} - {% cycle "odd" "even" as row_class silent %} - + {% if weight.notes %} - + {% endif %} {% empty %} diff --git a/core/templates/core/widget_tag_editor.html b/core/templates/core/widget_tag_editor.html index 3b4a7eed..d0212a63 100644 --- a/core/templates/core/widget_tag_editor.html +++ b/core/templates/core/widget_tag_editor.html @@ -5,39 +5,31 @@ {{ k }}="{{ v }}" {% endfor %}> {% csrf_token %} -
    {% trans "Actions" %} {% trans "Date" %}
    @@ -62,7 +61,7 @@
    {{ weight.notes }}{{ weight.notes }}
    ","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function _e(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?b.merge([e],i):i}function ge(e,t){for(var i=0,n=e.length;i",""]);var ve=/<|&#?\w+;/;function ye(e,t,i,n,a){for(var r,o,s,l,u,c,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f-1)a&&a.push(r);else if(u=ne(r),o=_e(d.appendChild(r),"script"),u&&ge(o),i)for(c=0;r=o[c++];)pe.test(r.type||"")&&i.push(r);return d}var be=/^([^.]*)(?:\.(.+)|)/;function Ae(){return!0}function we(){return!1}function Me(e,t){return e===function(){try{return _.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,i,n,a,r){var o,s;if("object"==typeof t){for(s in"string"!=typeof i&&(n=n||i,i=void 0),t)ke(e,s,i,n,t[s],r);return e}if(null==n&&null==a?(a=i,n=i=void 0):null==a&&("string"==typeof i?(a=n,n=void 0):(a=n,n=i,i=void 0)),!1===a)a=we;else if(!a)return e;return 1===r&&(o=a,(a=function(e){return b().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=b.guid++)),e.each(function(){b.event.add(this,t,a,n,i)})}function Te(e,t,i){i?(K.set(e,t,!1),b.event.add(e,t,{namespace:!1,handler:function(e){var n,r,o=K.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(b.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=a.call(arguments),K.set(this,t,o),n=i(this,t),this[t](),o!==(r=K.get(this,t))||n?K.set(this,t,!1):r={},o!==r)return e.stopImmediatePropagation(),e.preventDefault(),r&&r.value}else o.length&&(K.set(this,t,{value:b.event.trigger(b.extend(o[0],b.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===K.get(e,t)&&b.event.add(e,t,Ae)}b.event={global:{},add:function(e,t,i,n,a){var r,o,s,l,u,c,d,h,f,p,m,_=K.get(e);if(U(e))for(i.handler&&(i=(r=i).handler,a=r.selector),a&&b.find.matchesSelector(ie,a),i.guid||(i.guid=b.guid++),(l=_.events)||(l=_.events=Object.create(null)),(o=_.handle)||(o=_.handle=function(t){return void 0!==b&&b.event.triggered!==t.type?b.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(O)||[""]).length;u--;)f=m=(s=be.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=b.event.special[f]||{},f=(a?d.delegateType:d.bindType)||f,d=b.event.special[f]||{},c=b.extend({type:f,origType:m,data:n,handler:i,guid:i.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:p.join(".")},r),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,n,p,o)||e.addEventListener&&e.addEventListener(f,o)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=i.guid)),a?h.splice(h.delegateCount++,0,c):h.push(c),b.event.global[f]=!0)},remove:function(e,t,i,n,a){var r,o,s,l,u,c,d,h,f,p,m,_=K.hasData(e)&&K.get(e);if(_&&(l=_.events)){for(u=(t=(t||"").match(O)||[""]).length;u--;)if(f=m=(s=be.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=b.event.special[f]||{},h=l[f=(n?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=r=h.length;r--;)c=h[r],!a&&m!==c.origType||i&&i.guid!==c.guid||s&&!s.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(h.splice(r,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));o&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,_.handle)||b.removeEvent(e,f,_.handle),delete l[f])}else for(f in l)b.event.remove(e,f+t[u],i,n,!0);b.isEmptyObject(l)&&K.remove(e,"handle events")}},dispatch:function(e){var t,i,n,a,r,o,s=new Array(arguments.length),l=b.event.fix(e),u=(K.get(this,"events")||Object.create(null))[l.type]||[],c=b.event.special[l.type]||{};for(s[0]=l,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(r=[],o={},i=0;i-1:b.find(a,this,null,[u]).length),o[a]&&r.push(n);r.length&&s.push({elem:u,handlers:r})}return u=this,l\s*$/g;function xe(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&b(e).children("tbody")[0]||e}function Ce(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var i,n,a,r,o,s;if(1===t.nodeType){if(K.hasData(e)&&(s=K.get(e).events))for(a in K.remove(t,"handle events"),s)for(i=0,n=s[a].length;i1&&"string"==typeof _&&!f.checkClone&&Ee.test(_))return e.each(function(a){var r=e.eq(a);g&&(t[0]=_.call(this,a,r.html())),Ye(r,t,i,n)});if(h&&(o=(a=ye(t,e[0].ownerDocument,!1,e,n)).firstChild,1===a.childNodes.length&&(a=o),o||n)){for(l=(s=b.map(_e(a,"script"),Ce)).length;d0&&ge(o,!d&&_e(e,"script")),c},cleanData:function(e){for(var t,i,n,a=b.event.special,r=0;void 0!==(i=e[r]);r++)if(U(i)){if(t=i[K.expando]){if(t.events)for(n in t.events)a[n]?b.event.remove(i,n):b.removeEvent(i,n,t.handle);i[K.expando]=void 0}i[Q.expando]&&(i[Q.expando]=void 0)}}}),b.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return F(this,function(e){return void 0===e?b.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ye(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||xe(this,e).appendChild(e)})},prepend:function(){return Ye(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=xe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ye(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ye(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(b.cleanData(_e(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return F(this,function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!De.test(e)&&!me[(fe.exec(e)||["",""])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;i=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-s-.5))||0),l}function Ze(e,t,i){var n=Ie(e),a=(!f.boxSizingReliable()||i)&&"border-box"===b.css(e,"boxSizing",!1,n),r=a,o=Fe(e,t,n),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ne.test(o)){if(!i)return o;o="auto"}return(!f.boxSizingReliable()&&a||!f.reliableTrDimensions()&&D(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===b.css(e,"display",!1,n))&&e.getClientRects().length&&(a="border-box"===b.css(e,"boxSizing",!1,n),(r=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+Je(e,t,i||(a?"border":"content"),r,n,o)+"px"}function $e(e,t,i,n,a){return new $e.prototype.init(e,t,i,n,a)}b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=Fe(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,r,o,s=V(t),l=je.test(t),u=e.style;if(l||(t=Ue(s)),o=b.cssHooks[t]||b.cssHooks[s],void 0===i)return o&&"get"in o&&void 0!==(a=o.get(e,!1,n))?a:u[t];"string"===(r=typeof i)&&(a=ee.exec(i))&&a[1]&&(i=oe(e,t,a),r="number"),null!=i&&i==i&&("number"!==r||l||(i+=a&&a[3]||(b.cssNumber[s]?"":"px")),f.clearCloneStyle||""!==i||0!==t.indexOf("background")||(u[t]="inherit"),o&&"set"in o&&void 0===(i=o.set(e,i,n))||(l?u.setProperty(t,i):u[t]=i))}},css:function(e,t,i,n){var a,r,o,s=V(t);return je.test(t)||(t=Ue(s)),(o=b.cssHooks[t]||b.cssHooks[s])&&"get"in o&&(a=o.get(e,!0,i)),void 0===a&&(a=Fe(e,t,n)),"normal"===a&&t in Qe&&(a=Qe[t]),""===i||i?(r=parseFloat(a),!0===i||isFinite(r)?r||0:a):a}}),b.each(["height","width"],function(e,t){b.cssHooks[t]={get:function(e,i,n){if(i)return!Ge.test(b.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,t,n):He(e,Ke,function(){return Ze(e,t,n)})},set:function(e,i,n){var a,r=Ie(e),o=!f.scrollboxSize()&&"absolute"===r.position,s=(o||n)&&"border-box"===b.css(e,"boxSizing",!1,r),l=n?Je(e,t,n,s,r):0;return s&&o&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-Je(e,t,"border",!1,r)-.5)),l&&(a=ee.exec(i))&&"px"!==(a[3]||"px")&&(e.style[t]=i,i=b.css(e,t)),Xe(0,i,l)}}}),b.cssHooks.marginLeft=We(f.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-He(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(i){for(var n=0,a={},r="string"==typeof i?i.split(" "):[i];n<4;n++)a[e+te[n]+t]=r[n]||r[n-2]||r[0];return a}},"margin"!==e&&(b.cssHooks[e+t].set=Xe)}),b.fn.extend({css:function(e,t){return F(this,function(e,t,i){var n,a,r={},o=0;if(Array.isArray(t)){for(n=Ie(e),a=t.length;o1)}}),b.Tween=$e,$e.prototype={constructor:$e,init:function(e,t,i,n,a,r){this.elem=e,this.prop=i,this.easing=a||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=r||(b.cssNumber[i]?"":"px")},cur:function(){var e=$e.propHooks[this.prop];return e&&e.get?e.get(this):$e.propHooks._default.get(this)},run:function(e){var t,i=$e.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):$e.propHooks._default.set(this),this}},$e.prototype.init.prototype=$e.prototype,$e.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=b.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||!b.cssHooks[e.prop]&&null==e.elem.style[Ue(e.prop)]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}},$e.propHooks.scrollTop=$e.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},b.fx=$e.prototype.init,b.fx.step={};var et,tt,it=/^(?:toggle|show|hide)$/,nt=/queueHooks$/;function at(){tt&&(!1===_.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,b.fx.interval),b.fx.tick())}function rt(){return e.setTimeout(function(){et=void 0}),et=Date.now()}function ot(e,t){var i,n=0,a={height:e};for(t=t?1:0;n<4;n+=2-t)a["margin"+(i=te[n])]=a["padding"+i]=e;return t&&(a.opacity=a.width=e),a}function st(e,t,i){for(var n,a=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),r=0,o=a.length;r1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})}}),b.extend({attr:function(e,t,i){var n,a,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?b.prop(e,t,i):(1===r&&b.isXMLDoc(e)||(a=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?ut:void 0)),void 0!==i?null===i?void b.removeAttr(e,t):a&&"set"in a&&void 0!==(n=a.set(e,i,t))?n:(e.setAttribute(t,i+""),i):a&&"get"in a&&null!==(n=a.get(e,t))?n:null==(n=b.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&D(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,a=t&&t.match(O);if(a&&1===e.nodeType)for(;i=a[n++];)e.removeAttribute(i)}}),ut={set:function(e,t,i){return!1===t?b.removeAttr(e,i):e.setAttribute(i,i),i}},b.each(b.expr.match.bool.source.match(/\w+/g),function(e,t){var i=ct[t]||b.find.attr;ct[t]=function(e,t,n){var a,r,o=t.toLowerCase();return n||(r=ct[o],ct[o]=a,a=null!=i(e,t,n)?o:null,ct[o]=r),a}});var dt=/^(?:input|select|textarea|button)$/i,ht=/^(?:a|area)$/i;function ft(e){return(e.match(O)||[]).join(" ")}function pt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(O)||[]}b.fn.extend({prop:function(e,t){return F(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[b.propFix[e]||e]})}}),b.extend({prop:function(e,t,i){var n,a,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&b.isXMLDoc(e)||(t=b.propFix[t]||t,a=b.propHooks[t]),void 0!==i?a&&"set"in a&&void 0!==(n=a.set(e,i,t))?n:e[t]=i:a&&"get"in a&&null!==(n=a.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=b.find.attr(e,"tabindex");return t?parseInt(t,10):dt.test(e.nodeName)||ht.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(b.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){b.propFix[this.toLowerCase()]=this}),b.fn.extend({addClass:function(e){var t,i,n,a,r,o;return p(e)?this.each(function(t){b(this).addClass(e.call(this,t,pt(this)))}):(t=mt(e)).length?this.each(function(){if(n=pt(this),i=1===this.nodeType&&" "+ft(n)+" "){for(r=0;r-1;)i=i.replace(" "+a+" "," ");o=ft(i),n!==o&&this.setAttribute("class",o)}}):this:this.attr("class","")},toggleClass:function(e,t){var i,n,a,r,o=typeof e,s="string"===o||Array.isArray(e);return p(e)?this.each(function(i){b(this).toggleClass(e.call(this,i,pt(this),t),t)}):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(i=mt(e),this.each(function(){if(s)for(r=b(this),a=0;a-1)return!0;return!1}});var _t=/\r/g;b.fn.extend({val:function(e){var t,i,n,a=this[0];return arguments.length?(n=p(e),this.each(function(i){var a;1===this.nodeType&&(null==(a=n?e.call(this,i,b(this).val()):e)?a="":"number"==typeof a?a+="":Array.isArray(a)&&(a=b.map(a,function(e){return null==e?"":e+""})),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,a,"value")||(this.value=a))})):a?(t=b.valHooks[a.type]||b.valHooks[a.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(a,"value"))?i:"string"==typeof(i=a.value)?i.replace(_t,""):null==i?"":i:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,"value");return null!=t?t:ft(b.text(e))}},select:{get:function(e){var t,i,n,a=e.options,r=e.selectedIndex,o="select-one"===e.type,s=o?null:[],l=o?r+1:a.length;for(n=r<0?l:o?r:0;n-1)&&(i=!0);return i||(e.selectedIndex=-1),r}}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=b.inArray(b(e).val(),t)>-1}},f.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),f.focusin="onfocusin"in e;var gt=/^(?:focusinfocus|focusoutblur)$/,vt=function(e){e.stopPropagation()};b.extend(b.event,{trigger:function(t,i,n,a){var r,o,s,l,u,d,h,f,g=[n||_],v=c.call(t,"type")?t.type:t,y=c.call(t,"namespace")?t.namespace.split("."):[];if(o=f=s=n=n||_,3!==n.nodeType&&8!==n.nodeType&&!gt.test(v+b.event.triggered)&&(v.indexOf(".")>-1&&(y=v.split("."),v=y.shift(),y.sort()),u=v.indexOf(":")<0&&"on"+v,(t=t[b.expando]?t:new b.Event(v,"object"==typeof t&&t)).isTrigger=a?2:3,t.namespace=y.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:b.makeArray(i,[t]),h=b.event.special[v]||{},a||!h.trigger||!1!==h.trigger.apply(n,i))){if(!a&&!h.noBubble&&!m(n)){for(l=h.delegateType||v,gt.test(l+v)||(o=o.parentNode);o;o=o.parentNode)g.push(o),s=o;s===(n.ownerDocument||_)&&g.push(s.defaultView||s.parentWindow||e)}for(r=0;(o=g[r++])&&!t.isPropagationStopped();)f=o,t.type=r>1?l:h.bindType||v,(d=(K.get(o,"events")||Object.create(null))[t.type]&&K.get(o,"handle"))&&d.apply(o,i),(d=u&&o[u])&&d.apply&&U(o)&&(t.result=d.apply(o,i),!1===t.result&&t.preventDefault());return t.type=v,a||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(g.pop(),i)||!U(n)||u&&p(n[v])&&!m(n)&&((s=n[u])&&(n[u]=null),b.event.triggered=v,t.isPropagationStopped()&&f.addEventListener(v,vt),n[v](),t.isPropagationStopped()&&f.removeEventListener(v,vt),b.event.triggered=void 0,s&&(n[u]=s)),t.result}},simulate:function(e,t,i){var n=b.extend(new b.Event,i,{type:e,isSimulated:!0});b.event.trigger(n,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];if(i)return b.event.trigger(e,t,i,!0)}}),f.focusin||b.each({focus:"focusin",blur:"focusout"},function(e,t){var i=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.event.special[t]={setup:function(){var n=this.ownerDocument||this.document||this,a=K.access(n,t);a||n.addEventListener(e,i,!0),K.access(n,t,(a||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,a=K.access(n,t)-1;a?K.access(n,t,a):(n.removeEventListener(e,i,!0),K.remove(n,t))}}});var yt=e.location,bt={guid:Date.now()},At=/\?/;b.parseXML=function(t){var i,n;if(!t||"string"!=typeof t)return null;try{i=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){}return n=i&&i.getElementsByTagName("parsererror")[0],i&&!n||b.error("Invalid XML: "+(n?b.map(n.childNodes,function(e){return e.textContent}).join("\n"):t)),i};var wt=/\[\]$/,Mt=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Tt=/^(?:input|select|textarea|keygen)/i;function Dt(e,t,i,n){var a;if(Array.isArray(t))b.each(t,function(t,a){i||wt.test(e)?n(e,a):Dt(e+"["+("object"==typeof a&&null!=a?t:"")+"]",a,i,n)});else if(i||"object"!==y(t))n(e,t);else for(a in t)Dt(e+"["+a+"]",t[a],i,n)}b.param=function(e,t){var i,n=[],a=function(e,t){var i=p(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){a(this.name,this.value)});else for(i in e)Dt(i,e[i],t,a);return n.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&Tt.test(this.nodeName)&&!kt.test(e)&&(this.checked||!he.test(e))}).map(function(e,t){var i=b(this).val();return null==i?null:Array.isArray(i)?b.map(i,function(e){return{name:t.name,value:e.replace(Mt,"\r\n")}}):{name:t.name,value:i.replace(Mt,"\r\n")}}).get()}});var Et=/%20/g,St=/#.*$/,xt=/([?&])_=[^&]*/,Ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Pt=/^\/\//,Yt={},Ot={},Nt="*/".concat("*"),jt=_.createElement("a");function It(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,a=0,r=t.toLowerCase().match(O)||[];if(p(i))for(;n=r[a++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function Ht(e,t,i,n){var a={},r=e===Ot;function o(s){var l;return a[s]=!0,b.each(e[s]||[],function(e,s){var u=s(t,i,n);return"string"!=typeof u||r||a[u]?r?!(l=u):void 0:(t.dataTypes.unshift(u),o(u),!1)}),l}return o(t.dataTypes[0])||!a["*"]&&o("*")}function zt(e,t){var i,n,a=b.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((a[i]?e:n||(n={}))[i]=t[i]);return n&&b.extend(!0,e,n),e}jt.href=yt.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(yt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Nt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,b.ajaxSettings),t):zt(b.ajaxSettings,e)},ajaxPrefilter:It(Yt),ajaxTransport:It(Ot),ajax:function(t,i){"object"==typeof t&&(i=t,t=void 0),i=i||{};var n,a,r,o,s,l,u,c,d,h,f=b.ajaxSetup({},i),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?b(p):b.event,g=b.Deferred(),v=b.Callbacks("once memory"),y=f.statusCode||{},A={},w={},M="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(u){if(!o)for(o={};t=Ct.exec(r);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?r:null},setRequestHeader:function(e,t){return null==u&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,A[e]=t),this},overrideMimeType:function(e){return null==u&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)k.always(e[k.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||M;return n&&n.abort(t),T(0,t),this}};if(g.promise(k),f.url=((t||f.url||yt.href)+"").replace(Pt,yt.protocol+"//"),f.type=i.method||i.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(O)||[""],null==f.crossDomain){l=_.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=jt.protocol+"//"+jt.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=b.param(f.data,f.traditional)),Ht(Yt,f,i,k),u)return k;for(d in(c=b.event&&f.global)&&0==b.active++&&b.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Lt.test(f.type),a=f.url.replace(St,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Et,"+")):(h=f.url.slice(a.length),f.data&&(f.processData||"string"==typeof f.data)&&(a+=(At.test(a)?"&":"?")+f.data,delete f.data),!1===f.cache&&(a=a.replace(xt,"$1"),h=(At.test(a)?"&":"?")+"_="+bt.guid+++h),f.url=a+h),f.ifModified&&(b.lastModified[a]&&k.setRequestHeader("If-Modified-Since",b.lastModified[a]),b.etag[a]&&k.setRequestHeader("If-None-Match",b.etag[a])),(f.data&&f.hasContent&&!1!==f.contentType||i.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Nt+"; q=0.01":""):f.accepts["*"]),f.headers)k.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,k,f)||u))return k.abort();if(M="abort",v.add(f.complete),k.done(f.success),k.fail(f.error),n=Ht(Ot,f,i,k)){if(k.readyState=1,c&&m.trigger("ajaxSend",[k,f]),u)return k;f.async&&f.timeout>0&&(s=e.setTimeout(function(){k.abort("timeout")},f.timeout));try{u=!1,n.send(A,T)}catch(e){if(u)throw e;T(-1,e)}}else T(-1,"No Transport");function T(t,i,o,l){var d,h,_,A,w,M=i;u||(u=!0,s&&e.clearTimeout(s),n=void 0,r=l||"",k.readyState=t>0?4:0,d=t>=200&&t<300||304===t,o&&(A=function(e,t,i){for(var n,a,r,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(a in s)if(s[a]&&s[a].test(n)){l.unshift(a);break}if(l[0]in i)r=l[0];else{for(a in i){if(!l[0]||e.converters[a+" "+l[0]]){r=a;break}o||(o=a)}r=r||o}if(r)return r!==l[0]&&l.unshift(r),i[r]}(f,k,o)),!d&&b.inArray("script",f.dataTypes)>-1&&b.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),A=function(e,t,i,n){var a,r,o,s,l,u={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)u[o.toLowerCase()]=e.converters[o];for(r=c.shift();r;)if(e.responseFields[r]&&(i[e.responseFields[r]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=c.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(o=u[l+" "+r]||u["* "+r]))for(a in u)if((s=a.split(" "))[1]===r&&(o=u[l+" "+s[0]]||u["* "+s[0]])){!0===o?o=u[a]:!0!==u[a]&&(r=s[0],c.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}(f,A,k,d),d?(f.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(b.lastModified[a]=w),(w=k.getResponseHeader("etag"))&&(b.etag[a]=w)),204===t||"HEAD"===f.type?M="nocontent":304===t?M="notmodified":(M=A.state,h=A.data,d=!(_=A.error))):(_=M,!t&&M||(M="error",t<0&&(t=0))),k.status=t,k.statusText=(i||M)+"",d?g.resolveWith(p,[h,M,k]):g.rejectWith(p,[k,M,_]),k.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[k,f,d?h:_]),v.fireWith(p,[k,M]),c&&(m.trigger("ajaxComplete",[k,f]),--b.active||b.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,i){return b.get(e,t,i,"json")},getScript:function(e,t){return b.get(e,void 0,t,"script")}}),b.each(["get","post"],function(e,t){b[t]=function(e,i,n,a){return p(i)&&(a=a||n,n=i,i=void 0),b.ajax(b.extend({url:e,type:t,dataType:a,data:i,success:n},b.isPlainObject(e)&&e))}}),b.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),b._evalUrl=function(e,t,i){return b.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){b.globalEval(e,t,i)}})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(p(e)&&(e=e.call(this[0])),t=b(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return p(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=p(e);return this.each(function(i){b(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){b(this).replaceWith(this.childNodes)}),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Rt={0:200,1223:204},Ft=b.ajaxSettings.xhr();f.cors=!!Ft&&"withCredentials"in Ft,f.ajax=Ft=!!Ft,b.ajaxTransport(function(t){var i,n;if(f.cors||Ft&&!t.crossDomain)return{send:function(a,r){var o,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];for(o in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||a["X-Requested-With"]||(a["X-Requested-With"]="XMLHttpRequest"),a)s.setRequestHeader(o,a[o]);i=function(e){return function(){i&&(i=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(Rt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=i(),n=s.onerror=s.ontimeout=i("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){i&&n()})},i=i("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(i)throw e}},abort:function(){i&&i()}}}),b.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),b.ajaxTransport("script",function(e){var t,i;if(e.crossDomain||e.scriptAttrs)return{send:function(n,a){t=b("