]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix icons in sidebar on personal page 4569/head
authorMorris Jobke <hey@morrisjobke.de>
Thu, 27 Apr 2017 20:58:41 +0000 (17:58 -0300)
committerMorris Jobke <hey@morrisjobke.de>
Thu, 27 Apr 2017 20:58:41 +0000 (17:58 -0300)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
apps/encryption/templates/settings-personal.php
apps/files_external/css/settings.css
apps/files_external/templates/settings.php
apps/twofactor_backupcodes/templates/personal.php
settings/css/settings.css
settings/personal.php
settings/templates/certificates.php

index e2bcb6813b6c73e18f2d8c6f868f2e283698b385..7d0a26eea93ef04c24c0fc7d7917a2f3b8c535d8 100644 (file)
@@ -5,7 +5,7 @@ script('encryption', 'settings-personal');
 script('core', 'multiselect');
 ?>
 <form id="ocDefaultEncryptionModule" class="section">
-       <h2><?php p($l->t('Basic encryption module')); ?></h2>
+       <h2 data-anchor-name="basic-encryption-module"><?php p($l->t('Basic encryption module')); ?></h2>
 
        <?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?>
 
index 610bc2f0e6b8f059c5d8f07b09d36adb6c8054b4..bac89e26b09275c8d159a75e9d2ba1a4f5fb937f 100644 (file)
@@ -114,3 +114,7 @@ td.mountPoint, td.backend { width:160px; }
 #externalStorage .mountOptionsDropdown {
        margin-right: 40px;
 }
+
+.nav-icon-external-storage {
+       background-image: url('../img/app-dark.svg?v=1');
+}
index 9d8c179dd322186485351e3a175c1173e17b1c99..bbd79994e399c5776b60ba4a4c5783e0652b9628 100644 (file)
@@ -88,7 +88,7 @@
 ?>
 
 <form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>">
-       <h2><?php p($l->t('External storage')); ?></h2>
+       <h2 data-anchor-name="external-storage"><?php p($l->t('External storage')); ?></h2>
        <?php if (isset($_['dependencies']) and ($_['dependencies']<>'') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?>
        <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'>
                <thead>
index 23b06e230582fdfb7e71744666d3104fccc47122..3076e16a166bfc38c4d3e88193c3a917e4e5655e 100644 (file)
@@ -7,6 +7,6 @@ style('twofactor_backupcodes', 'style');
 ?>
 
 <div class="section">
-    <h2><?php p($l->t('Second-factor backup codes')); ?></h2>
+    <h2 data-anchor-name="second-factor-backup-codes"><?php p($l->t('Second-factor backup codes')); ?></h2>
     <div id="twofactor-backupcodes-settings"></div>
 </div>
index 0a1d4e046feb11db880454912f3c36dcd87f90ba..65709c9578acb724ef54fe4dd3260d254e0a3128 100644 (file)
@@ -26,6 +26,9 @@ input#openid, input#webdav { width:20em; }
 .nav-icon-second-factor-backup-codes {
        background-image: url('../img/password.svg?v=1');
 }
+.nav-icon-ssl-root-certificate {
+       background-image: url('../img/password.svg?v=1');
+}
 
 #avatarform {
        min-width: 145px;
index 2c46a9f8dd291375d16f8ca9a307cad87c8848ab..6cbcc330cd929fd0a58d4c70da4a59e4b70eeef8 100644 (file)
@@ -220,8 +220,13 @@ $formsMap = array_map(function($form){
        if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
                $sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
                $sectionName = str_replace('</h2>', '', $sectionName);
-               $anchor = strtolower($sectionName);
-               $anchor = str_replace(' ', '-', $anchor);
+               if (strpos($regs['class'], 'data-anchor-name') !== false) {
+                       preg_match('%.*data-anchor-name="(?P<anchor>[^"]*)"%i', $regs['class'], $matches);
+                       $anchor = $matches['anchor'];
+               } else {
+                       $anchor = strtolower($sectionName);
+                       $anchor = str_replace(' ', '-', $anchor);
+               }
 
                return array(
                        'anchor' => $anchor,
index 16f8dda31ad6191f95f23f1be1e48ac34a8b0afc..ac0a22938003c6cb731a2934b871626e2f94cd7f 100644 (file)
@@ -1,5 +1,5 @@
 <div class="section">
-       <h2><?php p($l->t('SSL Root Certificates')); ?></h2>
+       <h2 data-anchor-name="ssl-root-certificate"><?php p($l->t('SSL Root Certificates')); ?></h2>
        <table id="sslCertificate" class="grid" data-type="<?php p($_['type']); ?>">
                <thead>
                        <tr>