aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/i18n/jquery.ui.datepicker-es.js6
-rw-r--r--ui/i18n/jquery.ui.datepicker-fi.js10
-rw-r--r--ui/i18n/jquery.ui.datepicker-gl.js6
-rw-r--r--ui/i18n/jquery.ui.datepicker-is.js18
-rw-r--r--ui/i18n/jquery.ui.datepicker-it.js2
-rw-r--r--ui/i18n/jquery.ui.datepicker-pt-BR.js10
-rw-r--r--ui/i18n/jquery.ui.datepicker-pt.js8
-rw-r--r--ui/i18n/jquery.ui.datepicker-sl.js10
-rw-r--r--ui/i18n/jquery.ui.datepicker-zh-CN.js4
-rw-r--r--ui/i18n/jquery.ui.datepicker-zh-HK.js4
-rw-r--r--ui/i18n/jquery.ui.datepicker-zh-TW.js4
-rw-r--r--ui/jquery.ui.autocomplete.js4
-rw-r--r--ui/jquery.ui.core.js41
-rw-r--r--ui/jquery.ui.datepicker.js3
-rw-r--r--ui/jquery.ui.droppable.js7
-rw-r--r--ui/jquery.ui.effect-shake.js2
-rw-r--r--ui/jquery.ui.effect.js79
-rw-r--r--ui/jquery.ui.menu.js5
-rw-r--r--ui/jquery.ui.position.js4
-rw-r--r--ui/jquery.ui.sortable.js31
-rw-r--r--ui/jquery.ui.tabs.js55
21 files changed, 188 insertions, 125 deletions
diff --git a/ui/i18n/jquery.ui.datepicker-es.js b/ui/i18n/jquery.ui.datepicker-es.js
index 5f90cb506..63368aecc 100644
--- a/ui/i18n/jquery.ui.datepicker-es.js
+++ b/ui/i18n/jquery.ui.datepicker-es.js
@@ -10,9 +10,9 @@ jQuery(function($){
'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
'Jul','Ago','Sep','Oct','Nov','Dic'],
- dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
- dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
- dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
+ dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
+ dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
weekHeader: 'Sm',
dateFormat: 'dd/mm/yy',
firstDay: 1,
diff --git a/ui/i18n/jquery.ui.datepicker-fi.js b/ui/i18n/jquery.ui.datepicker-fi.js
index 4c5adda35..bd6d99498 100644
--- a/ui/i18n/jquery.ui.datepicker-fi.js
+++ b/ui/i18n/jquery.ui.datepicker-fi.js
@@ -5,11 +5,11 @@ jQuery(function($){
closeText: 'Sulje',
prevText: '«Edellinen',
nextText: 'Seuraava»',
- currentText: 'Tänään',
- monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
- 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
- monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
- 'Heinä','Elo','Syys','Loka','Marras','Joulu'],
+ currentText: 'Tänään',
+ monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
+ 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
+ monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
+ 'Heinä','Elo','Syys','Loka','Marras','Joulu'],
dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
diff --git a/ui/i18n/jquery.ui.datepicker-gl.js b/ui/i18n/jquery.ui.datepicker-gl.js
index 3e24312a4..0de64968f 100644
--- a/ui/i18n/jquery.ui.datepicker-gl.js
+++ b/ui/i18n/jquery.ui.datepicker-gl.js
@@ -10,9 +10,9 @@ jQuery(function($){
'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
'Xul','Ago','Set','Out','Nov','Dec'],
- dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
- dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
- dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
+ dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
+ dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
weekHeader: 'Sm',
dateFormat: 'dd/mm/yy',
firstDay: 1,
diff --git a/ui/i18n/jquery.ui.datepicker-is.js b/ui/i18n/jquery.ui.datepicker-is.js
index b52959a03..f1b067ebf 100644
--- a/ui/i18n/jquery.ui.datepicker-is.js
+++ b/ui/i18n/jquery.ui.datepicker-is.js
@@ -4,15 +4,15 @@ jQuery(function($){
$.datepicker.regional['is'] = {
closeText: 'Loka',
prevText: '< Fyrri',
- nextText: 'Næsti >',
- currentText: 'Í dag',
- monthNames: ['Janúar','Febrúar','Mars','Apríl','Ma&iacute','Júní',
- 'Júlí','Ágúst','September','Október','Nóvember','Desember'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
- 'Júl','Ágú','Sep','Okt','Nóv','Des'],
- dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
- dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
- dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
+ nextText: 'Næsti >',
+ currentText: 'Í dag',
+ monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
+ 'Júlí','Ágúst','September','Október','Nóvember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
+ 'Júl','Ágú','Sep','Okt','Nóv','Des'],
+ dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
+ dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
+ dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
weekHeader: 'Vika',
dateFormat: 'dd/mm/yy',
firstDay: 0,
diff --git a/ui/i18n/jquery.ui.datepicker-it.js b/ui/i18n/jquery.ui.datepicker-it.js
index ebca16637..a01f043f8 100644
--- a/ui/i18n/jquery.ui.datepicker-it.js
+++ b/ui/i18n/jquery.ui.datepicker-it.js
@@ -10,7 +10,7 @@ jQuery(function($){
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
'Lug','Ago','Set','Ott','Nov','Dic'],
- dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
+ dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
weekHeader: 'Sm',
diff --git a/ui/i18n/jquery.ui.datepicker-pt-BR.js b/ui/i18n/jquery.ui.datepicker-pt-BR.js
index b2d61f62e..0741892ab 100644
--- a/ui/i18n/jquery.ui.datepicker-pt-BR.js
+++ b/ui/i18n/jquery.ui.datepicker-pt-BR.js
@@ -4,15 +4,15 @@ jQuery(function($){
$.datepicker.regional['pt-BR'] = {
closeText: 'Fechar',
prevText: '<Anterior',
- nextText: 'Próximo>',
+ nextText: 'Próximo>',
currentText: 'Hoje',
- monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
'Jul','Ago','Set','Out','Nov','Dez'],
- dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
- dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
- dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
weekHeader: 'Sm',
dateFormat: 'dd/mm/yy',
firstDay: 0,
diff --git a/ui/i18n/jquery.ui.datepicker-pt.js b/ui/i18n/jquery.ui.datepicker-pt.js
index 9ec5a6228..98925b455 100644
--- a/ui/i18n/jquery.ui.datepicker-pt.js
+++ b/ui/i18n/jquery.ui.datepicker-pt.js
@@ -5,13 +5,13 @@ jQuery(function($){
prevText: '<Anterior',
nextText: 'Seguinte',
currentText: 'Hoje',
- monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
'Jul','Ago','Set','Out','Nov','Dez'],
- dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
- dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
- dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
weekHeader: 'Sem',
dateFormat: 'dd/mm/yy',
firstDay: 0,
diff --git a/ui/i18n/jquery.ui.datepicker-sl.js b/ui/i18n/jquery.ui.datepicker-sl.js
index e3d7f6d74..048a47af7 100644
--- a/ui/i18n/jquery.ui.datepicker-sl.js
+++ b/ui/i18n/jquery.ui.datepicker-sl.js
@@ -1,19 +1,19 @@
/* Slovenian initialisation for the jQuery UI date picker plugin. */
/* Written by Jaka Jancar (jaka@kubje.org). */
-/* c = č, s = š z = ž C = Č S = Š Z = Ž */
+/* c = č, s = š z = ž C = Č S = Š Z = Ž */
jQuery(function($){
$.datepicker.regional['sl'] = {
closeText: 'Zapri',
- prevText: '<Prejšnji',
+ prevText: '<Prejšnji',
nextText: 'Naslednji>',
currentText: 'Trenutni',
monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
'Julij','Avgust','September','Oktober','November','December'],
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
'Jul','Avg','Sep','Okt','Nov','Dec'],
- dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
- dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
- dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
+ dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
+ dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
+ dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
weekHeader: 'Teden',
dateFormat: 'dd.mm.yy',
firstDay: 1,
diff --git a/ui/i18n/jquery.ui.datepicker-zh-CN.js b/ui/i18n/jquery.ui.datepicker-zh-CN.js
index fed386f54..d337e4a99 100644
--- a/ui/i18n/jquery.ui.datepicker-zh-CN.js
+++ b/ui/i18n/jquery.ui.datepicker-zh-CN.js
@@ -8,8 +8,8 @@ jQuery(function($){
currentText: '今天',
monthNames: ['一月','二月','三月','四月','五月','六月',
'七月','八月','九月','十月','十一月','十二月'],
- monthNamesShort: ['一','二','三','四','五','六',
- '七','八','九','十','十一','十二'],
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
dayNamesMin: ['日','一','二','三','四','五','六'],
diff --git a/ui/i18n/jquery.ui.datepicker-zh-HK.js b/ui/i18n/jquery.ui.datepicker-zh-HK.js
index 3c26d0ec2..ef6f4e715 100644
--- a/ui/i18n/jquery.ui.datepicker-zh-HK.js
+++ b/ui/i18n/jquery.ui.datepicker-zh-HK.js
@@ -8,8 +8,8 @@ jQuery(function($){
currentText: '今天',
monthNames: ['一月','二月','三月','四月','五月','六月',
'七月','八月','九月','十月','十一月','十二月'],
- monthNamesShort: ['一','二','三','四','五','六',
- '七','八','九','十','十一','十二'],
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
dayNamesMin: ['日','一','二','三','四','五','六'],
diff --git a/ui/i18n/jquery.ui.datepicker-zh-TW.js b/ui/i18n/jquery.ui.datepicker-zh-TW.js
index 19702a65c..b9105ea50 100644
--- a/ui/i18n/jquery.ui.datepicker-zh-TW.js
+++ b/ui/i18n/jquery.ui.datepicker-zh-TW.js
@@ -8,8 +8,8 @@ jQuery(function($){
currentText: '今天',
monthNames: ['一月','二月','三月','四月','五月','六月',
'七月','八月','九月','十月','十一月','十二月'],
- monthNamesShort: ['一','二','三','四','五','六',
- '七','八','九','十','十一','十二'],
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
dayNamesMin: ['日','一','二','三','四','五','六'],
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index 617aa9c70..80778f908 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -154,7 +154,7 @@ $.widget( "ui.autocomplete", {
break;
}
},
- input: function( event ) {
+ input: function( event ) {
if ( suppressInput ) {
suppressInput = false;
event.preventDefault();
@@ -482,8 +482,6 @@ $.widget( "ui.autocomplete", {
.empty()
.zIndex( this.element.zIndex() + 1 );
this._renderMenu( ul, items );
- // TODO refresh should check if the active item is still in the dom, removing the need for a manual blur
- this.menu.blur();
this.menu.refresh();
// size and position menu
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js
index 0e33f11ed..daa0c16e2 100644
--- a/ui/jquery.ui.core.js
+++ b/ui/jquery.ui.core.js
@@ -125,17 +125,6 @@ $.fn.extend({
$( this ).removeAttr( "id" );
}
});
- },
-
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- },
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
}
});
@@ -268,6 +257,20 @@ $(function() {
// deprecated
+
+$.fn.extend({
+ disableSelection: function() {
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+ ".ui-disableSelection", function( event ) {
+ event.preventDefault();
+ });
+ },
+
+ enableSelection: function() {
+ return this.unbind( ".ui-disableSelection" );
+ }
+});
+
$.extend( $.ui, {
// $.ui.plugin is deprecated. Use the proxy pattern instead.
plugin: {
@@ -285,7 +288,7 @@ $.extend( $.ui, {
if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
return;
}
-
+
for ( i = 0; i < set.length; i++ ) {
if ( instance.options[ set[ i ][ 0 ] ] ) {
set[ i ][ 1 ].apply( instance.element, args );
@@ -293,24 +296,24 @@ $.extend( $.ui, {
}
}
},
-
+
contains: $.contains,
-
+
// only used by resizable
hasScroll: function( el, a ) {
-
+
//If overflow is hidden, the element might have extra content, but the user wants to hide it
if ( $( el ).css( "overflow" ) === "hidden") {
return false;
}
-
+
var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
has = false;
-
+
if ( el[ scroll ] > 0 ) {
return true;
}
-
+
// TODO: determine which cases actually cause this to happen
// if the element doesn't have the scroll set, see if it's possible to
// set the scroll
@@ -319,7 +322,7 @@ $.extend( $.ui, {
el[ scroll ] = 0;
return has;
},
-
+
// these are odd functions, fix the API or move into individual plugins
isOverAxis: function( x, reference, size ) {
//Determines when x coordinate is over "b" element axis
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index cd4ffe3ee..f72b15d1f 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -708,9 +708,6 @@ $.extend(Datepicker.prototype, {
/* Generate the date picker content. */
_updateDatepicker: function(inst) {
- if ($.datepicker._curInst && inst != $.datepicker._curInst) {
- return;
- }
this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
var borders = $.datepicker._getBorders(inst.dpDiv);
instActive = inst; // for delegate hover events
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js
index 36179d6d5..a99ec50a3 100644
--- a/ui/jquery.ui.droppable.js
+++ b/ui/jquery.ui.droppable.js
@@ -253,7 +253,12 @@ $.ui.ddmanager = {
var parentInstance;
if (this.options.greedy) {
- var parent = this.element.parents(':data(droppable):eq(0)');
+ // find droppable parents with same scope
+ var scope = this.options.scope;
+ var parent = this.element.parents(':data(droppable)').filter(function () {
+ return $.data(this, 'droppable').options.scope === scope;
+ });
+
if (parent.length) {
parentInstance = $.data(parent[0], 'droppable');
parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
diff --git a/ui/jquery.ui.effect-shake.js b/ui/jquery.ui.effect-shake.js
index fd9605d0a..9ae3968d6 100644
--- a/ui/jquery.ui.effect-shake.js
+++ b/ui/jquery.ui.effect-shake.js
@@ -22,7 +22,7 @@ $.effects.effect.shake = function( o, done ) {
distance = o.distance || 20,
times = o.times || 3,
anims = times * 2 + 1,
- speed = o.duration,
+ speed = Math.round(o.duration/anims),
ref = (direction === "up" || direction === "down") ? "top" : "left",
positiveMotion = (direction === "up" || direction === "left"),
animation = {},
diff --git a/ui/jquery.ui.effect.js b/ui/jquery.ui.effect.js
index ec8260709..8ad9b34e3 100644
--- a/ui/jquery.ui.effect.js
+++ b/ui/jquery.ui.effect.js
@@ -19,12 +19,14 @@ $.effects = {
};
/*!
- * jQuery Color Animations
+ * jQuery Color Animations v2.0.0
* http://jquery.com/
*
* Copyright 2012 jQuery Foundation and other contributors
- * Dual licensed under the MIT or GPL Version 2 licenses.
+ * Released under the MIT license.
* http://jquery.org/license
+ *
+ * Date: Mon Aug 13 13:41:02 2012 -0500
*/
(function( jQuery, undefined ) {
@@ -272,8 +274,8 @@ color.fn = jQuery.extend( color.prototype, {
});
} else {
each( spaces, function( spaceName, space ) {
+ var cache = space.cache;
each( space.props, function( key, prop ) {
- var cache = space.cache;
// if the cache doesn't exist, and we know how to convert
if ( !inst[ cache ] && space.to ) {
@@ -290,6 +292,15 @@ color.fn = jQuery.extend( color.prototype, {
// call clamp with alwaysAllowEmpty
inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
});
+
+ // everything defined but alpha?
+ if ( inst[ cache ] && $.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
+ // use the default of 1
+ inst[ cache ][ 3 ] = 1;
+ if ( space.from ) {
+ inst._rgba = space.from( inst[ cache ] );
+ }
+ }
});
}
return this;
@@ -581,19 +592,23 @@ each( spaces, function( spaceName, space ) {
each( stepHooks, function( i, hook ) {
jQuery.cssHooks[ hook ] = {
set: function( elem, value ) {
- var parsed, backgroundColor, curElem;
+ var parsed, curElem,
+ backgroundColor = "";
if ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) {
value = color( parsed || value );
if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- do {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- } while (
- ( backgroundColor === "" || backgroundColor === "transparent" ) &&
- ( curElem = curElem.parentNode ) &&
- curElem.style
- );
+ while (
+ (backgroundColor === "" || backgroundColor === "transparent") &&
+ curElem && curElem.style
+ ) {
+ try {
+ backgroundColor = jQuery.css( curElem, "backgroundColor" );
+ curElem = curElem.parentNode;
+ } catch ( e ) {
+ }
+ }
value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
backgroundColor :
@@ -619,6 +634,17 @@ each( stepHooks, function( i, hook ) {
};
});
+jQuery.cssHooks.borderColor = {
+ expand: function( value ) {
+ var expanded = {};
+
+ each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
+ expanded[ "border" + part + "Color" ] = value;
+ });
+ return expanded;
+ }
+};
+
// Basic color names only.
// Usage of any of the other color names requires adding yourself or including
// jquery.color.svg-names.js.
@@ -641,7 +667,7 @@ colors = jQuery.Color.names = {
white: "#ffffff",
yellow: "#ffff00",
- // 4.2.3. ‘transparent’ color keyword
+ // 4.2.3. "transparent" color keyword
transparent: [ null, null, null, 0 ],
_default: "#ffffff"
@@ -805,37 +831,42 @@ $.fn.extend({
_addClass: $.fn.addClass,
addClass: function( classNames, speed, easing, callback ) {
return speed ?
- $.effects.animateClass.apply( this, [{ add: classNames }, speed, easing, callback ]) :
- this._addClass(classNames);
+ $.effects.animateClass.call( this,
+ { add: classNames }, speed, easing, callback ) :
+ this._addClass( classNames );
},
_removeClass: $.fn.removeClass,
removeClass: function( classNames, speed, easing, callback ) {
return speed ?
- $.effects.animateClass.apply( this, [{ remove: classNames }, speed, easing, callback ]) :
- this._removeClass(classNames);
+ $.effects.animateClass.call( this,
+ { remove: classNames }, speed, easing, callback ) :
+ this._removeClass( classNames );
},
_toggleClass: $.fn.toggleClass,
toggleClass: function( classNames, force, speed, easing, callback ) {
if ( typeof force === "boolean" || force === undefined ) {
if ( !speed ) {
- // without speed parameter;
+ // without speed parameter
return this._toggleClass( classNames, force );
} else {
- return $.effects.animateClass.apply( this, [( force ? { add:classNames } : { remove:classNames }), speed, easing, callback ]);
+ return $.effects.animateClass.call( this,
+ (force ? { add: classNames } : { remove: classNames }),
+ speed, easing, callback );
}
} else {
- // without force parameter;
- return $.effects.animateClass.apply( this, [{ toggle: classNames }, force, speed, easing ]);
+ // without force parameter
+ return $.effects.animateClass.call( this,
+ { toggle: classNames }, force, speed, easing );
}
},
switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.apply( this, [{
- add: add,
- remove: remove
- }, speed, easing, callback ]);
+ return $.effects.animateClass.call( this, {
+ add: add,
+ remove: remove
+ }, speed, easing, callback );
}
});
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index 78b602cce..333bc9a38 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -319,6 +319,11 @@ $.widget( "ui.menu", {
.prepend( submenuCarat );
menu.attr( "aria-labelledby", item.attr( "id" ) );
});
+
+ // If the active item has been removed, blur the menu
+ if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
+ this.blur();
+ }
},
_itemRole: function() {
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index eef8a95c9..2e2fe215a 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -360,7 +360,7 @@ $.ui.position = {
var within = data.within,
withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
- offsetLeft = within.isWindow ? 0 : within.offset.left,
+ offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
overLeft = collisionPosLeft - offsetLeft,
overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
@@ -395,7 +395,7 @@ $.ui.position = {
var within = data.within,
withinOffset = within.offset.top + within.scrollTop,
outerHeight = within.height,
- offsetTop = within.isWindow ? 0 : within.offset.top,
+ offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
collisionPosTop = position.top - data.collisionPosition.marginTop,
overTop = collisionPosTop - offsetTop,
overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index 8d7b6ccb8..0b10cffc2 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -296,7 +296,16 @@ $.widget("ui.sortable", $.ui.mouse, {
var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
if (!intersection) continue;
- if(itemElement != this.currentItem[0] //cannot intersect with itself
+ // Only put the placeholder inside the current Container, skip all
+ // items form 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.
+ if (item.instance !== this.currentContainer) continue;
+
+ if (itemElement != this.currentItem[0] //cannot intersect with itself
&& this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
&& !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
&& (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true)
@@ -999,15 +1008,17 @@ $.widget("ui.sortable", $.ui.mouse, {
if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
- if(!$.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
- if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- for (var i = this.containers.length - 1; i >= 0; i--){
- if($.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- }
- };
- };
+
+ // Check if the items Container has Changed and trigger appropriate
+ // events.
+ if (this !== this.currentContainer) {
+ if(!noPropagation) {
+ delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
+ }
+ }
+
//Post events to containers
for (var i = this.containers.length - 1; i >= 0; i--){
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index b31ce364a..7631366d6 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -792,13 +792,7 @@ $.widget( "ui.tabs", {
return;
}
- this.xhr = $.ajax({
- url: anchor.attr( "href" ),
- beforeSend: function( jqXHR, settings ) {
- return that._trigger( "beforeLoad", event,
- $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
- }
- });
+ this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
// support: jQuery <1.8
// jQuery <1.8 returns false if the request is canceled in beforeSend,
@@ -835,6 +829,18 @@ $.widget( "ui.tabs", {
}
},
+ // TODO: Remove this function in 1.10 when ajaxOptions is removed
+ _ajaxSettings: function( anchor, event, eventData ) {
+ var that = this;
+ return {
+ url: anchor.attr( "href" ),
+ beforeSend: function( jqXHR, settings ) {
+ return that._trigger( "beforeLoad", event,
+ $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
+ }
+ };
+ },
+
_getPanelForTab: function( tab ) {
var id = $( tab ).attr( "aria-controls" );
return this.element.find( this._sanitizeSelector( "#" + id ) );
@@ -860,6 +866,7 @@ if ( $.uiBackCompat !== false ) {
}
});
+ // TODO: Remove _ajaxSettings() method when removing this extension
// ajaxOptions and cache options
$.widget( "ui.tabs", $.ui.tabs, {
options: {
@@ -879,19 +886,6 @@ if ( $.uiBackCompat !== false ) {
return;
}
- $.extend( ui.ajaxSettings, that.options.ajaxOptions, {
- error: function( xhr, s, e ) {
- try {
- // Passing index avoid a race condition when this method is
- // called after the user has selected another tab.
- // Pass the anchor that initiated this request allows
- // loadError to manipulate the tab content panel via $(a.hash)
- that.options.ajaxOptions.error( xhr, s, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] );
- }
- catch ( e ) {}
- }
- });
-
ui.jqXHR.success(function() {
if ( that.options.cache ) {
$.data( ui.tab[ 0 ], "cache.tabs", true );
@@ -900,6 +894,23 @@ if ( $.uiBackCompat !== false ) {
}});
},
+ _ajaxSettings: function( anchor, event, ui ) {
+ var ajaxOptions = this.options.ajaxOptions;
+ return $.extend( {}, ajaxOptions, {
+ error: function( xhr, s, e ) {
+ try {
+ // Passing index avoid a race condition when this method is
+ // called after the user has selected another tab.
+ // Pass the anchor that initiated this request allows
+ // loadError to manipulate the tab content panel via $(a.hash)
+ ajaxOptions.error(
+ xhr, s, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] );
+ }
+ catch ( e ) {}
+ }
+ }, this._superApply( arguments ) );
+ },
+
_setOption: function( key, value ) {
// reset cache if switching from cached to not cached
if ( key === "cache" && value === false ) {
@@ -937,7 +948,9 @@ if ( $.uiBackCompat !== false ) {
this._super();
this._on({
tabsbeforeload: function( event, ui ) {
- if ( !this.options.spinner ) {
+ // Don't react to nested tabs or tabs that don't use a spinner
+ if ( event.target !== this.element[ 0 ] ||
+ !this.options.spinner ) {
return;
}