mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-23 17:20:29 +00:00
show loading gif when converting documents
This commit is contained in:
parent
a7c3ccd580
commit
75b79439b5
@ -1941,12 +1941,12 @@ textarea:-moz-placeholder {/* for FF */
|
|||||||
min-height:500px;/*for ff*/
|
min-height:500px;/*for ff*/
|
||||||
}
|
}
|
||||||
#svg-view,
|
#svg-view,
|
||||||
#flash,
|
#converted-html,
|
||||||
#pdf {
|
#pdf {
|
||||||
width:950px;
|
width:950px;
|
||||||
margin:0 auto;
|
margin:0 auto;
|
||||||
}
|
}
|
||||||
#flash {
|
#converted-html {
|
||||||
height:500px;
|
height:500px;
|
||||||
}
|
}
|
||||||
#doc-view {
|
#doc-view {
|
||||||
@ -2479,3 +2479,18 @@ textarea:-moz-placeholder {/* for FF */
|
|||||||
#plan-form input[type=radio] {
|
#plan-form input[type=radio] {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.convert-loading {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.convert-loading img {
|
||||||
|
vertical-align: middle;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.convert-loading .loading-text {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
@ -53,12 +53,10 @@ window.onload = function () {
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if filetype == 'Document' or filetype == 'PDF' and not use_pdfjs %}
|
{% if filetype == 'Document' or filetype == 'PDF' and not use_pdfjs %}
|
||||||
$('#file-view').html('<div id="flash"></div>');
|
var msg = '{% trans "The file is being processed, please wait..." %}';
|
||||||
|
$('#file-view').html('<div id="converted-html"><div class="convert-loading"><img src="{{ MEDIA_URL }}img/loading-icon.gif" alt="loading..." /><span class="loading-text">' + msg + '</span></div></div>');
|
||||||
function load_iframe() {
|
function load_iframe() {
|
||||||
var iframe = document.createElement('iframe');
|
$('#converted-html').html('<iframe src="{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}/index.html" style="height:500px" />');
|
||||||
iframe.src = "{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}.html";
|
|
||||||
iframe.style.height = '500px';
|
|
||||||
document.getElementById('flash').appendChild(iframe);
|
|
||||||
}
|
}
|
||||||
{% if html_exists %}
|
{% if html_exists %}
|
||||||
load_iframe();
|
load_iframe();
|
||||||
|
@ -4,12 +4,10 @@
|
|||||||
{% block extra_script %}{{ block.super }}
|
{% block extra_script %}{{ block.super }}
|
||||||
{% if not err%}
|
{% if not err%}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('#file-view').html('<div id="flash"></div>');
|
var msg = '{% trans "The file is being processed, please wait..." %}';
|
||||||
|
$('#file-view').html('<div id="converted-html"><div class="convert-loading"><img src="{{ MEDIA_URL }}img/loading-icon.gif" alt="loading..." /><span class="loading-text">' + msg + '</span></div></div>');
|
||||||
function load_iframe() {
|
function load_iframe() {
|
||||||
iframe = document.createElement('iframe');
|
$('#converted-html').html('<iframe src="{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}/index.html" style="height:500px" />');
|
||||||
iframe.src = "{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}.html";
|
|
||||||
iframe.style.height = '500px';
|
|
||||||
document.getElementById('flash').appendChild(iframe);
|
|
||||||
}
|
}
|
||||||
{% if html_exists %}
|
{% if html_exists %}
|
||||||
load_iframe();
|
load_iframe();
|
||||||
|
@ -60,12 +60,10 @@ if (!($.browser.msie && parseInt($.browser.version) < 10)) {
|
|||||||
</script>
|
</script>
|
||||||
{% else %}
|
{% else %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('#file-view').html('<div id="flash"></div>');
|
var msg = '{% trans "The file is being processed, please wait..." %}';
|
||||||
|
$('#file-view').html('<div id="converted-html"><div class="convert-loading"><img src="{{ MEDIA_URL }}img/loading-icon.gif" alt="loading..." /><span class="loading-text">' + msg + '</span></div></div>');
|
||||||
function load_iframe() {
|
function load_iframe() {
|
||||||
var iframe = document.createElement('iframe');
|
$('#converted-html').html('<iframe src="{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}/index.html" style="height:500px" />');
|
||||||
iframe.src = "{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}.html";
|
|
||||||
iframe.style.height = '500px';
|
|
||||||
document.getElementById('flash').appendChild(iframe);
|
|
||||||
}
|
}
|
||||||
{% if html_exists %}
|
{% if html_exists %}
|
||||||
load_iframe();
|
load_iframe();
|
||||||
|
Loading…
Reference in New Issue
Block a user