summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/css/apps.scss31
-rw-r--r--core/css/multiselect.scss9
-rw-r--r--settings/css/settings.scss18
-rw-r--r--settings/js/users/users.js6
-rw-r--r--settings/templates/users/main.php3
-rw-r--r--settings/templates/users/part.createuser.php58
6 files changed, 92 insertions, 33 deletions
diff --git a/core/css/apps.scss b/core/css/apps.scss
index becbf63cd6d..bcb0878b3c8 100644
--- a/core/css/apps.scss
+++ b/core/css/apps.scss
@@ -92,6 +92,22 @@ kbd {
border-right: 1px solid $color-border;
display: flex;
flex-direction: column;
+
+ /* 'New' button */
+ .app-navigation-new {
+ display: block;
+ padding: 10px;
+ button {
+ display: inline-block;
+ width: 100%;
+ padding: 10px;
+ padding-left: 34px;
+ background-position: 10px center;
+ text-align: left;
+ margin: 0;
+ }
+ }
+
li {
position: relative;
}
@@ -794,14 +810,14 @@ kbd {
flex: 0 0 auto;
> button,
> a,
- > .menuitem {
+ > .menuitem,
+ > label {
cursor: pointer;
line-height: 36px;
border: 0;
background-color: transparent;
display: flex;
align-items: center;
- width: auto;
height: auto;
margin: 0;
font-weight: 300;
@@ -865,6 +881,9 @@ kbd {
margin: -2px 11px 0;
}
}
+ > input:not([type=radio]):not([type=checkbox]):not([type=image]) {
+ width: 150px;
+ }
}
> button {
padding: 0;
@@ -876,7 +895,7 @@ kbd {
}
}
-
+/* CONTENT WRAPPER --------------------------------------------------------- */
#app-content-wrapper {
display: flex;
position: relative;
@@ -891,6 +910,8 @@ kbd {
overflow-y: auto;
}
}
+
+/* CONTENT LIST ------------------------------------------------------------- */
.app-content-list {
width: 300px;
border-right: 1px solid nc-darken($color-main-background, 8%);
@@ -1036,7 +1057,8 @@ kbd {
}
}
}
-/* App content */
+
+/* CONTENT ------------------------------------------------------------------ */
.app-content-detail {
/* grow full width */
flex-grow: 1;
@@ -1046,6 +1068,7 @@ kbd {
}
}
+/* MOBILE ------------------------------------------------------------------- */
/* Mobile width < 768px */
@media only screen and (max-width: 768px) {
diff --git a/core/css/multiselect.scss b/core/css/multiselect.scss
index 3aa9eb639dd..da6cbde3722 100644
--- a/core/css/multiselect.scss
+++ b/core/css/multiselect.scss
@@ -25,7 +25,7 @@ ul.multiselectoptions {
position: absolute;
max-height: 20em;
overflow-y: auto;
- z-index: 49;
+ z-index: 149;
&.down {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
@@ -96,7 +96,7 @@ div.multiselect {
&.active {
background-color: $color-main-background;
position: relative;
- z-index: 50;
+ z-index: 150;
}
&.up {
border-top: 0 none;
@@ -116,11 +116,16 @@ div.multiselect {
text-overflow: ellipsis;
width: 90%;
white-space: nowrap;
+ line-height: 20px;
}
&:last-child {
position: absolute;
right: 8px;
top: 8px;
+ padding: 0 !important;
+ min-width: 16px;
+ min-height: 16px;
+ background-position: center;
}
}
}
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 {
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 0b94401941b..31f9605e48f 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -2,6 +2,7 @@
* Copyright (c) 2014, Arthur Schiwon <blizzz@owncloud.com>
* Copyright (c) 2014, Raghu Nayyar <beingminimal@gmail.com>
* Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
+ * Copyright (c) 2017, John Molakvoæ <skjnldsv@protonmail.com>
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
@@ -31,6 +32,7 @@ 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'))
},
/**
@@ -508,7 +510,7 @@ var UserList = {
checked: checked,
oncheck: addUserToGroup,
onuncheck: removeUserFromGroup,
- minWidth: 100
+ minWidth: 150
});
},
@@ -542,7 +544,7 @@ var UserList = {
checked: checked,
oncheck: checkHandler,
onuncheck: checkHandler,
- minWidth: 100
+ minWidth: 150
});
},
diff --git a/settings/templates/users/main.php b/settings/templates/users/main.php
index 3688f2296cd..6b75c46d10f 100644
--- a/settings/templates/users/main.php
+++ b/settings/templates/users/main.php
@@ -1,6 +1,7 @@
<?php
/**
* Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
+ * Copyright (c) 2017, John Molakvoæ <skjnldsv@protonmail.com>
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
@@ -35,6 +36,7 @@ translation('settings');
?>
<div id="app-navigation">
+ <?php print_unescaped($this->inc('users/part.createuser')); ?>
<?php print_unescaped($this->inc('users/part.grouplist')); ?>
<div id="app-settings">
<div id="app-settings-header">
@@ -88,6 +90,5 @@ translation('settings');
</div>
<div id="app-content">
- <?php print_unescaped($this->inc('users/part.createuser')); ?>
<?php print_unescaped($this->inc('users/part.userlist', $userlistParams)); ?>
</div>
diff --git a/settings/templates/users/part.createuser.php b/settings/templates/users/part.createuser.php
index 6a388fc0d88..fca9ecc0898 100644
--- a/settings/templates/users/part.createuser.php
+++ b/settings/templates/users/part.createuser.php
@@ -1,25 +1,37 @@
-<div id="controls">
- <form id="newuser" autocomplete="off">
- <input id="newusername" type="text"
- placeholder="<?php p($l->t('Username'))?>"
- autocomplete="off" autocapitalize="none" autocorrect="off" />
- <input
- type="password" id="newuserpassword"
- placeholder="<?php p($l->t('Password'))?>"
- autocomplete="off" autocapitalize="none" autocorrect="off" />
- <input id="newemail" type="email" style="display:none"
- placeholder="<?php p($l->t('E-Mail'))?>"
- autocomplete="off" autocapitalize="none" autocorrect="off" />
- <div class="groups"><div class="groupsListContainer multiselect button" data-placeholder="<?php p($l->t('Groups'))?>"><span class="title groupsList"></span><span class="icon-triangle-s"></span></div></div>
- <input type="submit" class="button" value="<?php p($l->t('Create'))?>" />
+<div class="app-navigation-new">
+ <button type="button" class="icon-add"><?php p($l->t('New user'))?></button>
+ <form class="newUserMenu" id="newuser" autocomplete="off" style="display: none;">
+ <div>
+ <input id="newusername" type="text" required
+ placeholder="<?php p($l->t('Username'))?>" name="username"
+ autocomplete="off" autocapitalize="none" autocorrect="off" />
+ </div>
+ <div>
+ <input id="newuserpassword" type="password" required
+ placeholder="<?php p($l->t('Password'))?>" name="password"
+ autocomplete="new-password" autocapitalize="none" autocorrect="off" />
+ </div>
+ <div>
+ <input id="newemail" type="text" style="display:none"
+ placeholder="<?php p($l->t('E-Mail'))?>" name="email"
+ autocomplete="off" autocapitalize="none" autocorrect="off" />
+ </div>
+ <div>
+ <label class="groups" for="newgroup">
+ <div class="groupsListContainer multiselect button" data-placeholder="<?php p($l->t('Groups'))?>"><span class="title groupsList"></span>
+ <span class="icon-triangle-s"></span>
+ </div>
+ </label>
+ <input type="submit" id="newsubmit" class="button icon-confirm has-tooltip" value="" title="<?php p($l->t('Create'))?>" />
+ </div>
+ <?php if((bool)$_['recoveryAdminEnabled']): ?>
+ <div class="recoveryPassword">
+ <input id="recoveryPassword"
+ type="password"
+ placeholder="<?php p($l->t('Admin Recovery Password'))?>"
+ title="<?php p($l->t('Enter the recovery password in order to recover the users files during password change'))?>"
+ alt="<?php p($l->t('Enter the recovery password in order to recover the users files during password change'))?>"/>
+ </div>
+ <?php endif; ?>
</form>
- <?php if((bool)$_['recoveryAdminEnabled']): ?>
- <div class="recoveryPassword">
- <input id="recoveryPassword"
- type="password"
- placeholder="<?php p($l->t('Admin Recovery Password'))?>"
- title="<?php p($l->t('Enter the recovery password in order to recover the users files during password change'))?>"
- alt="<?php p($l->t('Enter the recovery password in order to recover the users files during password change'))?>"/>
- </div>
- <?php endif; ?>
</div>