Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ccbdd95

Browse files
committed
Update to jQuery UI 1.10.4
1 parent bbc2432 commit ccbdd95

File tree

63 files changed

+347
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+347
-308
lines changed

History.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# master
22

3+
* Update to jQuery UI 1.10.4
4+
35
# 4.2.0
46

57
* Bump Rails dependency to `>=3.2.16`

VERSIONS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
| Gem | jQuery UI |
44
|--------|-----------|
5+
| 4.2.1 | 1.10.4 |
56
| 4.2.0 | 1.10.3 |
67
| 4.1.2 | 1.10.3 |
78
| 4.1.1 | 1.10.3 |

app/assets/javascripts/jquery.ui.accordion.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
//= require jquery.ui.widget
33

44
/*!
5-
* jQuery UI Accordion 1.10.3
5+
* jQuery UI Accordion 1.10.4
66
* http://jqueryui.com
77
*
8-
* Copyright 2013 jQuery Foundation and other contributors
8+
* Copyright 2014 jQuery Foundation and other contributors
99
* Released under the MIT license.
1010
* http://jquery.org/license
1111
*
@@ -27,7 +27,7 @@ showProps.height = showProps.paddingTop = showProps.paddingBottom =
2727
showProps.borderTopWidth = showProps.borderBottomWidth = "show";
2828

2929
$.widget( "ui.accordion", {
30-
version: "1.10.3",
30+
version: "1.10.4",
3131
options: {
3232
active: 0,
3333
animate: {},
@@ -105,6 +105,7 @@ $.widget( "ui.accordion", {
105105
this.headers
106106
.removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
107107
.removeAttr( "role" )
108+
.removeAttr( "aria-expanded" )
108109
.removeAttr( "aria-selected" )
109110
.removeAttr( "aria-controls" )
110111
.removeAttr( "tabIndex" )
@@ -119,7 +120,6 @@ $.widget( "ui.accordion", {
119120
contents = this.headers.next()
120121
.css( "display", "" )
121122
.removeAttr( "role" )
122-
.removeAttr( "aria-expanded" )
123123
.removeAttr( "aria-hidden" )
124124
.removeAttr( "aria-labelledby" )
125125
.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
@@ -170,7 +170,6 @@ $.widget( "ui.accordion", {
170170
},
171171

172172
_keydown: function( event ) {
173-
/*jshint maxcomplexity:15*/
174173
if ( event.altKey || event.ctrlKey ) {
175174
return;
176175
}
@@ -297,11 +296,11 @@ $.widget( "ui.accordion", {
297296
.not( this.active )
298297
.attr({
299298
"aria-selected": "false",
299+
"aria-expanded": "false",
300300
tabIndex: -1
301301
})
302302
.next()
303303
.attr({
304-
"aria-expanded": "false",
305304
"aria-hidden": "true"
306305
})
307306
.hide();
@@ -312,11 +311,11 @@ $.widget( "ui.accordion", {
312311
} else {
313312
this.active.attr({
314313
"aria-selected": "true",
314+
"aria-expanded": "true",
315315
tabIndex: 0
316316
})
317317
.next()
318318
.attr({
319-
"aria-expanded": "true",
320319
"aria-hidden": "false"
321320
});
322321
}
@@ -471,15 +470,17 @@ $.widget( "ui.accordion", {
471470
}
472471

473472
toHide.attr({
474-
"aria-expanded": "false",
475473
"aria-hidden": "true"
476474
});
477475
toHide.prev().attr( "aria-selected", "false" );
478476
// if we're switching panels, remove the old header from the tab order
479477
// if we're opening from collapsed state, remove the previous header from the tab order
480478
// if we're collapsing, then keep the collapsing header in the tab order
481479
if ( toShow.length && toHide.length ) {
482-
toHide.prev().attr( "tabIndex", -1 );
480+
toHide.prev().attr({
481+
"tabIndex": -1,
482+
"aria-expanded": "false"
483+
});
483484
} else if ( toShow.length ) {
484485
this.headers.filter(function() {
485486
return $( this ).attr( "tabIndex" ) === 0;
@@ -488,14 +489,12 @@ $.widget( "ui.accordion", {
488489
}
489490

490491
toShow
491-
.attr({
492-
"aria-expanded": "true",
493-
"aria-hidden": "false"
494-
})
492+
.attr( "aria-hidden", "false" )
495493
.prev()
496494
.attr({
497495
"aria-selected": "true",
498-
tabIndex: 0
496+
tabIndex: 0,
497+
"aria-expanded": "true"
499498
});
500499
},
501500

@@ -567,7 +566,6 @@ $.widget( "ui.accordion", {
567566
if ( toHide.length ) {
568567
toHide.parent()[0].className = toHide.parent()[0].className;
569568
}
570-
571569
this._trigger( "activate", null, data );
572570
}
573571
});

app/assets/javascripts/jquery.ui.autocomplete.js

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
//= require jquery.ui.position
55

66
/*!
7-
* jQuery UI Autocomplete 1.10.3
7+
* jQuery UI Autocomplete 1.10.4
88
* http://jqueryui.com
99
*
10-
* Copyright 2013 jQuery Foundation and other contributors
10+
* Copyright 2014 jQuery Foundation and other contributors
1111
* Released under the MIT license.
1212
* http://jquery.org/license
1313
*
@@ -21,11 +21,8 @@
2121
*/
2222
(function( $, undefined ) {
2323

24-
// used to prevent race conditions with remote data sources
25-
var requestIndex = 0;
26-
2724
$.widget( "ui.autocomplete", {
28-
version: "1.10.3",
25+
version: "1.10.4",
2926
defaultElement: "<input>",
3027
options: {
3128
appendTo: null,
@@ -49,6 +46,7 @@ $.widget( "ui.autocomplete", {
4946
select: null
5047
},
5148

49+
requestIndex: 0,
5250
pending: 0,
5351

5452
_create: function() {
@@ -82,7 +80,6 @@ $.widget( "ui.autocomplete", {
8280

8381
this._on( this.element, {
8482
keydown: function( event ) {
85-
/*jshint maxcomplexity:15*/
8683
if ( this.element.prop( "readOnly" ) ) {
8784
suppressKeyPress = true;
8885
suppressInput = true;
@@ -425,19 +422,18 @@ $.widget( "ui.autocomplete", {
425422
},
426423

427424
_response: function() {
428-
var that = this,
429-
index = ++requestIndex;
425+
var index = ++this.requestIndex;
430426

431-
return function( content ) {
432-
if ( index === requestIndex ) {
433-
that.__response( content );
427+
return $.proxy(function( content ) {
428+
if ( index === this.requestIndex ) {
429+
this.__response( content );
434430
}
435431

436-
that.pending--;
437-
if ( !that.pending ) {
438-
that.element.removeClass( "ui-autocomplete-loading" );
432+
this.pending--;
433+
if ( !this.pending ) {
434+
this.element.removeClass( "ui-autocomplete-loading" );
439435
}
440-
};
436+
}, this );
441437
},
442438

443439
__response: function( content ) {

app/assets/javascripts/jquery.ui.button.js

Lines changed: 21 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
//= require jquery.ui.widget
33

44
/*!
5-
* jQuery UI Button 1.10.3
5+
* jQuery UI Button 1.10.4
66
* http://jqueryui.com
77
*
8-
* Copyright 2013 jQuery Foundation and other contributors
8+
* Copyright 2014 jQuery Foundation and other contributors
99
* Released under the MIT license.
1010
* http://jquery.org/license
1111
*
@@ -17,9 +17,8 @@
1717
*/
1818
(function( $, undefined ) {
1919

20-
var lastActive, startXPos, startYPos, clickDragged,
20+
var lastActive,
2121
baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
22-
stateClasses = "ui-state-hover ui-state-active ",
2322
typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
2423
formResetHandler = function() {
2524
var form = $( this );
@@ -46,7 +45,7 @@ var lastActive, startXPos, startYPos, clickDragged,
4645
};
4746

4847
$.widget( "ui.button", {
49-
version: "1.10.3",
48+
version: "1.10.4",
5049
defaultElement: "<button>",
5150
options: {
5251
disabled: null,
@@ -74,8 +73,7 @@ $.widget( "ui.button", {
7473
var that = this,
7574
options = this.options,
7675
toggleButton = this.type === "checkbox" || this.type === "radio",
77-
activeClass = !toggleButton ? "ui-state-active" : "",
78-
focusClass = "ui-state-focus";
76+
activeClass = !toggleButton ? "ui-state-active" : "";
7977

8078
if ( options.label === null ) {
8179
options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
@@ -107,53 +105,32 @@ $.widget( "ui.button", {
107105
}
108106
});
109107

110-
this.element
111-
.bind( "focus" + this.eventNamespace, function() {
112-
// no need to check disabled, focus won't be triggered anyway
113-
that.buttonElement.addClass( focusClass );
114-
})
115-
.bind( "blur" + this.eventNamespace, function() {
116-
that.buttonElement.removeClass( focusClass );
117-
});
108+
// Can't use _focusable() because the element that receives focus
109+
// and the element that gets the ui-state-focus class are different
110+
this._on({
111+
focus: function() {
112+
this.buttonElement.addClass( "ui-state-focus" );
113+
},
114+
blur: function() {
115+
this.buttonElement.removeClass( "ui-state-focus" );
116+
}
117+
});
118118

119119
if ( toggleButton ) {
120120
this.element.bind( "change" + this.eventNamespace, function() {
121-
if ( clickDragged ) {
122-
return;
123-
}
124121
that.refresh();
125122
});
126-
// if mouse moves between mousedown and mouseup (drag) set clickDragged flag
127-
// prevents issue where button state changes but checkbox/radio checked state
128-
// does not in Firefox (see ticket #6970)
129-
this.buttonElement
130-
.bind( "mousedown" + this.eventNamespace, function( event ) {
131-
if ( options.disabled ) {
132-
return;
133-
}
134-
clickDragged = false;
135-
startXPos = event.pageX;
136-
startYPos = event.pageY;
137-
})
138-
.bind( "mouseup" + this.eventNamespace, function( event ) {
139-
if ( options.disabled ) {
140-
return;
141-
}
142-
if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
143-
clickDragged = true;
144-
}
145-
});
146123
}
147124

148125
if ( this.type === "checkbox" ) {
149126
this.buttonElement.bind( "click" + this.eventNamespace, function() {
150-
if ( options.disabled || clickDragged ) {
127+
if ( options.disabled ) {
151128
return false;
152129
}
153130
});
154131
} else if ( this.type === "radio" ) {
155132
this.buttonElement.bind( "click" + this.eventNamespace, function() {
156-
if ( options.disabled || clickDragged ) {
133+
if ( options.disabled ) {
157134
return false;
158135
}
159136
$( this ).addClass( "ui-state-active" );
@@ -263,7 +240,7 @@ $.widget( "ui.button", {
263240
this.element
264241
.removeClass( "ui-helper-hidden-accessible" );
265242
this.buttonElement
266-
.removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
243+
.removeClass( baseClasses + " ui-state-active " + typeClasses )
267244
.removeAttr( "role" )
268245
.removeAttr( "aria-pressed" )
269246
.html( this.buttonElement.find(".ui-button-text").html() );
@@ -276,10 +253,9 @@ $.widget( "ui.button", {
276253
_setOption: function( key, value ) {
277254
this._super( key, value );
278255
if ( key === "disabled" ) {
256+
this.element.prop( "disabled", !!value );
279257
if ( value ) {
280-
this.element.prop( "disabled", true );
281-
} else {
282-
this.element.prop( "disabled", false );
258+
this.buttonElement.removeClass( "ui-state-focus" );
283259
}
284260
return;
285261
}
@@ -363,7 +339,7 @@ $.widget( "ui.button", {
363339
});
364340

365341
$.widget( "ui.buttonset", {
366-
version: "1.10.3",
342+
version: "1.10.4",
367343
options: {
368344
items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
369345
},

app/assets/javascripts/jquery.ui.core.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*!
2-
* jQuery UI Core 1.10.3
2+
* jQuery UI Core 1.10.4
33
* http://jqueryui.com
44
*
5-
* Copyright 2013 jQuery Foundation and other contributors
5+
* Copyright 2014 jQuery Foundation and other contributors
66
* Released under the MIT license.
77
* http://jquery.org/license
88
*
@@ -17,7 +17,7 @@ var uuid = 0,
1717
$.ui = $.ui || {};
1818

1919
$.extend( $.ui, {
20-
version: "1.10.3",
20+
version: "1.10.4",
2121

2222
keyCode: {
2323
BACKSPACE: 8,

app/assets/javascripts/jquery.ui.datepicker-es.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ jQuery(function($){
66
prevText: '&#x3C;Ant',
77
nextText: 'Sig&#x3E;',
88
currentText: 'Hoy',
9-
monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
10-
'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
11-
monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
12-
'Jul','Ago','Sep','Oct','Nov','Dic'],
13-
dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
14-
dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
15-
dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi',''],
9+
monthNames: ['enero','febrero','marzo','abril','mayo','junio',
10+
'julio','agosto','septiembre','octubre','noviembre','diciembre'],
11+
monthNamesShort: ['ene','feb','mar','abr','may','jun',
12+
'jul','ogo','sep','oct','nov','dic'],
13+
dayNames: ['domingo','lunes','martes','miércoles','jueves','viernes','sábado'],
14+
dayNamesShort: ['dom','lun','mar','mié','juv','vie','sáb'],
15+
dayNamesMin: ['D','L','M','X','J','V','S'],
1616
weekHeader: 'Sm',
1717
dateFormat: 'dd/mm/yy',
1818
firstDay: 1,

app/assets/javascripts/jquery.ui.datepicker-fi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jQuery(function($){
1414
dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
1515
dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
1616
weekHeader: 'Vk',
17-
dateFormat: 'dd.mm.yy',
17+
dateFormat: 'd.m.yy',
1818
firstDay: 1,
1919
isRTL: false,
2020
showMonthAfterYear: false,

0 commit comments

Comments
 (0)