aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-15 17:14:19 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-15 17:14:19 +0100
commitf86168bf6b57a06b2faa53f976976fc17cb6cc7e (patch)
treea18bfd9cf1e75fa1417436798611bc969d9a59ad /ui
parent8cbbf33192728b51d2b7a05e2a75fa334da54f26 (diff)
parentfb6119e182ece9f2b5f94eb79b8763b602d04c47 (diff)
downloadjquery-ui-f86168bf6b57a06b2faa53f976976fc17cb6cc7e.tar.gz
jquery-ui-f86168bf6b57a06b2faa53f976976fc17cb6cc7e.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui')
-rw-r--r--ui/i18n/jquery.ui.datepicker-fo.js2
-rw-r--r--ui/jquery.ui.accordion.js2
-rw-r--r--ui/jquery.ui.datepicker.js14
-rw-r--r--ui/jquery.ui.resizable.js33
-rw-r--r--ui/jquery.ui.tooltip.js27
5 files changed, 50 insertions, 28 deletions
diff --git a/ui/i18n/jquery.ui.datepicker-fo.js b/ui/i18n/jquery.ui.datepicker-fo.js
index 9c848a04b..cb0e3def7 100644
--- a/ui/i18n/jquery.ui.datepicker-fo.js
+++ b/ui/i18n/jquery.ui.datepicker-fo.js
@@ -15,7 +15,7 @@ jQuery(function($){
dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
weekHeader: 'Vk',
dateFormat: 'dd-mm-yy',
- firstDay: 0,
+ firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''};
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 4ebc5b549..7914f7c5f 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -346,7 +346,7 @@ $.widget( "ui.accordion", {
maxHeight = 0;
this.headers.next()
.each(function() {
- maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
+ maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
})
.height( maxHeight );
}
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index c7ecafffb..e3c3bd398 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1742,8 +1742,20 @@ $.extend(Datepicker.prototype, {
_isInRange: function(inst, date) {
var minDate = this._getMinMaxDate(inst, 'min');
var maxDate = this._getMinMaxDate(inst, 'max');
+ var minYear = null;
+ var maxYear = null;
+ var years = this._get(inst, 'yearRange');
+ if (years){
+ var yearSplit = years.split(':');
+ var currentYear = new Date().getFullYear();
+ minYear = parseInt(yearSplit[0], 10) + currentYear;
+ maxYear = parseInt(yearSplit[1], 10) + currentYear;
+ }
+
return ((!minDate || date.getTime() >= minDate.getTime()) &&
- (!maxDate || date.getTime() <= maxDate.getTime()));
+ (!maxDate || date.getTime() <= maxDate.getTime()) &&
+ (!minYear || date.getFullYear() >= minYear) &&
+ (!maxYear || date.getFullYear() <= maxYear));
},
/* Provide the configuration settings for formatting/parsing. */
diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js
index fba9216e1..a27a140b2 100644
--- a/ui/jquery.ui.resizable.js
+++ b/ui/jquery.ui.resizable.js
@@ -286,8 +286,10 @@ $.widget("ui.resizable", $.ui.mouse, {
_mouseDrag: function(event) {
//Increase performance, avoid regex
- var el = this.helper,
- smp = this.originalMousePosition, a = this.axis;
+ var el = this.helper, props = {},
+ smp = this.originalMousePosition, a = this.axis,
+ prevTop = this.position.top, prevLeft = this.position.left,
+ prevWidth = this.size.width, prevHeight = this.size.height;
var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
var trigger = this._change[a];
@@ -303,21 +305,32 @@ $.widget("ui.resizable", $.ui.mouse, {
data = this._respectSize(data, event);
+ this._updateCache(data);
+
// plugins callbacks need to be called first
this._propagate("resize", event);
- el.css({
- top: this.position.top + "px", left: this.position.left + "px",
- width: this.size.width + "px", height: this.size.height + "px"
- });
+ if (this.position.top !== prevTop) {
+ props.top = this.position.top + "px";
+ }
+ if (this.position.left !== prevLeft) {
+ props.left = this.position.left + "px";
+ }
+ if (this.size.width !== prevWidth) {
+ props.width = this.size.width + "px";
+ }
+ if (this.size.height !== prevHeight) {
+ props.height = this.size.height + "px";
+ }
+ el.css(props);
if (!this._helper && this._proportionallyResizeElements.length)
this._proportionallyResize();
- this._updateCache(data);
-
- // calling the user callback at the end
- this._trigger('resize', event, this.ui());
+ // Call the user callback if the element was resized
+ if ( ! $.isEmptyObject(props) ) {
+ this._trigger('resize', event, this.ui());
+ }
return false;
},
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index e5b496bee..2ccd61f46 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -138,20 +138,8 @@ $.widget( "ui.tooltip", {
// but always pointing at the same event target
.closest( this.options.items );
- // No element to show a tooltip for
- if ( !target.length ) {
- return;
- }
-
- // If the tooltip is open and we're tracking then reposition the tooltip.
- // This makes sure that a tracking tooltip doesn't obscure a focused element
- // if the user was hovering when the element gained focused.
- if ( this.options.track && target.data( "ui-tooltip-id" ) ) {
- this._find( target ).position( $.extend({
- of: target
- }, this.options.position ) );
- // Stop tracking (#8622)
- this._off( this.document, "mousemove" );
+ // No element to show a tooltip for or the tooltip is already open
+ if ( !target.length || target.data( "ui-tooltip-id" ) ) {
return;
}
@@ -188,7 +176,8 @@ $.widget( "ui.tooltip", {
_updateContent: function( target, event ) {
var content,
contentOption = this.options.content,
- that = this;
+ that = this,
+ eventType = event ? event.type : null;
if ( typeof contentOption === "string" ) {
return this._open( event, target, contentOption );
@@ -202,6 +191,14 @@ $.widget( "ui.tooltip", {
// IE may instantly serve a cached response for ajax requests
// delay this call to _open so the other call to _open runs first
that._delay(function() {
+ // jQuery creates a special event for focusin when it doesn't
+ // exist natively. To improve performance, the native event
+ // object is reused and the type is changed. Therefore, we can't
+ // rely on the type being correct after the event finished
+ // bubbling, so we set it back to the previous value. (#8740)
+ if ( event ) {
+ event.type = eventType;
+ }
this._open( event, target, response );
});
});