summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Bertolín <sbertolin@solidgear.es>2016-06-08 09:02:05 +0000
committerSergio Bertolín <sbertolin@solidgear.es>2016-06-08 09:02:05 +0000
commite0aaa21bd8f9e726a5ffe2142116fc0e036cfff5 (patch)
tree1a8e86dffd8f76e3f64a9e94b9645ed1b15c6758
parent7dcc47dc94c2db2e1968b9a5bdcab694d1b78dbb (diff)
downloadnextcloud-server-e0aaa21bd8f9e726a5ffe2142116fc0e036cfff5.tar.gz
nextcloud-server-e0aaa21bd8f9e726a5ffe2142116fc0e036cfff5.zip
Fixed problem about removing trusted servers accidentally
-rw-r--r--apps/federation/css/settings-admin.css11
-rw-r--r--apps/federation/js/settings-admin.js8
-rw-r--r--apps/federation/templates/settings-admin.php3
3 files changed, 13 insertions, 9 deletions
diff --git a/apps/federation/css/settings-admin.css b/apps/federation/css/settings-admin.css
index 55b1dd64d15..150412c156f 100644
--- a/apps/federation/css/settings-admin.css
+++ b/apps/federation/css/settings-admin.css
@@ -17,10 +17,13 @@
cursor: pointer;
}
-#listOfTrustedServers li:hover {
- cursor: pointer;
-}
-
#listOfTrustedServers .status {
margin-right: 10px;
}
+
+#listOfTrustedServers .icon {
+ cursor: pointer;
+ display: inline-block;
+ vertical-align: middle;
+ margin-left: 10px;
+}
diff --git a/apps/federation/js/settings-admin.js b/apps/federation/js/settings-admin.js
index 7d531b39d8c..a903cb15305 100644
--- a/apps/federation/js/settings-admin.js
+++ b/apps/federation/js/settings-admin.js
@@ -56,10 +56,10 @@ $(document).ready(function () {
}
});
- // remove trusted server from list
- $( "#listOfTrustedServers" ).on('click', 'li', function() {
- var id = $(this).attr('id');
- var $this = $(this);
+// remove trusted server from list
+ $( "#listOfTrustedServers" ).on('click', 'li > .icon-delete', function() {
+ var id = $(this).parent().attr('id');
+ var $this = $(this).parent();
$.ajax({
url: OC.generateUrl('/apps/federation/trusted-servers/' + id),
type: 'DELETE',
diff --git a/apps/federation/templates/settings-admin.php b/apps/federation/templates/settings-admin.php
index 704fc9a9ace..ce66214de7c 100644
--- a/apps/federation/templates/settings-admin.php
+++ b/apps/federation/templates/settings-admin.php
@@ -23,7 +23,7 @@ style('federation', 'settings-admin')
</p>
<ul id="listOfTrustedServers">
<?php foreach($_['trustedServers'] as $trustedServer) { ?>
- <li id="<?php p($trustedServer['id']); ?>" class="icon-delete">
+ <li id="<?php p($trustedServer['id']); ?>">
<?php if((int)$trustedServer['status'] === TrustedServers::STATUS_OK) { ?>
<span class="status success"></span>
<?php
@@ -36,6 +36,7 @@ style('federation', 'settings-admin')
<span class="status error"></span>
<?php } ?>
<?php p($trustedServer['url']); ?>
+ <span class="icon icon-delete"></span>
</li>
<?php } ?>
</ul>