diff --git a/.github/workflows/build-base-app.yml b/.github/workflows/build-base-app.yml index 6bc771def..9ee2aec9c 100644 --- a/.github/workflows/build-base-app.yml +++ b/.github/workflows/build-base-app.yml @@ -17,7 +17,7 @@ jobs: packages: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/.github/workflows/build-celery-worker.yml b/.github/workflows/build-celery-worker.yml index 87a7d1851..0144f6d90 100644 --- a/.github/workflows/build-celery-worker.yml +++ b/.github/workflows/build-celery-worker.yml @@ -19,7 +19,7 @@ jobs: packages: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/.github/workflows/build-mq-broker.yml b/.github/workflows/build-mq-broker.yml index 2ba41bb9c..10f171284 100644 --- a/.github/workflows/build-mq-broker.yml +++ b/.github/workflows/build-mq-broker.yml @@ -18,7 +18,7 @@ jobs: packages: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2ed7034d6..4bd7362c4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -26,12 +26,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.pnp.cjs b/.pnp.cjs index 414b8bbfe..444bdca20 100644 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -37,6 +37,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@fullcalendar/bootstrap5", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ ["@fullcalendar/core", "npm:6.1.4"],\ ["@fullcalendar/daygrid", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ + ["@fullcalendar/icalendar", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ ["@fullcalendar/interaction", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ ["@fullcalendar/list", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ ["@fullcalendar/luxon2", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ @@ -67,6 +68,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["file-saver", "npm:2.0.5"],\ ["highcharts", "npm:10.3.3"],\ ["html-validate", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:7.13.1"],\ + ["ical.js", "npm:1.5.0"],\ ["jquery", "npm:3.6.3"],\ ["jquery-migrate", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:3.4.0"],\ ["jquery-ui-dist", "npm:1.13.2"],\ @@ -92,6 +94,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["shepherd.js", "npm:10.0.1"],\ ["slugify", "npm:1.6.5"],\ ["sortablejs", "npm:1.15.0"],\ + ["vanillajs-datepicker", "npm:1.3.1"],\ ["vite", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:3.2.5"],\ ["vue", "npm:3.2.47"],\ ["vue-router", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:4.1.6"],\ @@ -313,6 +316,32 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["@fullcalendar/icalendar", [\ + ["npm:6.1.4", {\ + "packageLocation": "./.yarn/cache/@fullcalendar-icalendar-npm-6.1.4-8f5c41e738-4ec2ed9092.zip/node_modules/@fullcalendar/icalendar/",\ + "packageDependencies": [\ + ["@fullcalendar/icalendar", "npm:6.1.4"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4", {\ + "packageLocation": "./.yarn/__virtual__/@fullcalendar-icalendar-virtual-d4c1c240a9/0/cache/@fullcalendar-icalendar-npm-6.1.4-8f5c41e738-4ec2ed9092.zip/node_modules/@fullcalendar/icalendar/",\ + "packageDependencies": [\ + ["@fullcalendar/icalendar", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ + ["@fullcalendar/core", "npm:6.1.4"],\ + ["@types/fullcalendar__core", null],\ + ["@types/ical.js", null],\ + ["ical.js", "npm:1.5.0"]\ + ],\ + "packagePeers": [\ + "@fullcalendar/core",\ + "@types/fullcalendar__core",\ + "@types/ical.js",\ + "ical.js"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@fullcalendar/interaction", [\ ["npm:6.1.4", {\ "packageLocation": "./.yarn/cache/@fullcalendar-interaction-npm-6.1.4-a5a798ee1e-5e282ba36b.zip/node_modules/@fullcalendar/interaction/",\ @@ -490,6 +519,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["@jridgewell/gen-mapping", [\ + ["npm:0.3.2", {\ + "packageLocation": "./.yarn/cache/@jridgewell-gen-mapping-npm-0.3.2-c64eeb4a4e-1832707a1c.zip/node_modules/@jridgewell/gen-mapping/",\ + "packageDependencies": [\ + ["@jridgewell/gen-mapping", "npm:0.3.2"],\ + ["@jridgewell/set-array", "npm:1.1.2"],\ + ["@jridgewell/sourcemap-codec", "npm:1.4.14"],\ + ["@jridgewell/trace-mapping", "npm:0.3.17"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@jridgewell/resolve-uri", [\ ["npm:3.1.0", {\ "packageLocation": "./.yarn/cache/@jridgewell-resolve-uri-npm-3.1.0-6ff2351e61-b5ceaaf9a1.zip/node_modules/@jridgewell/resolve-uri/",\ @@ -499,6 +540,26 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["@jridgewell/set-array", [\ + ["npm:1.1.2", {\ + "packageLocation": "./.yarn/cache/@jridgewell-set-array-npm-1.1.2-45b82d7fb6-69a84d5980.zip/node_modules/@jridgewell/set-array/",\ + "packageDependencies": [\ + ["@jridgewell/set-array", "npm:1.1.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ + ["@jridgewell/source-map", [\ + ["npm:0.3.2", {\ + "packageLocation": "./.yarn/cache/@jridgewell-source-map-npm-0.3.2-6fd1f37b22-1b83f0eb94.zip/node_modules/@jridgewell/source-map/",\ + "packageDependencies": [\ + ["@jridgewell/source-map", "npm:0.3.2"],\ + ["@jridgewell/gen-mapping", "npm:0.3.2"],\ + ["@jridgewell/trace-mapping", "npm:0.3.17"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@jridgewell/sourcemap-codec", [\ ["npm:1.4.14", {\ "packageLocation": "./.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.14-f5f0630788-61100637b6.zip/node_modules/@jridgewell/sourcemap-codec/",\ @@ -517,6 +578,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@jridgewell/sourcemap-codec", "npm:1.4.14"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:0.3.17", {\ + "packageLocation": "./.yarn/cache/@jridgewell-trace-mapping-npm-0.3.17-57578fd48c-9d703b859c.zip/node_modules/@jridgewell/trace-mapping/",\ + "packageDependencies": [\ + ["@jridgewell/trace-mapping", "npm:0.3.17"],\ + ["@jridgewell/resolve-uri", "npm:3.1.0"],\ + ["@jridgewell/sourcemap-codec", "npm:1.4.14"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@juggle/resize-observer", [\ @@ -1249,7 +1319,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@parcel/source-map", "npm:2.1.1"],\ ["@parcel/utils", "npm:2.8.3"],\ ["nullthrows", "npm:1.1.1"],\ - ["terser", "npm:5.13.1"]\ + ["terser", "npm:5.16.5"]\ ],\ "linkType": "HARD"\ }]\ @@ -5242,10 +5312,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["http-cache-semantics", [\ - ["npm:4.1.0", {\ - "packageLocation": "./.yarn/cache/http-cache-semantics-npm-4.1.0-860520a31f-974de94a81.zip/node_modules/http-cache-semantics/",\ + ["npm:4.1.1", {\ + "packageLocation": "./.yarn/cache/http-cache-semantics-npm-4.1.1-1120131375-83ac0bc60b.zip/node_modules/http-cache-semantics/",\ "packageDependencies": [\ - ["http-cache-semantics", "npm:4.1.0"]\ + ["http-cache-semantics", "npm:4.1.1"]\ ],\ "linkType": "HARD"\ }]\ @@ -5297,6 +5367,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["ical.js", [\ + ["npm:1.5.0", {\ + "packageLocation": "./.yarn/cache/ical.js-npm-1.5.0-5ba1c69420-51df7a01f4.zip/node_modules/ical.js/",\ + "packageDependencies": [\ + ["ical.js", "npm:1.5.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["iconv-lite", [\ ["npm:0.6.3", {\ "packageLocation": "./.yarn/cache/iconv-lite-npm-0.6.3-24b8aae27e-3f60d47a5c.zip/node_modules/iconv-lite/",\ @@ -5899,10 +5978,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["json5", [\ - ["npm:1.0.1", {\ - "packageLocation": "./.yarn/cache/json5-npm-1.0.1-647fc8794b-e76ea23dbb.zip/node_modules/json5/",\ + ["npm:1.0.2", {\ + "packageLocation": "./.yarn/cache/json5-npm-1.0.2-9607f93e30-866458a8c5.zip/node_modules/json5/",\ "packageDependencies": [\ - ["json5", "npm:1.0.1"],\ + ["json5", "npm:1.0.2"],\ ["minimist", "npm:1.2.6"]\ ],\ "linkType": "HARD"\ @@ -6120,15 +6199,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["lodash.sortby", [\ - ["npm:4.7.0", {\ - "packageLocation": "./.yarn/cache/lodash.sortby-npm-4.7.0-fda8ab950d-db170c9396.zip/node_modules/lodash.sortby/",\ - "packageDependencies": [\ - ["lodash.sortby", "npm:4.7.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["lru-cache", [\ ["npm:6.0.0", {\ "packageLocation": "./.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zip/node_modules/lru-cache/",\ @@ -6182,7 +6252,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["make-fetch-happen", "npm:10.1.5"],\ ["agentkeepalive", "npm:4.2.1"],\ ["cacache", "npm:16.1.0"],\ - ["http-cache-semantics", "npm:4.1.0"],\ + ["http-cache-semantics", "npm:4.1.1"],\ ["http-proxy-agent", "npm:5.0.0"],\ ["https-proxy-agent", "npm:5.0.1"],\ ["is-lambda", "npm:1.0.1"],\ @@ -7450,6 +7520,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@fullcalendar/bootstrap5", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ ["@fullcalendar/core", "npm:6.1.4"],\ ["@fullcalendar/daygrid", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ + ["@fullcalendar/icalendar", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ ["@fullcalendar/interaction", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ ["@fullcalendar/list", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ ["@fullcalendar/luxon2", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:6.1.4"],\ @@ -7480,6 +7551,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["file-saver", "npm:2.0.5"],\ ["highcharts", "npm:10.3.3"],\ ["html-validate", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:7.13.1"],\ + ["ical.js", "npm:1.5.0"],\ ["jquery", "npm:3.6.3"],\ ["jquery-migrate", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:3.4.0"],\ ["jquery-ui-dist", "npm:1.13.2"],\ @@ -7505,6 +7577,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["shepherd.js", "npm:10.0.1"],\ ["slugify", "npm:1.6.5"],\ ["sortablejs", "npm:1.15.0"],\ + ["vanillajs-datepicker", "npm:1.3.1"],\ ["vite", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:3.2.5"],\ ["vue", "npm:3.2.47"],\ ["vue-router", "virtual:dc3fc578bfa5e06182a4d2be39ede0bc5b74940b1ffe0d70c26892ab140a4699787750fba175dc306292e80b4aa2c8c5f68c2a821e69b2c37e360c0dff36ff66#npm:4.1.6"],\ @@ -7836,14 +7909,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["source-map", "npm:0.6.1"]\ ],\ "linkType": "HARD"\ - }],\ - ["npm:0.8.0-beta.0", {\ - "packageLocation": "./.yarn/cache/source-map-npm-0.8.0-beta.0-688a309e94-e94169be64.zip/node_modules/source-map/",\ - "packageDependencies": [\ - ["source-map", "npm:0.8.0-beta.0"],\ - ["whatwg-url", "npm:7.1.0"]\ - ],\ - "linkType": "HARD"\ }]\ ]],\ ["source-map-js", [\ @@ -8063,13 +8128,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["terser", [\ - ["npm:5.13.1", {\ - "packageLocation": "./.yarn/cache/terser-npm-5.13.1-c7df10bd07-0b1f5043cf.zip/node_modules/terser/",\ + ["npm:5.16.5", {\ + "packageLocation": "./.yarn/cache/terser-npm-5.16.5-b3f4101afe-f2c1a087fa.zip/node_modules/terser/",\ "packageDependencies": [\ - ["terser", "npm:5.13.1"],\ + ["terser", "npm:5.16.5"],\ + ["@jridgewell/source-map", "npm:0.3.2"],\ ["acorn", "npm:8.7.1"],\ ["commander", "npm:2.20.3"],\ - ["source-map", "npm:0.8.0-beta.0"],\ ["source-map-support", "npm:0.5.21"]\ ],\ "linkType": "HARD"\ @@ -8142,16 +8207,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["tr46", [\ - ["npm:1.0.1", {\ - "packageLocation": "./.yarn/cache/tr46-npm-1.0.1-9547f343a4-96d4ed46bc.zip/node_modules/tr46/",\ - "packageDependencies": [\ - ["tr46", "npm:1.0.1"],\ - ["punycode", "npm:2.1.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["treemate", [\ ["npm:0.3.11", {\ "packageLocation": "./.yarn/cache/treemate-npm-0.3.11-7be66c23fc-0c6ccbc6c5.zip/node_modules/treemate/",\ @@ -8167,7 +8222,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [\ ["tsconfig-paths", "npm:3.14.1"],\ ["@types/json5", "npm:0.0.29"],\ - ["json5", "npm:1.0.1"],\ + ["json5", "npm:1.0.2"],\ ["minimist", "npm:1.2.6"],\ ["strip-bom", "npm:3.0.0"]\ ],\ @@ -8296,6 +8351,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["vanillajs-datepicker", [\ + ["npm:1.3.1", {\ + "packageLocation": "./.yarn/cache/vanillajs-datepicker-npm-1.3.1-75a9d66ea4-c01ea7ec70.zip/node_modules/vanillajs-datepicker/",\ + "packageDependencies": [\ + ["vanillajs-datepicker", "npm:1.3.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["vdirs", [\ ["npm:0.1.8", {\ "packageLocation": "./.yarn/cache/vdirs-npm-0.1.8-59a32a98d6-a7be8ccad3.zip/node_modules/vdirs/",\ @@ -8550,27 +8614,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ - ["webidl-conversions", [\ - ["npm:4.0.2", {\ - "packageLocation": "./.yarn/cache/webidl-conversions-npm-4.0.2-1d159e6409-c93d8dfe90.zip/node_modules/webidl-conversions/",\ - "packageDependencies": [\ - ["webidl-conversions", "npm:4.0.2"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ - ["whatwg-url", [\ - ["npm:7.1.0", {\ - "packageLocation": "./.yarn/cache/whatwg-url-npm-7.1.0-d6cae01571-fecb07c872.zip/node_modules/whatwg-url/",\ - "packageDependencies": [\ - ["whatwg-url", "npm:7.1.0"],\ - ["lodash.sortby", "npm:4.7.0"],\ - ["tr46", "npm:1.0.1"],\ - ["webidl-conversions", "npm:4.0.2"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["which", [\ ["npm:2.0.2", {\ "packageLocation": "./.yarn/cache/which-npm-2.0.2-320ddf72f7-1a5c563d3c.zip/node_modules/which/",\ diff --git a/.yarn/cache/@fullcalendar-icalendar-npm-6.1.4-8f5c41e738-4ec2ed9092.zip b/.yarn/cache/@fullcalendar-icalendar-npm-6.1.4-8f5c41e738-4ec2ed9092.zip new file mode 100644 index 000000000..09dce1e18 Binary files /dev/null and b/.yarn/cache/@fullcalendar-icalendar-npm-6.1.4-8f5c41e738-4ec2ed9092.zip differ diff --git a/.yarn/cache/@jridgewell-gen-mapping-npm-0.3.2-c64eeb4a4e-1832707a1c.zip b/.yarn/cache/@jridgewell-gen-mapping-npm-0.3.2-c64eeb4a4e-1832707a1c.zip new file mode 100644 index 000000000..e030e7e42 Binary files /dev/null and b/.yarn/cache/@jridgewell-gen-mapping-npm-0.3.2-c64eeb4a4e-1832707a1c.zip differ diff --git a/.yarn/cache/@jridgewell-set-array-npm-1.1.2-45b82d7fb6-69a84d5980.zip b/.yarn/cache/@jridgewell-set-array-npm-1.1.2-45b82d7fb6-69a84d5980.zip new file mode 100644 index 000000000..3b901fc14 Binary files /dev/null and b/.yarn/cache/@jridgewell-set-array-npm-1.1.2-45b82d7fb6-69a84d5980.zip differ diff --git a/.yarn/cache/@jridgewell-source-map-npm-0.3.2-6fd1f37b22-1b83f0eb94.zip b/.yarn/cache/@jridgewell-source-map-npm-0.3.2-6fd1f37b22-1b83f0eb94.zip new file mode 100644 index 000000000..cdc4bd0e2 Binary files /dev/null and b/.yarn/cache/@jridgewell-source-map-npm-0.3.2-6fd1f37b22-1b83f0eb94.zip differ diff --git a/.yarn/cache/@jridgewell-trace-mapping-npm-0.3.17-57578fd48c-9d703b859c.zip b/.yarn/cache/@jridgewell-trace-mapping-npm-0.3.17-57578fd48c-9d703b859c.zip new file mode 100644 index 000000000..29e13633c Binary files /dev/null and b/.yarn/cache/@jridgewell-trace-mapping-npm-0.3.17-57578fd48c-9d703b859c.zip differ diff --git a/.yarn/cache/http-cache-semantics-npm-4.1.0-860520a31f-974de94a81.zip b/.yarn/cache/http-cache-semantics-npm-4.1.0-860520a31f-974de94a81.zip deleted file mode 100644 index ed85c1c4c..000000000 Binary files a/.yarn/cache/http-cache-semantics-npm-4.1.0-860520a31f-974de94a81.zip and /dev/null differ diff --git a/.yarn/cache/http-cache-semantics-npm-4.1.1-1120131375-83ac0bc60b.zip b/.yarn/cache/http-cache-semantics-npm-4.1.1-1120131375-83ac0bc60b.zip new file mode 100644 index 000000000..19f1e0a20 Binary files /dev/null and b/.yarn/cache/http-cache-semantics-npm-4.1.1-1120131375-83ac0bc60b.zip differ diff --git a/.yarn/cache/ical.js-npm-1.5.0-5ba1c69420-51df7a01f4.zip b/.yarn/cache/ical.js-npm-1.5.0-5ba1c69420-51df7a01f4.zip new file mode 100644 index 000000000..7aa64acf0 Binary files /dev/null and b/.yarn/cache/ical.js-npm-1.5.0-5ba1c69420-51df7a01f4.zip differ diff --git a/.yarn/cache/json5-npm-1.0.1-647fc8794b-e76ea23dbb.zip b/.yarn/cache/json5-npm-1.0.1-647fc8794b-e76ea23dbb.zip deleted file mode 100644 index cc70df522..000000000 Binary files a/.yarn/cache/json5-npm-1.0.1-647fc8794b-e76ea23dbb.zip and /dev/null differ diff --git a/.yarn/cache/json5-npm-1.0.2-9607f93e30-866458a8c5.zip b/.yarn/cache/json5-npm-1.0.2-9607f93e30-866458a8c5.zip new file mode 100644 index 000000000..aa52eb045 Binary files /dev/null and b/.yarn/cache/json5-npm-1.0.2-9607f93e30-866458a8c5.zip differ diff --git a/.yarn/cache/lodash.sortby-npm-4.7.0-fda8ab950d-db170c9396.zip b/.yarn/cache/lodash.sortby-npm-4.7.0-fda8ab950d-db170c9396.zip deleted file mode 100644 index 915d1f2fc..000000000 Binary files a/.yarn/cache/lodash.sortby-npm-4.7.0-fda8ab950d-db170c9396.zip and /dev/null differ diff --git a/.yarn/cache/source-map-npm-0.8.0-beta.0-688a309e94-e94169be64.zip b/.yarn/cache/source-map-npm-0.8.0-beta.0-688a309e94-e94169be64.zip deleted file mode 100644 index 877220ab4..000000000 Binary files a/.yarn/cache/source-map-npm-0.8.0-beta.0-688a309e94-e94169be64.zip and /dev/null differ diff --git a/.yarn/cache/terser-npm-5.13.1-c7df10bd07-0b1f5043cf.zip b/.yarn/cache/terser-npm-5.13.1-c7df10bd07-0b1f5043cf.zip deleted file mode 100644 index b8f30c7ef..000000000 Binary files a/.yarn/cache/terser-npm-5.13.1-c7df10bd07-0b1f5043cf.zip and /dev/null differ diff --git a/.yarn/cache/terser-npm-5.16.5-b3f4101afe-f2c1a087fa.zip b/.yarn/cache/terser-npm-5.16.5-b3f4101afe-f2c1a087fa.zip new file mode 100644 index 000000000..e7b665654 Binary files /dev/null and b/.yarn/cache/terser-npm-5.16.5-b3f4101afe-f2c1a087fa.zip differ diff --git a/.yarn/cache/tr46-npm-1.0.1-9547f343a4-96d4ed46bc.zip b/.yarn/cache/tr46-npm-1.0.1-9547f343a4-96d4ed46bc.zip deleted file mode 100644 index 3130815a0..000000000 Binary files a/.yarn/cache/tr46-npm-1.0.1-9547f343a4-96d4ed46bc.zip and /dev/null differ diff --git a/.yarn/cache/vanillajs-datepicker-npm-1.3.1-75a9d66ea4-c01ea7ec70.zip b/.yarn/cache/vanillajs-datepicker-npm-1.3.1-75a9d66ea4-c01ea7ec70.zip new file mode 100644 index 000000000..3926d112d Binary files /dev/null and b/.yarn/cache/vanillajs-datepicker-npm-1.3.1-75a9d66ea4-c01ea7ec70.zip differ diff --git a/.yarn/cache/webidl-conversions-npm-4.0.2-1d159e6409-c93d8dfe90.zip b/.yarn/cache/webidl-conversions-npm-4.0.2-1d159e6409-c93d8dfe90.zip deleted file mode 100644 index a75f5ee65..000000000 Binary files a/.yarn/cache/webidl-conversions-npm-4.0.2-1d159e6409-c93d8dfe90.zip and /dev/null differ diff --git a/.yarn/cache/whatwg-url-npm-7.1.0-d6cae01571-fecb07c872.zip b/.yarn/cache/whatwg-url-npm-7.1.0-d6cae01571-fecb07c872.zip deleted file mode 100644 index 9f2181485..000000000 Binary files a/.yarn/cache/whatwg-url-npm-7.1.0-d6cae01571-fecb07c872.zip and /dev/null differ diff --git a/client/agenda/AgendaQuickAccess.vue b/client/agenda/AgendaQuickAccess.vue index 8823ca13e..d080e5dd4 100644 --- a/client/agenda/AgendaQuickAccess.vue +++ b/client/agenda/AgendaQuickAccess.vue @@ -74,7 +74,6 @@ size='large' :show-arrow='true' trigger='click' - @select='downloadIcs' ) n-button.mt-2( id='agenda-quickaccess-addtocal-btn' @@ -141,14 +140,26 @@ const route = useRoute() const downloadIcsOptions = [ { - label: 'Subscribe... (webcal)', key: 'subscribe', - icon: () => h('i', { class: 'bi bi-calendar-week text-blue' }) + type: 'render', + render: () => h('a', { + class: 'agenda-quickaccess-callinks', + href: `webcal://${window.location.host}${icsLink.value}` + }, [ + h('i', { class: 'bi bi-calendar-week text-blue' }), + h('span', 'Subscribe... (webcal)') + ]) }, { - label: 'Download... (.ics)', key: 'download', - icon: () => h('i', { class: 'bi bi-arrow-down-square' }) + type: 'render', + render: () => h('a', { + class: 'agenda-quickaccess-callinks', + href: icsLink.value + }, [ + h('i', { class: 'bi bi-arrow-down-square' }), + h('span', 'Download... (.ics)') + ]) } ] @@ -158,6 +169,17 @@ const shortMode = computed(() => { return siteStore.viewport <= 1350 }) +const icsLink = computed(() => { + if (agendaStore.pickerMode) { + const sessionKeywords = agendaStore.scheduleAdjusted.map(s => s.sessionKeyword) + return `${getUrl('meetingCalIcs', { meetingNumber: agendaStore.meeting.number })}?show=${sessionKeywords.join(',')}` + } else if (agendaStore.selectedCatSubs.length > 0) { + return `${getUrl('meetingCalIcs', { meetingNumber: agendaStore.meeting.number })}?show=${agendaStore.selectedCatSubs.join(',')}` + } else { + return `${getUrl('meetingCalIcs', { meetingNumber: agendaStore.meeting.number })}` + } +}) + // METHODS function pickerStart () { @@ -177,24 +199,6 @@ function pickerDiscard () { } } -function downloadIcs (key) { - message.loading('Generating calendar file... Download will begin shortly.') - let icsUrl = '' - if (agendaStore.pickerMode) { - const sessionKeywords = agendaStore.scheduleAdjusted.map(s => s.sessionKeyword) - icsUrl = `${getUrl('meetingCalIcs', { meetingNumber: agendaStore.meeting.number })}?show=${sessionKeywords.join(',')}` - } else if (agendaStore.selectedCatSubs.length > 0) { - icsUrl = `${getUrl('meetingCalIcs', { meetingNumber: agendaStore.meeting.number })}?show=${agendaStore.selectedCatSubs.join(',')}` - } else { - icsUrl = `${getUrl('meetingCalIcs', { meetingNumber: agendaStore.meeting.number })}` - } - if (key === 'subscribe') { - window.location.assign(`webcal://${window.location.host}${icsUrl}`) - } else { - window.location.assign(icsUrl) - } -} - function scrollToDay (dayId, ev) { ev.preventDefault() document.getElementById(`agenda-day-${dayId}`)?.scrollIntoView(true) @@ -284,5 +288,24 @@ function scrollToNow (ev) { margin-top: 15px; margin-bottom: 15px; } + + &-callinks { + padding: 8px 16px; + display: flex; + text-decoration: none; + align-items: center; + + &:hover, &:focus { + text-decoration: underline; + } + + > i { + font-size: var(--n-font-size); + } + + > span { + margin-left: 12px; + } + } } diff --git a/client/agenda/AgendaScheduleList.vue b/client/agenda/AgendaScheduleList.vue index 3897e1d62..12003b866 100644 --- a/client/agenda/AgendaScheduleList.vue +++ b/client/agenda/AgendaScheduleList.vue @@ -263,7 +263,7 @@ const meetingEvents = computed(() => { key: `sesshd-${item.id}`, displayType: 'session-head', timeslot: itemTimeSlot, - name: `${item.adjustedStart.toFormat('cccc')} ${item.slotName}`, + name: `${item.adjustedStart.setZone(agendaStore.meeting.timezone).toFormat('cccc')} ${item.slotName}`, cssClasses: 'agenda-table-display-session-head' + (isLive ? ' agenda-table-live' : '') }) } diff --git a/dev/coverage-action/package-lock.json b/dev/coverage-action/package-lock.json index 8841a57fe..190666667 100644 --- a/dev/coverage-action/package-lock.json +++ b/dev/coverage-action/package-lock.json @@ -14,7 +14,7 @@ "chart.js": "3.7.1", "chartjs-node-canvas": "4.1.6", "lodash": "4.17.21", - "luxon": "2.3.1" + "luxon": "2.5.2" }, "devDependencies": { "eslint": "7.32.0", @@ -1734,9 +1734,9 @@ "dev": true }, "node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -1800,9 +1800,9 @@ } }, "node_modules/luxon": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-2.3.1.tgz", - "integrity": "sha512-I8vnjOmhXsMSlNMZlMkSOvgrxKJl0uOsEzdGgGNZuZPaS9KlefpE9KV95QFftlJSC+1UyCC9/I69R02cz/zcCA==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-2.5.2.tgz", + "integrity": "sha512-Yg7/RDp4nedqmLgyH0LwgGRvMEKVzKbUdkBYyCosbHgJ+kaOUx0qzSiSatVc3DFygnirTPYnMM2P5dg2uH1WvA==", "engines": { "node": ">=12" } @@ -3993,9 +3993,9 @@ "dev": true }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -4047,9 +4047,9 @@ } }, "luxon": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-2.3.1.tgz", - "integrity": "sha512-I8vnjOmhXsMSlNMZlMkSOvgrxKJl0uOsEzdGgGNZuZPaS9KlefpE9KV95QFftlJSC+1UyCC9/I69R02cz/zcCA==" + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-2.5.2.tgz", + "integrity": "sha512-Yg7/RDp4nedqmLgyH0LwgGRvMEKVzKbUdkBYyCosbHgJ+kaOUx0qzSiSatVc3DFygnirTPYnMM2P5dg2uH1WvA==" }, "make-dir": { "version": "3.1.0", diff --git a/dev/coverage-action/package.json b/dev/coverage-action/package.json index 9e7417fe6..be9cf2528 100644 --- a/dev/coverage-action/package.json +++ b/dev/coverage-action/package.json @@ -11,7 +11,7 @@ "chart.js": "3.7.1", "chartjs-node-canvas": "4.1.6", "lodash": "4.17.21", - "luxon": "2.3.1" + "luxon": "2.5.2" }, "devDependencies": { "eslint": "7.32.0", diff --git a/dev/diff/package-lock.json b/dev/diff/package-lock.json index 96ce2b548..26e2756cc 100644 --- a/dev/diff/package-lock.json +++ b/dev/diff/package-lock.json @@ -15,7 +15,7 @@ "keypress": "^0.2.1", "listr2": "^5.0.2", "lodash-es": "^4.17.21", - "luxon": "^3.0.1", + "luxon": "^3.2.1", "pretty-bytes": "^6.0.0", "tar": "^6.1.11", "yargs": "^17.5.1" @@ -666,9 +666,9 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "node_modules/http2-wrapper": { "version": "2.1.11", @@ -1007,9 +1007,9 @@ } }, "node_modules/luxon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.0.1.tgz", - "integrity": "sha512-hF3kv0e5gwHQZKz4wtm4c+inDtyc7elkanAsBq+fundaCdUBNJB1dHEGUZIM6SfSBUlbVFduPwEtNjFK8wLtcw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.2.1.tgz", + "integrity": "sha512-QrwPArQCNLAKGO/C+ZIilgIuDnEnKx5QYODdDtbFaxzsbZcc/a7WFq7MhsVYgRlwawLtvOUESTlfJ+hc/USqPg==", "engines": { "node": ">=12" } @@ -1985,9 +1985,9 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "http2-wrapper": { "version": "2.1.11", @@ -2219,9 +2219,9 @@ "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==" }, "luxon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.0.1.tgz", - "integrity": "sha512-hF3kv0e5gwHQZKz4wtm4c+inDtyc7elkanAsBq+fundaCdUBNJB1dHEGUZIM6SfSBUlbVFduPwEtNjFK8wLtcw==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.2.1.tgz", + "integrity": "sha512-QrwPArQCNLAKGO/C+ZIilgIuDnEnKx5QYODdDtbFaxzsbZcc/a7WFq7MhsVYgRlwawLtvOUESTlfJ+hc/USqPg==" }, "mimic-fn": { "version": "2.1.0", diff --git a/dev/diff/package.json b/dev/diff/package.json index 43d37545f..c4c587729 100644 --- a/dev/diff/package.json +++ b/dev/diff/package.json @@ -11,7 +11,7 @@ "keypress": "^0.2.1", "listr2": "^5.0.2", "lodash-es": "^4.17.21", - "luxon": "^3.0.1", + "luxon": "^3.2.1", "pretty-bytes": "^6.0.0", "tar": "^6.1.11", "yargs": "^17.5.1" diff --git a/ietf/doc/utils_search.py b/ietf/doc/utils_search.py index 0353d5296..00046ed30 100644 --- a/ietf/doc/utils_search.py +++ b/ietf/doc/utils_search.py @@ -251,7 +251,6 @@ def prepare_document_table(request, docs, query=None, max_results=200): if query and hasattr(query, "urlencode"): # fed a Django QueryDict d = query.copy() for h in meta['headers']: - h["sort_url"] = "?" + d.urlencode() if h['key'] == sort_key: h['sorted'] = True if sort_reversed: @@ -262,5 +261,6 @@ def prepare_document_table(request, docs, query=None, max_results=200): d["sort"] = "-" + h["key"] else: d["sort"] = h["key"] + h["sort_url"] = "?" + d.urlencode() return (docs, meta) diff --git a/ietf/group/tests_js.py b/ietf/group/tests_js.py index 1c7f9fc9a..7c51c2331 100644 --- a/ietf/group/tests_js.py +++ b/ietf/group/tests_js.py @@ -100,8 +100,8 @@ class MilestoneTests(IetfSeleniumTestCase): # fill in the edit milestone form desc_input.send_keys(description) - due_input.send_keys(due_date.strftime('%m %Y\n')) # \n closes the date selector self._search_draft_and_locate_result(draft_input, draft_search_string, draft).click() + due_input.send_keys(due_date.strftime('%m %Y')) self._click_milestone_submit_button('Review') result_row = self._assert_milestone_changed() @@ -165,7 +165,7 @@ class MilestoneTests(IetfSeleniumTestCase): # modify the fields new_due_date = (milestone.due + datetime.timedelta(days=31)).strftime('%m %Y') due_field.clear() - due_field.send_keys(new_due_date + '\n') + due_field.send_keys(new_due_date) self._search_draft_and_locate_result(draft_input, draft_search_string, draft).click() @@ -189,4 +189,4 @@ class MilestoneTests(IetfSeleniumTestCase): gms = self.group.groupmilestone_set.first() self.assertEqual(gms.desc, expected_desc) self.assertEqual(gms.due.strftime('%m %Y'), expected_due_date) - self.assertCountEqual(expected_docs, gms.docs.all()) \ No newline at end of file + self.assertCountEqual(expected_docs, gms.docs.all()) diff --git a/ietf/ietfauth/views.py b/ietf/ietfauth/views.py index fb6aec433..9adb62b31 100644 --- a/ietf/ietfauth/views.py +++ b/ietf/ietfauth/views.py @@ -777,7 +777,7 @@ def apikey_create(request): @person_required def apikey_disable(request): person = request.user.person - choices = [ (k.hash(), str(k)) for k in person.apikeys.all() ] + choices = [ (k.hash(), str(k)) for k in person.apikeys.exclude(valid=False) ] # class KeyDeleteForm(forms.Form): hash = forms.ChoiceField(label='Key', choices=choices) diff --git a/ietf/ipr/tests.py b/ietf/ipr/tests.py index 3afb47bbf..fd07821af 100644 --- a/ietf/ipr/tests.py +++ b/ietf/ipr/tests.py @@ -591,7 +591,7 @@ I would like to revoke this declaration. get_payload_text(outbox[len_before + 1]).replace('\n', ' ') ) self.assertIn(f'{settings.IDTRACKER_BASE_URL}{urlreverse("ietf.ipr.views.showlist")}', get_payload_text(outbox[len_before]).replace('\n',' ')) - self.assertIn(f'{settings.IDTRACKER_BASE_URL}{urlreverse("ietf.ipr.views.history",kwargs=dict(id=ipr.pk))}', get_payload_text(outbox[len_before+1]).replace('\n',' ')) + self.assertIn(f'{settings.IDTRACKER_BASE_URL}{urlreverse("ietf.ipr.views.show",kwargs=dict(id=ipr.pk))}', get_payload_text(outbox[len_before+1]).replace('\n',' ')) def test_notify_generic(self): RoleFactory(name_id='ad',group__acronym='gen') diff --git a/ietf/meeting/helpers.py b/ietf/meeting/helpers.py index a266efafa..e3f4874f4 100644 --- a/ietf/meeting/helpers.py +++ b/ietf/meeting/helpers.py @@ -826,7 +826,7 @@ def get_announcement_initial(meeting, is_change=False): desc=desc, date=meeting.date, change=change) - body = render_to_string('meeting/interim_announcement.txt', locals()) + body = render_to_string('meeting/interim_announcement.txt', locals() | {"settings": settings}) initial['body'] = body return initial diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index b6c6b52b4..c883e5b00 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -298,26 +298,6 @@ class Meeting(models.Model): self._proceedings_format_version = version # save this for later return self._proceedings_format_version - @property - def session_constraintnames(self): - """Gets a list of the constraint names that should be used for this meeting - - Anticipated that this will soon become a many-to-many relationship with ConstraintName - (see issue #2770). Making this a @property allows use of the .all(), .filter(), etc, - so that other code should not need changes when this is replaced. - """ - try: - mtg_num = int(self.number) - except ValueError: - mtg_num = None # should not come up, but this method should not fail - if mtg_num is None or mtg_num >= 106: - # These meetings used the old 'conflic?' constraint types labeled as though - # they were the new types. - slugs = ('chair_conflict', 'tech_overlap', 'key_participant') - else: - slugs = ('conflict', 'conflic2', 'conflic3') - return ConstraintName.objects.filter(slug__in=slugs) - def base_url(self): return "/meeting/%s" % (self.number, ) diff --git a/ietf/meeting/tests_views.py b/ietf/meeting/tests_views.py index c945e8bb9..5785e24a1 100644 --- a/ietf/meeting/tests_views.py +++ b/ietf/meeting/tests_views.py @@ -4510,10 +4510,11 @@ class InterimTests(TestCase): if sess: timeslot = sess.official_timeslotassignment().timeslot self.assertIn(timeslot.time.strftime('%Y-%m-%d'), announcement_text) - self.assertIn( - '(%s to %s UTC)' % ( + self.assertRegex( + announcement_text, + r'(%s\s+to\s+%s\s+UTC)' % ( timeslot.utc_start_time().strftime('%H:%M'),timeslot.utc_end_time().strftime('%H:%M') - ), announcement_text) + )) # Count number of sessions listed if base_session and extra_session: expected_session_matches = 3 diff --git a/ietf/secr/sreq/views.py b/ietf/secr/sreq/views.py index 8091835f5..3f2521f2e 100644 --- a/ietf/secr/sreq/views.py +++ b/ietf/secr/sreq/views.py @@ -3,6 +3,7 @@ import datetime +import inflect from collections import defaultdict, OrderedDict from django.conf import settings @@ -105,18 +106,29 @@ def get_lock_message(meeting=None): meeting = get_meeting(days=14) return meeting.session_request_lock_message -def get_requester_text(person,group): - ''' - This function takes a Person object and a Group object and returns the text to use in the - session request notification email, ie. Joe Smith, a Chair of the ancp working group - ''' - roles = group.role_set.filter(name__in=('chair','secr'),person=person) + +def get_requester_text(person, group): + """ + This function takes a Person object and a Group object and returns the text to use + in the session request notification email, ie. Joe Smith, a Chair of the ancp + working group + """ + roles = group.role_set.filter(name__in=("chair", "secr", "ad"), person=person) if roles: - return '%s, a %s of the %s working group' % (person.ascii, roles[0].name, group.acronym) - if group.parent and group.parent.role_set.filter(name='ad',person=person): - return '%s, a %s Area Director' % (person.ascii, group.parent.acronym.upper()) - if person.role_set.filter(name='secr',group__acronym='secretariat'): - return '%s, on behalf of the %s working group' % (person.ascii, group.acronym) + rolename = str(roles[0].name) + return "%s, %s of the %s %s" % ( + person.name, + inflect.engine().a(rolename), + group.acronym.upper(), + group.type.verbose_name, + ) + if person.role_set.filter(name="secr", group__acronym="secretariat"): + return "%s, on behalf of the %s %s" % ( + person.name, + group.acronym.upper(), + group.type.verbose_name, + ) + def save_conflicts(group, meeting, conflicts, name): ''' diff --git a/ietf/secr/templates/sreq/session_request_notification.txt b/ietf/secr/templates/sreq/session_request_notification.txt index db2006040..a41f20244 100644 --- a/ietf/secr/templates/sreq/session_request_notification.txt +++ b/ietf/secr/templates/sreq/session_request_notification.txt @@ -1,5 +1,5 @@ {% load ams_filters %} -{{ header }} meeting session request has just been submitted by {{ requester }}. +{% filter wordwrap:78 %}{{ header }} meeting session request has just been submitted by {{ requester }}.{% endfilter %} {% include "includes/session_info.txt" %} diff --git a/ietf/static/css/datepicker.scss b/ietf/static/css/datepicker.scss index c25b790e0..21d6aac24 100644 --- a/ietf/static/css/datepicker.scss +++ b/ietf/static/css/datepicker.scss @@ -1,683 +1,2 @@ -/*! - * Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker) - * - * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) - */ - - .datepicker { - border-radius: 4px; - direction: ltr; - } - .datepicker-inline { - width: 220px; - } - .datepicker-rtl { - direction: rtl; - } - .datepicker-rtl.dropdown-menu { - left: auto; - } - .datepicker-rtl table tr td span { - float: right; - } - .datepicker-dropdown { - top: 0; - left: 0; - padding: 4px; - } - .datepicker-dropdown:before { - content: ''; - display: inline-block; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid rgba(0, 0, 0, 0.15); - border-top: 0; - border-bottom-color: rgba(0, 0, 0, 0.2); - position: absolute; - } - .datepicker-dropdown:after { - content: ''; - display: inline-block; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #fff; - border-top: 0; - position: absolute; - } - .datepicker-dropdown.datepicker-orient-left:before { - left: 6px; - } - .datepicker-dropdown.datepicker-orient-left:after { - left: 7px; - } - .datepicker-dropdown.datepicker-orient-right:before { - right: 6px; - } - .datepicker-dropdown.datepicker-orient-right:after { - right: 7px; - } - .datepicker-dropdown.datepicker-orient-bottom:before { - top: -7px; - } - .datepicker-dropdown.datepicker-orient-bottom:after { - top: -6px; - } - .datepicker-dropdown.datepicker-orient-top:before { - bottom: -7px; - border-bottom: 0; - border-top: 7px solid rgba(0, 0, 0, 0.15); - } - .datepicker-dropdown.datepicker-orient-top:after { - bottom: -6px; - border-bottom: 0; - border-top: 6px solid #fff; - } - .datepicker table { - margin: 0; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - } - .datepicker table tr td, - .datepicker table tr th { - text-align: center; - width: 30px; - height: 30px; - border-radius: 4px; - border: none; - } - .table-striped .datepicker table tr td, - .table-striped .datepicker table tr th { - background-color: transparent; - } - .datepicker table tr td.old, - .datepicker table tr td.new { - color: #777777; - } - .datepicker table tr td.day:hover, - .datepicker table tr td.focused { - background: #eeeeee; - cursor: pointer; - } - .datepicker table tr td.disabled, - .datepicker table tr td.disabled:hover { - background: none; - color: #777777; - cursor: default; - } - .datepicker table tr td.highlighted { - color: #000; - background-color: #d9edf7; - border-color: #85c5e5; - border-radius: 0; - } - .datepicker table tr td.highlighted:focus, - .datepicker table tr td.highlighted.focus { - color: #000; - background-color: #afd9ee; - border-color: #298fc2; - } - .datepicker table tr td.highlighted:hover { - color: #000; - background-color: #afd9ee; - border-color: #52addb; - } - .datepicker table tr td.highlighted:active, - .datepicker table tr td.highlighted.active { - color: #000; - background-color: #afd9ee; - border-color: #52addb; - } - .datepicker table tr td.highlighted:active:hover, - .datepicker table tr td.highlighted.active:hover, - .datepicker table tr td.highlighted:active:focus, - .datepicker table tr td.highlighted.active:focus, - .datepicker table tr td.highlighted:active.focus, - .datepicker table tr td.highlighted.active.focus { - color: #000; - background-color: #91cbe8; - border-color: #298fc2; - } - .datepicker table tr td.highlighted.disabled:hover, - .datepicker table tr td.highlighted[disabled]:hover, - fieldset[disabled] .datepicker table tr td.highlighted:hover, - .datepicker table tr td.highlighted.disabled:focus, - .datepicker table tr td.highlighted[disabled]:focus, - fieldset[disabled] .datepicker table tr td.highlighted:focus, - .datepicker table tr td.highlighted.disabled.focus, - .datepicker table tr td.highlighted[disabled].focus, - fieldset[disabled] .datepicker table tr td.highlighted.focus { - background-color: #d9edf7; - border-color: #85c5e5; - } - .datepicker table tr td.highlighted.focused { - background: #afd9ee; - } - .datepicker table tr td.highlighted.disabled, - .datepicker table tr td.highlighted.disabled:active { - background: #d9edf7; - color: #777777; - } - .datepicker table tr td.today { - color: #000; - background-color: #ffdb99; - border-color: #ffb733; - } - .datepicker table tr td.today:focus, - .datepicker table tr td.today.focus { - color: #000; - background-color: #ffc966; - border-color: #b37400; - } - .datepicker table tr td.today:hover { - color: #000; - background-color: #ffc966; - border-color: #f59e00; - } - .datepicker table tr td.today:active, - .datepicker table tr td.today.active { - color: #000; - background-color: #ffc966; - border-color: #f59e00; - } - .datepicker table tr td.today:active:hover, - .datepicker table tr td.today.active:hover, - .datepicker table tr td.today:active:focus, - .datepicker table tr td.today.active:focus, - .datepicker table tr td.today:active.focus, - .datepicker table tr td.today.active.focus { - color: #000; - background-color: #ffbc42; - border-color: #b37400; - } - .datepicker table tr td.today.disabled:hover, - .datepicker table tr td.today[disabled]:hover, - fieldset[disabled] .datepicker table tr td.today:hover, - .datepicker table tr td.today.disabled:focus, - .datepicker table tr td.today[disabled]:focus, - fieldset[disabled] .datepicker table tr td.today:focus, - .datepicker table tr td.today.disabled.focus, - .datepicker table tr td.today[disabled].focus, - fieldset[disabled] .datepicker table tr td.today.focus { - background-color: #ffdb99; - border-color: #ffb733; - } - .datepicker table tr td.today.focused { - background: #ffc966; - } - .datepicker table tr td.today.disabled, - .datepicker table tr td.today.disabled:active { - background: #ffdb99; - color: #777777; - } - .datepicker table tr td.range { - color: #000; - background-color: #eeeeee; - border-color: #bbbbbb; - border-radius: 0; - } - .datepicker table tr td.range:focus, - .datepicker table tr td.range.focus { - color: #000; - background-color: #d5d5d5; - border-color: #7c7c7c; - } - .datepicker table tr td.range:hover { - color: #000; - background-color: #d5d5d5; - border-color: #9d9d9d; - } - .datepicker table tr td.range:active, - .datepicker table tr td.range.active { - color: #000; - background-color: #d5d5d5; - border-color: #9d9d9d; - } - .datepicker table tr td.range:active:hover, - .datepicker table tr td.range.active:hover, - .datepicker table tr td.range:active:focus, - .datepicker table tr td.range.active:focus, - .datepicker table tr td.range:active.focus, - .datepicker table tr td.range.active.focus { - color: #000; - background-color: #c3c3c3; - border-color: #7c7c7c; - } - .datepicker table tr td.range.disabled:hover, - .datepicker table tr td.range[disabled]:hover, - fieldset[disabled] .datepicker table tr td.range:hover, - .datepicker table tr td.range.disabled:focus, - .datepicker table tr td.range[disabled]:focus, - fieldset[disabled] .datepicker table tr td.range:focus, - .datepicker table tr td.range.disabled.focus, - .datepicker table tr td.range[disabled].focus, - fieldset[disabled] .datepicker table tr td.range.focus { - background-color: #eeeeee; - border-color: #bbbbbb; - } - .datepicker table tr td.range.focused { - background: #d5d5d5; - } - .datepicker table tr td.range.disabled, - .datepicker table tr td.range.disabled:active { - background: #eeeeee; - color: #777777; - } - .datepicker table tr td.range.highlighted { - color: #000; - background-color: #e4eef3; - border-color: #9dc1d3; - } - .datepicker table tr td.range.highlighted:focus, - .datepicker table tr td.range.highlighted.focus { - color: #000; - background-color: #c1d7e3; - border-color: #4b88a6; - } - .datepicker table tr td.range.highlighted:hover { - color: #000; - background-color: #c1d7e3; - border-color: #73a6c0; - } - .datepicker table tr td.range.highlighted:active, - .datepicker table tr td.range.highlighted.active { - color: #000; - background-color: #c1d7e3; - border-color: #73a6c0; - } - .datepicker table tr td.range.highlighted:active:hover, - .datepicker table tr td.range.highlighted.active:hover, - .datepicker table tr td.range.highlighted:active:focus, - .datepicker table tr td.range.highlighted.active:focus, - .datepicker table tr td.range.highlighted:active.focus, - .datepicker table tr td.range.highlighted.active.focus { - color: #000; - background-color: #a8c8d8; - border-color: #4b88a6; - } - .datepicker table tr td.range.highlighted.disabled:hover, - .datepicker table tr td.range.highlighted[disabled]:hover, - fieldset[disabled] .datepicker table tr td.range.highlighted:hover, - .datepicker table tr td.range.highlighted.disabled:focus, - .datepicker table tr td.range.highlighted[disabled]:focus, - fieldset[disabled] .datepicker table tr td.range.highlighted:focus, - .datepicker table tr td.range.highlighted.disabled.focus, - .datepicker table tr td.range.highlighted[disabled].focus, - fieldset[disabled] .datepicker table tr td.range.highlighted.focus { - background-color: #e4eef3; - border-color: #9dc1d3; - } - .datepicker table tr td.range.highlighted.focused { - background: #c1d7e3; - } - .datepicker table tr td.range.highlighted.disabled, - .datepicker table tr td.range.highlighted.disabled:active { - background: #e4eef3; - color: #777777; - } - .datepicker table tr td.range.today { - color: #000; - background-color: #f7ca77; - border-color: #f1a417; - } - .datepicker table tr td.range.today:focus, - .datepicker table tr td.range.today.focus { - color: #000; - background-color: #f4b747; - border-color: #815608; - } - .datepicker table tr td.range.today:hover { - color: #000; - background-color: #f4b747; - border-color: #bf800c; - } - .datepicker table tr td.range.today:active, - .datepicker table tr td.range.today.active { - color: #000; - background-color: #f4b747; - border-color: #bf800c; - } - .datepicker table tr td.range.today:active:hover, - .datepicker table tr td.range.today.active:hover, - .datepicker table tr td.range.today:active:focus, - .datepicker table tr td.range.today.active:focus, - .datepicker table tr td.range.today:active.focus, - .datepicker table tr td.range.today.active.focus { - color: #000; - background-color: #f2aa25; - border-color: #815608; - } - .datepicker table tr td.range.today.disabled:hover, - .datepicker table tr td.range.today[disabled]:hover, - fieldset[disabled] .datepicker table tr td.range.today:hover, - .datepicker table tr td.range.today.disabled:focus, - .datepicker table tr td.range.today[disabled]:focus, - fieldset[disabled] .datepicker table tr td.range.today:focus, - .datepicker table tr td.range.today.disabled.focus, - .datepicker table tr td.range.today[disabled].focus, - fieldset[disabled] .datepicker table tr td.range.today.focus { - background-color: #f7ca77; - border-color: #f1a417; - } - .datepicker table tr td.range.today.disabled, - .datepicker table tr td.range.today.disabled:active { - background: #f7ca77; - color: #777777; - } - .datepicker table tr td.selected, - .datepicker table tr td.selected.highlighted { - color: #fff; - background-color: #777777; - border-color: #555555; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - } - .datepicker table tr td.selected:focus, - .datepicker table tr td.selected.highlighted:focus, - .datepicker table tr td.selected.focus, - .datepicker table tr td.selected.highlighted.focus { - color: #fff; - background-color: #5e5e5e; - border-color: #161616; - } - .datepicker table tr td.selected:hover, - .datepicker table tr td.selected.highlighted:hover { - color: #fff; - background-color: #5e5e5e; - border-color: #373737; - } - .datepicker table tr td.selected:active, - .datepicker table tr td.selected.highlighted:active, - .datepicker table tr td.selected.active, - .datepicker table tr td.selected.highlighted.active { - color: #fff; - background-color: #5e5e5e; - border-color: #373737; - } - .datepicker table tr td.selected:active:hover, - .datepicker table tr td.selected.highlighted:active:hover, - .datepicker table tr td.selected.active:hover, - .datepicker table tr td.selected.highlighted.active:hover, - .datepicker table tr td.selected:active:focus, - .datepicker table tr td.selected.highlighted:active:focus, - .datepicker table tr td.selected.active:focus, - .datepicker table tr td.selected.highlighted.active:focus, - .datepicker table tr td.selected:active.focus, - .datepicker table tr td.selected.highlighted:active.focus, - .datepicker table tr td.selected.active.focus, - .datepicker table tr td.selected.highlighted.active.focus { - color: #fff; - background-color: #4c4c4c; - border-color: #161616; - } - .datepicker table tr td.selected.disabled:hover, - .datepicker table tr td.selected.highlighted.disabled:hover, - .datepicker table tr td.selected[disabled]:hover, - .datepicker table tr td.selected.highlighted[disabled]:hover, - fieldset[disabled] .datepicker table tr td.selected:hover, - fieldset[disabled] .datepicker table tr td.selected.highlighted:hover, - .datepicker table tr td.selected.disabled:focus, - .datepicker table tr td.selected.highlighted.disabled:focus, - .datepicker table tr td.selected[disabled]:focus, - .datepicker table tr td.selected.highlighted[disabled]:focus, - fieldset[disabled] .datepicker table tr td.selected:focus, - fieldset[disabled] .datepicker table tr td.selected.highlighted:focus, - .datepicker table tr td.selected.disabled.focus, - .datepicker table tr td.selected.highlighted.disabled.focus, - .datepicker table tr td.selected[disabled].focus, - .datepicker table tr td.selected.highlighted[disabled].focus, - fieldset[disabled] .datepicker table tr td.selected.focus, - fieldset[disabled] .datepicker table tr td.selected.highlighted.focus { - background-color: #777777; - border-color: #555555; - } - .datepicker table tr td.active, - .datepicker table tr td.active.highlighted { - color: #fff; - background-color: #337ab7; - border-color: #2e6da4; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - } - .datepicker table tr td.active:focus, - .datepicker table tr td.active.highlighted:focus, - .datepicker table tr td.active.focus, - .datepicker table tr td.active.highlighted.focus { - color: #fff; - background-color: #286090; - border-color: #122b40; - } - .datepicker table tr td.active:hover, - .datepicker table tr td.active.highlighted:hover { - color: #fff; - background-color: #286090; - border-color: #204d74; - } - .datepicker table tr td.active:active, - .datepicker table tr td.active.highlighted:active, - .datepicker table tr td.active.active, - .datepicker table tr td.active.highlighted.active { - color: #fff; - background-color: #286090; - border-color: #204d74; - } - .datepicker table tr td.active:active:hover, - .datepicker table tr td.active.highlighted:active:hover, - .datepicker table tr td.active.active:hover, - .datepicker table tr td.active.highlighted.active:hover, - .datepicker table tr td.active:active:focus, - .datepicker table tr td.active.highlighted:active:focus, - .datepicker table tr td.active.active:focus, - .datepicker table tr td.active.highlighted.active:focus, - .datepicker table tr td.active:active.focus, - .datepicker table tr td.active.highlighted:active.focus, - .datepicker table tr td.active.active.focus, - .datepicker table tr td.active.highlighted.active.focus { - color: #fff; - background-color: #204d74; - border-color: #122b40; - } - .datepicker table tr td.active.disabled:hover, - .datepicker table tr td.active.highlighted.disabled:hover, - .datepicker table tr td.active[disabled]:hover, - .datepicker table tr td.active.highlighted[disabled]:hover, - fieldset[disabled] .datepicker table tr td.active:hover, - fieldset[disabled] .datepicker table tr td.active.highlighted:hover, - .datepicker table tr td.active.disabled:focus, - .datepicker table tr td.active.highlighted.disabled:focus, - .datepicker table tr td.active[disabled]:focus, - .datepicker table tr td.active.highlighted[disabled]:focus, - fieldset[disabled] .datepicker table tr td.active:focus, - fieldset[disabled] .datepicker table tr td.active.highlighted:focus, - .datepicker table tr td.active.disabled.focus, - .datepicker table tr td.active.highlighted.disabled.focus, - .datepicker table tr td.active[disabled].focus, - .datepicker table tr td.active.highlighted[disabled].focus, - fieldset[disabled] .datepicker table tr td.active.focus, - fieldset[disabled] .datepicker table tr td.active.highlighted.focus { - background-color: #337ab7; - border-color: #2e6da4; - } - .datepicker table tr td span { - display: block; - width: 23%; - height: 54px; - line-height: 54px; - float: left; - margin: 1%; - cursor: pointer; - border-radius: 4px; - } - .datepicker table tr td span:hover, - .datepicker table tr td span.focused { - background: #eeeeee; - } - .datepicker table tr td span.disabled, - .datepicker table tr td span.disabled:hover { - background: none; - color: #777777; - cursor: default; - } - .datepicker table tr td span.active, - .datepicker table tr td span.active:hover, - .datepicker table tr td span.active.disabled, - .datepicker table tr td span.active.disabled:hover { - color: #fff; - background-color: #337ab7; - border-color: #2e6da4; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - } - .datepicker table tr td span.active:focus, - .datepicker table tr td span.active:hover:focus, - .datepicker table tr td span.active.disabled:focus, - .datepicker table tr td span.active.disabled:hover:focus, - .datepicker table tr td span.active.focus, - .datepicker table tr td span.active:hover.focus, - .datepicker table tr td span.active.disabled.focus, - .datepicker table tr td span.active.disabled:hover.focus { - color: #fff; - background-color: #286090; - border-color: #122b40; - } - .datepicker table tr td span.active:hover, - .datepicker table tr td span.active:hover:hover, - .datepicker table tr td span.active.disabled:hover, - .datepicker table tr td span.active.disabled:hover:hover { - color: #fff; - background-color: #286090; - border-color: #204d74; - } - .datepicker table tr td span.active:active, - .datepicker table tr td span.active:hover:active, - .datepicker table tr td span.active.disabled:active, - .datepicker table tr td span.active.disabled:hover:active, - .datepicker table tr td span.active.active, - .datepicker table tr td span.active:hover.active, - .datepicker table tr td span.active.disabled.active, - .datepicker table tr td span.active.disabled:hover.active { - color: #fff; - background-color: #286090; - border-color: #204d74; - } - .datepicker table tr td span.active:active:hover, - .datepicker table tr td span.active:hover:active:hover, - .datepicker table tr td span.active.disabled:active:hover, - .datepicker table tr td span.active.disabled:hover:active:hover, - .datepicker table tr td span.active.active:hover, - .datepicker table tr td span.active:hover.active:hover, - .datepicker table tr td span.active.disabled.active:hover, - .datepicker table tr td span.active.disabled:hover.active:hover, - .datepicker table tr td span.active:active:focus, - .datepicker table tr td span.active:hover:active:focus, - .datepicker table tr td span.active.disabled:active:focus, - .datepicker table tr td span.active.disabled:hover:active:focus, - .datepicker table tr td span.active.active:focus, - .datepicker table tr td span.active:hover.active:focus, - .datepicker table tr td span.active.disabled.active:focus, - .datepicker table tr td span.active.disabled:hover.active:focus, - .datepicker table tr td span.active:active.focus, - .datepicker table tr td span.active:hover:active.focus, - .datepicker table tr td span.active.disabled:active.focus, - .datepicker table tr td span.active.disabled:hover:active.focus, - .datepicker table tr td span.active.active.focus, - .datepicker table tr td span.active:hover.active.focus, - .datepicker table tr td span.active.disabled.active.focus, - .datepicker table tr td span.active.disabled:hover.active.focus { - color: #fff; - background-color: #204d74; - border-color: #122b40; - } - .datepicker table tr td span.active.disabled:hover, - .datepicker table tr td span.active:hover.disabled:hover, - .datepicker table tr td span.active.disabled.disabled:hover, - .datepicker table tr td span.active.disabled:hover.disabled:hover, - .datepicker table tr td span.active[disabled]:hover, - .datepicker table tr td span.active:hover[disabled]:hover, - .datepicker table tr td span.active.disabled[disabled]:hover, - .datepicker table tr td span.active.disabled:hover[disabled]:hover, - fieldset[disabled] .datepicker table tr td span.active:hover, - fieldset[disabled] .datepicker table tr td span.active:hover:hover, - fieldset[disabled] .datepicker table tr td span.active.disabled:hover, - fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover, - .datepicker table tr td span.active.disabled:focus, - .datepicker table tr td span.active:hover.disabled:focus, - .datepicker table tr td span.active.disabled.disabled:focus, - .datepicker table tr td span.active.disabled:hover.disabled:focus, - .datepicker table tr td span.active[disabled]:focus, - .datepicker table tr td span.active:hover[disabled]:focus, - .datepicker table tr td span.active.disabled[disabled]:focus, - .datepicker table tr td span.active.disabled:hover[disabled]:focus, - fieldset[disabled] .datepicker table tr td span.active:focus, - fieldset[disabled] .datepicker table tr td span.active:hover:focus, - fieldset[disabled] .datepicker table tr td span.active.disabled:focus, - fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus, - .datepicker table tr td span.active.disabled.focus, - .datepicker table tr td span.active:hover.disabled.focus, - .datepicker table tr td span.active.disabled.disabled.focus, - .datepicker table tr td span.active.disabled:hover.disabled.focus, - .datepicker table tr td span.active[disabled].focus, - .datepicker table tr td span.active:hover[disabled].focus, - .datepicker table tr td span.active.disabled[disabled].focus, - .datepicker table tr td span.active.disabled:hover[disabled].focus, - fieldset[disabled] .datepicker table tr td span.active.focus, - fieldset[disabled] .datepicker table tr td span.active:hover.focus, - fieldset[disabled] .datepicker table tr td span.active.disabled.focus, - fieldset[disabled] .datepicker table tr td span.active.disabled:hover.focus { - background-color: #337ab7; - border-color: #2e6da4; - } - .datepicker table tr td span.old, - .datepicker table tr td span.new { - color: #777777; - } - .datepicker .datepicker-switch { - width: 145px; - } - .datepicker .datepicker-switch, - .datepicker .prev, - .datepicker .next, - .datepicker tfoot tr th { - cursor: pointer; - } - .datepicker .datepicker-switch:hover, - .datepicker .prev:hover, - .datepicker .next:hover, - .datepicker tfoot tr th:hover { - background: #eeeeee; - } - .datepicker .prev.disabled, - .datepicker .next.disabled { - visibility: hidden; - } - .datepicker .cw { - font-size: 10px; - width: 12px; - padding: 0 2px 0 5px; - vertical-align: middle; - } - .input-group.date .input-group-addon { - cursor: pointer; - } - .input-daterange { - width: 100%; - } - .input-daterange input { - text-align: center; - } - .input-daterange input:first-child { - border-radius: 3px 0 0 3px; - } - .input-daterange input:last-child { - border-radius: 0 3px 3px 0; - } - .input-daterange .input-group-addon { - width: auto; - min-width: 16px; - padding: 4px 5px; - line-height: 1.42857143; - border-width: 1px 0; - margin-left: -5px; - margin-right: -5px; - } - /*# sourceMappingURL=bootstrap-datepicker3.css.map */ +@import "vanillajs-datepicker/sass/index-bs5"; +@import "vanillajs-datepicker/sass/datepicker-bs5"; diff --git a/ietf/static/js/datepicker.js b/ietf/static/js/datepicker.js index 1fe6d0314..43d80acb5 100644 --- a/ietf/static/js/datepicker.js +++ b/ietf/static/js/datepicker.js @@ -1,2039 +1,54 @@ -/*! - * Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker) - * - * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) - */ +import { + Datepicker +} from 'vanillajs-datepicker'; -(function(factory){ - if (typeof define === 'function' && define.amd) { - define(['jquery'], factory); - } else if (typeof exports === 'object') { - factory(require('jquery')); - } else { - factory(jQuery); - } -}(function($, undefined){ - function UTCDate(){ - return new Date(Date.UTC.apply(Date, arguments)); - } - function UTCToday(){ - var today = new Date(); - return UTCDate(today.getFullYear(), today.getMonth(), today.getDate()); - } - function isUTCEquals(date1, date2) { - return ( - date1.getUTCFullYear() === date2.getUTCFullYear() && - date1.getUTCMonth() === date2.getUTCMonth() && - date1.getUTCDate() === date2.getUTCDate() - ); - } - function alias(method, deprecationMsg){ - return function(){ - if (deprecationMsg !== undefined) { - $.fn.datepicker.deprecated(deprecationMsg); - } +global.enable_datepicker = function (el) { + // we need to translate from bootstrap-datepicker options to + // vanillajs-datepicker options + const view_mode = { + day: 0, + days: 0, + month: 1, + months: 1, + year: 2, + years: 2, + decade: 3, + decades: 3 + }; - return this[method].apply(this, arguments); - }; - } - function isValidDate(d) { - return d && !isNaN(d.getTime()); - } - - var DateArray = (function(){ - var extras = { - get: function(i){ - return this.slice(i)[0]; - }, - contains: function(d){ - // Array.indexOf is not cross-browser; - // $.inArray doesn't work with Dates - var val = d && d.valueOf(); - for (var i=0, l=this.length; i < l; i++) - // Use date arithmetic to allow dates with different times to match - if (0 <= this[i].valueOf() - val && this[i].valueOf() - val < 1000*60*60*24) - return i; - return -1; - }, - remove: function(i){ - this.splice(i,1); - }, - replace: function(new_array){ - if (!new_array) - return; - if (!Array.isArray(new_array)) - new_array = [new_array]; - this.clear(); - this.push.apply(this, new_array); - }, - clear: function(){ - this.length = 0; - }, - copy: function(){ - var a = new DateArray(); - a.replace(this); - return a; - } - }; - - return function(){ - var a = []; - a.push.apply(a, arguments); - $.extend(a, extras); - return a; - }; - })(); - - - // Picker object - - var Datepicker = function(element, options){ - $.data(element, 'datepicker', this); - - this._events = []; - this._secondaryEvents = []; - - this._process_options(options); - - this.dates = new DateArray(); - this.viewDate = this.o.defaultViewDate; - this.focusDate = null; - - this.element = $(element); - this.isInput = this.element.is('input'); - this.inputField = this.isInput ? this.element : this.element.find('input'); - this.component = this.element.hasClass('date') ? this.element.find('.add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn') : false; - if (this.component && this.component.length === 0) - this.component = false; - this.isInline = !this.component && this.element.is('div'); - - this.picker = $(DPGlobal.template); - - // Checking templates and inserting - if (this._check_template(this.o.templates.leftArrow)) { - this.picker.find('.prev').html(this.o.templates.leftArrow); - } - - if (this._check_template(this.o.templates.rightArrow)) { - this.picker.find('.next').html(this.o.templates.rightArrow); - } - - this._buildEvents(); - this._attachEvents(); - - if (this.isInline){ - this.picker.addClass('datepicker-inline').appendTo(this.element); - } - else { - this.picker.addClass('datepicker-dropdown dropdown-menu'); - } - - if (this.o.rtl){ - this.picker.addClass('datepicker-rtl'); - } - - if (this.o.calendarWeeks) { - this.picker.find('.datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear') - .attr('colspan', function(i, val){ - return Number(val) + 1; - }); - } - - this._process_options({ - startDate: this._o.startDate, - endDate: this._o.endDate, - daysOfWeekDisabled: this.o.daysOfWeekDisabled, - daysOfWeekHighlighted: this.o.daysOfWeekHighlighted, - datesDisabled: this.o.datesDisabled - }); - - this._allow_update = false; - this.setViewMode(this.o.startView); - this._allow_update = true; - - this.fillDow(); - this.fillMonths(); - - this.update(); - - if (this.isInline){ - this.show(); - } - }; - - Datepicker.prototype = { - constructor: Datepicker, - - _resolveViewName: function(view){ - $.each(DPGlobal.viewModes, function(i, viewMode){ - if (view === i || $.inArray(view, viewMode.names) !== -1){ - view = i; - return false; - } - }); - - return view; - }, - - _resolveDaysOfWeek: function(daysOfWeek){ - if (!Array.isArray(daysOfWeek)) - daysOfWeek = daysOfWeek.split(/[,\s]*/); - return $.map(daysOfWeek, Number); - }, - - _check_template: function(tmp){ - try { - // If empty - if (tmp === undefined || tmp === "") { - return false; - } - // If no html, everything ok - if ((tmp.match(/[<>]/g) || []).length <= 0) { - return true; - } - // Checking if html is fine - var jDom = $(tmp); - return jDom.length > 0; - } - catch (ex) { - return false; - } - }, - - _process_options: function(opts){ - // Store raw options for reference - this._o = $.extend({}, this._o, opts); - // Processed options - var o = this.o = $.extend({}, this._o); - - // Check if "de-DE" style date is available, if not language should - // fallback to 2 letter code eg "de" - var lang = o.language; - if (!dates[lang]){ - lang = lang.split('-')[0]; - if (!dates[lang]) - lang = defaults.language; - } - o.language = lang; - - // Retrieve view index from any aliases - o.startView = this._resolveViewName(o.startView); - o.minViewMode = this._resolveViewName(o.minViewMode); - o.maxViewMode = this._resolveViewName(o.maxViewMode); - - // Check view is between min and max - o.startView = Math.max(this.o.minViewMode, Math.min(this.o.maxViewMode, o.startView)); - - // true, false, or Number > 0 - if (o.multidate !== true){ - o.multidate = Number(o.multidate) || false; - if (o.multidate !== false) - o.multidate = Math.max(0, o.multidate); - } - o.multidateSeparator = String(o.multidateSeparator); - - o.weekStart %= 7; - o.weekEnd = (o.weekStart + 6) % 7; - - var format = DPGlobal.parseFormat(o.format); - if (o.startDate !== -Infinity){ - if (!!o.startDate){ - if (o.startDate instanceof Date) - o.startDate = this._local_to_utc(this._zero_time(o.startDate)); - else - o.startDate = DPGlobal.parseDate(o.startDate, format, o.language, o.assumeNearbyYear); - } - else { - o.startDate = -Infinity; - } - } - if (o.endDate !== Infinity){ - if (!!o.endDate){ - if (o.endDate instanceof Date) - o.endDate = this._local_to_utc(this._zero_time(o.endDate)); - else - o.endDate = DPGlobal.parseDate(o.endDate, format, o.language, o.assumeNearbyYear); - } - else { - o.endDate = Infinity; - } - } - - o.daysOfWeekDisabled = this._resolveDaysOfWeek(o.daysOfWeekDisabled||[]); - o.daysOfWeekHighlighted = this._resolveDaysOfWeek(o.daysOfWeekHighlighted||[]); - - o.datesDisabled = o.datesDisabled||[]; - if (!Array.isArray(o.datesDisabled)) { - o.datesDisabled = o.datesDisabled.split(','); - } - o.datesDisabled = $.map(o.datesDisabled, function(d){ - return DPGlobal.parseDate(d, format, o.language, o.assumeNearbyYear); - }); - - var plc = String(o.orientation).toLowerCase().split(/\s+/g), - _plc = o.orientation.toLowerCase(); - plc = $.grep(plc, function(word){ - return /^auto|left|right|top|bottom$/.test(word); - }); - o.orientation = {x: 'auto', y: 'auto'}; - if (!_plc || _plc === 'auto') - ; // no action - else if (plc.length === 1){ - switch (plc[0]){ - case 'top': - case 'bottom': - o.orientation.y = plc[0]; - break; - case 'left': - case 'right': - o.orientation.x = plc[0]; - break; - } - } - else { - _plc = $.grep(plc, function(word){ - return /^left|right$/.test(word); - }); - o.orientation.x = _plc[0] || 'auto'; - - _plc = $.grep(plc, function(word){ - return /^top|bottom$/.test(word); - }); - o.orientation.y = _plc[0] || 'auto'; - } - if (o.defaultViewDate instanceof Date || typeof o.defaultViewDate === 'string') { - o.defaultViewDate = DPGlobal.parseDate(o.defaultViewDate, format, o.language, o.assumeNearbyYear); - } else if (o.defaultViewDate) { - var year = o.defaultViewDate.year || new Date().getFullYear(); - var month = o.defaultViewDate.month || 0; - var day = o.defaultViewDate.day || 1; - o.defaultViewDate = UTCDate(year, month, day); - } else { - o.defaultViewDate = UTCToday(); - } - }, - _applyEvents: function(evs){ - for (var i=0, el, ch, ev; i < evs.length; i++){ - el = evs[i][0]; - if (evs[i].length === 2){ - ch = undefined; - ev = evs[i][1]; - } else if (evs[i].length === 3){ - ch = evs[i][1]; - ev = evs[i][2]; - } - el.on(ev, ch); - } - }, - _unapplyEvents: function(evs){ - for (var i=0, el, ev, ch; i < evs.length; i++){ - el = evs[i][0]; - if (evs[i].length === 2){ - ch = undefined; - ev = evs[i][1]; - } else if (evs[i].length === 3){ - ch = evs[i][1]; - ev = evs[i][2]; - } - el.off(ev, ch); - } - }, - _buildEvents: function(){ - var events = { - keyup: $.proxy(function(e){ - if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1) - this.update(); - }, this), - keydown: $.proxy(this.keydown, this), - paste: $.proxy(this.paste, this) + let options = { + buttonClass: "btn" + }; + if (el.dataset.dateFormat) { + options = { ...options, + format: el.dataset.dateFormat + }; + if (!el.dataset.dateFormat.includes("dd")) { + options = { ...options, + pickLevel: 1 }; - - if (this.o.showOnFocus === true) { - events.focus = $.proxy(this.show, this); - } - - if (this.isInput) { // single input - this._events = [ - [this.element, events] - ]; - } - // component: input + button - else if (this.component && this.inputField.length) { - this._events = [ - // For components that are not readonly, allow keyboard nav - [this.inputField, events], - [this.component, { - click: $.proxy(this.show, this) - }] - ]; - } - else { - this._events = [ - [this.element, { - click: $.proxy(this.show, this), - keydown: $.proxy(this.keydown, this) - }] - ]; - } - this._events.push( - // Component: listen for blur on element descendants - [this.element, '*', { - blur: $.proxy(function(e){ - this._focused_from = e.target; - }, this) - }], - // Input: listen for blur on element - [this.element, { - blur: $.proxy(function(e){ - this._focused_from = e.target; - }, this) - }] - ); - - if (this.o.immediateUpdates) { - // Trigger input updates immediately on changed year/month - this._events.push([this.element, { - 'changeYear changeMonth': $.proxy(function(e){ - this.update(e.date); - }, this) - }]); - } - - this._secondaryEvents = [ - [this.picker, { - click: $.proxy(this.click, this) - }], - [this.picker, '.prev, .next', { - click: $.proxy(this.navArrowsClick, this) - }], - [this.picker, '.day:not(.disabled)', { - click: $.proxy(this.dayCellClick, this) - }], - [$(window), { - resize: $.proxy(this.place, this) - }], - [$(document), { - 'mousedown touchstart': $.proxy(function(e){ - // Clicked outside the datepicker, hide it - if (!( - this.element.is(e.target) || - this.element.find(e.target).length || - this.picker.is(e.target) || - this.picker.find(e.target).length || - this.isInline - )){ - this.hide(); - } - }, this) - }] - ]; - }, - _attachEvents: function(){ - this._detachEvents(); - this._applyEvents(this._events); - }, - _detachEvents: function(){ - this._unapplyEvents(this._events); - }, - _attachSecondaryEvents: function(){ - this._detachSecondaryEvents(); - this._applyEvents(this._secondaryEvents); - }, - _detachSecondaryEvents: function(){ - this._unapplyEvents(this._secondaryEvents); - }, - _trigger: function(event, altdate){ - var date = altdate || this.dates.get(-1), - local_date = this._utc_to_local(date); - - this.element.trigger({ - type: event, - date: local_date, - viewMode: this.viewMode, - dates: $.map(this.dates, this._utc_to_local), - format: $.proxy(function(ix, format){ - if (arguments.length === 0){ - ix = this.dates.length - 1; - format = this.o.format; - } else if (typeof ix === 'string'){ - format = ix; - ix = this.dates.length - 1; - } - format = format || this.o.format; - var date = this.dates.get(ix); - return DPGlobal.formatDate(date, format, this.o.language); - }, this) - }); - }, - - show: function(){ - if (this.inputField.is(':disabled') || (this.inputField.prop('readonly') && this.o.enableOnReadonly === false)) - return; - if (!this.isInline) - this.picker.appendTo(this.o.container); - this.place(); - this.picker.show(); - this._attachSecondaryEvents(); - this._trigger('show'); - if ((window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && this.o.disableTouchKeyboard) { - $(this.element).blur(); - } - return this; - }, - - hide: function(){ - if (this.isInline || !this.picker.is(':visible')) - return this; - this.focusDate = null; - this.picker.hide().detach(); - this._detachSecondaryEvents(); - this.setViewMode(this.o.startView); - - if (this.o.forceParse && this.inputField.val()) - this.setValue(); - this._trigger('hide'); - return this; - }, - - destroy: function(){ - this.hide(); - this._detachEvents(); - this._detachSecondaryEvents(); - this.picker.remove(); - delete this.element.data().datepicker; - if (!this.isInput){ - delete this.element.data().date; - } - return this; - }, - - paste: function(e){ - var dateString; - if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.types - && $.inArray('text/plain', e.originalEvent.clipboardData.types) !== -1) { - dateString = e.originalEvent.clipboardData.getData('text/plain'); - } else if (window.clipboardData) { - dateString = window.clipboardData.getData('Text'); - } else { - return; - } - this.setDate(dateString); - this.update(); - e.preventDefault(); - }, - - _utc_to_local: function(utc){ - if (!utc) { - return utc; - } - - var local = new Date(utc.getTime() + (utc.getTimezoneOffset() * 60000)); - - if (local.getTimezoneOffset() !== utc.getTimezoneOffset()) { - local = new Date(utc.getTime() + (local.getTimezoneOffset() * 60000)); - } - - return local; - }, - _local_to_utc: function(local){ - return local && new Date(local.getTime() - (local.getTimezoneOffset()*60000)); - }, - _zero_time: function(local){ - return local && new Date(local.getFullYear(), local.getMonth(), local.getDate()); - }, - _zero_utc_time: function(utc){ - return utc && UTCDate(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()); - }, - - getDates: function(){ - return $.map(this.dates, this._utc_to_local); - }, - - getUTCDates: function(){ - return $.map(this.dates, function(d){ - return new Date(d); - }); - }, - - getDate: function(){ - return this._utc_to_local(this.getUTCDate()); - }, - - getUTCDate: function(){ - var selected_date = this.dates.get(-1); - if (selected_date !== undefined) { - return new Date(selected_date); - } else { - return null; - } - }, - - clearDates: function(){ - this.inputField.val(''); - this.update(); - this._trigger('changeDate'); - - if (this.o.autoclose) { - this.hide(); - } - }, - - setDates: function(){ - var args = Array.isArray(arguments[0]) ? arguments[0] : arguments; - this.update.apply(this, args); - this._trigger('changeDate'); - this.setValue(); - return this; - }, - - setUTCDates: function(){ - var args = Array.isArray(arguments[0]) ? arguments[0] : arguments; - this.setDates.apply(this, $.map(args, this._utc_to_local)); - return this; - }, - - setDate: alias('setDates'), - setUTCDate: alias('setUTCDates'), - remove: alias('destroy', 'Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead'), - - setValue: function(){ - var formatted = this.getFormattedDate(); - this.inputField.val(formatted); - return this; - }, - - getFormattedDate: function(format){ - if (format === undefined) - format = this.o.format; - - var lang = this.o.language; - return $.map(this.dates, function(d){ - return DPGlobal.formatDate(d, format, lang); - }).join(this.o.multidateSeparator); - }, - - getStartDate: function(){ - return this.o.startDate; - }, - - setStartDate: function(startDate){ - this._process_options({startDate: startDate}); - this.update(); - this.updateNavArrows(); - return this; - }, - - getEndDate: function(){ - return this.o.endDate; - }, - - setEndDate: function(endDate){ - this._process_options({endDate: endDate}); - this.update(); - this.updateNavArrows(); - return this; - }, - - setDaysOfWeekDisabled: function(daysOfWeekDisabled){ - this._process_options({daysOfWeekDisabled: daysOfWeekDisabled}); - this.update(); - return this; - }, - - setDaysOfWeekHighlighted: function(daysOfWeekHighlighted){ - this._process_options({daysOfWeekHighlighted: daysOfWeekHighlighted}); - this.update(); - return this; - }, - - setDatesDisabled: function(datesDisabled){ - this._process_options({datesDisabled: datesDisabled}); - this.update(); - return this; - }, - - place: function(){ - if (this.isInline) - return this; - var calendarWidth = this.picker.outerWidth(), - calendarHeight = this.picker.outerHeight(), - visualPadding = 10, - container = $(this.o.container), - windowWidth = container.width(), - scrollTop = this.o.container === 'body' ? $(document).scrollTop() : container.scrollTop(), - appendOffset = container.offset(); - - var parentsZindex = [0]; - this.element.parents().each(function(){ - var itemZIndex = $(this).css('z-index'); - if (itemZIndex !== 'auto' && Number(itemZIndex) !== 0) parentsZindex.push(Number(itemZIndex)); - }); - var zIndex = Math.max.apply(Math, parentsZindex) + this.o.zIndexOffset; - var offset = this.component ? this.component.parent().offset() : this.element.offset(); - var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false); - var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false); - var left = offset.left - appendOffset.left; - var top = offset.top - appendOffset.top; - - if (this.o.container !== 'body') { - top += scrollTop; - } - - this.picker.removeClass( - 'datepicker-orient-top datepicker-orient-bottom '+ - 'datepicker-orient-right datepicker-orient-left' - ); - - if (this.o.orientation.x !== 'auto'){ - this.picker.addClass('datepicker-orient-' + this.o.orientation.x); - if (this.o.orientation.x === 'right') - left -= calendarWidth - width; - } - // auto x orientation is best-placement: if it crosses a window - // edge, fudge it sideways - else { - if (offset.left < 0) { - // component is outside the window on the left side. Move it into visible range - this.picker.addClass('datepicker-orient-left'); - left -= offset.left - visualPadding; - } else if (left + calendarWidth > windowWidth) { - // the calendar passes the widow right edge. Align it to component right side - this.picker.addClass('datepicker-orient-right'); - left += width - calendarWidth; - } else { - if (this.o.rtl) { - // Default to right - this.picker.addClass('datepicker-orient-right'); - } else { - // Default to left - this.picker.addClass('datepicker-orient-left'); - } - } - } - - // auto y orientation is best-situation: top or bottom, no fudging, - // decision based on which shows more of the calendar - var yorient = this.o.orientation.y, - top_overflow; - if (yorient === 'auto'){ - top_overflow = -scrollTop + top - calendarHeight; - yorient = top_overflow < 0 ? 'bottom' : 'top'; - } - - this.picker.addClass('datepicker-orient-' + yorient); - if (yorient === 'top') - top -= calendarHeight + parseInt(this.picker.css('padding-top')); - else - top += height; - - if (this.o.rtl) { - var right = windowWidth - (left + width); - this.picker.css({ - top: top, - right: right, - zIndex: zIndex - }); - } else { - this.picker.css({ - top: top, - left: left, - zIndex: zIndex - }); - } - return this; - }, - - _allow_update: true, - update: function(){ - if (!this._allow_update) - return this; - - var oldDates = this.dates.copy(), - dates = [], - fromArgs = false; - if (arguments.length){ - $.each(arguments, $.proxy(function(i, date){ - if (date instanceof Date) - date = this._local_to_utc(date); - dates.push(date); - }, this)); - fromArgs = true; - } else { - dates = this.isInput - ? this.element.val() - : this.element.data('date') || this.inputField.val(); - if (dates && this.o.multidate) - dates = dates.split(this.o.multidateSeparator); - else - dates = [dates]; - delete this.element.data().date; - } - - dates = $.map(dates, $.proxy(function(date){ - return DPGlobal.parseDate(date, this.o.format, this.o.language, this.o.assumeNearbyYear); - }, this)); - dates = $.grep(dates, $.proxy(function(date){ - return ( - !this.dateWithinRange(date) || - !date - ); - }, this), true); - this.dates.replace(dates); - - if (this.o.updateViewDate) { - if (this.dates.length) - this.viewDate = new Date(this.dates.get(-1)); - else if (this.viewDate < this.o.startDate) - this.viewDate = new Date(this.o.startDate); - else if (this.viewDate > this.o.endDate) - this.viewDate = new Date(this.o.endDate); - else - this.viewDate = this.o.defaultViewDate; - } - - if (fromArgs){ - // setting date by clicking - this.setValue(); - this.element.change(); - } - else if (this.dates.length){ - // setting date by typing - if (String(oldDates) !== String(this.dates) && fromArgs) { - this._trigger('changeDate'); - this.element.change(); - } - } - if (!this.dates.length && oldDates.length) { - this._trigger('clearDate'); - this.element.change(); - } - - this.fill(); - return this; - }, - - fillDow: function(){ - if (this.o.showWeekDays) { - var dowCnt = this.o.weekStart, - html = '
{{ key.hash }}
+ {{ key.hash }}