1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-22 03:16:34 +00:00

[full screen] shared dir/file view, sysadmin: fix

This commit is contained in:
llj
2016-05-13 16:10:05 +08:00
parent 671186dd60
commit fde0bdb9d9
5 changed files with 20 additions and 25 deletions

View File

@@ -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;
}

View File

@@ -6,13 +6,15 @@
<style type="text/css">
#header {
display:block;
margin-bottom:12px;
}
</style>
{% endblock %}
{% block main_panel %}
{% if traffic_over_limit %}
<p class="strip-tip">{% trans "File download is disabled: the share link traffic of owner is used up." %}</p>
{% endif %}
<div id="shared-file-view-hd" class="ovhd">
<div class="fleft">
<h2 class="ellipsis no-bold" title="{{ file_name }}">{{ file_name }}</h2>
@@ -35,11 +37,11 @@
<div class="fright">
{% if request.user.is_authenticated and request.user.username != shared_by %}
{% if save_to_link %}
<button data="{{save_to_link}}" id="save" class="btn">{% trans "Save to..."%}</button>
<button data="{{save_to_link}}" id="save" class="shared-file-op-btn">{% trans "Save to..."%}</button>
{% endif %}
{% endif %}
{% if not traffic_over_limit %}
<a href="{% if from_shared_dir %}?p={{path|urlencode}}&dl=1{% else %}?dl=1{% endif %}" class="obv-btn">{% trans "Download" %} ({{file_size|filesizeformat}})</a>
<a href="{% if from_shared_dir %}?p={{path|urlencode}}&dl=1{% else %}?dl=1{% endif %}" class="obv-btn shared-file-op-btn">{% trans "Download" %} ({{file_size|filesizeformat}})</a>
{% endif %}
</div>
</div>
@@ -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('<p class="alc" style="background:#fddaa4;color:#1f0600;padding:3px 0;margin:0 0 15px;">' + tip + '</p>').removeClass('hide');
{% endif %}
});
$(function () {
$('#view-hd .ellipsis').css({'max-width': $('#view-hd').width() - $('#view-hd .fright').outerWidth(true) - 10});

View File

@@ -8,6 +8,7 @@
{% block main_content %}
<div class="row">
<div id="side-nav" class="side-tabnav col-md-3">
{% block left_panel %}
<h3 class="hd">{% trans "System Admin" %}</h3>
<ul class="side-tabnav-tabs">
<li class="tab">
@@ -60,6 +61,7 @@
</li>
{% endif %}
</ul>
{% endblock %}
</div>
<div id="right-panel" class="col-md-9 col-md-offset-3">

View File

@@ -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('<p>' + tip + '</p>').addClass('top-tip').removeClass('hide');
$('#right-panel').prepend('<p class="strip-tip">' + tip + '</p>');
}
}
});
@@ -104,7 +104,7 @@ $(function(){
if (data['already_expired'] || data['to_be_expired']) {
tip = tip.replace('%(date)s', data['expiration_date']);
$('#title-panel').append('<p>' + tip + '</p>').addClass('top-tip').removeClass('hide');
$('#right-panel').prepend('<p class="strip-tip">' + tip + '</p>');
}
}
});

View File

@@ -8,6 +8,10 @@
{% endblock %}
{% block wide_page_content %}
{% if traffic_over_limit %}
<p class="strip-tip">{% trans "File download is disabled: the share link traffic of owner is used up." %}</p>
{% endif %}
<h2>{{ dir_name }}</h2>
<p>{% trans "Shared by: " %}{{ username|email2nickname }}</p>
@@ -158,13 +162,6 @@
{% block extra_script %}
<script type="text/javascript" src="{% static "scripts/lib/jquery.magnific-popup.js" %}"></script>
<script type="text/javascript">
$(function() {
{% if traffic_over_limit %}
var tip = "{% trans "File download is disabled: the share link traffic of owner is used up." %}";
$('#title-panel').html('<p class="alc" style="background:#fddaa4;color:#1f0600;padding:3px 0;margin:0 0 15px;">' + tip + '</p>').removeClass('hide');
{% endif %}
});
var magnificOptions = {
type: 'image',
tClose: "{% trans "Close (Esc)" %}", // Alt text on close button