From 677853f1ecef1bbbf54433fab915a1b9b1dccbcb Mon Sep 17 00:00:00 2001 From: llj Date: Wed, 4 Jul 2012 17:06:25 +0800 Subject: [PATCH] redesigned footer;improved file-op popup position --- media/css/seahub.css | 36 +++++++++++++++++++++++++---- templates/base.html | 33 +++++++++++++++++++++++---- templates/myhome_base.html | 15 ------------- templates/repo.html | 46 +++++++++++++++++++++----------------- 4 files changed, 87 insertions(+), 43 deletions(-) diff --git a/media/css/seahub.css b/media/css/seahub.css index 05c651d43c..faa342c6f1 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -134,7 +134,6 @@ table img { .main { width:680px; } -#footer { color:#999; padding-top:2px; margin:25px auto; border-top:1px solid #DDD; } /* info-bar */ #info-bar { height: 30px; color: #fff; background: #000; } @@ -175,7 +174,36 @@ table img { #header .nav a.cur { color:#000; } #header .nav a:hover { color: #ff9933; text-decoration: underline; } /* footer */ -#footer a { color:#333; text-decoration:none; } +#footer { + color:#636363; + font-size:12px; + padding:20px 0 10px; + margin:25px auto; + border-top:1px solid #DDD; +} +#footer .items { + width:65%; +} +#footer .other-info { + width:30%; +} +#footer .item { + float:left; + width:28%; + padding:0 3% 0 2%; +} +#footer .item h4 { + font-size:12px; + font-weight:bold; + color:#636363; + padding-bottom:5px; + border-bottom:1px solid #e1e1e1; + margin-bottom:5px; +} +#footer a { + color:#444; + font-weight:normal; +} /* main */ .path, .access-notice { margin: 12px 0 6px 0; } .with-bg li { @@ -349,24 +377,24 @@ table img { margin-top:12px; } .repo-op a { + font-weight: normal; margin-left:8px; background:#fff scroll no-repeat left 50%; } .repo-op .upload-file { padding-left:17px; background-image:url('../img/upload.png'); - font-weight: normal; } #add-new-dir { padding-left:20px; background-image:url('../img/folder-add.png'); - font-weight: normal; } .more-op { cursor:pointer; } .op-list { position:absolute; + left:18px; background:#fff; padding:6px 1px; border:1px solid #eee; diff --git a/templates/base.html b/templates/base.html index 8b44c6af0e..bfc4682442 100644 --- a/templates/base.html +++ b/templates/base.html @@ -77,7 +77,7 @@
{% block right_panel %}{% endblock %}
-
+
{% block main_panel %}{% endblock %}
@@ -88,14 +88,39 @@
- + {% block extra_script %}{% endblock %} diff --git a/templates/myhome_base.html b/templates/myhome_base.html index cea286471a..52a482b1b9 100644 --- a/templates/myhome_base.html +++ b/templates/myhome_base.html @@ -22,20 +22,5 @@
  • 回到本地
  • - -
  • - 使用帮助 -
  • - {% endblock %} diff --git a/templates/repo.html b/templates/repo.html index 5dd2678ac7..da089dcf92 100644 --- a/templates/repo.html +++ b/templates/repo.html @@ -126,13 +126,15 @@ {% if not view_history %} - 更多操作 - +
    + 更多操作 + +
    {% endif %} @@ -144,16 +146,18 @@ {{ dirent.props.obj_name }} {{ dirent.file_size|filesizeformat }} - 更多操作 - +
    + 更多操作 + +
    {% endfor %} @@ -222,8 +226,10 @@ $('.more-op').hover( function() { $(this).parent().css('position','relative'); $('.op-list').attr('class', 'op-list hide'); - if ($(this).offset().top + $(this).next().height() > $('#main').offset().top + $('#main').height()) { - $(this).next().css('bottom', 25); + if ($(this).offset().top + $(this).next().height() <= $('#main-panel').offset().top + $('#main-panel').height()) { + $(this).next().css('top', 6); + } else { + $(this).next().css('bottom', 2); } $(this).next().removeClass('hide'); clearTimeout(Hide); @@ -335,7 +341,7 @@ $('.file-cp, .file-mv, .dir-cp, .dir-mv').click(function () { path.shift(); path = '/' + path.join('/') + '/'; } - return '{{ SITE_ROOT }}file/move/get_subdir/?repo_id=' + encodeURIComponent(repo_id) + '&path=' + encodeURIComponent(path); + return '{{ SITE_ROOT }}file/move/get_subdir/?repo_id=' + e(repo_id) + '&path=' + e(path); } } },