]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only show SSL table header if there are certificates
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 31 Mar 2015 11:00:24 +0000 (13:00 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 31 Mar 2015 11:00:24 +0000 (13:00 +0200)
settings/js/personal.js

index 302906702bd21aef70b6d3590ecda39330892d49..314c57d8f779f9bc301a56a194535372e81ffdd9 100644 (file)
@@ -335,6 +335,10 @@ $(document).ready(function () {
                        cert: row.data('name')
                });
                row.remove();
+
+               if ($('#sslCertificate > tbody > tr').length === 0) {
+                       $('#sslCertificate').hide();
+               }
                return true;
        });
 
@@ -362,12 +366,17 @@ $(document).ready(function () {
                        ));
 
                        $('#sslCertificate tbody').append(row);
+                       $('#sslCertificate').show();
                }
        });
 
        $('#rootcert_import_button').click(function () {
                $('#rootcert_import').click();
        });
+
+       if ($('#sslCertificate > tbody > tr').length === 0) {
+               $('#sslCertificate').hide();
+       }
 });
 
 OC.Encryption = {