mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-22 16:56:57 +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*/
|
||||
}
|
||||
#svg-view,
|
||||
#flash,
|
||||
#converted-html,
|
||||
#pdf {
|
||||
width:950px;
|
||||
margin:0 auto;
|
||||
}
|
||||
#flash {
|
||||
#converted-html {
|
||||
height:500px;
|
||||
}
|
||||
#doc-view {
|
||||
@ -2479,3 +2479,18 @@ textarea:-moz-placeholder {/* for FF */
|
||||
#plan-form input[type=radio] {
|
||||
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 %}
|
||||
|
||||
{% 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() {
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.src = "{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}.html";
|
||||
iframe.style.height = '500px';
|
||||
document.getElementById('flash').appendChild(iframe);
|
||||
$('#converted-html').html('<iframe src="{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}/index.html" style="height:500px" />');
|
||||
}
|
||||
{% if html_exists %}
|
||||
load_iframe();
|
||||
|
@ -4,12 +4,10 @@
|
||||
{% block extra_script %}{{ block.super }}
|
||||
{% if not err%}
|
||||
<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() {
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.src = "{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}.html";
|
||||
iframe.style.height = '500px';
|
||||
document.getElementById('flash').appendChild(iframe);
|
||||
$('#converted-html').html('<iframe src="{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}/index.html" style="height:500px" />');
|
||||
}
|
||||
{% if html_exists %}
|
||||
load_iframe();
|
||||
|
@ -60,12 +60,10 @@ if (!($.browser.msie && parseInt($.browser.version) < 10)) {
|
||||
</script>
|
||||
{% else %}
|
||||
<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() {
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.src = "{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}.html";
|
||||
iframe.style.height = '500px';
|
||||
document.getElementById('flash').appendChild(iframe);
|
||||
$('#converted-html').html('<iframe src="{{ DOCUMENT_CONVERTOR_ROOT }}html/{{ obj_id }}/index.html" style="height:500px" />');
|
||||
}
|
||||
{% if html_exists %}
|
||||
load_iframe();
|
||||
|
Loading…
Reference in New Issue
Block a user