From fde0bdb9d9943c277e1af12fb952adb4e012e014 Mon Sep 17 00:00:00 2001 From: llj Date: Fri, 13 May 2016 16:10:05 +0800 Subject: [PATCH] [full screen] shared dir/file view, sysadmin: fix --- media/css/seahub.css | 15 +++++++-------- seahub/templates/shared_file_view.html | 13 +++++-------- seahub/templates/sysadmin/base.html | 2 ++ seahub/templates/sysadmin/sys_useradmin.html | 4 ++-- seahub/templates/view_shared_dir.html | 11 ++++------- 5 files changed, 20 insertions(+), 25 deletions(-) diff --git a/media/css/seahub.css b/media/css/seahub.css index e5bb9f2fe3..9cea000d70 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -368,6 +368,12 @@ table img { vertical-align:middle; } .vh { visibility:hidden; } .vam { vertical-align:middle; } .tip { color:#808080; font-size:12px; } +.strip-tip { + padding:3px 0; + background:#fddaa4; + color:#1f0600; + text-align:center; +} .outstanding-tip { color:red; } .label { color:#333; font-size:12px; font-style:normal; } .italic { font-style:italic; } @@ -375,12 +381,6 @@ table img { vertical-align:middle; } .inline-block { display: inline-block; } .cspt { cursor:pointer; } .pos-rel { position:relative; } -.top-tip { - background:#fddaa4; - color:#1f0600; - text-align:center; - margin:0 0 15px; -} .sr-only { position: absolute; width: 1px; @@ -3282,8 +3282,7 @@ button.sf-dropdown-toggle:focus { #shared-file-view-hd .share-by { margin:0; } -#shared-file-view-hd .btn, -#shared-file-view-hd .obv-btn { +.shared-file-op-btn { padding:7px; margin-top:11px; } diff --git a/seahub/templates/shared_file_view.html b/seahub/templates/shared_file_view.html index f561388f37..8b513d0dab 100644 --- a/seahub/templates/shared_file_view.html +++ b/seahub/templates/shared_file_view.html @@ -6,13 +6,15 @@ {% endblock %} {% block main_panel %} + {% if traffic_over_limit %} +

{% trans "File download is disabled: the share link traffic of owner is used up." %}

+ {% endif %}

{{ file_name }}

@@ -35,11 +37,11 @@
{% if request.user.is_authenticated and request.user.username != shared_by %} {% if save_to_link %} - + {% endif %} {% endif %} {% if not traffic_over_limit %} - {% trans "Download" %} ({{file_size|filesizeformat}}) + {% trans "Download" %} ({{file_size|filesizeformat}}) {% endif %}
@@ -73,11 +75,6 @@ $(function() { var dld_btn = $('.obv-btn').clone(); dld_btn.html("{% trans "Download" %}").attr('class', 'sf-btn-link big-btn-link'); $('#file-view-tip').append(dld_btn); - - {% if traffic_over_limit %} - var tip = "{% trans "File download is disabled: the share link traffic of owner is used up." %}"; - $('#title-panel').html('

' + tip + '

').removeClass('hide'); - {% endif %} }); $(function () { $('#view-hd .ellipsis').css({'max-width': $('#view-hd').width() - $('#view-hd .fright').outerWidth(true) - 10}); diff --git a/seahub/templates/sysadmin/base.html b/seahub/templates/sysadmin/base.html index a68bdea78a..03165921ed 100644 --- a/seahub/templates/sysadmin/base.html +++ b/seahub/templates/sysadmin/base.html @@ -8,6 +8,7 @@ {% block main_content %}
+ {% block left_panel %}

{% trans "System Admin" %}

  • @@ -60,6 +61,7 @@
  • {% endif %}
+ {% endblock %}
diff --git a/seahub/templates/sysadmin/sys_useradmin.html b/seahub/templates/sysadmin/sys_useradmin.html index eb045aafe1..7c7b8567fa 100644 --- a/seahub/templates/sysadmin/sys_useradmin.html +++ b/seahub/templates/sysadmin/sys_useradmin.html @@ -82,7 +82,7 @@ $(function(){ if (data['need_update']) { var tip = "{% trans "A new server version %(v)s is available." %}"; tip = tip.replace('%(v)s', data['new_version']); - $('#title-panel').append('

' + tip + '

').addClass('top-tip').removeClass('hide'); + $('#right-panel').prepend('

' + tip + '

'); } } }); @@ -104,7 +104,7 @@ $(function(){ if (data['already_expired'] || data['to_be_expired']) { tip = tip.replace('%(date)s', data['expiration_date']); - $('#title-panel').append('

' + tip + '

').addClass('top-tip').removeClass('hide'); + $('#right-panel').prepend('

' + tip + '

'); } } }); diff --git a/seahub/templates/view_shared_dir.html b/seahub/templates/view_shared_dir.html index d0f507f576..f6a4f30a62 100644 --- a/seahub/templates/view_shared_dir.html +++ b/seahub/templates/view_shared_dir.html @@ -8,6 +8,10 @@ {% endblock %} {% block wide_page_content %} + {% if traffic_over_limit %} +

{% trans "File download is disabled: the share link traffic of owner is used up." %}

+ {% endif %} +

{{ dir_name }}

{% trans "Shared by: " %}{{ username|email2nickname }}

@@ -158,13 +162,6 @@ {% block extra_script %}