diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-03-13 19:44:10 -0600 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-02 21:19:30 +0200 |
commit | ed00bab80b95581357666bd0d9fcf103f95b77f0 (patch) | |
tree | 5b3f75a316b2f6b1b0af3e092b81827bddcafc20 | |
parent | 86022f87107160ac863229fb30edb251deb4ba0c (diff) | |
download | nextcloud-server-ed00bab80b95581357666bd0d9fcf103f95b77f0.tar.gz nextcloud-server-ed00bab80b95581357666bd0d9fcf103f95b77f0.zip |
Fixed layout of bruteforcesettings
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r-- | apps/bruteforcesettings/css/settings.css | 17 | ||||
-rw-r--r-- | apps/bruteforcesettings/js/IPWhitelistView.js | 2 | ||||
-rw-r--r-- | apps/bruteforcesettings/templates/ipwhitelist.php | 7 | ||||
-rw-r--r-- | lib/private/Settings/Manager.php | 2 | ||||
-rw-r--r-- | tests/lib/Settings/ManagerTest.php | 8 |
5 files changed, 27 insertions, 9 deletions
diff --git a/apps/bruteforcesettings/css/settings.css b/apps/bruteforcesettings/css/settings.css new file mode 100644 index 00000000000..1d2837b00ee --- /dev/null +++ b/apps/bruteforcesettings/css/settings.css @@ -0,0 +1,17 @@ + +#whitelist-list { + min-width: 262px; +} + +#whitelist-list td span { + padding: 10px 15px; + display: inline-block; +} + +#whitelist-list .action-column { + width: 46px; +} + +#whitelist-list .action-column a { + display: inline-block; +}
\ No newline at end of file diff --git a/apps/bruteforcesettings/js/IPWhitelistView.js b/apps/bruteforcesettings/js/IPWhitelistView.js index da711ae1225..7341c7d0797 100644 --- a/apps/bruteforcesettings/js/IPWhitelistView.js +++ b/apps/bruteforcesettings/js/IPWhitelistView.js @@ -27,7 +27,7 @@ var TEMPLATE_WHITELIST = '<tr data-id="{{id}}">' + '<td><span>{{ip}}/{{mask}}</span></td>' - + '<td><a class="icon-delete has-tooltip" title="' + t('bruteforcesettings', 'Delete') + '">BAD CSS</a></td>' + + '<td class="action-column"><span><a class="icon-delete has-tooltip" title="' + t('bruteforcesettings', 'Delete') + '"></a></span></td>' + '</tr>'; OCA.BruteForceSettings.WhitelistView = OC.Backbone.View.extend({ diff --git a/apps/bruteforcesettings/templates/ipwhitelist.php b/apps/bruteforcesettings/templates/ipwhitelist.php index 69354956168..a4b0292e942 100644 --- a/apps/bruteforcesettings/templates/ipwhitelist.php +++ b/apps/bruteforcesettings/templates/ipwhitelist.php @@ -30,16 +30,17 @@ script('bruteforcesettings', [ 'IPWhitelistCollection', 'IPWhitelistView', ]); +style('bruteforcesettings', [ + 'settings' +]) /** @var \OCP\IL10N $l */ ?> <form id="IPWhiteList" class="section"> <h2><?php p($l->t('Brute force ip whitelist')); ?></h2> - <table> - <tbody id="whitelist-list"> + <table id="whitelist-list"> - </tbody> </table> <input type="text" name="whitelist_ip" id="whitelist_ip" placeholder="1.2.3.4" style="width: 200px;" />/ diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 2ae1e0682b7..080b697b238 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -273,7 +273,7 @@ class Manager implements IManager { $sections = [ 0 => [new Section('server', $this->l->t('Server settings'), 0, $this->url->imagePath('settings', 'admin.svg'))], 5 => [new Section('sharing', $this->l->t('Sharing'), 0, $this->url->imagePath('core', 'actions/share.svg'))], - 10 => [new Section('security', $this->l->t('Security'), 0)], + 10 => [new Section('security', $this->l->t('Security'), 0, $this->url->imagePath('core', 'actions/password.svg'))], 45 => [new Section('encryption', $this->l->t('Encryption'), 0, $this->url->imagePath('core', 'actions/password.svg'))], 98 => [new Section('additional', $this->l->t('Additional settings'), 0, $this->url->imagePath('core', 'actions/settings-dark.svg'))], 99 => [new Section('tips-tricks', $this->l->t('Tips & tricks'), 0, $this->url->imagePath('settings', 'help.svg'))], diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index e6acafe9b88..497a0df9f4e 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -146,7 +146,7 @@ class ManagerTest extends TestCase { ['class' => \OCA\WorkflowEngine\Settings\Section::class, 'priority' => 90] ])); - $this->url->expects($this->exactly(5)) + $this->url->expects($this->exactly(6)) ->method('imagePath') ->willReturnMap([ ['settings', 'admin.svg', '1'], @@ -159,7 +159,7 @@ class ManagerTest extends TestCase { $this->assertEquals([ 0 => [new Section('server', 'Server settings', 0, '1')], 5 => [new Section('sharing', 'Sharing', 0, '2')], - 10 => [new Section('security', 'Security', 0)], + 10 => [new Section('security', 'Security', 0, '3')], 45 => [new Section('encryption', 'Encryption', 0, '3')], 90 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)], 98 => [new Section('additional', 'Additional settings', 0, '4')], @@ -178,7 +178,7 @@ class ManagerTest extends TestCase { ->will($this->returnValue([ ])); - $this->url->expects($this->exactly(5)) + $this->url->expects($this->exactly(6)) ->method('imagePath') ->willReturnMap([ ['settings', 'admin.svg', '1'], @@ -191,7 +191,7 @@ class ManagerTest extends TestCase { $this->assertEquals([ 0 => [new Section('server', 'Server settings', 0, '1')], 5 => [new Section('sharing', 'Sharing', 0, '2')], - 10 => [new Section('security', 'Security', 0)], + 10 => [new Section('security', 'Security', 0, '3')], 45 => [new Section('encryption', 'Encryption', 0, '3')], 98 => [new Section('additional', 'Additional settings', 0, '4')], 99 => [new Section('tips-tricks', 'Tips & tricks', 0, '5')], |