Ignore:
Timestamp:
Oct 28, 2011, 3:32:48 PM (12 years ago)
Author:
patdenice
Message:

merge r12525 from trunk to branch 2.3
feature:2487
Update jQuery to 1.6.4 and jQuery UI to 1.8.16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/themes/default/js/ui/jquery.ui.dialog.js

    r9559 r12526  
    11/*
    2  * jQuery UI Dialog 1.8.10
     2 * jQuery UI Dialog 1.8.16
    33 *
    44 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
     
    3838                minHeight: true,
    3939                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
    4052        };
    4153
     
    99111                                // setting outline to 0 prevents a border on focus in Mozilla
    100112                                .attr('tabIndex', -1).css('outline', 0).keydown(function(event) {
    101                                         if (options.closeOnEscape && event.keyCode &&
     113                                        if (options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
    102114                                                event.keyCode === $.ui.keyCode.ESCAPE) {
    103115                                               
     
    295307                //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
    296308                //  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() };
    298310                $.ui.dialog.maxZ += 1;
    299311                self.uiDialog.css('z-index', $.ui.dialog.maxZ);
     
    377389                                        props;
    378390                                var button = $('<button type="button"></button>')
    379                                         .attr( props, true )
    380                                         .unbind('click')
    381391                                        .click(function() {
    382392                                                props.click.apply(self.element[0], arguments);
    383393                                        })
    384394                                        .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                                });
    385406                                if ($.fn.button) {
    386407                                        button.button();
     
    682703
    683704$.extend($.ui.dialog, {
    684         version: "1.8.10",
     705        version: "1.8.16",
    685706
    686707        uuid: 0,
     
    728749                        // allow closing by pressing the escape key
    729750                        $(document).bind('keydown.dialog-overlay', function(event) {
    730                                 if (dialog.options.closeOnEscape && event.keyCode &&
     751                                if (dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
    731752                                        event.keyCode === $.ui.keyCode.ESCAPE) {
    732753                                       
     
    803824                var scrollWidth,
    804825                        offsetWidth;
    805                 // handle IE 6
    806                 if ($.browser.msie && $.browser.version < 7) {
     826                // handle IE
     827                if ( $.browser.msie ) {
    807828                        scrollWidth = Math.max(
    808829                                document.documentElement.scrollWidth,
Note: See TracChangeset for help on using the changeset viewer.