From 2a5be28bc5a0fe4748279bebe23d1be6416fe015 Mon Sep 17 00:00:00 2001 From: patdenice Date: Fri, 28 Oct 2011 13:25:54 +0000 Subject: feature:2487 Update jQuery to 1.6.4 and jQuery UI to 1.8.16 git-svn-id: http://piwigo.org/svn/trunk@12525 68402e56-0260-453c-a942-63ccdbb3a9ee --- themes/default/js/ui/jquery.ui.core.js | 52 +++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 23 deletions(-) (limited to 'themes/default/js/ui/jquery.ui.core.js') diff --git a/themes/default/js/ui/jquery.ui.core.js b/themes/default/js/ui/jquery.ui.core.js index 1dbfd6358..5cafb07b7 100644 --- a/themes/default/js/ui/jquery.ui.core.js +++ b/themes/default/js/ui/jquery.ui.core.js @@ -1,5 +1,5 @@ /*! - * jQuery UI 1.8.10 + * jQuery UI 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -18,7 +18,7 @@ if ( $.ui.version ) { } $.extend( $.ui, { - version: "1.8.10", + version: "1.8.16", keyCode: { ALT: 18, @@ -58,6 +58,8 @@ $.extend( $.ui, { // plugins $.fn.extend({ + propAttr: $.fn.prop || $.fn.attr, + _focus: $.fn.focus, focus: function( delay, fn ) { return typeof delay === "number" ? @@ -174,6 +176,27 @@ $.each( [ "Width", "Height" ], function( i, name ) { }); // selectors +function focusable( element, isTabIndexNotNaN ) { + var nodeName = element.nodeName.toLowerCase(); + if ( "area" === nodeName ) { + var map = element.parentNode, + mapName = map.name, + img; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap=#" + mapName + "]" )[0]; + return !!img && visible( img ); + } + return ( /input|select|textarea|button|object/.test( nodeName ) + ? !element.disabled + : "a" == nodeName + ? element.href || isTabIndexNotNaN + : isTabIndexNotNaN) + // the element and all of its ancestors must be visible + && visible( element ); +} + function visible( element ) { return !$( element ).parents().andSelf().filter(function() { return $.curCSS( this, "visibility" ) === "hidden" || @@ -187,30 +210,13 @@ $.extend( $.expr[ ":" ], { }, focusable: function( element ) { - var nodeName = element.nodeName.toLowerCase(), - tabIndex = $.attr( element, "tabindex" ); - if ( "area" === nodeName ) { - var map = element.parentNode, - mapName = map.name, - img; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap=#" + mapName + "]" )[0]; - return !!img && visible( img ); - } - return ( /input|select|textarea|button|object/.test( nodeName ) - ? !element.disabled - : "a" == nodeName - ? element.href || !isNaN( tabIndex ) - : !isNaN( tabIndex )) - // the element and all of its ancestors must be visible - && visible( element ); + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); }, tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ); - return ( isNaN( tabIndex ) || tabIndex >= 0 ) && $( element ).is( ":focusable" ); + var tabIndex = $.attr( element, "tabindex" ), + isTabIndexNaN = isNaN( tabIndex ); + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); } }); -- cgit v1.2.3