summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2017-09-28 17:48:40 +0200
committerGitHub <noreply@github.com>2017-09-28 17:48:40 +0200
commitd58c0e68343185fe37293fa3901ced348e23bb9b (patch)
treebdc7805bd944f97429a2973f940337b32c9f8a05 /settings
parentb17ca81df07166fed99afd224cf301b7746df5bb (diff)
parentb9a8ba7a2361d6a1d1bbf6acf20abac58ac2ed91 (diff)
downloadnextcloud-server-d58c0e68343185fe37293fa3901ced348e23bb9b.tar.gz
nextcloud-server-d58c0e68343185fe37293fa3901ced348e23bb9b.zip
Merge pull request #6669 from nextcloud/various-css-fixes
Various css fixes
Diffstat (limited to 'settings')
-rw-r--r--settings/css/settings.scss86
-rw-r--r--settings/js/users/users.js10
-rw-r--r--settings/templates/settings/personal/personal.info.php20
-rw-r--r--settings/templates/users/part.userlist.php4
4 files changed, 59 insertions, 61 deletions
diff --git a/settings/css/settings.scss b/settings/css/settings.scss
index 8a722896fa5..221dad33ac3 100644
--- a/settings/css/settings.scss
+++ b/settings/css/settings.scss
@@ -579,42 +579,6 @@ span.usersLastLoginTooltip {
.groupsListContainer.hidden {
display: none;
}
- .bubble {
- z-index: 1;
- right: -6px;
- top: auto;
- &:after {
- right: 5px;
- }
- }
- .popovermenu {
- a.menuitem {
- height: 20px;
- margin: 0;
- padding: 0;
- line-height: initial;
- }
- margin-top: 4px;
- border-top-right-radius: 3px;
- right: 3px;
- opacity: 0;
- display: block;
- visibility: hidden;
- transition: opacity 0.1s, visibility 0.1s;
- }
- tr.active .popovermenu {
- opacity: 1;
- visibility: visible;
- }
- .popovermenu > ul.userActionsMenu {
- right: 15px;
- a {
- margin: 5px 0;
- span:last-child {
- margin-left: 5px;
- }
- }
- }
}
/* because of accessibility the name cell is <th> - therefore we enforce the black color */
@@ -649,10 +613,24 @@ tr:hover > td {
td.userActions {
width: 25px;
text-align: center;
+ position: relative;
.action {
position: relative;
top: 3px;
}
+ .toggleUserActions {
+ border: none;
+ background-color: rgba(0, 0, 0, 0);
+ width: 34px;
+ height: 34px;
+ margin: 0;
+ opacity: 0.5;
+ &:hover,
+ &:focus {
+ background-color: transparent;
+ opacity: 1;
+ }
+ }
}
tr.active td.userActions .action {
@@ -683,18 +661,30 @@ input#recoveryPassword {
#userlist td.quota {
position: relative;
width: 10em;
+ progress.quota-user-progress {
+ position: absolute;
+ width: calc(10em + 0px);
+ margin-top: -7px;
+ z-index: 0;
+ margin-left: 1px;
+ height: 3px;
+ }
}
select {
&.quota-user {
- position: absolute;
- left: 0;
- top: 0;
width: 10em;
height: 34px;
+ z-index: 50;
+ position: relative;
}
- &.quota.active {
- background: #fff;
+ + progress.quota-user-progress {
+ position: absolute;
+ width: calc(10em + 0px);
+ margin-top: -7px;
+ z-index: 0;
+ margin-left: 1px;
+ height: 3px;
}
}
@@ -702,20 +692,6 @@ input.userFilter {
width: 200px;
}
-.quota_progress_container {
- position: absolute;
- left: 0;
- top: 0;
- width: 10em;
- margin: 3px 3px 3px 0;
- border-radius: 3px;
-}
-
-.quota_progress {
- background-color: #eee;
- height: 34px;
-}
-
#newusergroups + input[type='submit'] {
position: relative;
top: -1px;
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 6fb74e1ba63..4a4faf13ec7 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -571,7 +571,12 @@ var UserList = {
//asymptotic curve approaching 50% at 10GB to visualize used stace with infinite quota
usedQuota = 95 * (1 - (1 / (usedInGB + 1)));
}
- $tr.find('.quota_progress').width(usedQuota + '%');
+ $tr.find('.quota-user-progress').val( isNaN(usedQuota) ? 0 : usedQuota );
+ if (usedQuota > 80) {
+ $tr.find('.quota-user-progress').addClass('warn');
+ } else {
+ $tr.find('.quota-user-progress').removeClass('warn');
+ }
},
/**
@@ -950,9 +955,12 @@ $(document).ready(function () {
if ($tr.is('.active')) {
$tr.removeClass('active');
+ menudiv.removeClass('open');
return;
}
$('#userlist tr.active').removeClass('active');
+ $('#userlist .popovermenu').removeClass('open');
+ menudiv.addClass('open');
menudiv.find('.action-togglestate').empty();
if ($tr.data('userEnabled')) {
$('.action-togglestate', $td).html('<span class="icon icon-close"></span><span>' + t('settings', 'Disable') + '</span>');
diff --git a/settings/templates/settings/personal/personal.info.php b/settings/templates/settings/personal/personal.info.php
index 084b34af96c..d6f6061ebf2 100644
--- a/settings/templates/settings/personal/personal.info.php
+++ b/settings/templates/settings/personal/personal.info.php
@@ -38,9 +38,23 @@ vendor_style('jcrop/css/jquery.Jcrop');
?>
<div id="quota" class="section">
- <div style="width:<?php p($_['usage_relative']);?>%"
- <?php if($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>>
- <p id="quotatext">
+ <progress value="<?php p($_['usage_relative']); ?>" max="100"
+ <?php if($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>></progress>
+
+ <div style="width:<?php p($_['usage_relative']);?>%" class="quotatext-fg
+ <?php if($_['usage_relative'] > 80): ?> quota-warning <?php endif; ?>">
+ <p class="quotatext">
+ <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?>
+ <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>',
+ [$_['usage'], $_['total_space']]));?>
+ <?php else: ?>
+ <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong> (<strong>%s %%</strong>)',
+ [$_['usage'], $_['total_space'], $_['usage_relative']]));?>
+ <?php endif ?>
+ </p>
+ </div>
+ <div class="quotatext-bg">
+ <p class="quotatext">
<?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?>
<?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>',
[$_['usage'], $_['total_space']]));?>
diff --git a/settings/templates/users/part.userlist.php b/settings/templates/users/part.userlist.php
index 5ceda71fc00..146e35d11ac 100644
--- a/settings/templates/users/part.userlist.php
+++ b/settings/templates/users/part.userlist.php
@@ -43,7 +43,6 @@
</td>
<?php endif;?>
<td class="quota">
- <div class="quota_progress_container"><div class="quota_progress"></div></div>
<select class="quota-user" data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>">
<option value='default'>
<?php p($l->t('Default'));?>
@@ -60,12 +59,13 @@
<?php p($l->t('Other'));?> ...
</option>
</select>
+ <progress class="quota-user-progress" value="" max="100"></progress>
</td>
<td class="storageLocation"></td>
<td class="userBackend"></td>
<td class="lastLogin"></td>
<td class="userActions"><span></span>
- <div class="popovermenu bubble open menu">
+ <div class="popovermenu bubble menu">
<ul class="userActionsMenu">
<li>
<a href="#" class="menuitem action-togglestate permanent" data-action="togglestate"></a>