]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix duplicate id "apps-management"
authorMichael Letzgus <www@chronos.michael-letzgus.de>
Sun, 19 Mar 2017 11:23:20 +0000 (12:23 +0100)
committerMichael Letzgus <www@chronos.michael-letzgus.de>
Sun, 19 Mar 2017 11:36:29 +0000 (12:36 +0100)
Make duplicate id "apps-management" a class since IDs must be unique:

https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#the-id-attribute
https://api.jquery.com/id-selector/

Signed-off-by: Michael Letzgus <michaelletzgus@users.noreply.github.com>
core/templates/layout.user.php
settings/js/apps.js

index 3cfb88bf423d92fdfa405b33b1d1ac60bf7add13..dad5ee1b826de12fc046e0254a28ab9bb6b9ea1a 100644 (file)
@@ -81,7 +81,7 @@
                                                                </a>
                                                        </li>
                                                        <?php if(OC_User::isAdminUser(OC_User::getUser())):     ?>
-                                                               <li id="apps-management" <?php if(count($_['navigation'])>$headerIconCount-1): ?>class="hidden"<?php endif; ?>>
+                                                               <li <?php if(count($_['navigation'])>$headerIconCount-1): ?> class="hidden apps-management"<?php else: ?> class="apps-management"  <?php endif; ?>>
                                                                        <a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4"
                                                                                <?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
                                                                                <img src="<?php print_unescaped(image_path('settings', 'apps.svg') . '?v=' . $_['versionHash']); ?>" />
                                                                /* show "More apps" link to app administration directly in app navigation, as last entry */
                                                                if(OC_User::isAdminUser(OC_User::getUser())):
                                                                        ?>
-                                                                       <li id="apps-management">
+                                                                       <li class="apps-management">
                                                                                <a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4"
                                                                                        <?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
                                                                                        <svg width="32" height="32" viewBox="0 0 32 32" class="app-icon">
index 8be18c4e9c063765dcc32f60d2dcac87ab2fe628..d2f26578a7cf7278f66c6aaf679cf8716cd5398f 100644 (file)
@@ -541,10 +541,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
 
                                if (navEntries.length > 7) {
                                        $('#more-apps').show();
-                                       $('#apps-management').hide();
+                                       $('.apps-management').hide();
                                } else {
                                        $('#more-apps').hide();
-                                       $('#apps-management').show();
+                                       $('.apps-management').show();
                                }
                        }
                });