aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/i18n/jquery.ui.datepicker-de.js2
-rw-r--r--ui/i18n/jquery.ui.datepicker-fa.js50
-rw-r--r--ui/i18n/jquery.ui.datepicker-fi.js4
-rw-r--r--ui/i18n/jquery.ui.datepicker-ge.js21
-rw-r--r--ui/i18n/jquery.ui.datepicker-mk.js4
-rw-r--r--ui/jquery.ui.accordion.js117
-rw-r--r--ui/jquery.ui.menu.js3
-rw-r--r--ui/jquery.ui.mouse.js3
-rw-r--r--ui/jquery.ui.tabs.js2
-rw-r--r--ui/jquery.ui.tooltip.js10
10 files changed, 173 insertions, 43 deletions
diff --git a/ui/i18n/jquery.ui.datepicker-de.js b/ui/i18n/jquery.ui.datepicker-de.js
index 52d6c82ce..cfe91759b 100644
--- a/ui/i18n/jquery.ui.datepicker-de.js
+++ b/ui/i18n/jquery.ui.datepicker-de.js
@@ -13,7 +13,7 @@ jQuery(function($){
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
- weekHeader: 'Wo',
+ weekHeader: 'KW',
dateFormat: 'dd.mm.yy',
firstDay: 1,
isRTL: false,
diff --git a/ui/i18n/jquery.ui.datepicker-fa.js b/ui/i18n/jquery.ui.datepicker-fa.js
index 1d7fbd23c..be8acd2a5 100644
--- a/ui/i18n/jquery.ui.datepicker-fa.js
+++ b/ui/i18n/jquery.ui.datepicker-fa.js
@@ -4,15 +4,51 @@
jQuery(function($) {
$.datepicker.regional['fa'] = {
closeText: 'بستن',
- prevText: '<قبلي',
- nextText: 'بعدي>',
+ prevText: '<قبلی',
+ nextText: 'بعدی>',
currentText: 'امروز',
- monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور',
- 'مهر','آبان','آذر','دي','بهمن','اسفند'],
+ monthNames: [
+ 'فروردين',
+ 'ارديبهشت',
+ 'خرداد',
+ 'تير',
+ 'مرداد',
+ 'شهريور',
+ 'مهر',
+ 'آبان',
+ 'آذر',
+ 'دی',
+ 'بهمن',
+ 'اسفند'
+ ],
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
- dayNames: ['يکشنبه','دوشنبه','سه‌شنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'],
- dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'],
- dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'],
+ dayNames: [
+ 'يکشنبه',
+ 'دوشنبه',
+ 'سه‌شنبه',
+ 'چهارشنبه',
+ 'پنجشنبه',
+ 'جمعه',
+ 'شنبه'
+ ],
+ dayNamesShort: [
+ 'ی',
+ 'د',
+ 'س',
+ 'چ',
+ 'پ',
+ 'ج',
+ 'ش'
+ ],
+ dayNamesMin: [
+ 'ی',
+ 'د',
+ 'س',
+ 'چ',
+ 'پ',
+ 'ج',
+ 'ش'
+ ],
weekHeader: 'هف',
dateFormat: 'yy/mm/dd',
firstDay: 6,
diff --git a/ui/i18n/jquery.ui.datepicker-fi.js b/ui/i18n/jquery.ui.datepicker-fi.js
index 1eae6c23b..4c5adda35 100644
--- a/ui/i18n/jquery.ui.datepicker-fi.js
+++ b/ui/i18n/jquery.ui.datepicker-fi.js
@@ -1,5 +1,5 @@
/* Finnish initialisation for the jQuery UI date picker plugin. */
-/* Written by Harri Kilpi� (harrikilpio@gmail.com). */
+/* Written by Harri Kilpiö (harrikilpio@gmail.com). */
jQuery(function($){
$.datepicker.regional['fi'] = {
closeText: 'Sulje',
@@ -10,7 +10,7 @@ jQuery(function($){
'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','Su'],
+ dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
weekHeader: 'Vk',
diff --git a/ui/i18n/jquery.ui.datepicker-ge.js b/ui/i18n/jquery.ui.datepicker-ge.js
new file mode 100644
index 000000000..10d4e5851
--- /dev/null
+++ b/ui/i18n/jquery.ui.datepicker-ge.js
@@ -0,0 +1,21 @@
+/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Lado Lomidze (lado.lomidze@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['ge'] = {
+ closeText: 'დახურვა',
+ prevText: '< წინა',
+ nextText: 'შემდეგი >',
+ currentText: 'დღეს',
+ monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'],
+ monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'],
+ dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'],
+ dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
+ dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
+ weekHeader: 'კვირა',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ge']);
+});
diff --git a/ui/i18n/jquery.ui.datepicker-mk.js b/ui/i18n/jquery.ui.datepicker-mk.js
index 1e602427a..028532551 100644
--- a/ui/i18n/jquery.ui.datepicker-mk.js
+++ b/ui/i18n/jquery.ui.datepicker-mk.js
@@ -6,9 +6,9 @@ jQuery(function($){
prevText: '<',
nextText: '>',
currentText: 'Денес',
- monthNames: ['Јануари','Фебруари','Март','Април','Мај','Јуни',
+ monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни',
'Јули','Август','Септември','Октомври','Ноември','Декември'],
- monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
+ monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун',
'Јул','Авг','Сеп','Окт','Ное','Дек'],
dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'],
dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'],
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 169a07409..ba8fa5e44 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -12,6 +12,7 @@
* jquery.ui.widget.js
*/
(function( $, undefined ) {
+ var uid = 0;
$.widget( "ui.accordion", {
version: "@VERSION",
@@ -33,7 +34,9 @@ $.widget( "ui.accordion", {
},
_create: function() {
- var options = this.options;
+ var accordionId = this.accordionId = "ui-accordion-" +
+ (this.element.attr( "id" ) || ++uid),
+ options = this.options;
this.prevShow = this.prevHide = $();
this.element.addClass( "ui-accordion ui-widget ui-helper-reset" );
@@ -68,20 +71,36 @@ $.widget( "ui.accordion", {
this.headers
.attr( "role", "tab" )
- // TODO: use _bind()
- .bind( "keydown.accordion", $.proxy( this, "_keydown" ) )
+ .each(function( i ) {
+ var header = $( this ),
+ headerId = header.attr( "id" ),
+ panel = header.next(),
+ panelId = panel.attr( "id" );
+ if ( !headerId ) {
+ headerId = accordionId + "-header-" + i;
+ header.attr( "id", headerId );
+ }
+ if ( !panelId ) {
+ panelId = accordionId + "-panel-" + i;
+ panel.attr( "id", panelId );
+ }
+ header.attr( "aria-controls", panelId );
+ panel.attr( "aria-labelledby", headerId );
+ })
.next()
.attr( "role", "tabpanel" );
this.headers
.not( this.active )
.attr({
- // TODO: document support for each of these
- "aria-expanded": "false",
"aria-selected": "false",
tabIndex: -1
})
.next()
+ .attr({
+ "aria-expanded": "false",
+ "aria-hidden": "true"
+ })
.hide();
// make sure at least one header is in the tab order
@@ -89,12 +108,18 @@ $.widget( "ui.accordion", {
this.headers.eq( 0 ).attr( "tabIndex", 0 );
} else {
this.active.attr({
- "aria-expanded": "true",
"aria-selected": "true",
tabIndex: 0
- });
+ })
+ .next()
+ .attr({
+ "aria-expanded": "true",
+ "aria-hidden": "false"
+ });
}
+ this._bind( this.headers, { keydown: "_keydown" });
+ this._bind( this.headers.next(), { keydown: "_panelKeyDown" });
this._setupEvents( options.event );
},
@@ -126,6 +151,8 @@ $.widget( "ui.accordion", {
},
_destroy: function() {
+ var accordionId = this.accordionId;
+
// clean up main element
this.element
.removeClass( "ui-accordion ui-widget ui-helper-reset" )
@@ -133,19 +160,31 @@ $.widget( "ui.accordion", {
// clean up headers
this.headers
- .unbind( ".accordion" )
.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" )
.removeAttr( "role" )
- .removeAttr( "aria-expanded" )
.removeAttr( "aria-selected" )
- .removeAttr( "tabIndex" );
+ .removeAttr( "aria-controls" )
+ .removeAttr( "tabIndex" )
+ .each(function() {
+ if ( /^ui-accordion/.test( this.id ) ) {
+ this.removeAttribute( "id" );
+ }
+ });
this._destroyIcons();
// clean up content panels
var contents = this.headers.next()
.css( "display", "" )
.removeAttr( "role" )
- .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" );
+ .removeAttr( "aria-expanded" )
+ .removeAttr( "aria-hidden" )
+ .removeAttr( "aria-labelledby" )
+ .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
+ .each(function() {
+ if ( /^ui-accordion/.test( this.id ) ) {
+ this.removeAttribute( "id" );
+ }
+ });
if ( this.options.heightStyle !== "content" ) {
this.element.css( "height", this.originalHeight );
contents.css( "height", "" );
@@ -161,8 +200,8 @@ $.widget( "ui.accordion", {
if ( key === "event" ) {
if ( this.options.event ) {
- // TODO: this is incorrect for multiple events (see _setupEvents)
- this.headers.unbind( this.options.event + ".accordion", this._eventHandler );
+ this.headers.unbind(
+ this.options.event.split( " " ).join( ".accordion " ) + ".accordion" );
}
this._setupEvents( value );
}
@@ -190,8 +229,7 @@ $.widget( "ui.accordion", {
},
_keydown: function( event ) {
- // TODO: remove disabled check when using _bind()
- if ( this.options.disabled || event.altKey || event.ctrlKey ) {
+ if ( event.altKey || event.ctrlKey ) {
return;
}
@@ -212,6 +250,13 @@ $.widget( "ui.accordion", {
case keyCode.SPACE:
case keyCode.ENTER:
this._eventHandler( event );
+ break;
+ case keyCode.HOME:
+ toFocus = this.headers[ 0 ];
+ break;
+ case keyCode.END:
+ toFocus = this.headers[ length - 1 ];
+ break;
}
if ( toFocus ) {
@@ -222,6 +267,12 @@ $.widget( "ui.accordion", {
}
},
+ _panelKeyDown : function( event ) {
+ if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
+ $( event.currentTarget ).prev().focus();
+ }
+ },
+
refresh: function() {
var heightStyle = this.options.heightStyle,
parent = this.element.parent(),
@@ -300,11 +351,14 @@ $.widget( "ui.accordion", {
},
_setupEvents: function( event ) {
- if ( event ) {
- // TODO: use _bind()
- this.headers.bind( event.split( " " ).join( ".accordion " ) + ".accordion",
- $.proxy( this, "_eventHandler" ) );
+ var events = {};
+ if ( !event ) {
+ return;
}
+ $.each( event.split(" "), function( index, eventName ) {
+ events[ eventName ] = "_eventHandler";
+ });
+ this._bind( this.headers, events );
},
_eventHandler: function( event ) {
@@ -324,7 +378,7 @@ $.widget( "ui.accordion", {
event.preventDefault();
- if ( options.disabled ||
+ if (
// click on active header, but not collapsible
( clickedIsActive && !options.collapsible ) ||
// allow canceling activation
@@ -382,21 +436,26 @@ $.widget( "ui.accordion", {
this._toggleComplete( data );
}
- // TODO assert that the blur and focus triggers are really necessary, remove otherwise
- toHide.prev()
+ toHide
.attr({
"aria-expanded": "false",
- "aria-selected": "false",
- tabIndex: -1
+ "aria-hidden": "true"
})
- .blur();
- toShow.prev()
+ .prev()
+ .attr({
+ "aria-selected": "false",
+ tabIndex: -1
+ });
+ toShow
.attr({
"aria-expanded": "true",
- "aria-selected": "true",
- tabIndex: 0
+ "aria-hidden": "false"
})
- .focus();
+ .prev()
+ .attr({
+ "aria-selected": "true",
+ tabIndex: 0
+ });
},
_animate: function( toShow, toHide, data ) {
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index 18f4eb9f8..17177a906 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -59,6 +59,9 @@ $.widget( "ui.menu", {
"mousedown .ui-menu-item > a": function( event ) {
event.preventDefault();
},
+ "click .ui-state-disabled > a": function( event ) {
+ event.preventDefault();
+ },
"click .ui-menu-item:has(a)": function( event ) {
event.stopImmediatePropagation();
//Don't select disabled menu items
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index 64a081961..5e7744418 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -46,6 +46,9 @@ $.widget("ui.mouse", {
// other instances of mouse
_mouseDestroy: function() {
this.element.unbind('.'+this.widgetName);
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
},
_mouseDown: function(event) {
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index ba48c3770..c9300e69b 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -434,7 +434,7 @@ $.widget( "ui.tabs", {
// meta-function to give users option to provide a href string instead of a numerical index.
// also sanitizes numerical indexes to valid values.
if ( typeof index == "string" ) {
- index = this.anchors.index( this.anchors.filter( "[href$=" + index + "]" ) );
+ index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
}
return index;
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index eddd9a0c9..23b3a9b71 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -99,7 +99,7 @@ $.widget( "ui.tooltip", {
return;
}
- if ( !target.data( "ui-tooltip-title" ) ) {
+ if ( target.attr( "title" ) ) {
target.data( "ui-tooltip-title", target.attr( "title" ) );
}
@@ -173,6 +173,12 @@ $.widget( "ui.tooltip", {
target = $( event ? event.currentTarget : this.element ),
tooltip = this._find( target );
+ // disabling closes the tooltip, so we need to track when we're closing
+ // to avoid an infinite loop in case the tooltip becomes disabled on close
+ if ( this.closing ) {
+ return;
+ }
+
// don't close if the element has focus
// this prevents the tooltip from closing if you hover while focused
if ( !force && this.document[0].activeElement === target[0] ) {
@@ -195,7 +201,9 @@ $.widget( "ui.tooltip", {
target.removeData( "tooltip-open" );
target.unbind( "mouseleave.tooltip focusout.tooltip keyup.tooltip" );
+ this.closing = true;
this._trigger( "close", event, { tooltip: tooltip } );
+ this.closing = false;
},
_tooltip: function( element ) {