diff options
author | kborchers <kris.borchers@gmail.com> | 2012-03-18 21:19:19 -0500 |
---|---|---|
committer | kborchers <kris.borchers@gmail.com> | 2012-03-18 21:19:19 -0500 |
commit | e38feeacb6f14579a146e6ddc5429a157271cdc9 (patch) | |
tree | dc3946c89c4020997a3c6ca61c89070a69a9d84e /ui | |
parent | 682a321d1e4b80835a860f82fb686cff4943982b (diff) | |
parent | 11b026d59b5d1f6f5cd55570c7148b2a33322c53 (diff) | |
download | jquery-ui-e38feeacb6f14579a146e6ddc5429a157271cdc9.tar.gz jquery-ui-e38feeacb6f14579a146e6ddc5429a157271cdc9.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui')
-rw-r--r-- | ui/i18n/jquery.ui.datepicker-fi.js | 4 | ||||
-rw-r--r-- | ui/jquery.ui.accordion.js | 20 | ||||
-rw-r--r-- | ui/jquery.ui.menu.js | 3 |
3 files changed, 15 insertions, 12 deletions
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/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 169a07409..2200732ac 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -68,8 +68,6 @@ $.widget( "ui.accordion", { this.headers .attr( "role", "tab" ) - // TODO: use _bind() - .bind( "keydown.accordion", $.proxy( this, "_keydown" ) ) .next() .attr( "role", "tabpanel" ); @@ -161,8 +159,7 @@ $.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( ".accordion" ); } this._setupEvents( value ); } @@ -190,8 +187,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; } @@ -300,11 +296,15 @@ $.widget( "ui.accordion", { }, _setupEvents: function( event ) { + var events = { + keydown: "_keydown" + }; if ( event ) { - // TODO: use _bind() - this.headers.bind( event.split( " " ).join( ".accordion " ) + ".accordion", - $.proxy( this, "_eventHandler" ) ); + $.each( event.split(" "), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); } + this._bind( this.headers, events ); }, _eventHandler: function( event ) { @@ -324,7 +324,7 @@ $.widget( "ui.accordion", { event.preventDefault(); - if ( options.disabled || + if ( // click on active header, but not collapsible ( clickedIsActive && !options.collapsible ) || // allow canceling activation 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 |