Made the global settings icon accessable via keyboard.

Bug http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-561
This commit is contained in:
Thomas Tanghus 2012-05-04 09:53:36 +02:00
parent 8d1754041e
commit 27da29525a
2 changed files with 6 additions and 1 deletions

View File

@ -419,6 +419,11 @@ $(document).ready(function(){
}
});
$('#settings #expand').keydown(function(event) {
if (event.which == 13 || event.which == 32) {
$('#expand').click()
}
});
$('#settings #expand').click(function(event) {
$('#settings #expanddiv').slideToggle();
event.stopPropagation();

View File

@ -44,7 +44,7 @@
</ul>
<ul id="settings" class="svg">
<img id="expand" class="svg" alt="<?php echo $l->t('Settings');?>" src="<?php echo image_path('', 'actions/settings.svg'); ?>" />
<img role=button tabindex=0 id="expand" class="svg" alt="<?php echo $l->t('Settings');?>" src="<?php echo image_path('', 'actions/settings.svg'); ?>" />
<span><?php echo $l->t('Settings');?></span>
<div id="expanddiv" <?php if($_['bodyid'] == 'body-user') echo 'style="display:none;"'; ?>>
<?php foreach($_['settingsnavigation'] as $entry):?>