From f499f1b9a113eaaf412ff8eb9e90000d0b2f578c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 31 Jul 2018 16:29:07 +0200 Subject: [PATCH 1/9] Move locale preview to two lines to reduce grid height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/templates/settings/personal/personal.info.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/settings/templates/settings/personal/personal.info.php b/settings/templates/settings/personal/personal.info.php index 3e8f31cf07..a0d766f88f 100644 --- a/settings/templates/settings/personal/personal.info.php +++ b/settings/templates/settings/personal/personal.info.php @@ -367,8 +367,9 @@ vendor_style('jcrop/css/jquery.Jcrop');
-

-

+

+ +

From 8abec697b0b544a22dcf0ff7718f97be3231e605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 31 Jul 2018 16:30:58 +0200 Subject: [PATCH 2/9] Make user management heading font size lighter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- settings/css/settings.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 45511c44db..3dd6bf8291 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -1473,7 +1473,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper { top: $grid-row-height; } &#grid-header { - color: var(--color-text-light); + color: var(--color-text-maxcontrast); z-index: 60; /* above new-user */ } &:hover { From 9b46814320e1b62c860a9b241cfbf0d0ddc13b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 1 Aug 2018 08:51:37 +0200 Subject: [PATCH 3/9] Rename CalDAV to Calendar settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/dav/templates/settings-admin-caldav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dav/templates/settings-admin-caldav.php b/apps/dav/templates/settings-admin-caldav.php index a3e3188fb4..919cb06802 100644 --- a/apps/dav/templates/settings-admin-caldav.php +++ b/apps/dav/templates/settings-admin-caldav.php @@ -29,7 +29,7 @@ script('dav', [ /** @var array $_ */ ?>
-

t('CalDAV server')); ?>

+

t('Calendar server')); ?>

/> From 635575f271d2c481cbe0da9fa4b4d7d3179c024b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 1 Aug 2018 09:19:52 +0200 Subject: [PATCH 4/9] files_external: Move delete option to 3-dots menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_external/css/settings.scss | 18 ++++++++++++++++-- apps/files_external/js/settings.js | 14 ++++++++++---- apps/files_external/templates/settings.php | 5 +---- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/apps/files_external/css/settings.scss b/apps/files_external/css/settings.scss index 04ecfc4162..9c75d455b3 100644 --- a/apps/files_external/css/settings.scss +++ b/apps/files_external/css/settings.scss @@ -6,6 +6,12 @@ margin: 15px 0 20px 0; } +#externalStorage td { + & > input, & > select { + width: 100%; + } +} + #externalStorage td.status { /* overwrite conflicting core styles */ display: table-cell; @@ -20,8 +26,12 @@ border-radius: 50%; cursor: pointer; } - -td.mountPoint, td.backend { width:160px; } +#externalStorage { + td.mountPoint, td.backend, td.authentication, td.configuration { + min-width: 160px; + width: 15%; + } +} #externalStorage td>img { padding-top:7px; opacity: 0.5; } #externalStorage td>img:hover { padding-top:7px; cursor:pointer; opacity: 1; } #addMountPoint>td { border:none; } @@ -86,6 +96,10 @@ td.mountPoint, td.backend { width:160px; } top: 3px; } +#externalStorage .select2-container.applicableUsers { + width: 100% !important; +} + #userMountingBackends { padding-left: 25px; } diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 38a77b59a1..b871fe2f74 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -54,6 +54,11 @@ var MOUNT_OPTIONS_DROPDOWN_TEMPLATE = ' ' + ' ' + ' ' + + '

  • ' + + ' ' + + ' {{t "files_external" "Delete"}}' + + ' ' + + '
  • ' + ' '+ ''; @@ -584,7 +589,7 @@ MountOptionsDropdown.prototype = { $el.find('.optionRow').each(function(i, row){ var $row = $(row); var optionId = $row.find('input, select').attr('name'); - if (visibleOptions.indexOf(optionId) === -1) { + if (visibleOptions.indexOf(optionId) === -1 && !$row.hasClass('persistent')) { $row.hide(); } else { $row.show(); @@ -734,7 +739,7 @@ MountConfigListView.prototype = _.extend({ self.recheckStorageConfig($(this).closest('tr')); }); - this.$el.on('click', 'td.remove>.icon-delete', function() { + this.$el.on('click', 'td.mountOptionsToggle .icon-delete', function() { self.deleteStorageConfig($(this).closest('tr')); }); @@ -742,7 +747,7 @@ MountConfigListView.prototype = _.extend({ self.saveStorageConfig($(this).closest('tr')); }); - this.$el.on('click', 'td.mountOptionsToggle>.icon-settings-dark', function() { + this.$el.on('click', 'td.mountOptionsToggle>.icon-more', function() { self._showMountOptionsDropdown($(this).closest('tr')); }); @@ -1311,7 +1316,8 @@ MountConfigListView.prototype = _.extend({ 'filesystem_check_changes', 'enable_sharing', 'encoding_compatibility', - 'readonly' + 'readonly', + 'delete' ]; if (this._encryptionEnabled) { visibleOptions.push('encrypt'); diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index db944075cc..0a84bf8b9d 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -150,12 +150,9 @@ -
    +
    - -
    -
    From 10de5f219cd7284f7238094f9f9fe09062a1649b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 1 Aug 2018 09:27:36 +0200 Subject: [PATCH 5/9] files_external: Add description to settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_external/templates/settings.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 0a84bf8b9d..b3900aaf93 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -95,6 +95,7 @@

    t('External storages')); ?>

    +

    t('External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow users to mount their own external storage services.')); ?>

    '> @@ -189,6 +190,7 @@

    t('Global credentials')); ?>

    +

    t('Global credentials can be used to authenticate with multiple external storages that have the same credentials.')); ?>

    Date: Wed, 1 Aug 2018 09:40:21 +0200 Subject: [PATCH 6/9] Move encryption settings to security MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/encryption/lib/Settings/Admin.php | 4 ++-- lib/private/Settings/Admin/Encryption.php | 4 ++-- lib/private/Settings/Manager.php | 3 +-- tests/lib/Settings/ManagerTest.php | 6 ++---- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/apps/encryption/lib/Settings/Admin.php b/apps/encryption/lib/Settings/Admin.php index 2faa118e2a..7ada315e23 100644 --- a/apps/encryption/lib/Settings/Admin.php +++ b/apps/encryption/lib/Settings/Admin.php @@ -110,7 +110,7 @@ class Admin implements ISettings { * @return string the section ID, e.g. 'sharing' */ public function getSection() { - return 'encryption'; + return 'security'; } /** @@ -121,7 +121,7 @@ class Admin implements ISettings { * E.g.: 70 */ public function getPriority() { - return 5; + return 11; } } diff --git a/lib/private/Settings/Admin/Encryption.php b/lib/private/Settings/Admin/Encryption.php index 012f579161..65f507154a 100644 --- a/lib/private/Settings/Admin/Encryption.php +++ b/lib/private/Settings/Admin/Encryption.php @@ -77,7 +77,7 @@ class Encryption implements ISettings { * @return string the section ID, e.g. 'sharing' */ public function getSection() { - return 'encryption'; + return 'security'; } /** @@ -88,6 +88,6 @@ class Encryption implements ISettings { * E.g.: 70 */ public function getPriority() { - return 0; + return 10; } } diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index e9f2a6f597..260e33d192 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -230,7 +230,6 @@ class Manager implements IManager { 1 => [new Section('server', $this->l->t('Basic settings'), 0, $this->url->imagePath('core', 'actions/settings-dark.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, $this->url->imagePath('core', 'actions/password.svg'))], - 45 => [new Section('encryption', $this->l->t('Encryption'), 0, $this->url->imagePath('core', 'actions/password.svg'))], 50 => [new Section('groupware', $this->l->t('Groupware'), 0, $this->url->imagePath('core', 'places/contacts.svg'))], 98 => [new Section('additional', $this->l->t('Additional settings'), 0, $this->url->imagePath('core', 'actions/settings-dark.svg'))], ]; @@ -270,7 +269,7 @@ class Manager implements IManager { $form = new Admin\Mail($this->config); $forms[$form->getPriority()] = [$form]; } - if ($section === 'encryption') { + if ($section === 'security') { /** @var ISettings $form */ $form = new Admin\Encryption($this->encryptionManager, $this->userManager); $forms[$form->getPriority()] = [$form]; diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index 76f6d867d3..df7e59841c 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -115,7 +115,7 @@ class ManagerTest extends TestCase { $this->manager->registerSection('admin', \OCA\WorkflowEngine\Settings\Section::class); - $this->url->expects($this->exactly(7)) + $this->url->expects($this->exactly(6)) ->method('imagePath') ->willReturnMap([ ['settings', 'admin.svg', '0'], @@ -131,7 +131,6 @@ class ManagerTest extends TestCase { 1 => [new Section('server', 'Basic settings', 0, '1')], 5 => [new Section('sharing', 'Sharing', 0, '2')], 10 => [new Section('security', 'Security', 0, '3')], - 45 => [new Section('encryption', 'Encryption', 0, '3')], 50 => [new Section('groupware', 'Groupware', 0, '5')], 55 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)], 98 => [new Section('additional', 'Additional settings', 0, '1')], @@ -168,7 +167,7 @@ class ManagerTest extends TestCase { ->method('t') ->will($this->returnArgument(0)); - $this->url->expects($this->exactly(7)) + $this->url->expects($this->exactly(6)) ->method('imagePath') ->willReturnMap([ ['settings', 'admin.svg', '0'], @@ -184,7 +183,6 @@ class ManagerTest extends TestCase { 1 => [new Section('server', 'Basic settings', 0, '1')], 5 => [new Section('sharing', 'Sharing', 0, '2')], 10 => [new Section('security', 'Security', 0, '3')], - 45 => [new Section('encryption', 'Encryption', 0, '3')], 50 => [new Section('groupware', 'Groupware', 0, '5')], 98 => [new Section('additional', 'Additional settings', 0, '1')], ], $this->manager->getAdminSections()); From b46b7d7591b4f76f234e8514c23e46f67c590a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 1 Aug 2018 09:45:34 +0200 Subject: [PATCH 7/9] systemtags: Submit input on enter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/systemtags/js/admin.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/systemtags/js/admin.js b/apps/systemtags/js/admin.js index 5e97cf8ad6..12ad23495e 100644 --- a/apps/systemtags/js/admin.js +++ b/apps/systemtags/js/admin.js @@ -40,6 +40,12 @@ } }); + var self = this; + $('#systemtag_name').on('keyup', function(e) { + if (e.which === 13) { + _.bind(self._onClickSubmit, self)(); + } + }); $('#systemtag_submit').on('click', _.bind(this._onClickSubmit, this)); $('#systemtag_delete').on('click', _.bind(this._onClickDelete, this)); $('#systemtag_reset').on('click', _.bind(this._onClickReset, this)); From 0dd519cff180d93d62c06b30b2706b2413c2895c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 2 Aug 2018 10:26:09 +0200 Subject: [PATCH 8/9] Fix encryption admin section tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/encryption/tests/Settings/AdminTest.php | 4 ++-- tests/lib/Settings/Admin/EncryptionTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/encryption/tests/Settings/AdminTest.php b/apps/encryption/tests/Settings/AdminTest.php index 9afc024dfc..54b3187a97 100644 --- a/apps/encryption/tests/Settings/AdminTest.php +++ b/apps/encryption/tests/Settings/AdminTest.php @@ -92,10 +92,10 @@ class AdminTest extends TestCase { } public function testGetSection() { - $this->assertSame('encryption', $this->admin->getSection()); + $this->assertSame('security', $this->admin->getSection()); } public function testGetPriority() { - $this->assertSame(5, $this->admin->getPriority()); + $this->assertSame(11, $this->admin->getPriority()); } } diff --git a/tests/lib/Settings/Admin/EncryptionTest.php b/tests/lib/Settings/Admin/EncryptionTest.php index 41196a9bc4..9be2a3f46d 100644 --- a/tests/lib/Settings/Admin/EncryptionTest.php +++ b/tests/lib/Settings/Admin/EncryptionTest.php @@ -129,10 +129,10 @@ class EncryptionTest extends TestCase { } public function testGetSection() { - $this->assertSame('encryption', $this->admin->getSection()); + $this->assertSame('security', $this->admin->getSection()); } public function testGetPriority() { - $this->assertSame(0, $this->admin->getPriority()); + $this->assertSame(10, $this->admin->getPriority()); } } From 84f99db7ab96746b9dc3fa662c136912c34274eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 2 Aug 2018 11:45:04 +0200 Subject: [PATCH 9/9] files_external: Fix jsunit tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_external/tests/js/settingsSpec.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js index fbbb341c30..78136fc6bf 100644 --- a/apps/files_external/tests/js/settingsSpec.js +++ b/apps/files_external/tests/js/settingsSpec.js @@ -46,12 +46,9 @@ describe('OCA.External.Settings tests', function() { '' + '' + ''+ - ''+ ''+ @@ -239,7 +236,7 @@ describe('OCA.External.Settings tests', function() { // TODO: respond and check data-id }); it('saves storage after closing mount options popovermenu', function() { - $tr.find('.mountOptionsToggle .icon-settings-dark').click(); + $tr.find('.mountOptionsToggle .icon-more').click(); $tr.find('[name=previews]').trigger(new $.Event('keyup', {keyCode: 97})); $tr.find('input[data-parameter=field1]').val('test'); @@ -331,7 +328,7 @@ describe('OCA.External.Settings tests', function() { }); it('shows popovermenu when clicking on toggle button, hides when clicking outside', function() { - $td.find('.icon-settings-dark').click(); + $td.find('.icon-more').click(); expect($td.find('.popovermenu.open').length).toEqual(1); @@ -342,7 +339,7 @@ describe('OCA.External.Settings tests', function() { it('doesnt show the encryption option when encryption is disabled', function () { view._encryptionEnabled = false; - $td.find('.icon-settings-dark').click(); + $td.find('.icon-more').click(); expect($td.find('.popovermenu [name=encrypt]:visible').length).toEqual(0); @@ -354,17 +351,17 @@ describe('OCA.External.Settings tests', function() { it('reads config from mountOptions field', function() { $tr.find('input.mountOptions').val(JSON.stringify({previews:false})); - $td.find('.icon-settings-dark').click(); + $td.find('.icon-more').click(); expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(false); $('body').mouseup(); $tr.find('input.mountOptions').val(JSON.stringify({previews:true})); - $td.find('.icon-settings-dark').click(); + $td.find('.icon-more').click(); expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(true); }); it('writes config into mountOptions field', function() { - $td.find('.icon-settings-dark').click(); + $td.find('.icon-more').click(); // defaults to true var $field = $td.find('.popovermenu [name=previews]'); expect($field.prop('checked')).toEqual(true);
    '+ - '
    '+ + '
    '+ ''+ '
    '+ - '
    '+ - '
    '+ '
    '+ '