]> source.dussan.org Git - nextcloud-server.git/commitdiff
backport of https://github.com/owncloud/core/commit/1fa76e53dc5c515035f19e78f39882055...
authorBjörn Schießle <schiessle@owncloud.com>
Wed, 12 Jun 2013 08:30:54 +0000 (10:30 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Wed, 12 Jun 2013 08:30:54 +0000 (10:30 +0200)
apps/files_external/js/settings.js

index ac408786ff6271a4088530927f2141075e495e63..3e605c59a9304491635a5b24094e3af9e6774b39 100644 (file)
@@ -88,7 +88,7 @@ OC.MountConfig={
                                                url: OC.filePath('files_external', 'ajax', 'removeMountPoint.php'),
                                                data: {
                                                        mountPoint: mountPoint,
-                                                       class: backendClass,
+                                                       'class': backendClass,
                                                        classOptions: classOptions,
                                                        mountType: mountType,
                                                        applicable: applicable,
@@ -103,7 +103,7 @@ OC.MountConfig={
                                                url: OC.filePath('files_external', 'ajax', 'removeMountPoint.php'),
                                                data: {
                                                        mountPoint: mountPoint,
-                                                       class: backendClass,
+                                                       'class': backendClass,
                                                        classOptions: classOptions,
                                                        mountType: mountType,
                                                        applicable: applicable,
@@ -247,15 +247,18 @@ $(document).ready(function() {
                OC.MountConfig.saveStorage($(this).parent().parent());
        });
 
+    $('#sslCertificate').on('click', 'td.remove>img', function() {
+               var $tr = $(this).parent().parent();
+               var row = this.parentNode.parentNode;
+               $.post(OC.filePath('files_external', 'ajax', 'removeRootCertificate.php'), {cert: row.id});
+               $tr.remove();
+               return true;
+       });
+
        $('#externalStorage').on('click', 'td.remove>img', function() {
                var tr = $(this).parent().parent();
                var mountPoint = $(tr).find('.mountPoint input').val();
-               if ( ! mountPoint) {
-                       var row=this.parentNode.parentNode;
-                       $.post(OC.filePath('files_external', 'ajax', 'removeRootCertificate.php'), { cert: row.id  });
-                       $(tr).remove();
-                       return true;
-               }
+
                if ($('#externalStorage').data('admin') === true) {
                        var isPersonal = false;
                        var multiselect = $(tr).find('.chzn-select').val();