mirror of https://github.com/snachodog/mybuddy.git
Remove sourcemap references when collecting static files
This commit is contained in:
parent
c540d36495
commit
c0dd79ef19
|
@ -6,6 +6,7 @@ var es = require('child_process').execSync;
|
|||
var flatten = require('gulp-flatten');
|
||||
var fontello = require('gulp-fontello');
|
||||
var pump = require('pump');
|
||||
var removeSourcemaps = require('gulp-remove-sourcemaps');
|
||||
var sass = require('gulp-sass')(require('sass'));
|
||||
var sassGlob = require('gulp-sass-glob');
|
||||
var styleLint = require('gulp-stylelint');
|
||||
|
@ -180,18 +181,21 @@ function lint(cb) {
|
|||
function scripts(cb) {
|
||||
pump([
|
||||
gulp.src(config.scriptsConfig.vendor),
|
||||
removeSourcemaps(),
|
||||
concat('vendor.js'),
|
||||
gulp.dest(config.scriptsConfig.dest)
|
||||
], cb);
|
||||
|
||||
pump([
|
||||
gulp.src(config.scriptsConfig.graph),
|
||||
removeSourcemaps(),
|
||||
concat('graph.js'),
|
||||
gulp.dest(config.scriptsConfig.dest)
|
||||
], cb);
|
||||
|
||||
pump([
|
||||
gulp.src(config.scriptsConfig.app),
|
||||
removeSourcemaps(),
|
||||
concat('app.js'),
|
||||
gulp.dest(config.scriptsConfig.dest)
|
||||
], cb);
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"gulp-csso": "^4.0.1",
|
||||
"gulp-flatten": "^0.4.0",
|
||||
"gulp-fontello": "^0.5.2",
|
||||
"gulp-remove-sourcemaps": "^1.0.4",
|
||||
"gulp-sass": "^5.0.0",
|
||||
"gulp-sass-glob": "^1.1.0",
|
||||
"gulp-spawn": "^1.0.0",
|
||||
|
@ -3858,6 +3859,12 @@
|
|||
"y18n": "^3.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/gulp-remove-sourcemaps": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/gulp-remove-sourcemaps/-/gulp-remove-sourcemaps-1.0.4.tgz",
|
||||
"integrity": "sha512-zW+YRzgbJIDDqAlIa/EtFJbOV1GSzQe2qV2zy+PjI1TJ27JCykQ5eYC+ajogEKZUOzoosgBnXzUGQlVW3YQUIw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/gulp-sass": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-5.0.0.tgz",
|
||||
|
@ -13127,6 +13134,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"gulp-remove-sourcemaps": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/gulp-remove-sourcemaps/-/gulp-remove-sourcemaps-1.0.4.tgz",
|
||||
"integrity": "sha512-zW+YRzgbJIDDqAlIa/EtFJbOV1GSzQe2qV2zy+PjI1TJ27JCykQ5eYC+ajogEKZUOzoosgBnXzUGQlVW3YQUIw==",
|
||||
"dev": true
|
||||
},
|
||||
"gulp-sass": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-5.0.0.tgz",
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"gulp-csso": "^4.0.1",
|
||||
"gulp-flatten": "^0.4.0",
|
||||
"gulp-fontello": "^0.5.2",
|
||||
"gulp-remove-sourcemaps": "^1.0.4",
|
||||
"gulp-sass": "^5.0.0",
|
||||
"gulp-sass-glob": "^1.1.0",
|
||||
"gulp-spawn": "^1.0.0",
|
||||
|
|
Binary file not shown.
|
@ -125,6 +125,10 @@
|
|||
margin-right: 4px;
|
||||
}
|
||||
|
||||
#changelist-search .help {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* FILTER COLUMN */
|
||||
|
||||
#changelist-filter {
|
Binary file not shown.
|
@ -125,6 +125,10 @@
|
|||
margin-right: 4px;
|
||||
}
|
||||
|
||||
#changelist-search .help {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* FILTER COLUMN */
|
||||
|
||||
#changelist-filter {
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -37,16 +37,19 @@ label {
|
|||
|
||||
/* RADIO BUTTONS */
|
||||
|
||||
form ul.radiolist li {
|
||||
list-style-type: none;
|
||||
form div.radiolist div {
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
form ul.radiolist label {
|
||||
float: none;
|
||||
display: inline;
|
||||
form div.radiolist.inline div {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
form ul.radiolist input[type="radio"] {
|
||||
form div.radiolist label {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
form div.radiolist input[type="radio"] {
|
||||
margin: -2px 4px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -84,6 +87,7 @@ form ul.inline li {
|
|||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 170px;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.aligned ul label {
|
||||
|
@ -105,7 +109,7 @@ form .aligned ul {
|
|||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
form .aligned div.radiolist {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
Binary file not shown.
|
@ -37,16 +37,19 @@ label {
|
|||
|
||||
/* RADIO BUTTONS */
|
||||
|
||||
form ul.radiolist li {
|
||||
list-style-type: none;
|
||||
form div.radiolist div {
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
form ul.radiolist label {
|
||||
float: none;
|
||||
display: inline;
|
||||
form div.radiolist.inline div {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
form ul.radiolist input[type="radio"] {
|
||||
form div.radiolist label {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
form div.radiolist input[type="radio"] {
|
||||
margin: -2px 4px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -84,6 +87,7 @@ form ul.inline li {
|
|||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 170px;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.aligned ul label {
|
||||
|
@ -105,7 +109,7 @@ form .aligned ul {
|
|||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
form .aligned div.radiolist {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
|
Binary file not shown.
|
@ -13,6 +13,7 @@
|
|||
|
||||
.login #header h1 {
|
||||
font-size: 18px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login #header h1 a {
|
Binary file not shown.
Binary file not shown.
|
@ -13,6 +13,7 @@
|
|||
|
||||
.login #header h1 {
|
||||
font-size: 18px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login #header h1 a {
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -60,13 +60,10 @@
|
|||
}
|
||||
|
||||
.main.shifted > #nav-sidebar {
|
||||
left: 24px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] .main.shifted > #nav-sidebar {
|
||||
left: 0;
|
||||
right: 24px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
|
@ -118,3 +115,25 @@
|
|||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#nav-filter {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 2px 5px;
|
||||
margin: 5px 0;
|
||||
border: 1px solid var(--border-color);
|
||||
background-color: var(--darkened-bg);
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
#nav-filter:focus {
|
||||
border-color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
#nav-filter.no-results {
|
||||
background: var(--message-error-bg);
|
||||
}
|
||||
|
||||
#nav-sidebar table {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -60,13 +60,10 @@
|
|||
}
|
||||
|
||||
.main.shifted > #nav-sidebar {
|
||||
left: 24px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] .main.shifted > #nav-sidebar {
|
||||
left: 0;
|
||||
right: 24px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
|
@ -118,3 +115,25 @@
|
|||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#nav-filter {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 2px 5px;
|
||||
margin: 5px 0;
|
||||
border: 1px solid var(--border-color);
|
||||
background-color: var(--darkened-bg);
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
#nav-filter:focus {
|
||||
border-color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
#nav-filter.no-results {
|
||||
background: var(--message-error-bg);
|
||||
}
|
||||
|
||||
#nav-sidebar table {
|
||||
width: 100%;
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -232,7 +232,7 @@ input[type="submit"], button {
|
|||
margin-left: 15px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
form .aligned div.radiolist {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
|
@ -650,12 +650,13 @@ input[type="submit"], button {
|
|||
padding-left: 0;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
form .aligned div.radiolist {
|
||||
margin-top: 5px;
|
||||
margin-right: 15px;
|
||||
margin-bottom: -3px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist:not(.inline) li + li {
|
||||
form .aligned div.radiolist:not(.inline) div + div {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
Binary file not shown.
|
@ -232,7 +232,7 @@ input[type="submit"], button {
|
|||
margin-left: 15px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
form .aligned div.radiolist {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
|
@ -650,12 +650,13 @@ input[type="submit"], button {
|
|||
padding-left: 0;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist {
|
||||
form .aligned div.radiolist {
|
||||
margin-top: 5px;
|
||||
margin-right: 15px;
|
||||
margin-bottom: -3px;
|
||||
}
|
||||
|
||||
form .aligned ul.radiolist:not(.inline) li + li {
|
||||
form .aligned div.radiolist:not(.inline) div + div {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -156,7 +156,7 @@
|
|||
});
|
||||
});
|
||||
|
||||
document.querySelector('#changelist-form button[name=index]').addEventListener('click', function() {
|
||||
document.querySelector('#changelist-form button[name=index]').addEventListener('click', function(event) {
|
||||
if (list_editable_changed) {
|
||||
const confirmed = confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."));
|
||||
if (!confirmed) {
|
Binary file not shown.
|
@ -156,7 +156,7 @@
|
|||
});
|
||||
});
|
||||
|
||||
document.querySelector('#changelist-form button[name=index]').addEventListener('click', function() {
|
||||
document.querySelector('#changelist-form button[name=index]').addEventListener('click', function(event) {
|
||||
if (list_editable_changed) {
|
||||
const confirmed = confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."));
|
||||
if (!confirmed) {
|
||||
|
|
Binary file not shown.
|
@ -1,41 +0,0 @@
|
|||
'use strict';
|
||||
{
|
||||
const $ = django.jQuery;
|
||||
const init = function($element, options) {
|
||||
const settings = $.extend({
|
||||
ajax: {
|
||||
data: function(params) {
|
||||
return {
|
||||
term: params.term,
|
||||
page: params.page,
|
||||
app_label: $element.data('app-label'),
|
||||
model_name: $element.data('model-name'),
|
||||
field_name: $element.data('field-name')
|
||||
};
|
||||
}
|
||||
}
|
||||
}, options);
|
||||
$element.select2(settings);
|
||||
};
|
||||
|
||||
$.fn.djangoAdminSelect2 = function(options) {
|
||||
const settings = $.extend({}, options);
|
||||
$.each(this, function(i, element) {
|
||||
const $element = $(element);
|
||||
init($element, settings);
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
// Initialize all autocomplete widgets except the one in the template
|
||||
// form used when a new formset is added.
|
||||
$('.admin-autocomplete').not('[name*=__prefix__]').djangoAdminSelect2();
|
||||
});
|
||||
|
||||
$(document).on('formset:added', (function() {
|
||||
return function(event, $newFormset) {
|
||||
return $newFormset.find('.admin-autocomplete').djangoAdminSelect2();
|
||||
};
|
||||
})(this));
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
{
|
||||
const $ = django.jQuery;
|
||||
|
||||
$.fn.djangoAdminSelect2 = function() {
|
||||
$.each(this, function(i, element) {
|
||||
$(element).select2({
|
||||
ajax: {
|
||||
data: (params) => {
|
||||
return {
|
||||
term: params.term,
|
||||
page: params.page,
|
||||
app_label: element.dataset.appLabel,
|
||||
model_name: element.dataset.modelName,
|
||||
field_name: element.dataset.fieldName
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
// Initialize all autocomplete widgets except the one in the template
|
||||
// form used when a new formset is added.
|
||||
$('.admin-autocomplete').not('[name*=__prefix__]').djangoAdminSelect2();
|
||||
});
|
||||
|
||||
$(document).on('formset:added', (function() {
|
||||
return function(event, $newFormset) {
|
||||
return $newFormset.find('.admin-autocomplete').djangoAdminSelect2();
|
||||
};
|
||||
})(this));
|
||||
}
|
Binary file not shown.
|
@ -1,28 +1,22 @@
|
|||
'use strict';
|
||||
{
|
||||
const $ = django.jQuery;
|
||||
const init = function($element, options) {
|
||||
const settings = $.extend({
|
||||
|
||||
$.fn.djangoAdminSelect2 = function() {
|
||||
$.each(this, function(i, element) {
|
||||
$(element).select2({
|
||||
ajax: {
|
||||
data: function(params) {
|
||||
data: (params) => {
|
||||
return {
|
||||
term: params.term,
|
||||
page: params.page,
|
||||
app_label: $element.data('app-label'),
|
||||
model_name: $element.data('model-name'),
|
||||
field_name: $element.data('field-name')
|
||||
app_label: element.dataset.appLabel,
|
||||
model_name: element.dataset.modelName,
|
||||
field_name: element.dataset.fieldName
|
||||
};
|
||||
}
|
||||
}
|
||||
}, options);
|
||||
$element.select2(settings);
|
||||
};
|
||||
|
||||
$.fn.djangoAdminSelect2 = function(options) {
|
||||
const settings = $.extend({}, options);
|
||||
$.each(this, function(i, element) {
|
||||
const $element = $(element);
|
||||
init($element, settings);
|
||||
});
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
// Core javascript helper functions
|
||||
// Core JavaScript helper functions
|
||||
'use strict';
|
||||
|
||||
// quickElement(tagType, parentReference [, textInChildNode, attribute, attributeValue ...]);
|
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
// Core javascript helper functions
|
||||
// Core JavaScript helper functions
|
||||
'use strict';
|
||||
|
||||
// quickElement(tagType, parentReference [, textInChildNode, attribute, attributeValue ...]);
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -218,12 +218,10 @@
|
|||
// instantiate a new SelectFilter instance for it.
|
||||
if (typeof SelectFilter !== 'undefined') {
|
||||
$('.selectfilter').each(function(index, value) {
|
||||
const namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length - 1], false);
|
||||
SelectFilter.init(value.id, this.dataset.fieldName, false);
|
||||
});
|
||||
$('.selectfilterstacked').each(function(index, value) {
|
||||
const namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length - 1], true);
|
||||
SelectFilter.init(value.id, this.dataset.fieldName, true);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -283,12 +281,10 @@
|
|||
// If any SelectFilter widgets were added, instantiate a new instance.
|
||||
if (typeof SelectFilter !== "undefined") {
|
||||
$(".selectfilter").each(function(index, value) {
|
||||
const namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length - 1], false);
|
||||
SelectFilter.init(value.id, this.dataset.fieldName, false);
|
||||
});
|
||||
$(".selectfilterstacked").each(function(index, value) {
|
||||
const namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length - 1], true);
|
||||
SelectFilter.init(value.id, this.dataset.fieldName, true);
|
||||
});
|
||||
}
|
||||
};
|
Binary file not shown.
|
@ -218,12 +218,10 @@
|
|||
// instantiate a new SelectFilter instance for it.
|
||||
if (typeof SelectFilter !== 'undefined') {
|
||||
$('.selectfilter').each(function(index, value) {
|
||||
const namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length - 1], false);
|
||||
SelectFilter.init(value.id, this.dataset.fieldName, false);
|
||||
});
|
||||
$('.selectfilterstacked').each(function(index, value) {
|
||||
const namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length - 1], true);
|
||||
SelectFilter.init(value.id, this.dataset.fieldName, true);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -283,12 +281,10 @@
|
|||
// If any SelectFilter widgets were added, instantiate a new instance.
|
||||
if (typeof SelectFilter !== "undefined") {
|
||||
$(".selectfilter").each(function(index, value) {
|
||||
const namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length - 1], false);
|
||||
SelectFilter.init(value.id, this.dataset.fieldName, false);
|
||||
});
|
||||
$(".selectfilterstacked").each(function(index, value) {
|
||||
const namearr = value.name.split('-');
|
||||
SelectFilter.init(value.id, namearr[namearr.length - 1], true);
|
||||
SelectFilter.init(value.id, this.dataset.fieldName, true);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,93 @@
|
|||
'use strict';
|
||||
{
|
||||
const toggleNavSidebar = document.getElementById('toggle-nav-sidebar');
|
||||
if (toggleNavSidebar !== null) {
|
||||
const navLinks = document.querySelectorAll('#nav-sidebar a');
|
||||
function disableNavLinkTabbing() {
|
||||
for (const navLink of navLinks) {
|
||||
navLink.tabIndex = -1;
|
||||
}
|
||||
}
|
||||
function enableNavLinkTabbing() {
|
||||
for (const navLink of navLinks) {
|
||||
navLink.tabIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const main = document.getElementById('main');
|
||||
let navSidebarIsOpen = localStorage.getItem('django.admin.navSidebarIsOpen');
|
||||
if (navSidebarIsOpen === null) {
|
||||
navSidebarIsOpen = 'true';
|
||||
}
|
||||
if (navSidebarIsOpen === 'false') {
|
||||
disableNavLinkTabbing();
|
||||
}
|
||||
main.classList.toggle('shifted', navSidebarIsOpen === 'true');
|
||||
|
||||
toggleNavSidebar.addEventListener('click', function() {
|
||||
if (navSidebarIsOpen === 'true') {
|
||||
navSidebarIsOpen = 'false';
|
||||
disableNavLinkTabbing();
|
||||
} else {
|
||||
navSidebarIsOpen = 'true';
|
||||
enableNavLinkTabbing();
|
||||
}
|
||||
localStorage.setItem('django.admin.navSidebarIsOpen', navSidebarIsOpen);
|
||||
main.classList.toggle('shifted');
|
||||
});
|
||||
}
|
||||
|
||||
function initSidebarQuickFilter() {
|
||||
const options = [];
|
||||
const navSidebar = document.getElementById('nav-sidebar');
|
||||
if (!navSidebar) {
|
||||
return;
|
||||
}
|
||||
navSidebar.querySelectorAll('th[scope=row] a').forEach((container) => {
|
||||
options.push({title: container.innerHTML, node: container});
|
||||
});
|
||||
|
||||
function checkValue(event) {
|
||||
let filterValue = event.target.value;
|
||||
if (filterValue) {
|
||||
filterValue = filterValue.toLowerCase();
|
||||
}
|
||||
if (event.key === 'Escape') {
|
||||
filterValue = '';
|
||||
event.target.value = ''; // clear input
|
||||
}
|
||||
let matches = false;
|
||||
for (const o of options) {
|
||||
let displayValue = '';
|
||||
if (filterValue) {
|
||||
if (o.title.toLowerCase().indexOf(filterValue) === -1) {
|
||||
displayValue = 'none';
|
||||
} else {
|
||||
matches = true;
|
||||
}
|
||||
}
|
||||
// show/hide parent <TR>
|
||||
o.node.parentNode.parentNode.style.display = displayValue;
|
||||
}
|
||||
if (!filterValue || matches) {
|
||||
event.target.classList.remove('no-results');
|
||||
} else {
|
||||
event.target.classList.add('no-results');
|
||||
}
|
||||
sessionStorage.setItem('django.admin.navSidebarFilterValue', filterValue);
|
||||
}
|
||||
|
||||
const nav = document.getElementById('nav-filter');
|
||||
nav.addEventListener('change', checkValue, false);
|
||||
nav.addEventListener('input', checkValue, false);
|
||||
nav.addEventListener('keyup', checkValue, false);
|
||||
|
||||
const storedValue = sessionStorage.getItem('django.admin.navSidebarFilterValue');
|
||||
if (storedValue) {
|
||||
nav.value = storedValue;
|
||||
checkValue({target: nav, key: ''});
|
||||
}
|
||||
}
|
||||
window.initSidebarQuickFilter = initSidebarQuickFilter;
|
||||
initSidebarQuickFilter();
|
||||
}
|
Binary file not shown.
|
@ -1,39 +0,0 @@
|
|||
'use strict';
|
||||
{
|
||||
const toggleNavSidebar = document.getElementById('toggle-nav-sidebar');
|
||||
if (toggleNavSidebar !== null) {
|
||||
const navLinks = document.querySelectorAll('#nav-sidebar a');
|
||||
function disableNavLinkTabbing() {
|
||||
for (const navLink of navLinks) {
|
||||
navLink.tabIndex = -1;
|
||||
}
|
||||
}
|
||||
function enableNavLinkTabbing() {
|
||||
for (const navLink of navLinks) {
|
||||
navLink.tabIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const main = document.getElementById('main');
|
||||
let navSidebarIsOpen = localStorage.getItem('django.admin.navSidebarIsOpen');
|
||||
if (navSidebarIsOpen === null) {
|
||||
navSidebarIsOpen = 'true';
|
||||
}
|
||||
if (navSidebarIsOpen === 'false') {
|
||||
disableNavLinkTabbing();
|
||||
}
|
||||
main.classList.toggle('shifted', navSidebarIsOpen === 'true');
|
||||
|
||||
toggleNavSidebar.addEventListener('click', function() {
|
||||
if (navSidebarIsOpen === 'true') {
|
||||
navSidebarIsOpen = 'false';
|
||||
disableNavLinkTabbing();
|
||||
} else {
|
||||
navSidebarIsOpen = 'true';
|
||||
enableNavLinkTabbing();
|
||||
}
|
||||
localStorage.setItem('django.admin.navSidebarIsOpen', navSidebarIsOpen);
|
||||
main.classList.toggle('shifted');
|
||||
});
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -36,4 +36,58 @@
|
|||
main.classList.toggle('shifted');
|
||||
});
|
||||
}
|
||||
|
||||
function initSidebarQuickFilter() {
|
||||
const options = [];
|
||||
const navSidebar = document.getElementById('nav-sidebar');
|
||||
if (!navSidebar) {
|
||||
return;
|
||||
}
|
||||
navSidebar.querySelectorAll('th[scope=row] a').forEach((container) => {
|
||||
options.push({title: container.innerHTML, node: container});
|
||||
});
|
||||
|
||||
function checkValue(event) {
|
||||
let filterValue = event.target.value;
|
||||
if (filterValue) {
|
||||
filterValue = filterValue.toLowerCase();
|
||||
}
|
||||
if (event.key === 'Escape') {
|
||||
filterValue = '';
|
||||
event.target.value = ''; // clear input
|
||||
}
|
||||
let matches = false;
|
||||
for (const o of options) {
|
||||
let displayValue = '';
|
||||
if (filterValue) {
|
||||
if (o.title.toLowerCase().indexOf(filterValue) === -1) {
|
||||
displayValue = 'none';
|
||||
} else {
|
||||
matches = true;
|
||||
}
|
||||
}
|
||||
// show/hide parent <TR>
|
||||
o.node.parentNode.parentNode.style.display = displayValue;
|
||||
}
|
||||
if (!filterValue || matches) {
|
||||
event.target.classList.remove('no-results');
|
||||
} else {
|
||||
event.target.classList.add('no-results');
|
||||
}
|
||||
sessionStorage.setItem('django.admin.navSidebarFilterValue', filterValue);
|
||||
}
|
||||
|
||||
const nav = document.getElementById('nav-filter');
|
||||
nav.addEventListener('change', checkValue, false);
|
||||
nav.addEventListener('input', checkValue, false);
|
||||
nav.addEventListener('keyup', checkValue, false);
|
||||
|
||||
const storedValue = sessionStorage.getItem('django.admin.navSidebarFilterValue');
|
||||
if (storedValue) {
|
||||
nav.value = storedValue;
|
||||
checkValue({target: nav, key: ''});
|
||||
}
|
||||
}
|
||||
window.initSidebarQuickFilter = initSidebarQuickFilter;
|
||||
initSidebarQuickFilter();
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
Copyright JS Foundation and other contributors, https://js.foundation/
|
||||
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
Copyright JS Foundation and other contributors, https://js.foundation/
|
||||
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,15 +1,15 @@
|
|||
/*!
|
||||
* jQuery JavaScript Library v3.5.1
|
||||
* jQuery JavaScript Library v3.6.0
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Copyright OpenJS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2020-05-04T22:49Z
|
||||
* Date: 2021-03-02T17:08Z
|
||||
*/
|
||||
( function( global, factory ) {
|
||||
|
||||
|
@ -80,7 +80,11 @@ var isFunction = function isFunction( obj ) {
|
|||
// In some browsers, typeof returns "function" for HTML <object> elements
|
||||
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
||||
// We don't want to classify *any* DOM node as a function.
|
||||
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
||||
// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
|
||||
// Plus for old WebKit, typeof returns "function" for HTML collections
|
||||
// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
|
||||
return typeof obj === "function" && typeof obj.nodeType !== "number" &&
|
||||
typeof obj.item !== "function";
|
||||
};
|
||||
|
||||
|
||||
|
@ -147,7 +151,7 @@ function toType( obj ) {
|
|||
|
||||
|
||||
var
|
||||
version = "3.5.1",
|
||||
version = "3.6.0",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
|
@ -518,14 +522,14 @@ function isArrayLike( obj ) {
|
|||
}
|
||||
var Sizzle =
|
||||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.5
|
||||
* Sizzle CSS Selector Engine v2.3.6
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2020-03-14
|
||||
* Date: 2021-02-16
|
||||
*/
|
||||
( function( window ) {
|
||||
var i,
|
||||
|
@ -1108,8 +1112,8 @@ support = Sizzle.support = {};
|
|||
* @returns {Boolean} True iff elem is a non-HTML XML node
|
||||
*/
|
||||
isXML = Sizzle.isXML = function( elem ) {
|
||||
var namespace = elem.namespaceURI,
|
||||
docElem = ( elem.ownerDocument || elem ).documentElement;
|
||||
var namespace = elem && elem.namespaceURI,
|
||||
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
||||
|
||||
// Support: IE <=8
|
||||
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
||||
|
@ -3026,7 +3030,7 @@ function nodeName( elem, name ) {
|
|||
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
|
||||
};
|
||||
}
|
||||
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
||||
|
||||
|
||||
|
@ -3997,8 +4001,8 @@ jQuery.extend( {
|
|||
resolveContexts = Array( i ),
|
||||
resolveValues = slice.call( arguments ),
|
||||
|
||||
// the master Deferred
|
||||
master = jQuery.Deferred(),
|
||||
// the primary Deferred
|
||||
primary = jQuery.Deferred(),
|
||||
|
||||
// subordinate callback factory
|
||||
updateFunc = function( i ) {
|
||||
|
@ -4006,30 +4010,30 @@ jQuery.extend( {
|
|||
resolveContexts[ i ] = this;
|
||||
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
||||
if ( !( --remaining ) ) {
|
||||
master.resolveWith( resolveContexts, resolveValues );
|
||||
primary.resolveWith( resolveContexts, resolveValues );
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// Single- and empty arguments are adopted like Promise.resolve
|
||||
if ( remaining <= 1 ) {
|
||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
|
||||
adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
|
||||
!remaining );
|
||||
|
||||
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
||||
if ( master.state() === "pending" ||
|
||||
if ( primary.state() === "pending" ||
|
||||
isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
||||
|
||||
return master.then();
|
||||
return primary.then();
|
||||
}
|
||||
}
|
||||
|
||||
// Multiple arguments are aggregated like Promise.all array elements
|
||||
while ( i-- ) {
|
||||
adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
|
||||
adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
|
||||
}
|
||||
|
||||
return master.promise();
|
||||
return primary.promise();
|
||||
}
|
||||
} );
|
||||
|
||||
|
@ -5089,10 +5093,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|||
}
|
||||
|
||||
|
||||
var
|
||||
rkeyEvent = /^key/,
|
||||
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
|
||||
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
||||
var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
||||
|
||||
function returnTrue() {
|
||||
return true;
|
||||
|
@ -5656,7 +5657,13 @@ function leverageNative( el, type, expectSync ) {
|
|||
// Cancel the outer synthetic event
|
||||
event.stopImmediatePropagation();
|
||||
event.preventDefault();
|
||||
return result.value;
|
||||
|
||||
// Support: Chrome 86+
|
||||
// In Chrome, if an element having a focusout handler is blurred by
|
||||
// clicking outside of it, it invokes the handler synchronously. If
|
||||
// that handler calls `.remove()` on the element, the data is cleared,
|
||||
// leaving `result` undefined. We need to guard against this.
|
||||
return result && result.value;
|
||||
}
|
||||
|
||||
// If this is an inner synthetic event for an event with a bubbling surrogate
|
||||
|
@ -5821,34 +5828,7 @@ jQuery.each( {
|
|||
targetTouches: true,
|
||||
toElement: true,
|
||||
touches: true,
|
||||
|
||||
which: function( event ) {
|
||||
var button = event.button;
|
||||
|
||||
// Add which for key events
|
||||
if ( event.which == null && rkeyEvent.test( event.type ) ) {
|
||||
return event.charCode != null ? event.charCode : event.keyCode;
|
||||
}
|
||||
|
||||
// Add which for click: 1 === left; 2 === middle; 3 === right
|
||||
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
||||
if ( button & 1 ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( button & 2 ) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
if ( button & 4 ) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return event.which;
|
||||
}
|
||||
which: true
|
||||
}, jQuery.event.addProp );
|
||||
|
||||
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
||||
|
@ -5874,6 +5854,12 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|||
return true;
|
||||
},
|
||||
|
||||
// Suppress native focus or blur as it's already being fired
|
||||
// in leverageNative.
|
||||
_default: function() {
|
||||
return true;
|
||||
},
|
||||
|
||||
delegateType: delegateType
|
||||
};
|
||||
} );
|
||||
|
@ -6541,6 +6527,10 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|||
// set in CSS while `offset*` properties report correct values.
|
||||
// Behavior in IE 9 is more subtle than in newer versions & it passes
|
||||
// some versions of this test; make sure not to make it pass there!
|
||||
//
|
||||
// Support: Firefox 70+
|
||||
// Only Firefox includes border widths
|
||||
// in computed dimensions. (gh-4529)
|
||||
reliableTrDimensions: function() {
|
||||
var table, tr, trChild, trStyle;
|
||||
if ( reliableTrDimensionsVal == null ) {
|
||||
|
@ -6548,17 +6538,32 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|||
tr = document.createElement( "tr" );
|
||||
trChild = document.createElement( "div" );
|
||||
|
||||
table.style.cssText = "position:absolute;left:-11111px";
|
||||
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
|
||||
tr.style.cssText = "border:1px solid";
|
||||
|
||||
// Support: Chrome 86+
|
||||
// Height set through cssText does not get applied.
|
||||
// Computed height then comes back as 0.
|
||||
tr.style.height = "1px";
|
||||
trChild.style.height = "9px";
|
||||
|
||||
// Support: Android 8 Chrome 86+
|
||||
// In our bodyBackground.html iframe,
|
||||
// display for all div elements is set to "inline",
|
||||
// which causes a problem only in Android 8 Chrome 86.
|
||||
// Ensuring the div is display: block
|
||||
// gets around this issue.
|
||||
trChild.style.display = "block";
|
||||
|
||||
documentElement
|
||||
.appendChild( table )
|
||||
.appendChild( tr )
|
||||
.appendChild( trChild );
|
||||
|
||||
trStyle = window.getComputedStyle( tr );
|
||||
reliableTrDimensionsVal = parseInt( trStyle.height ) > 3;
|
||||
reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
|
||||
parseInt( trStyle.borderTopWidth, 10 ) +
|
||||
parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;
|
||||
|
||||
documentElement.removeChild( table );
|
||||
}
|
||||
|
@ -7761,6 +7766,7 @@ jQuery.fn.extend( {
|
|||
anim.stop( true );
|
||||
}
|
||||
};
|
||||
|
||||
doAnimation.finish = doAnimation;
|
||||
|
||||
return empty || optall.queue === false ?
|
||||
|
@ -8707,9 +8713,7 @@ jQuery.extend( jQuery.event, {
|
|||
special.bindType || type;
|
||||
|
||||
// jQuery handler
|
||||
handle = (
|
||||
dataPriv.get( cur, "events" ) || Object.create( null )
|
||||
)[ event.type ] &&
|
||||
handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
|
||||
dataPriv.get( cur, "handle" );
|
||||
if ( handle ) {
|
||||
handle.apply( cur, data );
|
||||
|
@ -8856,7 +8860,7 @@ var rquery = ( /\?/ );
|
|||
|
||||
// Cross-browser xml parsing
|
||||
jQuery.parseXML = function( data ) {
|
||||
var xml;
|
||||
var xml, parserErrorElem;
|
||||
if ( !data || typeof data !== "string" ) {
|
||||
return null;
|
||||
}
|
||||
|
@ -8865,12 +8869,17 @@ jQuery.parseXML = function( data ) {
|
|||
// IE throws on parseFromString with invalid input.
|
||||
try {
|
||||
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
||||
} catch ( e ) {
|
||||
xml = undefined;
|
||||
}
|
||||
} catch ( e ) {}
|
||||
|
||||
if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
|
||||
jQuery.error( "Invalid XML: " + data );
|
||||
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
||||
if ( !xml || parserErrorElem ) {
|
||||
jQuery.error( "Invalid XML: " + (
|
||||
parserErrorElem ?
|
||||
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
||||
return el.textContent;
|
||||
} ).join( "\n" ) :
|
||||
data
|
||||
) );
|
||||
}
|
||||
return xml;
|
||||
};
|
||||
|
@ -8971,16 +8980,14 @@ jQuery.fn.extend( {
|
|||
// Can add propHook for "elements" to filter or add form elements
|
||||
var elements = jQuery.prop( this, "elements" );
|
||||
return elements ? jQuery.makeArray( elements ) : this;
|
||||
} )
|
||||
.filter( function() {
|
||||
} ).filter( function() {
|
||||
var type = this.type;
|
||||
|
||||
// Use .is( ":disabled" ) so that fieldset[disabled] works
|
||||
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
||||
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
||||
( this.checked || !rcheckableType.test( type ) );
|
||||
} )
|
||||
.map( function( _i, elem ) {
|
||||
} ).map( function( _i, elem ) {
|
||||
var val = jQuery( this ).val();
|
||||
|
||||
if ( val == null ) {
|
||||
|
@ -9033,6 +9040,7 @@ var
|
|||
|
||||
// Anchor tag for parsing the document origin
|
||||
originAnchor = document.createElement( "a" );
|
||||
|
||||
originAnchor.href = location.href;
|
||||
|
||||
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
||||
|
@ -9727,8 +9735,10 @@ jQuery.extend( {
|
|||
response = ajaxHandleResponses( s, jqXHR, responses );
|
||||
}
|
||||
|
||||
// Use a noop converter for missing script
|
||||
if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) {
|
||||
// Use a noop converter for missing script but not if jsonp
|
||||
if ( !isSuccess &&
|
||||
jQuery.inArray( "script", s.dataTypes ) > -1 &&
|
||||
jQuery.inArray( "json", s.dataTypes ) < 0 ) {
|
||||
s.converters[ "text script" ] = function() {};
|
||||
}
|
||||
|
||||
|
@ -10466,12 +10476,6 @@ jQuery.offset = {
|
|||
options.using.call( elem, props );
|
||||
|
||||
} else {
|
||||
if ( typeof props.top === "number" ) {
|
||||
props.top += "px";
|
||||
}
|
||||
if ( typeof props.left === "number" ) {
|
||||
props.left += "px";
|
||||
}
|
||||
curElem.css( props );
|
||||
}
|
||||
}
|
||||
|
@ -10640,8 +10644,11 @@ jQuery.each( [ "top", "left" ], function( _i, prop ) {
|
|||
|
||||
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
||||
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
||||
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
|
||||
function( defaultExtra, funcName ) {
|
||||
jQuery.each( {
|
||||
padding: "inner" + name,
|
||||
content: type,
|
||||
"": "outer" + name
|
||||
}, function( defaultExtra, funcName ) {
|
||||
|
||||
// Margin is only for outerHeight, outerWidth
|
||||
jQuery.fn[ funcName ] = function( margin, value ) {
|
||||
|
@ -10726,7 +10733,8 @@ jQuery.fn.extend( {
|
|||
}
|
||||
} );
|
||||
|
||||
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
||||
jQuery.each(
|
||||
( "blur focus focusin focusout resize scroll click dblclick " +
|
||||
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
||||
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
||||
function( _i, name ) {
|
||||
|
@ -10737,7 +10745,8 @@ jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
|||
this.on( name, null, data, fn ) :
|
||||
this.trigger( name );
|
||||
};
|
||||
} );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
Binary file not shown.
|
@ -1,15 +1,15 @@
|
|||
/*!
|
||||
* jQuery JavaScript Library v3.5.1
|
||||
* jQuery JavaScript Library v3.6.0
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Copyright OpenJS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2020-05-04T22:49Z
|
||||
* Date: 2021-03-02T17:08Z
|
||||
*/
|
||||
( function( global, factory ) {
|
||||
|
||||
|
@ -80,7 +80,11 @@ var isFunction = function isFunction( obj ) {
|
|||
// In some browsers, typeof returns "function" for HTML <object> elements
|
||||
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
||||
// We don't want to classify *any* DOM node as a function.
|
||||
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
||||
// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
|
||||
// Plus for old WebKit, typeof returns "function" for HTML collections
|
||||
// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
|
||||
return typeof obj === "function" && typeof obj.nodeType !== "number" &&
|
||||
typeof obj.item !== "function";
|
||||
};
|
||||
|
||||
|
||||
|
@ -147,7 +151,7 @@ function toType( obj ) {
|
|||
|
||||
|
||||
var
|
||||
version = "3.5.1",
|
||||
version = "3.6.0",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
|
@ -518,14 +522,14 @@ function isArrayLike( obj ) {
|
|||
}
|
||||
var Sizzle =
|
||||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.5
|
||||
* Sizzle CSS Selector Engine v2.3.6
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2020-03-14
|
||||
* Date: 2021-02-16
|
||||
*/
|
||||
( function( window ) {
|
||||
var i,
|
||||
|
@ -1108,8 +1112,8 @@ support = Sizzle.support = {};
|
|||
* @returns {Boolean} True iff elem is a non-HTML XML node
|
||||
*/
|
||||
isXML = Sizzle.isXML = function( elem ) {
|
||||
var namespace = elem.namespaceURI,
|
||||
docElem = ( elem.ownerDocument || elem ).documentElement;
|
||||
var namespace = elem && elem.namespaceURI,
|
||||
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
||||
|
||||
// Support: IE <=8
|
||||
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
||||
|
@ -3026,7 +3030,7 @@ function nodeName( elem, name ) {
|
|||
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
|
||||
};
|
||||
}
|
||||
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
||||
|
||||
|
||||
|
@ -3997,8 +4001,8 @@ jQuery.extend( {
|
|||
resolveContexts = Array( i ),
|
||||
resolveValues = slice.call( arguments ),
|
||||
|
||||
// the master Deferred
|
||||
master = jQuery.Deferred(),
|
||||
// the primary Deferred
|
||||
primary = jQuery.Deferred(),
|
||||
|
||||
// subordinate callback factory
|
||||
updateFunc = function( i ) {
|
||||
|
@ -4006,30 +4010,30 @@ jQuery.extend( {
|
|||
resolveContexts[ i ] = this;
|
||||
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
||||
if ( !( --remaining ) ) {
|
||||
master.resolveWith( resolveContexts, resolveValues );
|
||||
primary.resolveWith( resolveContexts, resolveValues );
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// Single- and empty arguments are adopted like Promise.resolve
|
||||
if ( remaining <= 1 ) {
|
||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
|
||||
adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
|
||||
!remaining );
|
||||
|
||||
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
||||
if ( master.state() === "pending" ||
|
||||
if ( primary.state() === "pending" ||
|
||||
isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
||||
|
||||
return master.then();
|
||||
return primary.then();
|
||||
}
|
||||
}
|
||||
|
||||
// Multiple arguments are aggregated like Promise.all array elements
|
||||
while ( i-- ) {
|
||||
adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
|
||||
adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
|
||||
}
|
||||
|
||||
return master.promise();
|
||||
return primary.promise();
|
||||
}
|
||||
} );
|
||||
|
||||
|
@ -5089,10 +5093,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|||
}
|
||||
|
||||
|
||||
var
|
||||
rkeyEvent = /^key/,
|
||||
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
|
||||
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
||||
var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
||||
|
||||
function returnTrue() {
|
||||
return true;
|
||||
|
@ -5656,7 +5657,13 @@ function leverageNative( el, type, expectSync ) {
|
|||
// Cancel the outer synthetic event
|
||||
event.stopImmediatePropagation();
|
||||
event.preventDefault();
|
||||
return result.value;
|
||||
|
||||
// Support: Chrome 86+
|
||||
// In Chrome, if an element having a focusout handler is blurred by
|
||||
// clicking outside of it, it invokes the handler synchronously. If
|
||||
// that handler calls `.remove()` on the element, the data is cleared,
|
||||
// leaving `result` undefined. We need to guard against this.
|
||||
return result && result.value;
|
||||
}
|
||||
|
||||
// If this is an inner synthetic event for an event with a bubbling surrogate
|
||||
|
@ -5821,34 +5828,7 @@ jQuery.each( {
|
|||
targetTouches: true,
|
||||
toElement: true,
|
||||
touches: true,
|
||||
|
||||
which: function( event ) {
|
||||
var button = event.button;
|
||||
|
||||
// Add which for key events
|
||||
if ( event.which == null && rkeyEvent.test( event.type ) ) {
|
||||
return event.charCode != null ? event.charCode : event.keyCode;
|
||||
}
|
||||
|
||||
// Add which for click: 1 === left; 2 === middle; 3 === right
|
||||
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
||||
if ( button & 1 ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( button & 2 ) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
if ( button & 4 ) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return event.which;
|
||||
}
|
||||
which: true
|
||||
}, jQuery.event.addProp );
|
||||
|
||||
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
||||
|
@ -5874,6 +5854,12 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|||
return true;
|
||||
},
|
||||
|
||||
// Suppress native focus or blur as it's already being fired
|
||||
// in leverageNative.
|
||||
_default: function() {
|
||||
return true;
|
||||
},
|
||||
|
||||
delegateType: delegateType
|
||||
};
|
||||
} );
|
||||
|
@ -6541,6 +6527,10 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|||
// set in CSS while `offset*` properties report correct values.
|
||||
// Behavior in IE 9 is more subtle than in newer versions & it passes
|
||||
// some versions of this test; make sure not to make it pass there!
|
||||
//
|
||||
// Support: Firefox 70+
|
||||
// Only Firefox includes border widths
|
||||
// in computed dimensions. (gh-4529)
|
||||
reliableTrDimensions: function() {
|
||||
var table, tr, trChild, trStyle;
|
||||
if ( reliableTrDimensionsVal == null ) {
|
||||
|
@ -6548,17 +6538,32 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|||
tr = document.createElement( "tr" );
|
||||
trChild = document.createElement( "div" );
|
||||
|
||||
table.style.cssText = "position:absolute;left:-11111px";
|
||||
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
|
||||
tr.style.cssText = "border:1px solid";
|
||||
|
||||
// Support: Chrome 86+
|
||||
// Height set through cssText does not get applied.
|
||||
// Computed height then comes back as 0.
|
||||
tr.style.height = "1px";
|
||||
trChild.style.height = "9px";
|
||||
|
||||
// Support: Android 8 Chrome 86+
|
||||
// In our bodyBackground.html iframe,
|
||||
// display for all div elements is set to "inline",
|
||||
// which causes a problem only in Android 8 Chrome 86.
|
||||
// Ensuring the div is display: block
|
||||
// gets around this issue.
|
||||
trChild.style.display = "block";
|
||||
|
||||
documentElement
|
||||
.appendChild( table )
|
||||
.appendChild( tr )
|
||||
.appendChild( trChild );
|
||||
|
||||
trStyle = window.getComputedStyle( tr );
|
||||
reliableTrDimensionsVal = parseInt( trStyle.height ) > 3;
|
||||
reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
|
||||
parseInt( trStyle.borderTopWidth, 10 ) +
|
||||
parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;
|
||||
|
||||
documentElement.removeChild( table );
|
||||
}
|
||||
|
@ -7761,6 +7766,7 @@ jQuery.fn.extend( {
|
|||
anim.stop( true );
|
||||
}
|
||||
};
|
||||
|
||||
doAnimation.finish = doAnimation;
|
||||
|
||||
return empty || optall.queue === false ?
|
||||
|
@ -8707,9 +8713,7 @@ jQuery.extend( jQuery.event, {
|
|||
special.bindType || type;
|
||||
|
||||
// jQuery handler
|
||||
handle = (
|
||||
dataPriv.get( cur, "events" ) || Object.create( null )
|
||||
)[ event.type ] &&
|
||||
handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
|
||||
dataPriv.get( cur, "handle" );
|
||||
if ( handle ) {
|
||||
handle.apply( cur, data );
|
||||
|
@ -8856,7 +8860,7 @@ var rquery = ( /\?/ );
|
|||
|
||||
// Cross-browser xml parsing
|
||||
jQuery.parseXML = function( data ) {
|
||||
var xml;
|
||||
var xml, parserErrorElem;
|
||||
if ( !data || typeof data !== "string" ) {
|
||||
return null;
|
||||
}
|
||||
|
@ -8865,12 +8869,17 @@ jQuery.parseXML = function( data ) {
|
|||
// IE throws on parseFromString with invalid input.
|
||||
try {
|
||||
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
||||
} catch ( e ) {
|
||||
xml = undefined;
|
||||
}
|
||||
} catch ( e ) {}
|
||||
|
||||
if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
|
||||
jQuery.error( "Invalid XML: " + data );
|
||||
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
||||
if ( !xml || parserErrorElem ) {
|
||||
jQuery.error( "Invalid XML: " + (
|
||||
parserErrorElem ?
|
||||
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
||||
return el.textContent;
|
||||
} ).join( "\n" ) :
|
||||
data
|
||||
) );
|
||||
}
|
||||
return xml;
|
||||
};
|
||||
|
@ -8971,16 +8980,14 @@ jQuery.fn.extend( {
|
|||
// Can add propHook for "elements" to filter or add form elements
|
||||
var elements = jQuery.prop( this, "elements" );
|
||||
return elements ? jQuery.makeArray( elements ) : this;
|
||||
} )
|
||||
.filter( function() {
|
||||
} ).filter( function() {
|
||||
var type = this.type;
|
||||
|
||||
// Use .is( ":disabled" ) so that fieldset[disabled] works
|
||||
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
||||
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
||||
( this.checked || !rcheckableType.test( type ) );
|
||||
} )
|
||||
.map( function( _i, elem ) {
|
||||
} ).map( function( _i, elem ) {
|
||||
var val = jQuery( this ).val();
|
||||
|
||||
if ( val == null ) {
|
||||
|
@ -9033,6 +9040,7 @@ var
|
|||
|
||||
// Anchor tag for parsing the document origin
|
||||
originAnchor = document.createElement( "a" );
|
||||
|
||||
originAnchor.href = location.href;
|
||||
|
||||
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
||||
|
@ -9727,8 +9735,10 @@ jQuery.extend( {
|
|||
response = ajaxHandleResponses( s, jqXHR, responses );
|
||||
}
|
||||
|
||||
// Use a noop converter for missing script
|
||||
if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) {
|
||||
// Use a noop converter for missing script but not if jsonp
|
||||
if ( !isSuccess &&
|
||||
jQuery.inArray( "script", s.dataTypes ) > -1 &&
|
||||
jQuery.inArray( "json", s.dataTypes ) < 0 ) {
|
||||
s.converters[ "text script" ] = function() {};
|
||||
}
|
||||
|
||||
|
@ -10466,12 +10476,6 @@ jQuery.offset = {
|
|||
options.using.call( elem, props );
|
||||
|
||||
} else {
|
||||
if ( typeof props.top === "number" ) {
|
||||
props.top += "px";
|
||||
}
|
||||
if ( typeof props.left === "number" ) {
|
||||
props.left += "px";
|
||||
}
|
||||
curElem.css( props );
|
||||
}
|
||||
}
|
||||
|
@ -10640,8 +10644,11 @@ jQuery.each( [ "top", "left" ], function( _i, prop ) {
|
|||
|
||||
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
||||
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
||||
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
|
||||
function( defaultExtra, funcName ) {
|
||||
jQuery.each( {
|
||||
padding: "inner" + name,
|
||||
content: type,
|
||||
"": "outer" + name
|
||||
}, function( defaultExtra, funcName ) {
|
||||
|
||||
// Margin is only for outerHeight, outerWidth
|
||||
jQuery.fn[ funcName ] = function( margin, value ) {
|
||||
|
@ -10726,7 +10733,8 @@ jQuery.fn.extend( {
|
|||
}
|
||||
} );
|
||||
|
||||
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
||||
jQuery.each(
|
||||
( "blur focus focusin focusout resize scroll click dblclick " +
|
||||
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
||||
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
||||
function( _i, name ) {
|
||||
|
@ -10737,7 +10745,8 @@ jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
|||
this.on( name, null, data, fn ) :
|
||||
this.trigger( name );
|
||||
};
|
||||
} );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -13918,7 +13918,7 @@ Popper.Defaults = Defaults;
|
|||
return Popper;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=popper.js.map
|
||||
|
||||
|
||||
/*!
|
||||
* Bootstrap v4.6.1 (https://getbootstrap.com/)
|
||||
|
@ -18276,7 +18276,7 @@ return Popper;
|
|||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=bootstrap.js.map
|
||||
|
||||
|
||||
//! moment.js
|
||||
//! version : 2.29.1
|
||||
|
@ -25143,6 +25143,138 @@ return Popper;
|
|||
|
||||
})));
|
||||
|
||||
//! moment.js locale configuration
|
||||
//! locale : Chinese (China) [zh-cn]
|
||||
//! author : suupic : https://github.com/suupic
|
||||
//! author : Zeno Zeng : https://github.com/zenozeng
|
||||
//! author : uu109 : https://github.com/uu109
|
||||
|
||||
;(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined'
|
||||
&& typeof require === 'function' ? factory(require('../moment')) :
|
||||
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
||||
factory(global.moment)
|
||||
}(this, (function (moment) { 'use strict';
|
||||
|
||||
//! moment.js locale configuration
|
||||
|
||||
var zhCn = moment.defineLocale('zh-cn', {
|
||||
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
|
||||
'_'
|
||||
),
|
||||
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
|
||||
'_'
|
||||
),
|
||||
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
|
||||
weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
|
||||
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
|
||||
longDateFormat: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'YYYY/MM/DD',
|
||||
LL: 'YYYY年M月D日',
|
||||
LLL: 'YYYY年M月D日Ah点mm分',
|
||||
LLLL: 'YYYY年M月D日ddddAh点mm分',
|
||||
l: 'YYYY/M/D',
|
||||
ll: 'YYYY年M月D日',
|
||||
lll: 'YYYY年M月D日 HH:mm',
|
||||
llll: 'YYYY年M月D日dddd HH:mm',
|
||||
},
|
||||
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
|
||||
meridiemHour: function (hour, meridiem) {
|
||||
if (hour === 12) {
|
||||
hour = 0;
|
||||
}
|
||||
if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
|
||||
return hour;
|
||||
} else if (meridiem === '下午' || meridiem === '晚上') {
|
||||
return hour + 12;
|
||||
} else {
|
||||
// '中午'
|
||||
return hour >= 11 ? hour : hour + 12;
|
||||
}
|
||||
},
|
||||
meridiem: function (hour, minute, isLower) {
|
||||
var hm = hour * 100 + minute;
|
||||
if (hm < 600) {
|
||||
return '凌晨';
|
||||
} else if (hm < 900) {
|
||||
return '早上';
|
||||
} else if (hm < 1130) {
|
||||
return '上午';
|
||||
} else if (hm < 1230) {
|
||||
return '中午';
|
||||
} else if (hm < 1800) {
|
||||
return '下午';
|
||||
} else {
|
||||
return '晚上';
|
||||
}
|
||||
},
|
||||
calendar: {
|
||||
sameDay: '[今天]LT',
|
||||
nextDay: '[明天]LT',
|
||||
nextWeek: function (now) {
|
||||
if (now.week() !== this.week()) {
|
||||
return '[下]dddLT';
|
||||
} else {
|
||||
return '[本]dddLT';
|
||||
}
|
||||
},
|
||||
lastDay: '[昨天]LT',
|
||||
lastWeek: function (now) {
|
||||
if (this.week() !== now.week()) {
|
||||
return '[上]dddLT';
|
||||
} else {
|
||||
return '[本]dddLT';
|
||||
}
|
||||
},
|
||||
sameElse: 'L',
|
||||
},
|
||||
dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
|
||||
ordinal: function (number, period) {
|
||||
switch (period) {
|
||||
case 'd':
|
||||
case 'D':
|
||||
case 'DDD':
|
||||
return number + '日';
|
||||
case 'M':
|
||||
return number + '月';
|
||||
case 'w':
|
||||
case 'W':
|
||||
return number + '周';
|
||||
default:
|
||||
return number;
|
||||
}
|
||||
},
|
||||
relativeTime: {
|
||||
future: '%s后',
|
||||
past: '%s前',
|
||||
s: '几秒',
|
||||
ss: '%d 秒',
|
||||
m: '1 分钟',
|
||||
mm: '%d 分钟',
|
||||
h: '1 小时',
|
||||
hh: '%d 小时',
|
||||
d: '1 天',
|
||||
dd: '%d 天',
|
||||
w: '1 周',
|
||||
ww: '%d 周',
|
||||
M: '1 个月',
|
||||
MM: '%d 个月',
|
||||
y: '1 年',
|
||||
yy: '%d 年',
|
||||
},
|
||||
week: {
|
||||
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
});
|
||||
|
||||
return zhCn;
|
||||
|
||||
})));
|
||||
|
||||
//! moment-timezone.js
|
||||
//! version : 0.5.34
|
||||
//! Copyright (c) JS Foundation and other contributors
|
Binary file not shown.
Binary file not shown.
|
@ -13918,7 +13918,7 @@ Popper.Defaults = Defaults;
|
|||
return Popper;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=popper.js.map
|
||||
|
||||
|
||||
/*!
|
||||
* Bootstrap v4.6.1 (https://getbootstrap.com/)
|
||||
|
@ -18276,7 +18276,7 @@ return Popper;
|
|||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=bootstrap.js.map
|
||||
|
||||
|
||||
//! moment.js
|
||||
//! version : 2.29.1
|
||||
|
@ -25143,6 +25143,138 @@ return Popper;
|
|||
|
||||
})));
|
||||
|
||||
//! moment.js locale configuration
|
||||
//! locale : Chinese (China) [zh-cn]
|
||||
//! author : suupic : https://github.com/suupic
|
||||
//! author : Zeno Zeng : https://github.com/zenozeng
|
||||
//! author : uu109 : https://github.com/uu109
|
||||
|
||||
;(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined'
|
||||
&& typeof require === 'function' ? factory(require('../moment')) :
|
||||
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
||||
factory(global.moment)
|
||||
}(this, (function (moment) { 'use strict';
|
||||
|
||||
//! moment.js locale configuration
|
||||
|
||||
var zhCn = moment.defineLocale('zh-cn', {
|
||||
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
|
||||
'_'
|
||||
),
|
||||
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
|
||||
'_'
|
||||
),
|
||||
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
|
||||
weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
|
||||
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
|
||||
longDateFormat: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'YYYY/MM/DD',
|
||||
LL: 'YYYY年M月D日',
|
||||
LLL: 'YYYY年M月D日Ah点mm分',
|
||||
LLLL: 'YYYY年M月D日ddddAh点mm分',
|
||||
l: 'YYYY/M/D',
|
||||
ll: 'YYYY年M月D日',
|
||||
lll: 'YYYY年M月D日 HH:mm',
|
||||
llll: 'YYYY年M月D日dddd HH:mm',
|
||||
},
|
||||
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
|
||||
meridiemHour: function (hour, meridiem) {
|
||||
if (hour === 12) {
|
||||
hour = 0;
|
||||
}
|
||||
if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
|
||||
return hour;
|
||||
} else if (meridiem === '下午' || meridiem === '晚上') {
|
||||
return hour + 12;
|
||||
} else {
|
||||
// '中午'
|
||||
return hour >= 11 ? hour : hour + 12;
|
||||
}
|
||||
},
|
||||
meridiem: function (hour, minute, isLower) {
|
||||
var hm = hour * 100 + minute;
|
||||
if (hm < 600) {
|
||||
return '凌晨';
|
||||
} else if (hm < 900) {
|
||||
return '早上';
|
||||
} else if (hm < 1130) {
|
||||
return '上午';
|
||||
} else if (hm < 1230) {
|
||||
return '中午';
|
||||
} else if (hm < 1800) {
|
||||
return '下午';
|
||||
} else {
|
||||
return '晚上';
|
||||
}
|
||||
},
|
||||
calendar: {
|
||||
sameDay: '[今天]LT',
|
||||
nextDay: '[明天]LT',
|
||||
nextWeek: function (now) {
|
||||
if (now.week() !== this.week()) {
|
||||
return '[下]dddLT';
|
||||
} else {
|
||||
return '[本]dddLT';
|
||||
}
|
||||
},
|
||||
lastDay: '[昨天]LT',
|
||||
lastWeek: function (now) {
|
||||
if (this.week() !== now.week()) {
|
||||
return '[上]dddLT';
|
||||
} else {
|
||||
return '[本]dddLT';
|
||||
}
|
||||
},
|
||||
sameElse: 'L',
|
||||
},
|
||||
dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
|
||||
ordinal: function (number, period) {
|
||||
switch (period) {
|
||||
case 'd':
|
||||
case 'D':
|
||||
case 'DDD':
|
||||
return number + '日';
|
||||
case 'M':
|
||||
return number + '月';
|
||||
case 'w':
|
||||
case 'W':
|
||||
return number + '周';
|
||||
default:
|
||||
return number;
|
||||
}
|
||||
},
|
||||
relativeTime: {
|
||||
future: '%s后',
|
||||
past: '%s前',
|
||||
s: '几秒',
|
||||
ss: '%d 秒',
|
||||
m: '1 分钟',
|
||||
mm: '%d 分钟',
|
||||
h: '1 小时',
|
||||
hh: '%d 小时',
|
||||
d: '1 天',
|
||||
dd: '%d 天',
|
||||
w: '1 周',
|
||||
ww: '%d 周',
|
||||
M: '1 个月',
|
||||
MM: '%d 个月',
|
||||
y: '1 年',
|
||||
yy: '%d 年',
|
||||
},
|
||||
week: {
|
||||
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
|
||||
dow: 1, // Monday is the first day of the week.
|
||||
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
||||
},
|
||||
});
|
||||
|
||||
return zhCn;
|
||||
|
||||
})));
|
||||
|
||||
//! moment-timezone.js
|
||||
//! version : 0.5.34
|
||||
//! Copyright (c) JS Foundation and other contributors
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue