Fixed layout of bruteforcesettings

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-03-13 19:44:10 -06:00 committed by Roeland Jago Douma
parent 86022f8710
commit ed00bab80b
No known key found for this signature in database
GPG Key ID: F941078878347C0C
5 changed files with 27 additions and 9 deletions

View File

@ -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;
}

View File

@ -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({

View File

@ -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;" />/

View File

@ -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'))],

View File

@ -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')],