From 2fd36afd01a7123d7cc51d8dab667910f645c999 Mon Sep 17 00:00:00 2001 From: Daniel Pan Date: Mon, 18 Apr 2016 19:10:58 +0800 Subject: [PATCH] Rewrite account info popup and clean css --- media/css/seahub.css | 97 ++++++++----------------- seahub/templates/base.html | 22 +++--- seahub/templates/base_for_backbone.html | 14 ---- seahub/templates/js/templates.html | 20 ++++- static/scripts/app/router.js | 8 +- static/scripts/app/views/account.js | 71 ++++++++++++++++++ static/scripts/common.js | 49 ------------- 7 files changed, 136 insertions(+), 145 deletions(-) create mode 100644 static/scripts/app/views/account.js diff --git a/media/css/seahub.css b/media/css/seahub.css index 09178e61ed..fde5f007be 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -1509,12 +1509,38 @@ button.dropdown-toggle:focus { cursor: pointer; color: #d6d6d6; } -#user-info-popup .avatar { +.account-popup .avatar { float:left; } -#user-info-popup .txt { +.account-popup .txt { margin-left:45px; } +.account-popup { + text-align:left; + right:0; + top:48px; + font-size:13px; +} +.account-popup .outer-caret { + top:-10px; + left:200px; +} +.account-popup > .item:last-child { + border-bottom:none; +} +.account-popup .item { + display:block; + padding:8px 18px; + border-bottom:1px solid #ddd; +} +.account-popup a.item { + color:#333; + font-weight:normal; +} +.account-popup a.item:hover { + background:#fafafa; + text-decoration:none; +} #account .manage { position:absolute; left:60px; @@ -1543,72 +1569,7 @@ button.dropdown-toggle:focus { background:#eee; text-decoration:none; } -#send-msg-popup, -.top-info-popup { - background:#fff; - border:1px solid #ddd; - box-shadow:0 0 5px #ccc; - position:absolute; - right:0; - z-index:100;/* for pages with jquery tabs*/ -} -#send-msg-popup { - width:430px; - padding:18px; - top:38px; - right:10px; -} -.top-info-popup { - width:200px; - text-align:left; - top:48px; - font-size:13px; - border-radius:4px; -} -#user-info-popup { - width:220px; -} -#notice-popup .outer-caret { - left:143px; -} -#user-info-popup .outer-caret { - top:-10px; - left:181px; -} -.top-info-popup .item { - display:block; - padding:8px 18px; - border-top:1px solid #ddd; -} -.top-info-popup a.item { - color:#333; - font-weight:normal; -} -.top-info-popup a.item:hover { - background:#fafafa; - text-decoration:none; -} -#msg-file-share { - margin-top:8px; - position:relative; -} -#msg-file-share-btn { - color:#999; - background:#fff; - border-radius:0; -} -#msg-file-share .icon-remove { - position:absolute; - right:20px; - top:0; - cursor:pointer; - font-size:1.2em; - color:#888; -} -#msg-file-tree { - padding:4px 0; - border:1px solid #ddd; -} + .select2-container .avatar, .select2-results .select2-result-label .avatar { vertical-align:middle; diff --git a/seahub/templates/base.html b/seahub/templates/base.html index bd39103a8d..4d0cf74960 100644 --- a/seahub/templates/base.html +++ b/seahub/templates/base.html @@ -57,19 +57,21 @@ {% avatar request.user 36 %} -
+