Changeset 12525 for trunk/themes/default/js/ui/jquery.ui.dialog.js
- Timestamp:
- Oct 28, 2011, 3:25:54 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/js/ui/jquery.ui.dialog.js
r9559 r12525 1 1 /* 2 * jQuery UI Dialog 1.8.1 02 * jQuery UI Dialog 1.8.16 3 3 * 4 4 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) … … 38 38 minHeight: true, 39 39 minWidth: true 40 }, 41 // support for jQuery 1.3.2 - handle common attrFn methods for dialog 42 attrFn = $.attrFn || { 43 val: true, 44 css: true, 45 html: true, 46 text: true, 47 data: true, 48 width: true, 49 height: true, 50 offset: true, 51 click: true 40 52 }; 41 53 … … 99 111 // setting outline to 0 prevents a border on focus in Mozilla 100 112 .attr('tabIndex', -1).css('outline', 0).keydown(function(event) { 101 if (options.closeOnEscape && event.keyCode &&113 if (options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && 102 114 event.keyCode === $.ui.keyCode.ESCAPE) { 103 115 … … 295 307 //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed. 296 308 // http://ui.jquery.com/bugs/ticket/3193 297 saveScroll = { scrollTop: self.element. attr('scrollTop'), scrollLeft: self.element.attr('scrollLeft') };309 saveScroll = { scrollTop: self.element.scrollTop(), scrollLeft: self.element.scrollLeft() }; 298 310 $.ui.dialog.maxZ += 1; 299 311 self.uiDialog.css('z-index', $.ui.dialog.maxZ); … … 377 389 props; 378 390 var button = $('<button type="button"></button>') 379 .attr( props, true )380 .unbind('click')381 391 .click(function() { 382 392 props.click.apply(self.element[0], arguments); 383 393 }) 384 394 .appendTo(uiButtonSet); 395 // can't use .attr( props, true ) with jQuery 1.3.2. 396 $.each( props, function( key, value ) { 397 if ( key === "click" ) { 398 return; 399 } 400 if ( key in attrFn ) { 401 button[ key ]( value ); 402 } else { 403 button.attr( key, value ); 404 } 405 }); 385 406 if ($.fn.button) { 386 407 button.button(); … … 682 703 683 704 $.extend($.ui.dialog, { 684 version: "1.8.1 0",705 version: "1.8.16", 685 706 686 707 uuid: 0, … … 728 749 // allow closing by pressing the escape key 729 750 $(document).bind('keydown.dialog-overlay', function(event) { 730 if (dialog.options.closeOnEscape && event.keyCode &&751 if (dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && 731 752 event.keyCode === $.ui.keyCode.ESCAPE) { 732 753 … … 803 824 var scrollWidth, 804 825 offsetWidth; 805 // handle IE 6806 if ( $.browser.msie && $.browser.version < 7) {826 // handle IE 827 if ( $.browser.msie ) { 807 828 scrollWidth = Math.max( 808 829 document.documentElement.scrollWidth,
Note: See TracChangeset
for help on using the changeset viewer.