From 4fa817039451982b2ff8d7f6267a2770af594ca4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sat, 6 May 2017 16:22:25 +0200 Subject: [PATCH] polish user actions dropdown Signed-off-by: Robin Appelman --- settings/css/settings.css | 333 ++++++++++++++++++++++++++++++------- settings/js/users/users.js | 15 +- 2 files changed, 284 insertions(+), 64 deletions(-) diff --git a/settings/css/settings.css b/settings/css/settings.css index 0777f7e4cf..95649fc23e 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -2,8 +2,13 @@ This file is licensed under the Affero General Public License version 3 or later. See the COPYING-README file. */ -select#languageinput, select#timezone { width:15em; } -input#openid, input#webdav { width:20em; } +select#languageinput, select#timezone { + width: 15em; +} + +input#openid, input#webdav { + width: 20em; +} /* PERSONAL */ @@ -11,21 +16,27 @@ input#openid, input#webdav { width:20em; } .nav-icon-personal-settings { background-image: url('../img/personal.svg?v=1'); } + .nav-icon-sessions { background-image: url('../img/toggle-filelist.svg?v=1'); } + .nav-icon-apppasswords { background-image: url('../img/password.svg?v=1'); } + .nav-icon-clientsbox { background-image: url('../img/change.svg?v=1'); } + .nav-icon-federated-cloud { background-image: url('../img/share.svg?v=1'); } + .nav-icon-second-factor-backup-codes { background-image: url('../img/password.svg?v=1'); } + .nav-icon-ssl-root-certificate { background-image: url('../img/password.svg?v=1'); } @@ -34,15 +45,19 @@ input#openid, input#webdav { width:20em; } min-width: 145px; padding-right: 0; } + #avatarform .avatardiv { margin-bottom: 10px; } + #avatarform .warning { width: 100%; } + #displayavatar { text-align: center; } + #displayavatar p { text-align: left; } @@ -53,9 +68,11 @@ input#openid, input#webdav { width:20em; } width: 33px; height: 33px; } + .jcrop-holder { z-index: 500; } + #cropper { float: left; z-index: 500; @@ -68,6 +85,7 @@ input#openid, input#webdav { width:20em; } width: 100%; height: calc(100% - 45px); } + #cropper .inner-container { z-index: 2001; /* above the top bar if needed */ position: absolute; @@ -84,9 +102,11 @@ input#openid, input#webdav { width:20em; } #cropper .inner-container .jcrop-holder { box-shadow: 0 0 7px #888; } + #cropper .inner-container .button { margin-top: 15px; } + #cropper .inner-container .primary { float: right; } @@ -94,6 +114,7 @@ input#openid, input#webdav { width:20em; } #personal-settings-avatar-container { float: left; } + #personal-settings-container { position: relative; float: left; @@ -101,22 +122,27 @@ input#openid, input#webdav { width:20em; } max-width: 700px; width: calc(100% - 200px); } + #personal-settings-container:after { clear: both; } + #personal-settings-container > div { float: left; height: 100px; min-width: 300px; } + #personal-settings-container.no-edit > div { height: 20px; min-width: 200px; } + #avatarform > h2, #personal-settings-container > div h2 { position: relative; } + #personal-settings-container > div h2 span[class^="icon-"], #personal-settings-avatar-container h2 span[class^="icon-"] { display: inline-block; @@ -127,11 +153,13 @@ input#openid, input#webdav { width:20em; } opacity: .3; cursor: pointer; } + .personal-settings-setting-box input[type="text"], .personal-settings-setting-box input[type="email"], .personal-settings-setting-box input[type="tel"] { width: 17em; } + #personal-settings-container > div > form span[class^="icon-checkmark"] { position: absolute; left: 228px; @@ -145,22 +173,27 @@ input#openid, input#webdav { width:20em; } right: 14px; top: 70px; } + #personal-settings-container .verify img { padding: 12px 7px 6px; } + /* only show pointer cursor when popup will be there */ #personal-settings-container .verify-action { cursor: pointer; } + .verification-dialog { display: none; right: -9px; top: 40px; width: 275px; } + .verification-dialog p { padding: 10px; } + .verification-dialog .verificationCode { font-family: monospace; display: block; @@ -171,16 +204,19 @@ input#openid, input#webdav { width:20em; } top: 44px; margin: -5px 0px 0; } + .federationScopeMenu.bubble::after { right: 50%; transform: translate(50%, 0); } + .federationScopeMenu.popovermenu a.menuitem, .federationScopeMenu.popovermenu label.menuitem, .federationScopeMenu.popovermenu .menuitem { font-size: 12.8px; line-height: 1.6em; } + .federationScopeMenu.popovermenu .menuitem .menuitem-text-detail { opacity: .75; } @@ -194,11 +230,13 @@ input#openid, input#webdav { width:20em; } padding-right: 0; min-width: 60%; } + #avatarform, #passwordform { margin-bottom: 0; padding-bottom: 0; } + #groups { overflow-wrap: break-word; max-width: 75%; @@ -213,17 +251,19 @@ input#openid, input#webdav { width:20em; } #sslCertificate tr.expired { background-color: rgba(255, 0, 0, 0.5); } + #sslCertificate td { padding: 5px; } - #displaynameerror { display: none; } + #displaynamechanged { display: none; } + input#identity { width: 20em; } @@ -237,6 +277,7 @@ input#identity { background-color: #47a447; padding: 3px; } + .msg.error { color: #fff; background-color: #d2322d; @@ -247,8 +288,13 @@ input#identity { display: inline-block; } -table.nostyle label { margin-right: 2em; } -table.nostyle td { padding: 0.2em 0; } +table.nostyle label { + margin-right: 2em; +} + +table.nostyle td { + padding: 0.2em 0; +} #sessions table, #apppasswords table { @@ -257,10 +303,12 @@ table.nostyle td { padding: 0.2em 0; } padding-top: 5px; max-width: 580px; } + #sessions table th, #apppasswords table th { opacity: .5; } + #sessions table th, #sessions table td, #apppasswords table th, @@ -286,10 +334,11 @@ table.nostyle td { padding: 0.2em 0; } position: relative; } -#sessions tr>*:nth-child(2), -#apppasswords tr>*:nth-child(2) { +#sessions tr > *:nth-child(2), +#apppasswords tr > *:nth-child(2) { text-align: right; } + #sessions .token-list td > a.icon, #apppasswords .token-list td > a.icon { opacity: 0; @@ -305,7 +354,7 @@ table.nostyle td { padding: 0.2em 0; } #sessions .token-list tr:hover td > a.icon, #apppasswords .token-list tr:hover td > a.icon, #sessions .token-list tr.active td > a.icon, -#apppasswords .token-list tr.active td > a.icon{ +#apppasswords .token-list tr.active td > a.icon { opacity: 0.6; } @@ -329,7 +378,7 @@ table.nostyle td { padding: 0.2em 0; } } #sessions .token-list tr.active div.configure > *, -#apppasswords .token-list tr.active div.configure > *{ +#apppasswords .token-list tr.active div.configure > * { margin-top: 5px; margin-bottom: 5px; display: inline-block; @@ -347,6 +396,7 @@ table.nostyle td { padding: 0.2em 0; } font-family: monospace; background-color: lightyellow; } + .app-password-row { display: table-row; } @@ -369,21 +419,29 @@ table.nostyle td { padding: 0.2em 0; } padding-left: 0 !important; margin-left: -10px } + .social-button img { padding: 10px; } - /* USERS */ -#newgroup-init a span { margin-left: 20px; } +#newgroup-init a span { + margin-left: 20px; +} + #newgroup-init a span:before { - position: absolute; left: 12px; top:-2px; - content: '+'; font-weight: bold; font-size: 150%; + position: absolute; + left: 12px; + top: -2px; + content: '+'; + font-weight: bold; + font-size: 150%; } #newgroup-form { height: 44px; } + #newgroupname { margin: 0; width: 100%; @@ -394,6 +452,7 @@ table.nostyle td { padding: 0.2em 0; } border-bottom: 1px solid #eee; border-radius: 0; } + #newgroup-form .button { position: absolute; right: 0; @@ -410,36 +469,70 @@ table.nostyle td { padding: 0.2em 0; } overflow: hidden; text-overflow: ellipsis; } + .isgroup.active .groupname { width: 65%; } -.usercount { float: left; margin: 5px; } -li.active span.utils .delete { - float: left; position: relative; opacity: 0.5; - top: -7px; left: 7px; width: 44px; height: 44px; +.usercount { + float: left; + margin: 5px; } + +li.active span.utils .delete { + float: left; + position: relative; + opacity: 0.5; + top: -7px; + left: 7px; + width: 44px; + height: 44px; +} + li.active .rename { padding: 8px 14px 20px 14px; - top: 0px; position: absolute; width: 16px; height: 16px; + top: 0px; + position: absolute; + width: 16px; + height: 16px; opacity: 0.5; display: inline-block !important; } -li.active span.utils .delete img { margin: 14px; } -li.active .rename { opacity: 0.5; } -li.active span.utils .delete:hover, li.active .rename:hover { opacity: 1; } -span.utils .delete, .rename { display: none; } + +li.active span.utils .delete img { + margin: 14px; +} + +li.active .rename { + opacity: 0.5; +} + +li.active span.utils .delete:hover, li.active .rename:hover { + opacity: 1; +} + +span.utils .delete, .rename { + display: none; +} + #app-navigation ul li.active > span.utils .delete, -#app-navigation ul li.active > span.utils .rename { display: block; } +#app-navigation ul li.active > span.utils .rename { + display: block; +} + #usersearchform { position: absolute; top: 2px; right: 0; } + #usersearchform input { width: 150px; } -#usersearchform label { font-weight: 700; } + +#usersearchform label { + font-weight: 700; +} /* display table at full width */ table.grid { @@ -450,6 +543,7 @@ table.grid th { height: 2em; color: #999; } + table.grid th, table.grid td { border-bottom: 1px solid #eee; padding: 0 .5em; @@ -457,11 +551,28 @@ table.grid th, table.grid td { text-align: left; font-weight: normal; } -td.name, td.password { padding-left:.8em; } -td.password>img,td.displayName>img, td.quota>img { visibility:hidden; } -td.password, td.quota, td.displayName { width:12em; cursor:pointer; } -td.password>span, td.quota>span { margin-right: 1.2em; color: #C7C7C7; } -span.usersLastLoginTooltip { white-space: nowrap; } + +td.name, td.password { + padding-left: .8em; +} + +td.password > img, td.displayName > img, td.quota > img { + visibility: hidden; +} + +td.password, td.quota, td.displayName { + width: 12em; + cursor: pointer; +} + +td.password > span, td.quota > span { + margin-right: 1.2em; + color: #C7C7C7; +} + +span.usersLastLoginTooltip { + white-space: nowrap; +} /* dropdowns will be relative to this element */ #userlist { @@ -472,7 +583,7 @@ span.usersLastLoginTooltip { white-space: nowrap; } #userlist .storageLocation, #userlist .userBackend, #userlist .lastLogin { - display : none; + display: none; } /* because of accessibility the name cell is - therefore we enforce the black color */ @@ -503,10 +614,11 @@ span.usersLastLoginTooltip { white-space: nowrap; } } .bubble { - z-index:1; + z-index: 1; right: -6px; top: auto; } + .bubble:after { right: 5px; } @@ -521,63 +633,111 @@ span.usersLastLoginTooltip { white-space: nowrap; } #userlist .popovermenu { margin-top: 4px; border-top-right-radius: 3px; + right: 3px; + opacity: 0; + display: block; + visibility: hidden; + transition: opacity 0.1s, visibility 0.1s; } -#userlist .popovermenu>ul.userActionsMenu { - right: 10px; +#userlist tr.active .popovermenu { + opacity: 1; + visibility: visible; } -#userlist .popovermenu>ul.userActionsMenu a span { +#userlist .popovermenu > ul.userActionsMenu { + right: 15px; +} + +#userlist .popovermenu > ul.userActionsMenu a { + margin: 5px 0; +} + +#userlist .popovermenu > ul.userActionsMenu a span:last-child { margin-left: 5px; } -#userlist .popovermenu { - display:none; +tr:hover > td.password > span, tr:hover > td.displayName > span { + margin: 0; + cursor: pointer; +} + +tr:hover > td.password > img, tr:hover > td.displayName > img, tr:hover > td.quota > img { + visibility: visible; + cursor: pointer; } -tr:hover>td.password>span, tr:hover>td.displayName>span { margin:0; cursor:pointer; } -tr:hover>td.password>img,tr:hover>td.displayName>img, tr:hover>td.quota>img { visibility:visible; cursor:pointer; } td.userActions { width: 25px; text-align: center; } + td.userActions .action { position: relative; top: 3px; } + +tr.active td.userActions .action { + opacity: 1; +} + td.userActions .action:hover { cursor: pointer; } -div.recoveryPassword { left:50em; display:block; position:absolute; top:-1px; } -input#recoveryPassword {width:15em;} +div.recoveryPassword { + left: 50em; + display: block; + position: absolute; + top: -1px; +} + +input#recoveryPassword { + width: 15em; +} + #controls select.quota { margin: 3px; margin-right: 10px; height: 37px; } -select.quota-user { position:relative; left:0; top:0; width:10em; } -select.quota.active { background: #fff; } -input.userFilter {width: 200px;} +select.quota-user { + position: relative; + left: 0; + top: 0; + width: 10em; +} + +select.quota.active { + background: #fff; +} + +input.userFilter { + width: 200px; +} /* positioning fixes */ #newuser { padding-left: 3px; } + #newuser .multiselect { min-width: 150px !important; } + #newuser .multiselect, #newusergroups + input[type='submit'] { position: relative; top: -1px; } + #headerGroups, #headerSubAdmins, #headerQuota { padding-left: 18px; } + #headerAvatar { width: 32px; } @@ -587,7 +747,6 @@ input.userFilter {width: 200px;} background-color: #FDD; } - /* APPS */ /* Bundle header */ @@ -595,21 +754,25 @@ input.userFilter {width: 200px;} display: table-row; position: relative; } + #apps-list .apps-header div { display: table-cell; height: 70px; } + #apps-list .apps-header h2 { display: table-cell; position: absolute; padding-left: 6px; padding-top: 15px; } + #apps-list .apps-header h2 .enable { position: relative; top: -1px; margin-left: 12px; } + #apps-list .apps-header h2 + .section { margin-top: 50px; } @@ -624,10 +787,14 @@ input.userFilter {width: 200px;} margin-bottom: 20px; } -.appinfo { margin: 1em 40px; } +.appinfo { + margin: 1em 40px; +} + #app-navigation .appwarning { background: #fcc; } + #app-navigation.appwarning:hover { background: #fbb; } @@ -640,12 +807,13 @@ span.version { #app-navigation .app-external, .app-version { - color: rgba(85,85,85,.5); + color: rgba(85, 85, 85, .5); } .app-level { margin-top: 8px; } + .app-level span { color: #555; background-color: transparent; @@ -653,10 +821,12 @@ span.version { border-radius: 3px; padding: 3px 6px; } + .app-level a { padding: 10px; white-space: nowrap; } + .app-level .official { border-color: #37ce02; background-position: left center; @@ -677,6 +847,7 @@ span.version { flex-wrap: wrap; align-content: flex-start; } + #apps-list.hidden { display: none; } @@ -686,6 +857,7 @@ span.version { flex: 0 0 auto; margin-left: 20px; } + #apps-list .section.apps-experimental { flex-basis: 90%; } @@ -693,16 +865,20 @@ span.version { #apps-list .app-description p { margin: 10px 0; } + #apps-list .app-description ul { list-style: disc; } + #apps-list .app-description ol { list-style: decimal; } + #apps-list .app-description > ul, #apps-list .app-description > ol { margin-left: 19px; } + #apps-list .app-description ol ol, #apps-list .app-description ol ul, #apps-list .app-description ul ol, @@ -715,6 +891,7 @@ span.version { width: 22%; box-sizing: border-box; } + #apps-list .section:nth-child(4n) { margin-right: 20px; } @@ -725,6 +902,7 @@ span.version { width: 30%; box-sizing: border-box; } + #apps-list .section:nth-child(3n) { margin-right: 20px; } @@ -735,6 +913,7 @@ span.version { width: 40%; box-sizing: border-box; } + #apps-list .section:nth-child(2n) { margin-right: 20px; } @@ -747,6 +926,7 @@ span.version { display: none !important; } } + @media only screen and (max-width: 700px) { #apps-list.installed .app-groups { display: none !important; @@ -757,9 +937,11 @@ span.version { display: block; margin: 8px 0; } + form.section { position: relative; } + .followupsection { display: block; padding: 0 30px 30px 30px; @@ -768,12 +950,14 @@ form.section { margin-top: -30px; position: relative; } + .app-image { position: relative; height: 150px; opacity: 1; overflow: hidden; } + .app-name, .app-version, .app-score, @@ -789,6 +973,7 @@ form.section { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; opacity: .5; } + .app-description-container { clear: both; position: relative; @@ -806,6 +991,7 @@ form.section { #app-category-1 { margin-bottom: 18px; } + /* capitalize "Other" category */ #app-category-925 { text-transform: capitalize; @@ -822,10 +1008,19 @@ form.section { } /* Transition to complete width! */ -.app:hover, .app:active { max-width: inherit; } +.app:hover, .app:active { + max-width: inherit; +} -.appslink { text-decoration: underline; } -.score { color:#666; font-weight:bold; font-size:0.8em; } +.appslink { + text-decoration: underline; +} + +.score { + color: #666; + font-weight: bold; + font-size: 0.8em; +} .appinfo .documentation { margin-top: 1em; @@ -845,7 +1040,7 @@ form.section { margin: 0; } -#apps-list.installed .section > *{ +#apps-list.installed .section > * { display: table-cell; height: initial; vertical-align: middle; @@ -884,20 +1079,25 @@ form.section { } #apps-list.installed .groups-enable label { - margin-right: 3px; + margin-right: 3px; } /* LOG */ #log { - white-space:normal; + white-space: normal; margin-bottom: 14px; } -#lessLog { display:none; } -table.grid td.date{ + +#lessLog { + display: none; +} + +table.grid td.date { white-space: nowrap; } + #log-section p { - margin-top:20px; + margin-top: 20px; } /* ADMIN */ @@ -908,6 +1108,7 @@ table.grid td.date{ margin-right: 6px; width: 16px; } + #app-navigation li span.no-icon { padding-left: 32px; } @@ -916,20 +1117,29 @@ table.grid td.date{ list-style: initial; margin: 10px 0; } + #security-warning-state span { padding-left: 25px; background-position: 5px center; margin-left: -5px; } -#shareAPI p { padding-bottom: 0.8em; } -#shareAPI input#shareapiExpireAfterNDays {width: 25px;} +#shareAPI p { + padding-bottom: 0.8em; +} + +#shareAPI input#shareapiExpireAfterNDays { + width: 25px; +} + #shareAPI .indent { padding-left: 28px; } + #shareAPI .double-indent { padding-left: 56px; } + #fileSharingSettings h3 { display: inline-block; } @@ -947,6 +1157,7 @@ table.grid td.date{ padding: 11px 20px; vertical-align: text-bottom; } + #shareAPI h2, #encryptionAPI h2, #mail_general_settings h2 { @@ -964,9 +1175,11 @@ table.grid td.date{ width: 300px; text-align: right; } + .mail_settings p select:nth-child(2) { width: 143px; } + #mail_smtpport { width: 40px; } @@ -974,12 +1187,14 @@ table.grid td.date{ .cronlog { margin-left: 10px; } + .status { display: inline-block; height: 16px; width: 16px; vertical-align: text-bottom; } + .status.success { border-radius: 50%; } @@ -1002,9 +1217,11 @@ span.success { background: #37ce02; border-radius: 3px; } + span.error { background: #ce3702; } + span.indeterminate { background: #e6db00; border-radius: 40% 0; @@ -1032,7 +1249,6 @@ doesnotexist:-o-prefocus, .strengthify-wrapper { font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; } - /* HELP */ .help-includes { @@ -1062,6 +1278,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper { #admin-tips li { list-style: initial; } + #admin-tips li a { display: inline-block; padding: 3px 0; diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 387709cd64..dccbcc0ce1 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -908,21 +908,24 @@ $(document).ready(function () { event.stopPropagation(); var $td = $(this).closest('td'); var $tr = $($td).closest('tr'); - var menudiv = $td.find('.popovermenu'); + var menudiv = $tr.find('.popovermenu'); - if(menudiv.is(':visible')) { - menudiv.fadeOut(100); + if($tr.is('.active')) { + $tr.removeClass('active'); return; } + $('#userlist tr.active').removeClass('active'); menudiv.find('.action-togglestate').empty(); if($tr.data('userEnabled')) { $('.action-togglestate', $td).html(''+t('settings', 'Disable')+''); } else { $('.action-togglestate', $td).html(''+t('settings', 'Enable')+''); } - menudiv.click(function() { menudiv.fadeOut(100); }); - menudiv.hover('', function() { menudiv.fadeOut(100); }); - menudiv.fadeIn(100); + $tr.addClass('active'); + }); + + $(document.body).click(function() { + $('#userlist tr.active').removeClass('active'); }); $userListBody.on('click', '.action-togglestate', function (event) {