From ac0ba26afc1fe5f7daf1d7f967301470b461772c Mon Sep 17 00:00:00 2001 From: patdenice Date: Mon, 7 Mar 2011 00:58:34 +0000 Subject: Update jQuery UI to 1.8.10. Improve jquery ui management in template class. git-svn-id: http://piwigo.org/svn/trunk@9559 68402e56-0260-453c-a942-63ccdbb3a9ee --- themes/default/js/ui/jquery.ui.datepicker.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'themes/default/js/ui/jquery.ui.datepicker.js') diff --git a/themes/default/js/ui/jquery.ui.datepicker.js b/themes/default/js/ui/jquery.ui.datepicker.js index 881bef44b..0e896462c 100644 --- a/themes/default/js/ui/jquery.ui.datepicker.js +++ b/themes/default/js/ui/jquery.ui.datepicker.js @@ -1,5 +1,5 @@ /* - * jQuery UI Datepicker 1.8.9 + * jQuery UI Datepicker 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -12,7 +12,7 @@ */ (function( $, undefined ) { -$.extend($.ui, { datepicker: { version: "1.8.9" } }); +$.extend($.ui, { datepicker: { version: "1.8.10" } }); var PROP_NAME = 'datepicker'; var dpuuid = new Date().getTime(); @@ -700,7 +700,9 @@ $.extend(Datepicker.prototype, { inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') + 'Class']('ui-datepicker-rtl'); if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input && - inst.input.is(':visible') && !inst.input.is(':disabled')) + // #6694 - don't focus the input if it's already focused + // this breaks the change event in IE + inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement) inst.input.focus(); // deffered render of the years select (to avoid flashes on Firefox) if( inst.yearshtml ){ @@ -752,7 +754,7 @@ $.extend(Datepicker.prototype, { _findPos: function(obj) { var inst = this._getInst(obj); var isRTL = this._get(inst, 'isRTL'); - while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) { + while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) { obj = obj[isRTL ? 'previousSibling' : 'nextSibling']; } var position = $(obj).offset(); @@ -1654,7 +1656,7 @@ $.extend(Datepicker.prototype, { /* Find the number of days in a given month. */ _getDaysInMonth: function(year, month) { - return 32 - new Date(year, month, 32).getDate(); + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); }, /* Find the day of the week of the first of a month. */ @@ -1724,7 +1726,12 @@ function isArray(a) { Object - settings for attaching new datepicker functionality @return jQuery object */ $.fn.datepicker = function(options){ - + + /* Verify an empty collection wasn't passed - Fixes #6976 */ + if ( !this.length ) { + return this; + } + /* Initialise the date picker. */ if (!$.datepicker.initialized) { $(document).mousedown($.datepicker._checkExternalClick). @@ -1750,7 +1757,7 @@ $.fn.datepicker = function(options){ $.datepicker = new Datepicker(); // singleton instance $.datepicker.initialized = false; $.datepicker.uuid = new Date().getTime(); -$.datepicker.version = "1.8.9"; +$.datepicker.version = "1.8.10"; // Workaround for #4055 // Add another global to avoid noConflict issues with inline event handlers -- cgit v1.2.3