diff --git a/media/css/seahub.css b/media/css/seahub.css index fe63878f10..41b017c2c8 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -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; +} diff --git a/seahub/templates/snippets/file_content_js.html b/seahub/templates/snippets/file_content_js.html index eba524bf60..591cd56a1a 100644 --- a/seahub/templates/snippets/file_content_js.html +++ b/seahub/templates/snippets/file_content_js.html @@ -53,12 +53,10 @@ window.onload = function () { {% endif %} {% if filetype == 'Document' or filetype == 'PDF' and not use_pdfjs %} - $('#file-view').html('
'); + var msg = '{% trans "The file is being processed, please wait..." %}'; + $('#file-view').html('
loading...' + msg + '
'); 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('