Changeset 29920
- Timestamp:
- 10/16/2014 07:01:44 PM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/jquery/ui/accordion.js
r29847 r29920 1 1 /*! 2 * jQuery UI Accordion 1.11. 12 * jQuery UI Accordion 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 26 26 27 27 return $.widget( "ui.accordion", { 28 version: "1.11. 1",28 version: "1.11.2", 29 29 options: { 30 30 active: 0, … … 260 260 261 261 _processPanels: function() { 262 var prevHeaders = this.headers, 263 prevPanels = this.panels; 264 262 265 this.headers = this.element.find( this.options.header ) 263 266 .addClass( "ui-accordion-header ui-state-default ui-corner-all" ); 264 267 265 this. headers.next()268 this.panels = this.headers.next() 266 269 .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) 267 270 .filter( ":not(.ui-accordion-content-active)" ) 268 271 .hide(); 272 273 // Avoid memory leaks (#10056) 274 if ( prevPanels ) { 275 this._off( prevHeaders.not( this.headers ) ); 276 this._off( prevPanels.not( this.panels ) ); 277 } 269 278 }, 270 279 -
trunk/src/wp-includes/js/jquery/ui/autocomplete.js
r29847 r29920 1 1 /*! 2 * jQuery UI Autocomplete 1.11. 12 * jQuery UI Autocomplete 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 28 28 29 29 $.widget( "ui.autocomplete", { 30 version: "1.11. 1",30 version: "1.11.2", 31 31 defaultElement: "<input>", 32 32 options: { -
trunk/src/wp-includes/js/jquery/ui/button.js
r29847 r29920 1 1 /*! 2 * jQuery UI Button 1.11. 12 * jQuery UI Button 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 53 53 54 54 $.widget( "ui.button", { 55 version: "1.11. 1",55 version: "1.11.2", 56 56 defaultElement: "<button>", 57 57 options: { … … 349 349 350 350 $.widget( "ui.buttonset", { 351 version: "1.11. 1",351 version: "1.11.2", 352 352 options: { 353 353 items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)" -
trunk/src/wp-includes/js/jquery/ui/core.js
r29847 r29920 1 1 /*! 2 * jQuery UI Core 1.11. 12 * jQuery UI Core 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 25 25 26 26 $.extend( $.ui, { 27 version: "1.11. 1",27 version: "1.11.2", 28 28 29 29 keyCode: { -
trunk/src/wp-includes/js/jquery/ui/datepicker.js
r29847 r29920 1 1 /*! 2 * jQuery UI Datepicker 1.11. 12 * jQuery UI Datepicker 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 24 24 }(function( $ ) { 25 25 26 $.extend($.ui, { datepicker: { version: "1.11. 1" } });26 $.extend($.ui, { datepicker: { version: "1.11.2" } }); 27 27 28 28 var datepicker_instActive; … … 2074 2074 $.datepicker.initialized = false; 2075 2075 $.datepicker.uuid = new Date().getTime(); 2076 $.datepicker.version = "1.11. 1";2076 $.datepicker.version = "1.11.2"; 2077 2077 2078 2078 return $.datepicker; -
trunk/src/wp-includes/js/jquery/ui/dialog.js
r29847 r29920 1 1 /*! 2 * jQuery UI Dialog 1.11. 12 * jQuery UI Dialog 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 31 31 32 32 return $.widget( "ui.dialog", { 33 version: "1.11. 1",33 version: "1.11.2", 34 34 options: { 35 35 appendTo: "body", -
trunk/src/wp-includes/js/jquery/ui/draggable.js
r29847 r29920 1 1 /*! 2 * jQuery UI Draggable 1.11. 12 * jQuery UI Draggable 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 27 27 28 28 $.widget("ui.draggable", $.ui.mouse, { 29 version: "1.11. 1",29 version: "1.11.2", 30 30 widgetEventPrefix: "drag", 31 31 options: { … … 62 62 _create: function() { 63 63 64 if ( this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {65 this. element[0].style.position = "relative";64 if ( this.options.helper === "original" ) { 65 this._setPositionRelative(); 66 66 } 67 67 if (this.options.addClasses){ … … 95 95 96 96 _mouseCapture: function(event) { 97 98 var document = this.document[ 0 ], 99 o = this.options; 100 101 // support: IE9 102 // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> 103 try { 104 // Support: IE9+ 105 // If the <body> is blurred, IE will switch windows, see #9520 106 if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) { 107 // Blur any element that currently has focus, see #4261 108 $( document.activeElement ).blur(); 109 } 110 } catch ( error ) {} 97 var o = this.options; 98 99 this._blurActiveElement( event ); 111 100 112 101 // among others, prevent a drag on a resizable-handle … … 121 110 } 122 111 123 $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { 124 $("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>") 125 .css({ 126 width: this.offsetWidth + "px", height: this.offsetHeight + "px", 127 position: "absolute", opacity: "0.001", zIndex: 1000 128 }) 129 .css($(this).offset()) 130 .appendTo("body"); 112 this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); 113 114 return true; 115 116 }, 117 118 _blockFrames: function( selector ) { 119 this.iframeBlocks = this.document.find( selector ).map(function() { 120 var iframe = $( this ); 121 122 return $( "<div>" ) 123 .css( "position", "absolute" ) 124 .appendTo( iframe.parent() ) 125 .outerWidth( iframe.outerWidth() ) 126 .outerHeight( iframe.outerHeight() ) 127 .offset( iframe.offset() )[ 0 ]; 131 128 }); 132 133 return true; 134 129 }, 130 131 _unblockFrames: function() { 132 if ( this.iframeBlocks ) { 133 this.iframeBlocks.remove(); 134 delete this.iframeBlocks; 135 } 136 }, 137 138 _blurActiveElement: function( event ) { 139 var document = this.document[ 0 ]; 140 141 // Only need to blur if the event occurred on the draggable itself, see #10527 142 if ( !this.handleElement.is( event.target ) ) { 143 return; 144 } 145 146 // support: IE9 147 // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> 148 try { 149 150 // Support: IE9, IE10 151 // If the <body> is blurred, IE will switch windows, see #9520 152 if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) { 153 154 // Blur any element that currently has focus, see #4261 155 $( document.activeElement ).blur(); 156 } 157 } catch ( error ) {} 135 158 }, 136 159 … … 164 187 this.scrollParent = this.helper.scrollParent( true ); 165 188 this.offsetParent = this.helper.offsetParent(); 166 this.offsetParentCssPosition = this.offsetParent.css( "position" ); 189 this.hasFixedAncestor = this.helper.parents().filter(function() { 190 return $( this ).css( "position" ) === "fixed"; 191 }).length > 0; 167 192 168 193 //The element's absolute position on the page minus margins 169 this.offset = this.positionAbs = this.element.offset(); 170 this.offset = { 171 top: this.offset.top - this.margins.top, 172 left: this.offset.left - this.margins.left 173 }; 174 175 //Reset scroll cache 176 this.offset.scroll = false; 177 178 $.extend(this.offset, { 179 click: { //Where the click happened, relative to the element 180 left: event.pageX - this.offset.left, 181 top: event.pageY - this.offset.top 182 }, 183 parent: this._getParentOffset(), 184 relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper 185 }); 194 this.positionAbs = this.element.offset(); 195 this._refreshOffsets( event ); 186 196 187 197 //Generate the original position … … 210 220 } 211 221 222 // Reset helper's right/bottom css if they're set and set explicit width/height instead 223 // as this prevents resizing of elements with right/bottom set (see #7772) 224 this._normalizeRightBottom(); 225 212 226 this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position 213 227 … … 220 234 }, 221 235 236 _refreshOffsets: function( event ) { 237 this.offset = { 238 top: this.positionAbs.top - this.margins.top, 239 left: this.positionAbs.left - this.margins.left, 240 scroll: false, 241 parent: this._getParentOffset(), 242 relative: this._getRelativeOffset() 243 }; 244 245 this.offset.click = { 246 left: event.pageX - this.offset.left, 247 top: event.pageY - this.offset.top 248 }; 249 }, 250 222 251 _mouseDrag: function(event, noPropagation) { 223 252 // reset any necessary cached properties (see #5009) 224 if ( this. offsetParentCssPosition === "fixed") {253 if ( this.hasFixedAncestor ) { 225 254 this.offset.parent = this._getParentOffset(); 226 255 } … … 280 309 }, 281 310 282 _mouseUp: function(event) { 283 //Remove frame helpers 284 $("div.ui-draggable-iframeFix").each(function() { 285 this.parentNode.removeChild(this); 286 }); 311 _mouseUp: function( event ) { 312 this._unblockFrames(); 287 313 288 314 //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) … … 291 317 } 292 318 293 // The interaction is over; whether or not the click resulted in a drag, focus the element 294 this.element.focus(); 319 // Only need to focus if the event occurred on the draggable itself, see #10527 320 if ( this.handleElement.is( event.target ) ) { 321 // The interaction is over; whether or not the click resulted in a drag, focus the element 322 this.element.focus(); 323 } 295 324 296 325 return $.ui.mouse.prototype._mouseUp.call(this, event); … … 328 357 329 358 var o = this.options, 330 helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[ 0 ], [ event ])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element); 359 helperIsFunction = $.isFunction( o.helper ), 360 helper = helperIsFunction ? 361 $( o.helper.apply( this.element[ 0 ], [ event ] ) ) : 362 ( o.helper === "clone" ? 363 this.element.clone().removeAttr( "id" ) : 364 this.element ); 331 365 332 366 if (!helper.parents("body").length) { … … 334 368 } 335 369 370 // http://bugs.jqueryui.com/ticket/9446 371 // a helper function can return the original element 372 // which wouldn't have been set to relative in _create 373 if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) { 374 this._setPositionRelative(); 375 } 376 336 377 if (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) { 337 378 helper.css("position", "absolute"); … … 340 381 return helper; 341 382 383 }, 384 385 _setPositionRelative: function() { 386 if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) { 387 this.element[ 0 ].style.position = "relative"; 388 } 342 389 }, 343 390 … … 426 473 _setContainment: function() { 427 474 428 var over, c, ce,475 var isUserScrollable, c, ce, 429 476 o = this.options, 430 477 document = this.document[ 0 ]; … … 473 520 } 474 521 475 over = c.css( "overflow" ) !== "hidden";522 isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) ); 476 523 477 524 this.containment = [ 478 525 ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), 479 526 ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ), 480 ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right, 481 ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top - this.margins.bottom 527 ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - 528 ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - 529 ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - 530 this.helperProportions.width - 531 this.margins.left - 532 this.margins.right, 533 ( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - 534 ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - 535 ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - 536 this.helperProportions.height - 537 this.margins.top - 538 this.margins.bottom 482 539 ]; 483 540 this.relativeContainer = c; … … 609 666 }, 610 667 668 _normalizeRightBottom: function() { 669 if ( this.options.axis !== "y" && this.helper.css( "right" ) !== "auto" ) { 670 this.helper.width( this.helper.width() ); 671 this.helper.css( "right", "auto" ); 672 } 673 if ( this.options.axis !== "x" && this.helper.css( "bottom" ) !== "auto" ) { 674 this.helper.height( this.helper.height() ); 675 this.helper.css( "bottom", "auto" ); 676 } 677 }, 678 611 679 // From now on bulk stuff - mainly helpers 612 680 613 _trigger: function( type, event, ui) {681 _trigger: function( type, event, ui ) { 614 682 ui = ui || this._uiHash(); 615 683 $.ui.plugin.call( this, type, [ event, ui, this ], true ); 616 //The absolute position has to be recalculated after plugins 617 if (type === "drag") { 618 this.positionAbs = this._convertPositionTo("absolute"); 619 } 620 return $.Widget.prototype._trigger.call(this, type, event, ui); 684 685 // Absolute position and offset (see #6884 ) have to be recalculated after plugins 686 if ( /^(drag|start|stop)/.test( type ) ) { 687 this.positionAbs = this._convertPositionTo( "absolute" ); 688 ui.offset = this.positionAbs; 689 } 690 return $.Widget.prototype._trigger.call( this, type, event, ui ); 621 691 }, 622 692 … … 634 704 }); 635 705 636 $.ui.plugin.add("draggable", "connectToSortable", { 637 start: function( event, ui, inst ) { 638 639 var o = inst.options, 640 uiSortable = $.extend({}, ui, { item: inst.element }); 641 inst.sortables = []; 642 $(o.connectToSortable).each(function() { 706 $.ui.plugin.add( "draggable", "connectToSortable", { 707 start: function( event, ui, draggable ) { 708 var uiSortable = $.extend( {}, ui, { 709 item: draggable.element 710 }); 711 712 draggable.sortables = []; 713 $( draggable.options.connectToSortable ).each(function() { 643 714 var sortable = $( this ).sortable( "instance" ); 644 if (sortable && !sortable.options.disabled) { 645 inst.sortables.push({ 646 instance: sortable, 647 shouldRevert: sortable.options.revert 648 }); 649 sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page). 715 716 if ( sortable && !sortable.options.disabled ) { 717 draggable.sortables.push( sortable ); 718 719 // refreshPositions is called at drag start to refresh the containerCache 720 // which is used in drag. This ensures it's initialized and synchronized 721 // with any changes that might have happened on the page since initialization. 722 sortable.refreshPositions(); 650 723 sortable._trigger("activate", event, uiSortable); 651 724 } 652 725 }); 653 654 }, 655 stop: function( event, ui, inst ) { 656 657 //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper 726 }, 727 stop: function( event, ui, draggable ) { 658 728 var uiSortable = $.extend( {}, ui, { 659 item: inst.element729 item: draggable.element 660 730 }); 661 731 662 $.each(inst.sortables, function() { 663 if (this.instance.isOver) { 664 665 this.instance.isOver = 0; 666 667 inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance 668 this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) 669 670 //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid" 671 if (this.shouldRevert) { 672 this.instance.options.revert = this.shouldRevert; 673 } 674 675 //Trigger the stop of the sortable 676 this.instance._mouseStop(event); 677 678 this.instance.options.helper = this.instance.options._helper; 679 680 //If the helper has been the original item, restore properties in the sortable 681 if (inst.options.helper === "original") { 682 this.instance.currentItem.css({ top: "auto", left: "auto" }); 683 } 684 732 draggable.cancelHelperRemoval = false; 733 734 $.each( draggable.sortables, function() { 735 var sortable = this; 736 737 if ( sortable.isOver ) { 738 sortable.isOver = 0; 739 740 // Allow this sortable to handle removing the helper 741 draggable.cancelHelperRemoval = true; 742 sortable.cancelHelperRemoval = false; 743 744 // Use _storedCSS To restore properties in the sortable, 745 // as this also handles revert (#9675) since the draggable 746 // may have modified them in unexpected ways (#8809) 747 sortable._storedCSS = { 748 position: sortable.placeholder.css( "position" ), 749 top: sortable.placeholder.css( "top" ), 750 left: sortable.placeholder.css( "left" ) 751 }; 752 753 sortable._mouseStop(event); 754 755 // Once drag has ended, the sortable should return to using 756 // its original helper, not the shared helper from draggable 757 sortable.options.helper = sortable.options._helper; 685 758 } else { 686 this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance 687 this.instance._trigger("deactivate", event, uiSortable); 688 } 689 759 // Prevent this Sortable from removing the helper. 760 // However, don't set the draggable to remove the helper 761 // either as another connected Sortable may yet handle the removal. 762 sortable.cancelHelperRemoval = true; 763 764 sortable._trigger( "deactivate", event, uiSortable ); 765 } 690 766 }); 691 692 }, 693 drag: function( event, ui, inst ) { 694 695 var that = this; 696 697 $.each(inst.sortables, function() { 698 767 }, 768 drag: function( event, ui, draggable ) { 769 $.each( draggable.sortables, function() { 699 770 var innermostIntersecting = false, 700 thisSortable = this;701 702 // Copy over some variables to allow calling the sortable's native _intersectsWith703 this.instance.positionAbs = inst.positionAbs;704 this.instance.helperProportions = inst.helperProportions;705 this.instance.offset.click = inst.offset.click;706 707 if ( this.instance._intersectsWith(this.instance.containerCache)) {771 sortable = this; 772 773 // Copy over variables that sortable's _intersectsWith uses 774 sortable.positionAbs = draggable.positionAbs; 775 sortable.helperProportions = draggable.helperProportions; 776 sortable.offset.click = draggable.offset.click; 777 778 if ( sortable._intersectsWith( sortable.containerCache ) ) { 708 779 innermostIntersecting = true; 709 $.each(inst.sortables, function() { 710 this.instance.positionAbs = inst.positionAbs; 711 this.instance.helperProportions = inst.helperProportions; 712 this.instance.offset.click = inst.offset.click; 713 if (this !== thisSortable && 714 this.instance._intersectsWith(this.instance.containerCache) && 715 $.contains(thisSortable.instance.element[0], this.instance.element[0]) 716 ) { 780 781 $.each( draggable.sortables, function() { 782 // Copy over variables that sortable's _intersectsWith uses 783 this.positionAbs = draggable.positionAbs; 784 this.helperProportions = draggable.helperProportions; 785 this.offset.click = draggable.offset.click; 786 787 if ( this !== sortable && 788 this._intersectsWith( this.containerCache ) && 789 $.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) { 717 790 innermostIntersecting = false; 718 791 } 792 719 793 return innermostIntersecting; 720 794 }); 721 795 } 722 796 723 if (innermostIntersecting) { 724 //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once 725 if (!this.instance.isOver) { 726 727 this.instance.isOver = 1; 728 //Now we fake the start of dragging for the sortable instance, 729 //by cloning the list group item, appending it to the sortable and using it as inst.currentItem 730 //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) 731 this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true); 732 this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it 733 this.instance.options.helper = function() { return ui.helper[0]; }; 734 735 event.target = this.instance.currentItem[0]; 736 this.instance._mouseCapture(event, true); 737 this.instance._mouseStart(event, true, true); 738 739 //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes 740 this.instance.offset.click.top = inst.offset.click.top; 741 this.instance.offset.click.left = inst.offset.click.left; 742 this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; 743 this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; 744 745 inst._trigger("toSortable", event); 746 inst.dropped = this.instance.element; //draggable revert needs that 747 //hack so receive/update callbacks work (mostly) 748 inst.currentItem = inst.element; 749 this.instance.fromOutside = inst; 750 751 } 752 753 //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable 754 if (this.instance.currentItem) { 755 this.instance._mouseDrag(event); 756 } 757 797 if ( innermostIntersecting ) { 798 // If it intersects, we use a little isOver variable and set it once, 799 // so that the move-in stuff gets fired only once. 800 if ( !sortable.isOver ) { 801 sortable.isOver = 1; 802 803 sortable.currentItem = ui.helper 804 .appendTo( sortable.element ) 805 .data( "ui-sortable-item", true ); 806 807 // Store helper option to later restore it 808 sortable.options._helper = sortable.options.helper; 809 810 sortable.options.helper = function() { 811 return ui.helper[ 0 ]; 812 }; 813 814 // Fire the start events of the sortable with our passed browser event, 815 // and our own helper (so it doesn't create a new one) 816 event.target = sortable.currentItem[ 0 ]; 817 sortable._mouseCapture( event, true ); 818 sortable._mouseStart( event, true, true ); 819 820 // Because the browser event is way off the new appended portlet, 821 // modify necessary variables to reflect the changes 822 sortable.offset.click.top = draggable.offset.click.top; 823 sortable.offset.click.left = draggable.offset.click.left; 824 sortable.offset.parent.left -= draggable.offset.parent.left - 825 sortable.offset.parent.left; 826 sortable.offset.parent.top -= draggable.offset.parent.top - 827 sortable.offset.parent.top; 828 829 draggable._trigger( "toSortable", event ); 830 831 // Inform draggable that the helper is in a valid drop zone, 832 // used solely in the revert option to handle "valid/invalid". 833 draggable.dropped = sortable.element; 834 835 // Need to refreshPositions of all sortables in the case that 836 // adding to one sortable changes the location of the other sortables (#9675) 837 $.each( draggable.sortables, function() { 838 this.refreshPositions(); 839 }); 840 841 // hack so receive/update callbacks work (mostly) 842 draggable.currentItem = draggable.element; 843 sortable.fromOutside = draggable; 844 } 845 846 if ( sortable.currentItem ) { 847 sortable._mouseDrag( event ); 848 // Copy the sortable's position because the draggable's can potentially reflect 849 // a relative position, while sortable is always absolute, which the dragged 850 // element has now become. (#8809) 851 ui.position = sortable.position; 852 } 758 853 } else { 759 760 //If it doesn't intersect with the sortable, and it intersected before, 761 //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval 762 if (this.instance.isOver) { 763 764 this.instance.isOver = 0; 765 this.instance.cancelHelperRemoval = true; 766 767 //Prevent reverting on this forced stop 768 this.instance.options.revert = false; 769 770 // The out event needs to be triggered independently 771 this.instance._trigger("out", event, this.instance._uiHash(this.instance)); 772 773 this.instance._mouseStop(event, true); 774 this.instance.options.helper = this.instance.options._helper; 775 776 //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size 777 this.instance.currentItem.remove(); 778 if (this.instance.placeholder) { 779 this.instance.placeholder.remove(); 854 // If it doesn't intersect with the sortable, and it intersected before, 855 // we fake the drag stop of the sortable, but make sure it doesn't remove 856 // the helper by using cancelHelperRemoval. 857 if ( sortable.isOver ) { 858 859 sortable.isOver = 0; 860 sortable.cancelHelperRemoval = true; 861 862 // Calling sortable's mouseStop would trigger a revert, 863 // so revert must be temporarily false until after mouseStop is called. 864 sortable.options._revert = sortable.options.revert; 865 sortable.options.revert = false; 866 867 sortable._trigger( "out", event, sortable._uiHash( sortable ) ); 868 sortable._mouseStop( event, true ); 869 870 // restore sortable behaviors that were modfied 871 // when the draggable entered the sortable area (#9481) 872 sortable.options.revert = sortable.options._revert; 873 sortable.options.helper = sortable.options._helper; 874 875 if ( sortable.placeholder ) { 876 sortable.placeholder.remove(); 780 877 } 781 878 782 inst._trigger("fromSortable", event); 783 inst.dropped = false; //draggable revert needs that 784 } 785 786 } 787 879 // Recalculate the draggable's offset considering the sortable 880 // may have modified them in unexpected ways (#8809) 881 draggable._refreshOffsets( event ); 882 ui.position = draggable._generatePosition( event, true ); 883 884 draggable._trigger( "fromSortable", event ); 885 886 // Inform draggable that the helper is no longer in a valid drop zone 887 draggable.dropped = false; 888 889 // Need to refreshPositions of all sortables just in case removing 890 // from one sortable changes the location of other sortables (#9675) 891 $.each( draggable.sortables, function() { 892 this.refreshPositions(); 893 }); 894 } 895 } 788 896 }); 789 790 897 } 791 898 }); … … 917 1024 for (i = inst.snapElements.length - 1; i >= 0; i--){ 918 1025 919 l = inst.snapElements[i].left ;1026 l = inst.snapElements[i].left - inst.margins.left; 920 1027 r = l + inst.snapElements[i].width; 921 t = inst.snapElements[i].top ;1028 t = inst.snapElements[i].top - inst.margins.top; 922 1029 b = t + inst.snapElements[i].height; 923 1030 … … 936 1043 rs = Math.abs(r - x1) <= d; 937 1044 if (ts) { 938 ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;1045 ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top; 939 1046 } 940 1047 if (bs) { 941 ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;1048 ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top; 942 1049 } 943 1050 if (ls) { 944 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;1051 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left; 945 1052 } 946 1053 if (rs) { 947 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;1054 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left; 948 1055 } 949 1056 } … … 957 1064 rs = Math.abs(r - x2) <= d; 958 1065 if (ts) { 959 ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;1066 ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top; 960 1067 } 961 1068 if (bs) { 962 ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;1069 ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top; 963 1070 } 964 1071 if (ls) { 965 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;1072 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left; 966 1073 } 967 1074 if (rs) { 968 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;1075 ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left; 969 1076 } 970 1077 } -
trunk/src/wp-includes/js/jquery/ui/droppable.js
r29847 r29920 1 1 /*! 2 * jQuery UI Droppable 1.11. 12 * jQuery UI Droppable 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 28 28 29 29 $.widget( "ui.droppable", { 30 version: "1.11. 1",30 version: "1.11.2", 31 31 widgetEventPrefix: "drop", 32 32 options: { … … 236 236 } 237 237 238 var x1 = ( draggable.positionAbs || draggable.position.absolute ).left ,239 y1 = ( draggable.positionAbs || draggable.position.absolute ).top ,238 var x1 = ( draggable.positionAbs || draggable.position.absolute ).left + draggable.margins.left, 239 y1 = ( draggable.positionAbs || draggable.position.absolute ).top + draggable.margins.top, 240 240 x2 = x1 + draggable.helperProportions.width, 241 241 y2 = y1 + draggable.helperProportions.height, -
trunk/src/wp-includes/js/jquery/ui/effect-blind.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Blind 1.11. 12 * jQuery UI Effects Blind 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-bounce.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Bounce 1.11. 12 * jQuery UI Effects Bounce 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-clip.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Clip 1.11. 12 * jQuery UI Effects Clip 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-drop.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Drop 1.11. 12 * jQuery UI Effects Drop 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 43 43 $.effects.createWrapper( el ); 44 44 45 distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;45 distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; 46 46 47 47 if ( show ) { -
trunk/src/wp-includes/js/jquery/ui/effect-explode.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Explode 1.11. 12 * jQuery UI Effects Explode 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-fade.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Fade 1.11. 12 * jQuery UI Effects Fade 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-fold.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Fold 1.11. 12 * jQuery UI Effects Fold 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-highlight.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Highlight 1.11. 12 * jQuery UI Effects Highlight 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-puff.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Puff 1.11. 12 * jQuery UI Effects Puff 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-pulsate.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Pulsate 1.11. 12 * jQuery UI Effects Pulsate 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-scale.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Scale 1.11. 12 * jQuery UI Effects Scale 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-shake.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Shake 1.11. 12 * jQuery UI Effects Shake 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-size.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Size 1.11. 12 * jQuery UI Effects Size 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-slide.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Slide 1.11. 12 * jQuery UI Effects Slide 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect-transfer.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects Transfer 1.11. 12 * jQuery UI Effects Transfer 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/effect.js
r29847 r29920 1 1 /*! 2 * jQuery UI Effects 1.11. 12 * jQuery UI Effects 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 634 634 try { 635 635 elem.style[ hook ] = value; 636 } catch ( e ) {636 } catch ( e ) { 637 637 // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' 638 638 } … … 905 905 906 906 $.extend( $.effects, { 907 version: "1.11. 1",907 version: "1.11.2", 908 908 909 909 // Saves a set of properties in a data storage … … 999 999 try { 1000 1000 active.id; 1001 } catch ( e ) {1001 } catch ( e ) { 1002 1002 active = document.body; 1003 1003 } -
trunk/src/wp-includes/js/jquery/ui/menu.js
r29847 r29920 1 1 /*! 2 * jQuery UI Menu 1.11. 12 * jQuery UI Menu 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 27 27 28 28 return $.widget( "ui.menu", { 29 version: "1.11. 1",29 version: "1.11.2", 30 30 defaultElement: "<ul>", 31 31 delay: 300, … … 102 102 }, 103 103 "mouseenter .ui-menu-item": function( event ) { 104 // Ignore mouse events while typeahead is active, see #10458. 105 // Prevents focusing the wrong item when typeahead causes a scroll while the mouse 106 // is over an item in the menu 107 if ( this.previousFilter ) { 108 return; 109 } 104 110 var target = $( event.currentTarget ); 105 111 // Remove ui-state-active class from siblings of the newly focused menu item … … 181 187 182 188 _keydown: function( event ) { 183 var match, prev, character, skip, regex,189 var match, prev, character, skip, 184 190 preventDefault = true; 185 186 function escape( value ) {187 return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );188 }189 191 190 192 switch ( event.keyCode ) { … … 236 238 } 237 239 238 regex = new RegExp( "^" + escape( character ), "i" ); 239 match = this.activeMenu.find( this.options.items ).filter(function() { 240 return regex.test( $( this ).text() ); 241 }); 240 match = this._filterMenuItems( character ); 242 241 match = skip && match.index( this.active.next() ) !== -1 ? 243 242 this.active.nextAll( ".ui-menu-item" ) : … … 248 247 if ( !match.length ) { 249 248 character = String.fromCharCode( event.keyCode ); 250 regex = new RegExp( "^" + escape( character ), "i" ); 251 match = this.activeMenu.find( this.options.items ).filter(function() { 252 return regex.test( $( this ).text() ); 253 }); 249 match = this._filterMenuItems( character ); 254 250 } 255 251 256 252 if ( match.length ) { 257 253 this.focus( event, match ); 258 if ( match.length > 1 ) { 259 this.previousFilter = character; 260 this.filterTimer = this._delay(function() { 261 delete this.previousFilter; 262 }, 1000 ); 263 } else { 254 this.previousFilter = character; 255 this.filterTimer = this._delay(function() { 264 256 delete this.previousFilter; 265 } 257 }, 1000 ); 266 258 } else { 267 259 delete this.previousFilter; … … 635 627 } 636 628 this._trigger( "select", event, ui ); 629 }, 630 631 _filterMenuItems: function(character) { 632 var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), 633 regex = new RegExp( "^" + escapedCharacter, "i" ); 634 635 return this.activeMenu 636 .find( this.options.items ) 637 638 // Only match on items, not dividers or other content (#10571) 639 .filter( ".ui-menu-item" ) 640 .filter(function() { 641 return regex.test( $.trim( $( this ).text() ) ); 642 }); 637 643 } 638 644 }); -
trunk/src/wp-includes/js/jquery/ui/mouse.js
r29847 r29920 1 1 /*! 2 * jQuery UI Mouse 1.11. 12 * jQuery UI Mouse 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 30 30 31 31 return $.widget("ui.mouse", { 32 version: "1.11. 1",32 version: "1.11.2", 33 33 options: { 34 34 cancel: "input,textarea,button,select,option", … … 70 70 return; 71 71 } 72 73 this._mouseMoved = false; 72 74 73 75 // we may have missed mouseup (out of window) … … 124 126 125 127 _mouseMove: function(event) { 126 // IE mouseup check - mouseup happened when mouse was out of window 127 if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { 128 return this._mouseUp(event); 128 // Only check for mouseups outside the document if you've moved inside the document 129 // at least once. This prevents the firing of mouseup in the case of IE<9, which will 130 // fire a mousemove event if content is placed under the cursor. See #7778 131 // Support: IE <9 132 if ( this._mouseMoved ) { 133 // IE mouseup check - mouseup happened when mouse was out of window 134 if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { 135 return this._mouseUp(event); 129 136 130 // Iframe mouseup check - mouseup occurred in another document 131 } else if ( !event.which ) { 132 return this._mouseUp( event ); 137 // Iframe mouseup check - mouseup occurred in another document 138 } else if ( !event.which ) { 139 return this._mouseUp( event ); 140 } 141 } 142 143 if ( event.which || event.button ) { 144 this._mouseMoved = true; 133 145 } 134 146 -
trunk/src/wp-includes/js/jquery/ui/position.js
r29847 r29920 1 1 /*! 2 * jQuery UI Position 1.11. 12 * jQuery UI Position 1.11.2 3 3 * http://jqueryui.com 4 4 * -
trunk/src/wp-includes/js/jquery/ui/progressbar.js
r29847 r29920 1 1 /*! 2 * jQuery UI Progressbar 1.11. 12 * jQuery UI Progressbar 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 26 26 27 27 return $.widget( "ui.progressbar", { 28 version: "1.11. 1",28 version: "1.11.2", 29 29 options: { 30 30 max: 100, -
trunk/src/wp-includes/js/jquery/ui/resizable.js
r29847 r29920 1 1 /*! 2 * jQuery UI Resizable 1.11. 12 * jQuery UI Resizable 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 27 27 28 28 $.widget("ui.resizable", $.ui.mouse, { 29 version: "1.11. 1",29 version: "1.11.2", 30 30 widgetEventPrefix: "resize", 31 31 options: { -
trunk/src/wp-includes/js/jquery/ui/selectable.js
r29847 r29920 1 1 /*! 2 * jQuery UI Selectable 1.11. 12 * jQuery UI Selectable 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 27 27 28 28 return $.widget("ui.selectable", $.ui.mouse, { 29 version: "1.11. 1",29 version: "1.11.2", 30 30 options: { 31 31 appendTo: "body", -
trunk/src/wp-includes/js/jquery/ui/selectmenu.js
r29847 r29920 1 1 /*! 2 * jQuery UI Selectmenu 1.11. 12 * jQuery UI Selectmenu 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 28 28 29 29 return $.widget( "ui.selectmenu", { 30 version: "1.11. 1",30 version: "1.11.2", 31 31 defaultElement: "<select>", 32 32 options: { … … 145 145 select: function( event, ui ) { 146 146 event.preventDefault(); 147 148 // support: IE8 149 // If the item was selected via a click, the text selection 150 // will be destroyed in IE 151 that._setSelection(); 152 147 153 that._select( ui.item.data( "ui-selectmenu-item" ), event ); 148 154 }, … … 255 261 this._toggleAttr(); 256 262 263 this.range = null; 257 264 this._off( this.document ); 258 265 … … 343 350 }, 344 351 352 _setSelection: function() { 353 var selection; 354 355 if ( !this.range ) { 356 return; 357 } 358 359 if ( window.getSelection ) { 360 selection = window.getSelection(); 361 selection.removeAllRanges(); 362 selection.addRange( this.range ); 363 364 // support: IE8 365 } else { 366 this.range.select(); 367 } 368 369 // support: IE 370 // Setting the text selection kills the button focus in IE, but 371 // restoring the focus doesn't kill the selection. 372 this.button.focus(); 373 }, 374 345 375 _documentClick: { 346 376 mousedown: function( event ) { … … 358 388 359 389 // Prevent text selection from being reset when interacting with the selectmenu (#10144) 360 mousedown: function( event ) { 361 event.preventDefault(); 390 mousedown: function() { 391 var selection; 392 393 if ( window.getSelection ) { 394 selection = window.getSelection(); 395 if ( selection.rangeCount ) { 396 this.range = selection.getRangeAt( 0 ); 397 } 398 399 // support: IE8 400 } else { 401 this.range = document.selection.createRange(); 402 } 362 403 }, 363 404 364 click: "_toggle", 405 click: function( event ) { 406 this._setSelection(); 407 this._toggle( event ); 408 }, 365 409 366 410 keydown: function( event ) { -
trunk/src/wp-includes/js/jquery/ui/slider.js
r29847 r29920 1 1 /*! 2 * jQuery UI Slider 1.11. 12 * jQuery UI Slider 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 27 27 28 28 return $.widget( "ui.slider", $.ui.mouse, { 29 version: "1.11. 1",29 version: "1.11.2", 30 30 widgetEventPrefix: "slide", 31 31 … … 59 59 this._detectOrientation(); 60 60 this._mouseInit(); 61 this._calculateNewMax(); 61 62 62 63 this.element … … 473 474 this._animateOff = false; 474 475 break; 476 case "step": 475 477 case "min": 476 478 case "max": 477 479 this._animateOff = true; 480 this._calculateNewMax(); 478 481 this._refreshValue(); 479 482 this._animateOff = false; … … 513 516 // this copy gets trimmed by min and max and then returned 514 517 vals = this.options.values.slice(); 515 for ( i = 0; i < vals.length; i += 1) {518 for ( i = 0; i < vals.length; i += 1) { 516 519 vals[ i ] = this._trimAlignValue( vals[ i ] ); 517 520 } … … 544 547 }, 545 548 549 _calculateNewMax: function() { 550 var remainder = ( this.options.max - this._valueMin() ) % this.options.step; 551 this.max = this.options.max - remainder; 552 }, 553 546 554 _valueMin: function() { 547 555 return this.options.min; … … 549 557 550 558 _valueMax: function() { 551 return this. options.max;559 return this.max; 552 560 }, 553 561 -
trunk/src/wp-includes/js/jquery/ui/sortable.js
r29847 r29920 1 1 /*! 2 * jQuery UI Sortable 1.11. 12 * jQuery UI Sortable 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 27 27 28 28 return $.widget("ui.sortable", $.ui.mouse, { 29 version: "1.11. 1",29 version: "1.11.2", 30 30 widgetEventPrefix: "sort", 31 31 ready: false, … … 912 912 913 913 if(this.currentContainer === this.containers[innermostIndex]) { 914 if ( !this.currentContainer.containerCache.over ) { 915 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() ); 916 this.currentContainer.containerCache.over = 1; 917 } 914 918 return; 915 919 } … … 1250 1254 1251 1255 this.dragging = false; 1252 if(this.cancelHelperRemoval) {1253 if(!noPropagation) {1254 this._trigger("beforeStop", event, this._uiHash());1255 for (i=0; i < delayedTriggers.length; i++) {1256 delayedTriggers[i].call(this, event);1257 } //Trigger all delayed events1258 this._trigger("stop", event, this._uiHash());1259 }1260 1261 this.fromOutside = false;1262 return false;1263 }1264 1256 1265 1257 if(!noPropagation) { … … 1270 1262 this.placeholder[0].parentNode.removeChild(this.placeholder[0]); 1271 1263 1272 if(this.helper[0] !== this.currentItem[0]) { 1273 this.helper.remove(); 1274 } 1275 this.helper = null; 1264 if ( !this.cancelHelperRemoval ) { 1265 if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { 1266 this.helper.remove(); 1267 } 1268 this.helper = null; 1269 } 1276 1270 1277 1271 if(!noPropagation) { … … 1283 1277 1284 1278 this.fromOutside = false; 1285 return true;1279 return !this.cancelHelperRemoval; 1286 1280 1287 1281 }, -
trunk/src/wp-includes/js/jquery/ui/spinner.js
r29847 r29920 1 1 /*! 2 * jQuery UI Spinner 1.11. 12 * jQuery UI Spinner 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 38 38 39 39 return $.widget( "ui.spinner", { 40 version: "1.11. 1",40 version: "1.11.2", 41 41 defaultElement: "<input>", 42 42 widgetEventPrefix: "spin", -
trunk/src/wp-includes/js/jquery/ui/tabs.js
r29847 r29920 1 1 /*! 2 * jQuery UI Tabs 1.11. 12 * jQuery UI Tabs 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 26 26 27 27 return $.widget( "ui.tabs", { 28 version: "1.11. 1",28 version: "1.11.2", 29 29 delay: 300, 30 30 options: { … … 373 373 374 374 _processTabs: function() { 375 var that = this; 375 var that = this, 376 prevTabs = this.tabs, 377 prevAnchors = this.anchors, 378 prevPanels = this.panels; 376 379 377 380 this.tablist = this._getList() … … 457 460 .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) 458 461 .attr( "role", "tabpanel" ); 462 463 // Avoid memory leaks (#10056) 464 if ( prevTabs ) { 465 this._off( prevTabs.not( this.tabs ) ); 466 this._off( prevAnchors.not( this.anchors ) ); 467 this._off( prevPanels.not( this.panels ) ); 468 } 459 469 }, 460 470 -
trunk/src/wp-includes/js/jquery/ui/tooltip.js
r29847 r29920 1 1 /*! 2 * jQuery UI Tooltip 1.11. 12 * jQuery UI Tooltip 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 27 27 28 28 return $.widget( "ui.tooltip", { 29 version: "1.11. 1",29 version: "1.11.2", 30 30 options: { 31 31 content: function() { … … 87 87 // IDs of generated tooltips, needed for destroy 88 88 this.tooltips = {}; 89 89 90 // IDs of parent tooltips where we removed the title attribute 90 91 this.parents = {}; … … 118 119 119 120 if ( key === "content" ) { 120 $.each( this.tooltips, function( id, element) {121 that._updateContent( element );121 $.each( this.tooltips, function( id, tooltipData ) { 122 that._updateContent( tooltipData.element ); 122 123 }); 123 124 } … … 128 129 129 130 // close open tooltips 130 $.each( this.tooltips, function( id, element) {131 $.each( this.tooltips, function( id, tooltipData ) { 131 132 var event = $.Event( "blur" ); 132 event.target = event.currentTarget = element[0];133 event.target = event.currentTarget = tooltipData.element[ 0 ]; 133 134 that.close( event, true ); 134 135 }); … … 232 233 233 234 _open: function( event, target, content ) { 234 var tooltip , events, delayedShow, a11yContent,235 var tooltipData, tooltip, events, delayedShow, a11yContent, 235 236 positionOption = $.extend( {}, this.options.position ); 236 237 … … 241 242 // Content can be updated multiple times. If the tooltip already 242 243 // exists, then just update the content and bail. 243 tooltip = this._find( target );244 if ( tooltip .length) {245 tooltip .find( ".ui-tooltip-content" ).html( content );244 tooltipData = this._find( target ); 245 if ( tooltipData ) { 246 tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content ); 246 247 return; 247 248 } … … 262 263 } 263 264 264 tooltip = this._tooltip( target ); 265 tooltipData = this._tooltip( target ); 266 tooltip = tooltipData.tooltip; 265 267 this._addDescribedBy( target, tooltip.attr( "id" ) ); 266 268 tooltip.find( ".ui-tooltip-content" ).html( content ); … … 297 299 } 298 300 299 this.hiding = false;300 this.closing = false;301 301 tooltip.hide(); 302 302 … … 344 344 345 345 close: function( event ) { 346 var that = this, 346 var tooltip, 347 that = this, 347 348 target = $( event ? event.currentTarget : this.element ), 348 tooltip = this._find( target ); 349 tooltipData = this._find( target ); 350 351 // The tooltip may already be closed 352 if ( !tooltipData ) { 353 return; 354 } 355 356 tooltip = tooltipData.tooltip; 349 357 350 358 // disabling closes the tooltip, so we need to track when we're closing 351 359 // to avoid an infinite loop in case the tooltip becomes disabled on close 352 if ( t his.closing ) {360 if ( tooltipData.closing ) { 353 361 return; 354 362 } … … 365 373 this._removeDescribedBy( target ); 366 374 367 t his.hiding = true;375 tooltipData.hiding = true; 368 376 tooltip.stop( true ); 369 377 this._hide( tooltip, this.options.hide, function() { 370 378 that._removeTooltip( $( this ) ); 371 this.hiding = false;372 this.closing = false;373 379 }); 374 380 … … 389 395 } 390 396 391 t his.closing = true;397 tooltipData.closing = true; 392 398 this._trigger( "close", event, { tooltip: tooltip } ); 393 if ( !t his.hiding ) {394 t his.closing = false;399 if ( !tooltipData.hiding ) { 400 tooltipData.closing = false; 395 401 } 396 402 }, … … 408 414 409 415 tooltip.appendTo( this.document[0].body ); 410 this.tooltips[ id ] = element; 411 return tooltip; 416 417 return this.tooltips[ id ] = { 418 element: element, 419 tooltip: tooltip 420 }; 412 421 }, 413 422 414 423 _find: function( target ) { 415 424 var id = target.data( "ui-tooltip-id" ); 416 return id ? $( "#" + id ) : $();425 return id ? this.tooltips[ id ] : null; 417 426 }, 418 427 … … 426 435 427 436 // close open tooltips 428 $.each( this.tooltips, function( id, element) {437 $.each( this.tooltips, function( id, tooltipData ) { 429 438 // Delegate to close method to handle common cleanup 430 var event = $.Event( "blur" ); 431 event.target = event.currentTarget = element[0]; 439 var event = $.Event( "blur" ), 440 element = tooltipData.element; 441 event.target = event.currentTarget = element[ 0 ]; 432 442 that.close( event, true ); 433 443 -
trunk/src/wp-includes/js/jquery/ui/widget.js
r29847 r29920 1 1 /*! 2 * jQuery UI Widget 1.11. 12 * jQuery UI Widget 1.11.2 3 3 * http://jqueryui.com 4 4 * … … 37 37 38 38 // http://bugs.jquery.com/ticket/8235 39 } catch ( e ) {}39 } catch ( e ) {} 40 40 } 41 41 orig( elems ); … … 255 255 this.uuid = widget_uuid++; 256 256 this.eventNamespace = "." + this.widgetName + this.uuid; 257 this.options = $.widget.extend( {},258 this.options,259 this._getCreateOptions(),260 options );261 257 262 258 this.bindings = $(); … … 280 276 this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); 281 277 } 278 279 this.options = $.widget.extend( {}, 280 this.options, 281 this._getCreateOptions(), 282 options ); 282 283 283 284 this._create(); … … 443 444 444 445 _off: function( element, eventName ) { 445 eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; 446 eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + 447 this.eventNamespace; 446 448 element.unbind( eventName ).undelegate( eventName ); 449 450 // Clear the stack to avoid memory leaks (#10056) 451 this.bindings = $( this.bindings.not( element ).get() ); 452 this.focusable = $( this.focusable.not( element ).get() ); 453 this.hoverable = $( this.hoverable.not( element ).get() ); 447 454 }, 448 455 -
trunk/src/wp-includes/script-loader.php
r29907 r29920 166 166 167 167 // full jQuery UI 168 $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array('jquery'), '1.11. 1', 1 );169 $scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$dev_suffix.js", array('jquery'), '1.11. 1', 1 );170 171 $scripts->add( 'jquery-effects-blind', "/wp-includes/js/jquery/ui/effect-blind$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );172 $scripts->add( 'jquery-effects-bounce', "/wp-includes/js/jquery/ui/effect-bounce$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );173 $scripts->add( 'jquery-effects-clip', "/wp-includes/js/jquery/ui/effect-clip$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );174 $scripts->add( 'jquery-effects-drop', "/wp-includes/js/jquery/ui/effect-drop$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );175 $scripts->add( 'jquery-effects-explode', "/wp-includes/js/jquery/ui/effect-explode$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );176 $scripts->add( 'jquery-effects-fade', "/wp-includes/js/jquery/ui/effect-fade$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );177 $scripts->add( 'jquery-effects-fold', "/wp-includes/js/jquery/ui/effect-fold$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );178 $scripts->add( 'jquery-effects-highlight', "/wp-includes/js/jquery/ui/effect-highlight$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );179 $scripts->add( 'jquery-effects-puff', "/wp-includes/js/jquery/ui/effect-puff$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );180 $scripts->add( 'jquery-effects-pulsate', "/wp-includes/js/jquery/ui/effect-pulsate$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );181 $scripts->add( 'jquery-effects-scale', "/wp-includes/js/jquery/ui/effect-scale$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );182 $scripts->add( 'jquery-effects-shake', "/wp-includes/js/jquery/ui/effect-shake$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );183 $scripts->add( 'jquery-effects-size', "/wp-includes/js/jquery/ui/effect-size$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );184 $scripts->add( 'jquery-effects-slide', "/wp-includes/js/jquery/ui/effect-slide$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );185 $scripts->add( 'jquery-effects-transfer', "/wp-includes/js/jquery/ui/effect-transfer$dev_suffix.js", array('jquery-effects-core'), '1.11. 1', 1 );186 187 $scripts->add( 'jquery-ui-accordion', "/wp-includes/js/jquery/ui/accordion$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11. 1', 1 );188 $scripts->add( 'jquery-ui-autocomplete', "/wp-includes/js/jquery/ui/autocomplete$dev_suffix.js", array('jquery-ui-menu'), '1.11. 1', 1 );189 $scripts->add( 'jquery-ui-button', "/wp-includes/js/jquery/ui/button$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11. 1', 1 );190 $scripts->add( 'jquery-ui-datepicker', "/wp-includes/js/jquery/ui/datepicker$dev_suffix.js", array('jquery-ui-core'), '1.11. 1', 1 );191 $scripts->add( 'jquery-ui-dialog', "/wp-includes/js/jquery/ui/dialog$dev_suffix.js", array('jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button', 'jquery-ui-position'), '1.11. 1', 1 );192 $scripts->add( 'jquery-ui-draggable', "/wp-includes/js/jquery/ui/draggable$dev_suffix.js", array('jquery-ui-mouse'), '1.11. 1', 1 );193 $scripts->add( 'jquery-ui-droppable', "/wp-includes/js/jquery/ui/droppable$dev_suffix.js", array('jquery-ui-draggable'), '1.11. 1', 1 );194 $scripts->add( 'jquery-ui-menu', "/wp-includes/js/jquery/ui/menu$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11. 1', 1 );195 $scripts->add( 'jquery-ui-mouse', "/wp-includes/js/jquery/ui/mouse$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget' ), '1.11. 1', 1 );196 $scripts->add( 'jquery-ui-position', "/wp-includes/js/jquery/ui/position$dev_suffix.js", array('jquery'), '1.11. 1', 1 );197 $scripts->add( 'jquery-ui-progressbar', "/wp-includes/js/jquery/ui/progressbar$dev_suffix.js", array('jquery-ui-widget'), '1.11. 1', 1 );198 $scripts->add( 'jquery-ui-resizable', "/wp-includes/js/jquery/ui/resizable$dev_suffix.js", array('jquery-ui-mouse'), '1.11. 1', 1 );199 $scripts->add( 'jquery-ui-selectable', "/wp-includes/js/jquery/ui/selectable$dev_suffix.js", array('jquery-ui-mouse'), '1.11. 1', 1 );200 $scripts->add( 'jquery-ui-selectmenu', "/wp-includes/js/jquery/ui/selectmenu$dev_suffix.js", array('jquery-ui-menu'), '1.11. 1', 1 );201 $scripts->add( 'jquery-ui-slider', "/wp-includes/js/jquery/ui/slider$dev_suffix.js", array('jquery-ui-mouse'), '1.11. 1', 1 );202 $scripts->add( 'jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$dev_suffix.js", array('jquery-ui-mouse'), '1.11. 1', 1 );203 $scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$dev_suffix.js", array( 'jquery-ui-button' ), '1.11. 1', 1 );204 $scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11. 1', 1 );205 $scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11. 1', 1 );206 $scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array('jquery'), '1.11. 1', 1 );168 $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array('jquery'), '1.11.2', 1 ); 169 $scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$dev_suffix.js", array('jquery'), '1.11.2', 1 ); 170 171 $scripts->add( 'jquery-effects-blind', "/wp-includes/js/jquery/ui/effect-blind$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 172 $scripts->add( 'jquery-effects-bounce', "/wp-includes/js/jquery/ui/effect-bounce$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 173 $scripts->add( 'jquery-effects-clip', "/wp-includes/js/jquery/ui/effect-clip$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 174 $scripts->add( 'jquery-effects-drop', "/wp-includes/js/jquery/ui/effect-drop$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 175 $scripts->add( 'jquery-effects-explode', "/wp-includes/js/jquery/ui/effect-explode$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 176 $scripts->add( 'jquery-effects-fade', "/wp-includes/js/jquery/ui/effect-fade$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 177 $scripts->add( 'jquery-effects-fold', "/wp-includes/js/jquery/ui/effect-fold$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 178 $scripts->add( 'jquery-effects-highlight', "/wp-includes/js/jquery/ui/effect-highlight$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 179 $scripts->add( 'jquery-effects-puff', "/wp-includes/js/jquery/ui/effect-puff$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 180 $scripts->add( 'jquery-effects-pulsate', "/wp-includes/js/jquery/ui/effect-pulsate$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 181 $scripts->add( 'jquery-effects-scale', "/wp-includes/js/jquery/ui/effect-scale$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 182 $scripts->add( 'jquery-effects-shake', "/wp-includes/js/jquery/ui/effect-shake$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 183 $scripts->add( 'jquery-effects-size', "/wp-includes/js/jquery/ui/effect-size$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 184 $scripts->add( 'jquery-effects-slide', "/wp-includes/js/jquery/ui/effect-slide$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 185 $scripts->add( 'jquery-effects-transfer', "/wp-includes/js/jquery/ui/effect-transfer$dev_suffix.js", array('jquery-effects-core'), '1.11.2', 1 ); 186 187 $scripts->add( 'jquery-ui-accordion', "/wp-includes/js/jquery/ui/accordion$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.2', 1 ); 188 $scripts->add( 'jquery-ui-autocomplete', "/wp-includes/js/jquery/ui/autocomplete$dev_suffix.js", array('jquery-ui-menu'), '1.11.2', 1 ); 189 $scripts->add( 'jquery-ui-button', "/wp-includes/js/jquery/ui/button$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.2', 1 ); 190 $scripts->add( 'jquery-ui-datepicker', "/wp-includes/js/jquery/ui/datepicker$dev_suffix.js", array('jquery-ui-core'), '1.11.2', 1 ); 191 $scripts->add( 'jquery-ui-dialog', "/wp-includes/js/jquery/ui/dialog$dev_suffix.js", array('jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button', 'jquery-ui-position'), '1.11.2', 1 ); 192 $scripts->add( 'jquery-ui-draggable', "/wp-includes/js/jquery/ui/draggable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.2', 1 ); 193 $scripts->add( 'jquery-ui-droppable', "/wp-includes/js/jquery/ui/droppable$dev_suffix.js", array('jquery-ui-draggable'), '1.11.2', 1 ); 194 $scripts->add( 'jquery-ui-menu', "/wp-includes/js/jquery/ui/menu$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.2', 1 ); 195 $scripts->add( 'jquery-ui-mouse', "/wp-includes/js/jquery/ui/mouse$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget' ), '1.11.2', 1 ); 196 $scripts->add( 'jquery-ui-position', "/wp-includes/js/jquery/ui/position$dev_suffix.js", array('jquery'), '1.11.2', 1 ); 197 $scripts->add( 'jquery-ui-progressbar', "/wp-includes/js/jquery/ui/progressbar$dev_suffix.js", array('jquery-ui-widget'), '1.11.2', 1 ); 198 $scripts->add( 'jquery-ui-resizable', "/wp-includes/js/jquery/ui/resizable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.2', 1 ); 199 $scripts->add( 'jquery-ui-selectable', "/wp-includes/js/jquery/ui/selectable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.2', 1 ); 200 $scripts->add( 'jquery-ui-selectmenu', "/wp-includes/js/jquery/ui/selectmenu$dev_suffix.js", array('jquery-ui-menu'), '1.11.2', 1 ); 201 $scripts->add( 'jquery-ui-slider', "/wp-includes/js/jquery/ui/slider$dev_suffix.js", array('jquery-ui-mouse'), '1.11.2', 1 ); 202 $scripts->add( 'jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.2', 1 ); 203 $scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$dev_suffix.js", array( 'jquery-ui-button' ), '1.11.2', 1 ); 204 $scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.2', 1 ); 205 $scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.2', 1 ); 206 $scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array('jquery'), '1.11.2', 1 ); 207 207 208 208 // deprecated, not used in core, most functionality is included in jQuery 1.3
Note: See TracChangeset
for help on using the changeset viewer.