1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 07:41:26 +00:00

Merge branch '4.1'

This commit is contained in:
zhengxie
2015-05-08 10:38:44 +08:00
4 changed files with 17 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
#main {
width:100%;
min-height:0;
}
#view-hd,
#view-path-op,

View File

@@ -71,16 +71,18 @@ $(function() {
{% endif %}
});
{% if filetype == 'PDF' and use_pdfjs %}
{% elif filetype == 'PDF' and not use_pdfjs and not html_exists %}
{% elif filetype == 'Document' and not html_exists %}
{% else %}
function setFileViewAreaHeight() {
var file_view = $('#file-view');
if ($(window).height() > file_view.outerHeight(true) + file_view.offset().top) {
file_view.outerHeight($(window).height() - file_view.offset().top);
}
if ($(document).height() > $(window).height()) {
file_view.outerHeight($(document).height() - file_view.offset().top);
}
}
$(window).load(setFileViewAreaHeight).resize(setFileViewAreaHeight);
{% endif %}
{% if request.user.is_authenticated and request.user.username != shared_by %}
$('#save').click(function() {

View File

@@ -174,16 +174,19 @@ function setToolbarPos() {
})();
$(window).load(setToolbarPos).resize(setToolbarPos);
{% if filetype == 'PDF' and use_pdfjs %}
{% elif filetype == 'PDF' and not use_pdfjs and not html_exists %}
{% elif filetype == 'Document' and not html_exists %}
{% else %}
function setFileViewAreaHeight() {
var file_view = $('#file-view');
if ($(window).height() > file_view.outerHeight(true) + file_view.offset().top) {
file_view.outerHeight($(window).height() - file_view.offset().top);
}
if ($(document).height() > $(window).height()) {
file_view.outerHeight($(document).height() - file_view.offset().top);
}
}
$(window).load(setFileViewAreaHeight).resize(setFileViewAreaHeight);
{% endif %}
$('#history').click(function () {
window.open($(this).data('url'));

View File

@@ -48,16 +48,18 @@ $(function() {
$('#file-view-tip').append('<a href="' + dld_url + '" class="big-obv-btn">' + "{% trans "Download" %}" + '</a>');
});
{% if filetype == 'PDF' and use_pdfjs %}
{% elif filetype == 'PDF' and not use_pdfjs and not html_exists %}
{% elif filetype == 'Document' and not html_exists %}
{% else %}
function setFileViewAreaHeight() {
var file_view = $('#file-view');
if ($(window).height() > file_view.outerHeight(true) + file_view.offset().top) {
file_view.outerHeight($(window).height() - file_view.offset().top);
}
if ($(document).height() > $(window).height()) {
file_view.outerHeight($(document).height() - file_view.offset().top);
}
}
$(window).load(setFileViewAreaHeight).resize(setFileViewAreaHeight);
{% endif %}
{% include "snippets/file_content_js.html" %}