mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Change Uglify to Uglify-JS
This commit is contained in:
parent
af7dbc036b
commit
1621ce716c
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.idea
|
||||
node_modules
|
8
.idea/codeStyles/Project.xml
Normal file
8
.idea/codeStyles/Project.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<option name="LINE_SEPARATOR" value=" " />
|
||||
<XML>
|
||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||
</XML>
|
||||
</code_scheme>
|
||||
</component>
|
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
|
||||
</state>
|
||||
</component>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -699,7 +699,7 @@ var datetimepickerFactory = function ($) {
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// for locale settings
|
||||
$.datetimepicker = {
|
||||
@ -734,11 +734,12 @@ var datetimepickerFactory = function ($) {
|
||||
RFC_1123: 'D, d M Y H:i:s O',
|
||||
RSS: 'D, d M Y H:i:s O',
|
||||
W3C: 'Y-m-d\TH:i:sP'
|
||||
}
|
||||
};
|
||||
|
||||
var isFormatStandard = function(format) {
|
||||
return Object.values(standardFormats).indexOf(format) === -1 ? false : true;
|
||||
}
|
||||
return $.map(standardFormats, function (val) { return val })
|
||||
.indexOf(format) === -1 ? false : true;
|
||||
};
|
||||
|
||||
$.extend($.datetimepicker, standardFormats);
|
||||
|
||||
@ -904,7 +905,7 @@ var datetimepickerFactory = function ($) {
|
||||
timeboxparent.on('mousewheel', function (event) {
|
||||
var top = Math.abs(parseInt(timebox.css('marginTop'), 10));
|
||||
|
||||
top = top - (event.deltaY * 20);
|
||||
top = top + (event.originalEvent.deltaY * 20);
|
||||
if (top < 0) {
|
||||
top = 0;
|
||||
}
|
||||
@ -959,6 +960,7 @@ var datetimepickerFactory = function ($) {
|
||||
ZKEY = 90,
|
||||
YKEY = 89,
|
||||
ctrlDown = false,
|
||||
isClosed = false,
|
||||
options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options),
|
||||
|
||||
lazyInitTimer = 0,
|
||||
@ -1075,7 +1077,7 @@ var datetimepickerFactory = function ($) {
|
||||
if(distance > options.touchMovedThreshold) {
|
||||
this.touchMoved = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
month_picker
|
||||
.find('.xdsoft_select')
|
||||
@ -2233,6 +2235,7 @@ var datetimepickerFactory = function ($) {
|
||||
datetimepicker
|
||||
.on('open.xdsoft', function (event) {
|
||||
var onShow = true;
|
||||
isClosed = false;
|
||||
if (options.onShow && $.isFunction(options.onShow)) {
|
||||
onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
|
||||
}
|
||||
@ -2253,6 +2256,12 @@ var datetimepickerFactory = function ($) {
|
||||
})
|
||||
.on('close.xdsoft', function (event) {
|
||||
var onClose = true;
|
||||
event.stopPropagation();
|
||||
|
||||
if (isClosed) {
|
||||
return;
|
||||
}
|
||||
|
||||
month_picker
|
||||
.find('.xdsoft_month,.xdsoft_year')
|
||||
.find('.xdsoft_select')
|
||||
@ -2263,7 +2272,7 @@ var datetimepickerFactory = function ($) {
|
||||
if (onClose !== false && !options.opened && !options.inline) {
|
||||
datetimepicker.hide();
|
||||
}
|
||||
event.stopPropagation();
|
||||
isClosed = true;
|
||||
})
|
||||
.on('toggle.xdsoft', function () {
|
||||
if (datetimepicker.is(':visible')) {
|
||||
@ -2379,7 +2388,7 @@ var datetimepickerFactory = function ($) {
|
||||
setCaretPos(input[0], 0);
|
||||
}
|
||||
|
||||
input.on('paste.xdsoft', function (event) {
|
||||
input.off('paste.xdsoft').on('paste.xdsoft', function (event) {
|
||||
// couple options here
|
||||
// 1. return false - tell them they can't paste
|
||||
// 2. insert over current characters - minimal validation
|
||||
@ -2392,12 +2401,13 @@ var datetimepickerFactory = function ($) {
|
||||
var clipboardData = event.clipboardData || event.originalEvent.clipboardData || window.clipboardData,
|
||||
pastedData = clipboardData.getData('text'),
|
||||
val = this.value,
|
||||
pos = this.selectionStart
|
||||
pos = this.selectionStart;
|
||||
|
||||
var valueBeforeCursor = val.substr(0, pos);
|
||||
var valueAfterPaste = val.substr(pos + pastedData.length);
|
||||
|
||||
val = valueBeforeCursor + pastedData + valueAfterPaste;
|
||||
val = val.substring(0, options.mask.length);
|
||||
pos += pastedData.length;
|
||||
|
||||
if (isValidValue(options.mask, val)) {
|
||||
@ -2655,7 +2665,7 @@ var datetimepickerFactory = function ($) {
|
||||
define(['jquery', 'jquery-mousewheel'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node/CommonJS style for Browserify
|
||||
module.exports = factory(require('jquery'));;
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
|
2
build/jquery.datetimepicker.full.min.js
vendored
2
build/jquery.datetimepicker.full.min.js
vendored
File diff suppressed because one or more lines are too long
2
build/jquery.datetimepicker.min.js
vendored
2
build/jquery.datetimepicker.min.js
vendored
File diff suppressed because one or more lines are too long
1807
package-lock.json
generated
1807
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -45,7 +45,7 @@
|
||||
"karma-firefox-launcher": "^1.1.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"mocha": "^5.0.4",
|
||||
"uglifycss": "^0.0.27",
|
||||
"uglifyjs": "^2.4.10"
|
||||
"uglify-js": "^3.4.9",
|
||||
"uglifycss": "^0.0.27"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user