diff options
author | Felix Nagel <info@felixnagel.com> | 2013-10-21 20:33:49 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-10-21 20:33:49 +0200 |
commit | fab6b8883e9464d101e2550dd2c12706a9de164d (patch) | |
tree | 5b19fadfa678d5709dfb9451b7635f00f038369f /ui | |
parent | 7af3dab075b71b4a4b542e3e3201229399a56959 (diff) | |
parent | fdc7052fdb7fdac34e79203a0cea2376fa588994 (diff) | |
download | jquery-ui-fab6b8883e9464d101e2550dd2c12706a9de164d.tar.gz jquery-ui-fab6b8883e9464d101e2550dd2c12706a9de164d.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui')
-rw-r--r-- | ui/i18n/jquery.ui.datepicker-fi.js | 2 | ||||
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 2 | ||||
-rw-r--r-- | ui/jquery.ui.draggable.js | 24 | ||||
-rw-r--r-- | ui/jquery.ui.menu.js | 4 | ||||
-rw-r--r-- | ui/jquery.ui.resizable.js | 2 | ||||
-rw-r--r-- | ui/jquery.ui.slider.js | 2 | ||||
-rw-r--r-- | ui/jquery.ui.sortable.js | 6 | ||||
-rw-r--r-- | ui/jquery.ui.widget.js | 4 |
8 files changed, 25 insertions, 21 deletions
diff --git a/ui/i18n/jquery.ui.datepicker-fi.js b/ui/i18n/jquery.ui.datepicker-fi.js index bd6d99498..e5c554aba 100644 --- a/ui/i18n/jquery.ui.datepicker-fi.js +++ b/ui/i18n/jquery.ui.datepicker-fi.js @@ -14,7 +14,7 @@ jQuery(function($){ dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'], dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'], weekHeader: 'Vk', - dateFormat: 'dd.mm.yy', + dateFormat: 'd.m.yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index d1a3c252d..2b803b62f 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -294,7 +294,7 @@ $.widget( "ui.autocomplete", { "aria-live": "polite" }) .addClass( "ui-helper-hidden-accessible" ) - .insertBefore( this.element ); + .appendTo( this.document[ 0 ].body ); // turning off autocomplete prevents the browser from remembering the // value when navigating through history, so we re-enable autocomplete diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 3b18f28f0..e528d194e 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -166,7 +166,7 @@ $.widget("ui.draggable", $.ui.mouse, { }); //Generate the original position - this.originalPosition = this.position = this._generatePosition(event); + this.originalPosition = this.position = this._generatePosition( event, false ); this.originalPageX = event.pageX; this.originalPageY = event.pageY; @@ -208,7 +208,7 @@ $.widget("ui.draggable", $.ui.mouse, { } //Compute the helpers position - this.position = this._generatePosition(event); + this.position = this._generatePosition( event, true ); this.positionAbs = this._convertPositionTo("absolute"); //Call plugins and callbacks and use the resulting position if something is returned @@ -221,12 +221,9 @@ $.widget("ui.draggable", $.ui.mouse, { this.position = ui.position; } - if(!this.options.axis || this.options.axis !== "y") { - this.helper[0].style.left = this.position.left+"px"; - } - if(!this.options.axis || this.options.axis !== "x") { - this.helper[0].style.top = this.position.top+"px"; - } + this.helper[ 0 ].style.left = this.position.left + "px"; + this.helper[ 0 ].style.top = this.position.top + "px"; + if($.ui.ddmanager) { $.ui.ddmanager.drag(this, event); } @@ -491,7 +488,7 @@ $.widget("ui.draggable", $.ui.mouse, { }, - _generatePosition: function(event) { + _generatePosition: function( event, constrainPosition ) { var containment, co, top, left, o = this.options, @@ -516,7 +513,7 @@ $.widget("ui.draggable", $.ui.mouse, { */ // If we are not dragging yet, we won't check for options - if ( this.originalPosition ) { + if ( constrainPosition ) { if ( this.containment ) { if ( this.relative_container ){ co = this.relative_container.offset(); @@ -554,6 +551,13 @@ $.widget("ui.draggable", $.ui.mouse, { pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; } + if ( o.axis === "y" ) { + pageX = this.originalPageX; + } + + if ( o.axis === "x" ) { + pageY = this.originalPageY; + } } return { diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 059f80b30..b0ff38894 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -371,7 +371,7 @@ $.widget( "ui.menu", { this._scrollIntoView( item ); this.active = item.first(); - focused = this.active.addClass( "ui-state-focus" ); + focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" ); // Only update aria-activedescendant if there's a role // otherwise we assume focus is managed elsewhere if ( this.options.role ) { @@ -498,7 +498,7 @@ $.widget( "ui.menu", { .attr( "aria-hidden", "true" ) .attr( "aria-expanded", "false" ) .end() - .find( ".ui-state-active" ) + .find( ".ui-state-active" ).not( ".ui-state-focus" ) .removeClass( "ui-state-active" ); }, diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js index aab93b57f..f683e6b65 100644 --- a/ui/jquery.ui.resizable.js +++ b/ui/jquery.ui.resizable.js @@ -316,7 +316,7 @@ $.widget("ui.resizable", $.ui.mouse, { //Store needed variables this.offset = this.helper.offset(); this.position = { left: curleft, top: curtop }; - this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; + this.size = this._helper ? { width: this.helper.width(), height: this.helper.height() } : { width: el.width(), height: el.height() }; this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; this.originalPosition = { left: curleft, top: curtop }; this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index e4f1cf7c9..df71f363f 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -322,7 +322,7 @@ $.widget( "ui.slider", $.ui.mouse, { } ); otherVal = this.values( index ? 0 : 1 ); if ( allowed !== false ) { - this.values( index, newVal, true ); + this.values( index, newVal ); } } } else { diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 9c7bf446c..c76a02397 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -354,12 +354,12 @@ $.widget("ui.sortable", $.ui.mouse, { } // Only put the placeholder inside the current Container, skip all - // items form other containers. This works because when moving + // items from other containers. This works because when moving // an item from one container to another the // currentContainer is switched before the placeholder is moved. // - // Without this moving items in "sub-sortables" can cause the placeholder to jitter - // beetween the outer and inner container. + // Without this, moving items in "sub-sortables" can cause + // the placeholder to jitter beetween the outer and inner container. if (item.instance !== this.currentContainer) { continue; } diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index a46dcaf99..cc01f784f 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -321,12 +321,12 @@ $.Widget.prototype = { curOption = curOption[ parts[ i ] ]; } key = parts.pop(); - if ( value === undefined ) { + if ( arguments.length === 1 ) { return curOption[ key ] === undefined ? null : curOption[ key ]; } curOption[ key ] = value; } else { - if ( value === undefined ) { + if ( arguments.length === 1 ) { return this.options[ key ] === undefined ? null : this.options[ key ]; } options[ key ] = value; |