From 8f55b1a27d97f24751542b6dc44a89eb03387a75 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Wed, 18 Nov 2015 13:38:03 +0100 Subject: add status to server list --- apps/federation/css/settings-admin.css | 6 ++++-- apps/federation/js/settings-admin.js | 5 ++++- apps/federation/lib/dbhandler.php | 2 +- apps/federation/templates/settings-admin.php | 11 ++++++++++- 4 files changed, 19 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/federation/css/settings-admin.css b/apps/federation/css/settings-admin.css index 7dbc949270f..55b1dd64d15 100644 --- a/apps/federation/css/settings-admin.css +++ b/apps/federation/css/settings-admin.css @@ -19,6 +19,8 @@ #listOfTrustedServers li:hover { cursor: pointer; - background: url(../../../core/img/actions/delete.svg) no-repeat left center; - padding-left: 20px; +} + +#listOfTrustedServers .status { + margin-right: 10px; } diff --git a/apps/federation/js/settings-admin.js b/apps/federation/js/settings-admin.js index a1f02a09efe..1bc7a8cc0aa 100644 --- a/apps/federation/js/settings-admin.js +++ b/apps/federation/js/settings-admin.js @@ -40,7 +40,10 @@ $(document).ready(function () { ).done(function (data) { $('#serverUrl').attr('value', ''); $('ul#listOfTrustedServers').prepend( - $('
  • ').attr('id', data.id).text(data.url) + $('
  • ') + .attr('id', data.id) + .attr('class', 'icon-delete') + .html('' + data.url) ); OC.msg.finishedSuccess('#ocFederationAddServer .msg', data.message); }) diff --git a/apps/federation/lib/dbhandler.php b/apps/federation/lib/dbhandler.php index 58cf0f7f3b9..2b57dd75419 100644 --- a/apps/federation/lib/dbhandler.php +++ b/apps/federation/lib/dbhandler.php @@ -110,7 +110,7 @@ class DbHandler { */ public function getAllServer() { $query = $this->connection->getQueryBuilder(); - $query->select('url', 'id')->from($this->dbTable); + $query->select('url', 'id', 'status')->from($this->dbTable); $result = $query->execute()->fetchAll(); return $result; } diff --git a/apps/federation/templates/settings-admin.php b/apps/federation/templates/settings-admin.php index faa1e393158..f9087137d56 100644 --- a/apps/federation/templates/settings-admin.php +++ b/apps/federation/templates/settings-admin.php @@ -1,5 +1,7 @@