Ignore:
Timestamp:
Jun 24, 2014, 10:16:59 PM (10 years ago)
Author:
rvelices
Message:

upgrade jquery ui from 1.10.1 to 1.10.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/js/ui/jquery.ui.datepicker.js

    r20824 r28780  
    11/*!
    2  * jQuery UI Datepicker 1.10.1
     2 * jQuery UI Datepicker 1.10.4
    33 * http://jqueryui.com
    44 *
    5  * Copyright 2013 jQuery Foundation and other contributors
     5 * Copyright 2014 jQuery Foundation and other contributors
    66 * Released under the MIT license.
    77 * http://jquery.org/license
     
    1414(function( $, undefined ) {
    1515
    16 $.extend($.ui, { datepicker: { version: "1.10.1" } });
     16$.extend($.ui, { datepicker: { version: "1.10.4" } });
    1717
    1818var PROP_NAME = "datepicker",
    19         dpuuid = new Date().getTime(),
    2019        instActive;
    2120
     
    754753                        }
    755754
    756                         if (inst.input.is(":visible") && !inst.input.is(":disabled")) {
     755                        if ( $.datepicker._shouldFocusInput( inst ) ) {
    757756                                inst.input.focus();
    758757                        }
     758
    759759                        $.datepicker._curInst = inst;
    760760                }
     
    783783                        "Class"]("ui-datepicker-rtl");
    784784
    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 ) ) {
    789786                        inst.input.focus();
    790787                }
     
    803800        },
    804801
    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" );
    815807        },
    816808
     
    15591551                        var handler = {
    15601552                                prev: function () {
    1561                                         window["DP_jQuery_" + dpuuid].datepicker._adjustDate(id, -stepMonths, "M");
     1553                                        $.datepicker._adjustDate(id, -stepMonths, "M");
    15621554                                },
    15631555                                next: function () {
    1564                                         window["DP_jQuery_" + dpuuid].datepicker._adjustDate(id, +stepMonths, "M");
     1556                                        $.datepicker._adjustDate(id, +stepMonths, "M");
    15651557                                },
    15661558                                hide: function () {
    1567                                         window["DP_jQuery_" + dpuuid].datepicker._hideDatepicker();
     1559                                        $.datepicker._hideDatepicker();
    15681560                                },
    15691561                                today: function () {
    1570                                         window["DP_jQuery_" + dpuuid].datepicker._gotoToday(id);
     1562                                        $.datepicker._gotoToday(id);
    15711563                                },
    15721564                                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);
    15741566                                        return false;
    15751567                                },
    15761568                                selectMonth: function () {
    1577                                         window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(id, this, "M");
     1569                                        $.datepicker._selectMonthYear(id, this, "M");
    15781570                                        return false;
    15791571                                },
    15801572                                selectYear: function () {
    1581                                         window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(id, this, "Y");
     1573                                        $.datepicker._selectMonthYear(id, this, "Y");
    15821574                                        return false;
    15831575                                }
     
    20422034$.datepicker.initialized = false;
    20432035$.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";
    20492037
    20502038})(jQuery);
Note: See TracChangeset for help on using the changeset viewer.