Changeset 28780 for trunk/themes/default/js/ui/jquery.ui.datepicker.js
- Timestamp:
- Jun 24, 2014, 10:16:59 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/js/ui/jquery.ui.datepicker.js
r20824 r28780 1 1 /*! 2 * jQuery UI Datepicker 1.10. 12 * jQuery UI Datepicker 1.10.4 3 3 * http://jqueryui.com 4 4 * 5 * Copyright 201 3jQuery Foundation and other contributors5 * Copyright 2014 jQuery Foundation and other contributors 6 6 * Released under the MIT license. 7 7 * http://jquery.org/license … … 14 14 (function( $, undefined ) { 15 15 16 $.extend($.ui, { datepicker: { version: "1.10. 1" } });16 $.extend($.ui, { datepicker: { version: "1.10.4" } }); 17 17 18 18 var PROP_NAME = "datepicker", 19 dpuuid = new Date().getTime(),20 19 instActive; 21 20 … … 754 753 } 755 754 756 if ( inst.input.is(":visible") && !inst.input.is(":disabled")) {755 if ( $.datepicker._shouldFocusInput( inst ) ) { 757 756 inst.input.focus(); 758 757 } 758 759 759 $.datepicker._curInst = inst; 760 760 } … … 783 783 "Class"]("ui-datepicker-rtl"); 784 784 785 // #6694 - don't focus the input if it's already focused 786 // this breaks the change event in IE 787 if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input && 788 inst.input.is(":visible") && !inst.input.is(":disabled") && inst.input[0] !== document.activeElement) { 785 if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { 789 786 inst.input.focus(); 790 787 } … … 803 800 }, 804 801 805 /* Retrieve the size of left and top borders for an element. 806 * @param elem (jQuery object) the element of interest 807 * @return (number[2]) the left and top borders 808 */ 809 _getBorders: function(elem) { 810 var convert = function(value) { 811 return {thin: 1, medium: 2, thick: 3}[value] || value; 812 }; 813 return [parseFloat(convert(elem.css("border-left-width"))), 814 parseFloat(convert(elem.css("border-top-width")))]; 802 // #6694 - don't focus the input if it's already focused 803 // this breaks the change event in IE 804 // Support: IE and jQuery <1.9 805 _shouldFocusInput: function( inst ) { 806 return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); 815 807 }, 816 808 … … 1559 1551 var handler = { 1560 1552 prev: function () { 1561 window["DP_jQuery_" + dpuuid].datepicker._adjustDate(id, -stepMonths, "M");1553 $.datepicker._adjustDate(id, -stepMonths, "M"); 1562 1554 }, 1563 1555 next: function () { 1564 window["DP_jQuery_" + dpuuid].datepicker._adjustDate(id, +stepMonths, "M");1556 $.datepicker._adjustDate(id, +stepMonths, "M"); 1565 1557 }, 1566 1558 hide: function () { 1567 window["DP_jQuery_" + dpuuid].datepicker._hideDatepicker();1559 $.datepicker._hideDatepicker(); 1568 1560 }, 1569 1561 today: function () { 1570 window["DP_jQuery_" + dpuuid].datepicker._gotoToday(id);1562 $.datepicker._gotoToday(id); 1571 1563 }, 1572 1564 selectDay: function () { 1573 window["DP_jQuery_" + dpuuid].datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);1565 $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); 1574 1566 return false; 1575 1567 }, 1576 1568 selectMonth: function () { 1577 window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(id, this, "M");1569 $.datepicker._selectMonthYear(id, this, "M"); 1578 1570 return false; 1579 1571 }, 1580 1572 selectYear: function () { 1581 window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(id, this, "Y");1573 $.datepicker._selectMonthYear(id, this, "Y"); 1582 1574 return false; 1583 1575 } … … 2042 2034 $.datepicker.initialized = false; 2043 2035 $.datepicker.uuid = new Date().getTime(); 2044 $.datepicker.version = "1.10.1"; 2045 2046 // Workaround for #4055 2047 // Add another global to avoid noConflict issues with inline event handlers 2048 window["DP_jQuery_" + dpuuid] = $; 2036 $.datepicker.version = "1.10.4"; 2049 2037 2050 2038 })(jQuery);
Note: See TracChangeset
for help on using the changeset viewer.