aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-01-30 18:10:39 +0100
committerFelix Nagel <info@felixnagel.com>2013-01-30 18:10:39 +0100
commit91dde04dadcd9b314e099ced040a763aa35b7b5c (patch)
tree3572e1b71f5c8998c46e411b9d992795a1105530 /ui
parentde149c47d79bf5822baad786591eb837fe2af769 (diff)
parentceebe07e2c99190030c16b031813ae660d9283d1 (diff)
downloadjquery-ui-91dde04dadcd9b314e099ced040a763aa35b7b5c.tar.gz
jquery-ui-91dde04dadcd9b314e099ced040a763aa35b7b5c.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.accordion.js5
-rw-r--r--ui/jquery.ui.datepicker.js10
-rw-r--r--ui/jquery.ui.dialog.js19
-rw-r--r--ui/jquery.ui.effect.js4
-rw-r--r--ui/jquery.ui.slider.js2
5 files changed, 27 insertions, 13 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 8050e55ab..1afa95cb4 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -65,6 +65,7 @@ $.widget( "ui.accordion", {
_getCreateEventData: function() {
return {
header: this.active,
+ panel: !this.active.length ? $() : this.active.next(),
content: !this.active.length ? $() : this.active.next()
};
},
@@ -262,8 +263,8 @@ $.widget( "ui.accordion", {
(this.element.attr( "id" ) || ++uid);
this.active = this._findActive( options.active )
- .addClass( "ui-accordion-header-active ui-state-active" )
- .toggleClass( "ui-corner-all ui-corner-top" );
+ .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
+ .removeClass( "ui-corner-all" );
this.active.next()
.addClass( "ui-accordion-content-active" )
.show();
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 24f0d5405..e93f596fc 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1918,8 +1918,14 @@ $.extend(Datepicker.prototype, {
if (years){
yearSplit = years.split(":");
currentYear = new Date().getFullYear();
- minYear = parseInt(yearSplit[0], 10) + currentYear;
- maxYear = parseInt(yearSplit[1], 10) + currentYear;
+ minYear = parseInt(yearSplit[0], 10);
+ maxYear = parseInt(yearSplit[1], 10);
+ if ( yearSplit[0].match(/[+\-].*/) ) {
+ minYear += currentYear;
+ }
+ if ( yearSplit[1].match(/[+\-].*/) ) {
+ maxYear += currentYear;
+ }
}
return ((!minDate || date.getTime() >= minDate.getTime()) &&
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index ef5787ef6..ec4032ff3 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -679,7 +679,10 @@ $.widget( "ui.dialog", {
if ( $.ui.dialog.overlayInstances ) {
this._on( this.document, {
focusin: function( event ) {
- if ( !$( event.target ).closest(".ui-dialog").length ) {
+ if ( !$( event.target ).closest(".ui-dialog").length &&
+ // TODO: Remove hack when datepicker implements
+ // the .ui-front logic (#8989)
+ !$( event.target ).closest(".ui-datepicker").length ) {
event.preventDefault();
$(".ui-dialog:visible:last .ui-dialog-content")
.data("ui-dialog")._focusTabbable();
@@ -692,7 +695,7 @@ $.widget( "ui.dialog", {
this.overlay = $("<div>")
.addClass("ui-widget-overlay ui-front")
- .appendTo( this.document[0].body );
+ .appendTo( this._appendTo() );
this._on( this.overlay, {
mousedown: "_keepFocus"
});
@@ -704,11 +707,15 @@ $.widget( "ui.dialog", {
return;
}
- $.ui.dialog.overlayInstances--;
- if ( !$.ui.dialog.overlayInstances ) {
- this._off( this.document, "focusin" );
+ if ( this.overlay ) {
+ $.ui.dialog.overlayInstances--;
+
+ if ( !$.ui.dialog.overlayInstances ) {
+ this._off( this.document, "focusin" );
+ }
+ this.overlay.remove();
+ this.overlay = null;
}
- this.overlay.remove();
}
});
diff --git a/ui/jquery.ui.effect.js b/ui/jquery.ui.effect.js
index c6623a0a1..97f006ee0 100644
--- a/ui/jquery.ui.effect.js
+++ b/ui/jquery.ui.effect.js
@@ -849,10 +849,10 @@ $.fn.extend({
_removeClass: $.fn.removeClass,
removeClass: function( classNames, speed, easing, callback ) {
- return speed ?
+ return arguments.length > 1 ?
$.effects.animateClass.call( this,
{ remove: classNames }, speed, easing, callback ) :
- this._removeClass( classNames );
+ this._removeClass.apply( this, arguments );
},
_toggleClass: $.fn.toggleClass,
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index 9640361a1..54024af49 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -80,7 +80,7 @@ $.widget( "ui.slider", $.ui.mouse, {
.addClass( "ui-slider-range" +
// note: this isn't the most fittingly semantic framework class for this element,
// but worked best visually with a variety of themes
- " ui-widget-header" +
+ " ui-widget-header ui-corner-all" +
( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
}