From 2f1aa251305be4dbe0b178ff523346a65dd3cf62 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Thu, 21 Dec 2017 12:06:18 +0100 Subject: New button standard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) USer menu in popover Signed-off-by: John Molakvoæ (skjnldsv) Multiselect fixes Signed-off-by: John Molakvoæ (skjnldsv) Register menu & copyright Signed-off-by: John Molakvoæ (skjnldsv) Allow form and label in popover standard Signed-off-by: John Molakvoæ (skjnldsv) New menu NOT in popover Signed-off-by: John Molakvoæ (skjnldsv) Stop autofilling user and password... SHAME TO THEM: https://bugzilla.mozilla.org/show_bug.cgi?id=956906#c100 Signed-off-by: John Molakvoæ (skjnldsv) Hide men by default Signed-off-by: John Molakvoæ (skjnldsv) --- settings/css/settings.scss | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'settings/css') diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 05d62423d17..0af440594da 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -549,7 +549,10 @@ span.usersLastLoginTooltip { /* use same height as in files app */ #newuser { /* positioning fixes */ - padding-left: 3px; + margin: 2px 0; + display: flex; + flex-direction: column; + .groups { display: inline; } @@ -561,6 +564,19 @@ span.usersLastLoginTooltip { position: relative; top: -1px; } + input:not([type='submit']) { + width: 100%; + margin: 2px 0; + } + input[type='submit'] { + flex-grow: 2; + } + > div { + display: inline-flex; + label { + display: block; + } + } } tr:hover > td { -- cgit v1.2.3 From 7f6b27aef7a3fd696a3836964bf0592e3ffe9d00 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Tue, 9 Jan 2018 15:55:45 +0100 Subject: New user form in table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) Added value and empty check to properly display a confirm button/input Signed-off-by: John Molakvoæ (skjnldsv) w3c html form table compliance and menu fixes Signed-off-by: John Molakvoæ (skjnldsv) Various design fixes Signed-off-by: John Molakvoæ (skjnldsv) Fix wording to consistent 'Add user' Signed-off-by: Jan-Christoph Borchardt Focus new username input on toggle Signed-off-by: John Molakvoæ (skjnldsv) Removed unwanted th after rebase Signed-off-by: John Molakvoæ (skjnldsv) quote fix Signed-off-by: John Molakvoæ (skjnldsv) Th to td Signed-off-by: John Molakvoæ (skjnldsv) 🙈 Signed-off-by: John Molakvoæ (skjnldsv) Email input to email type Signed-off-by: John Molakvoæ (skjnldsv) Fixed table template cells and fix email input enabling Signed-off-by: John Molakvoæ (skjnldsv) Always show email and fixed min-width of name, username, mail and fullname columns Signed-off-by: John Molakvoæ (skjnldsv) Use button id Signed-off-by: John Molakvoæ (skjnldsv) --- core/css/inputs.scss | 5 + settings/css/settings.scss | 35 ++--- settings/js/users/users.js | 44 +----- settings/templates/users/main.php | 14 -- settings/templates/users/part.createuser.php | 36 +---- settings/templates/users/part.userlist.php | 226 +++++++++++++++++---------- 6 files changed, 165 insertions(+), 195 deletions(-) (limited to 'settings/css') diff --git a/core/css/inputs.scss b/core/css/inputs.scss index c0576f01b09..7b74d645481 100644 --- a/core/css/inputs.scss +++ b/core/css/inputs.scss @@ -149,6 +149,11 @@ input[type='reset'] { cursor: pointer; box-sizing: border-box; background-color: nc-darken($color-main-background, 3%); + &.icon-confirm:not(:empty), + &.icon-confirm[value]:not([value=""]) { + background-position: calc(100% - 6px) center; + padding-right: 30px; + } } /* Buttons */ diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 0af440594da..69e9b593d95 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -491,9 +491,12 @@ table.grid { } } -td { +td, th { &.name { padding-left: .8em; + width: 10em; + min-width: 10em; + max-width: 10em; } &.password { padding-left: .8em; @@ -504,8 +507,12 @@ td { &.displayName > img { visibility: hidden; } - &.password, &.displayName { + &.password, + &.displayName, + &.mailAddress { width: 12em; + min-width: 12em; + max-width: 12em; cursor: pointer; } &.mailAddress { @@ -524,7 +531,7 @@ span.usersLastLoginTooltip { /* dropdowns will be relative to this element */ #userlist { position: relative; - .mailAddress, .storageLocation, .userBackend, .lastLogin { + .storageLocation, .userBackend, .lastLogin { display: none; } th.name { @@ -545,17 +552,7 @@ span.usersLastLoginTooltip { } } -/* because of accessibility the name cell is - therefore we enforce the black color */ -/* use same height as in files app */ #newuser { - /* positioning fixes */ - margin: 2px 0; - display: flex; - flex-direction: column; - - .groups { - display: inline; - } .groupsListContainer.hidden { display: none; } @@ -564,18 +561,8 @@ span.usersLastLoginTooltip { position: relative; top: -1px; } - input:not([type='submit']) { + #newuserHeader input:not([type="submit"]) { width: 100%; - margin: 2px 0; - } - input[type='submit'] { - flex-grow: 2; - } - > div { - display: inline-flex; - label { - display: block; - } } } diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 31f9605e48f..58c15cf1c93 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -32,7 +32,13 @@ var UserList = { // initially the list might already contain user entries (not fully ajaxified yet) // initialize these entries this.$el.find('.quota-user').singleSelect().on('change', this.onQuotaSelect); - OC.registerMenu($('.app-navigation-new > button'), $('#newuser')) + OC.registerMenu( + $('#new-user-button'), + $('#newuserHeader'), + function() { + $('#newusername').focus(); + } + ); }, /** @@ -1136,24 +1142,6 @@ $(document).ready(function () { } }); - if ($('#CheckboxEmailAddress').is(':checked')) { - $("#userlist .mailAddress").show(); - } - // Option to display/hide the "Mail Address" column - $('#CheckboxEmailAddress').click(function () { - if ($('#CheckboxEmailAddress').is(':checked')) { - $("#userlist .mailAddress").show(); - if (OC.isUserAdmin()) { - OCP.AppConfig.setValue('core', 'umgmt_show_email', 'true'); - } - } else { - $("#userlist .mailAddress").hide(); - if (OC.isUserAdmin()) { - OCP.AppConfig.setValue('core', 'umgmt_show_email', 'false'); - } - } - }); - if ($('#CheckboxUserBackend').is(':checked')) { $("#userlist .userBackend").show(); } @@ -1172,24 +1160,6 @@ $(document).ready(function () { } }); - if ($('#CheckboxMailOnUserCreate').is(':checked')) { - $("#newemail").show(); - } - // Option to display/hide the "E-Mail" input field - $('#CheckboxMailOnUserCreate').click(function () { - if ($('#CheckboxMailOnUserCreate').is(':checked')) { - $("#newemail").show(); - if (OC.isUserAdmin()) { - OCP.AppConfig.setValue('core', 'umgmt_send_email', 'true'); - } - } else { - $("#newemail").hide(); - if (OC.isUserAdmin()) { - OCP.AppConfig.setValue('core', 'umgmt_send_email', 'false'); - } - } - }); - // calculate initial limit of users to load var initialUserCountLimit = UserList.initialUsersToLoad, containerHeight = $('#app-content').height(); diff --git a/settings/templates/users/main.php b/settings/templates/users/main.php index 6b75c46d10f..3fc80fca0b9 100644 --- a/settings/templates/users/main.php +++ b/settings/templates/users/main.php @@ -67,20 +67,6 @@ translation('settings'); t('Show last login')) ?>

-

- /> - -

-

- /> - -

t('When the password of a new user is left empty, an activation email with a link to set the password is sent.')) ?>

diff --git a/settings/templates/users/part.createuser.php b/settings/templates/users/part.createuser.php index fca9ecc0898..57fe8e8b63f 100644 --- a/settings/templates/users/part.createuser.php +++ b/settings/templates/users/part.createuser.php @@ -1,37 +1,3 @@
- - +
diff --git a/settings/templates/users/part.userlist.php b/settings/templates/users/part.userlist.php index 2506dba7fc3..e4e5aa3df7b 100644 --- a/settings/templates/users/part.userlist.php +++ b/settings/templates/users/part.userlist.php @@ -1,90 +1,146 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
t('Username'))?>t( 'Full name' )); ?>t( 'Password' )); ?>t( 'Email' )); ?>t( 'Groups' )); ?>t('Group admin for')); ?>t('Quota')); ?>t('Storage location')); ?>t('User backend')); ?>t('Last login')); ?>
<?php p($l->t(" title="t("change full name"))?>"/> - ●●●●●●● <?php p($l->t(" title="t("set new password"))?>"/> - <?php p($l->t('change email address'))?> -
-
-
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - -
t('Username'))?>t( 'Full name' )); ?>t( 'Password' )); ?>t( 'Email' )); ?>t( 'Groups' )); ?>t('Group admin for')); ?>t('Recovery password')); ?>t('Quota')); ?>t('Storage location')); ?>t('User backend')); ?>t('Last login')); ?>
<?php p($l->t('change full name'))?> + ●●●●●●● <?php p($l->t('set new password'))?> + <?php p($l->t('change email address'))?> +
+
+
+ - - -
- -
- + + +
+
+ +
+ +
- -
+
+