]> source.dussan.org Git - nextcloud-server.git/commitdiff
Made the global settings icon accessable via keyboard.
authorThomas Tanghus <thomas@tanghus.net>
Fri, 4 May 2012 07:53:36 +0000 (09:53 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Fri, 4 May 2012 07:53:36 +0000 (09:53 +0200)
Bug http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-561

core/js/js.js
core/templates/layout.user.php

index f697f2b8537416dcc9ec875b78f2d31e54112f45..7585d4b09d1064a0fd62858fc497631373e05cc5 100644 (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();
index 674b1853037467761bc62403aa4e526270f7ab0d..b832ac2636fedbf79e7fb966a45f5e57fc3a63b5 100644 (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):?>