aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.dialog.js
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-10-28 13:25:54 +0000
committerpatdenice <patdenice@piwigo.org>2011-10-28 13:25:54 +0000
commit2a5be28bc5a0fe4748279bebe23d1be6416fe015 (patch)
tree19dc0a131baa6ad1b8fb1c96e64c153013785d81 /themes/default/js/ui/jquery.ui.dialog.js
parent3ea95e0ebcce5ecd80ac4e95879dae72e9360988 (diff)
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
Diffstat (limited to '')
-rw-r--r--themes/default/js/ui/jquery.ui.dialog.js39
1 files changed, 30 insertions, 9 deletions
diff --git a/themes/default/js/ui/jquery.ui.dialog.js b/themes/default/js/ui/jquery.ui.dialog.js
index af9fafb52..0551d9042 100644
--- a/themes/default/js/ui/jquery.ui.dialog.js
+++ b/themes/default/js/ui/jquery.ui.dialog.js
@@ -1,5 +1,5 @@
/*
- * jQuery UI Dialog 1.8.10
+ * jQuery UI Dialog 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -37,6 +37,18 @@ var uiDialogClasses =
maxWidth: true,
minHeight: true,
minWidth: true
+ },
+ // support for jQuery 1.3.2 - handle common attrFn methods for dialog
+ attrFn = $.attrFn || {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true,
+ click: true
};
$.widget("ui.dialog", {
@@ -98,7 +110,7 @@ $.widget("ui.dialog", {
// setting tabIndex makes the div focusable
// setting outline to 0 prevents a border on focus in Mozilla
.attr('tabIndex', -1).css('outline', 0).keydown(function(event) {
- if (options.closeOnEscape && event.keyCode &&
+ if (options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
event.keyCode === $.ui.keyCode.ESCAPE) {
self.close(event);
@@ -294,7 +306,7 @@ $.widget("ui.dialog", {
//Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
// http://ui.jquery.com/bugs/ticket/3193
- saveScroll = { scrollTop: self.element.attr('scrollTop'), scrollLeft: self.element.attr('scrollLeft') };
+ saveScroll = { scrollTop: self.element.scrollTop(), scrollLeft: self.element.scrollLeft() };
$.ui.dialog.maxZ += 1;
self.uiDialog.css('z-index', $.ui.dialog.maxZ);
self.element.attr(saveScroll);
@@ -376,12 +388,21 @@ $.widget("ui.dialog", {
{ click: props, text: name } :
props;
var button = $('<button type="button"></button>')
- .attr( props, true )
- .unbind('click')
.click(function() {
props.click.apply(self.element[0], arguments);
})
.appendTo(uiButtonSet);
+ // can't use .attr( props, true ) with jQuery 1.3.2.
+ $.each( props, function( key, value ) {
+ if ( key === "click" ) {
+ return;
+ }
+ if ( key in attrFn ) {
+ button[ key ]( value );
+ } else {
+ button.attr( key, value );
+ }
+ });
if ($.fn.button) {
button.button();
}
@@ -681,7 +702,7 @@ $.widget("ui.dialog", {
});
$.extend($.ui.dialog, {
- version: "1.8.10",
+ version: "1.8.16",
uuid: 0,
maxZ: 0,
@@ -727,7 +748,7 @@ $.extend($.ui.dialog.overlay, {
// allow closing by pressing the escape key
$(document).bind('keydown.dialog-overlay', function(event) {
- if (dialog.options.closeOnEscape && event.keyCode &&
+ if (dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
event.keyCode === $.ui.keyCode.ESCAPE) {
dialog.close(event);
@@ -802,8 +823,8 @@ $.extend($.ui.dialog.overlay, {
width: function() {
var scrollWidth,
offsetWidth;
- // handle IE 6
- if ($.browser.msie && $.browser.version < 7) {
+ // handle IE
+ if ( $.browser.msie ) {
scrollWidth = Math.max(
document.documentElement.scrollWidth,
document.body.scrollWidth