Merge pull request 'feature/load-scripts-not-in-popup' from feature/load-scripts-not-in-popup into develop

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/66
This commit is contained in:
Sergey Linnik
2025-06-19 08:03:46 +00:00
28 changed files with 48 additions and 299 deletions

View File

@ -1,5 +1,6 @@
# Change Log # Change Log
- preload frame moved from uploading popap
- change tab title on rename - change tab title on rename
- change uploaded file name in popap if converted - change uploaded file name in popap if converted
- php-laravel: fix custom jwt header - php-laravel: fix custom jwt header

View File

@ -511,10 +511,6 @@ label .checkbox {
line-height: 150%; line-height: 150%;
} }
#loadScripts {
display: none;
}
#iframeScripts { #iframeScripts {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;

View File

@ -126,7 +126,7 @@ if (typeof jQuery != "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
@ -184,35 +184,14 @@ if (typeof jQuery != "undefined") {
} else { } else {
jq("#uploadFileName").text(response.filename); jq("#uploadFileName").text(response.filename);
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("current");
if (jq("#loadScripts").is(":empty")) {
var urlScripts = jq("#loadScripts").attr("data-docs");
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
jq("#loadScripts").html(frame);
document.getElementById("iframeScripts").onload = onloadScripts;
jq("#loadScripts iframe").attr("src", urlScripts);
} else {
onloadScripts();
}
};
var onloadScripts = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("done").removeClass("current");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -274,7 +253,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -362,10 +362,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </div>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span> <span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
<br /> <br />
<div class="error-message"> <div class="error-message">
@ -410,7 +407,7 @@
</div> </div>
</div> </div>
<span id="loadScripts" data-docs="<%= WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>"></span> <iframe id="iframeScripts" src="<%= WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
<footer> <footer>
<div class="center"> <div class="center">

View File

@ -511,10 +511,6 @@ label .checkbox {
line-height: 150%; line-height: 150%;
} }
#loadScripts {
display: none;
}
#iframeScripts { #iframeScripts {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;

View File

@ -364,10 +364,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </div>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span> <span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
<br /> <br />
<div class="error-message"> <div class="error-message">
@ -412,7 +409,7 @@
</div> </div>
</div> </div>
<span id="loadScripts" data-docs="<%= UrlPreloadScripts %>"></span> <iframe id="iframeScripts" src="<%= UrlPreloadScripts %>" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
<footer> <footer>
<div class="center"> <div class="center">

View File

@ -126,7 +126,7 @@ if (typeof jQuery != "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
@ -184,35 +184,14 @@ if (typeof jQuery != "undefined") {
} else { } else {
jq("#uploadFileName").text(response.filename); jq("#uploadFileName").text(response.filename);
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("current");
if (jq("#loadScripts").is(":empty")) {
var urlScripts = jq("#loadScripts").attr("data-docs");
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
jq("#loadScripts").html(frame);
document.getElementById("iframeScripts").onload = onloadScripts;
jq("#loadScripts iframe").attr("src", urlScripts);
} else {
onloadScripts();
}
};
var onloadScripts = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("done").removeClass("current");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -274,7 +253,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -114,7 +114,7 @@ if (typeof jQuery !== "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
@ -171,35 +171,14 @@ if (typeof jQuery !== "undefined") {
} else { } else {
jq("#uploadFileName").text(response.filename); jq("#uploadFileName").text(response.filename);
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("current");
if (jq("#loadScripts").is(":empty")) {
var urlScripts = jq("#loadScripts").attr("data-docs");
var frame = "<iframe id=\"iframeScripts\" width=1 height=1 style=\"position: absolute; visibility: hidden;\" ></iframe>";
jq("#loadScripts").html(frame);
document.getElementById("iframeScripts").onload = onloadScripts;
jq("#loadScripts iframe").attr("src", urlScripts);
} else {
onloadScripts();
}
};
var onloadScripts = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("done").removeClass("current");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -261,7 +240,7 @@ if (typeof jQuery !== "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -511,10 +511,6 @@ label .checkbox {
line-height: 150%; line-height: 150%;
} }
#loadScripts {
display: none;
}
#iframeScripts { #iframeScripts {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;

View File

@ -341,10 +341,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </div>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span> <span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
<br /> <br />
<div class="error-message"> <div class="error-message">
@ -388,7 +385,7 @@
</div> </div>
</div> </div>
<span id="loadScripts" data-docs="{{ .Preloader }}"></span> <iframe id="iframeScripts" src="{{ .Preloader }}" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
<footer> <footer>
<div class="center"> <div class="center">

View File

@ -511,10 +511,6 @@ label .checkbox {
line-height: 150%; line-height: 150%;
} }
#loadScripts {
display: none;
}
#iframeScripts { #iframeScripts {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;

View File

@ -114,7 +114,7 @@ if (typeof jQuery !== "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
@ -170,35 +170,14 @@ if (typeof jQuery !== "undefined") {
jq("#hiddenFileName").val(response.filename); jq("#hiddenFileName").val(response.filename);
jq("#uploadFileName").text(response.filename); jq("#uploadFileName").text(response.filename);
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("current");
if (jq("#loadScripts").is(":empty")) {
var urlScripts = jq("#loadScripts").attr("data-docs");
var frame = "<iframe id=\"iframeScripts\" width=1 height=1 style=\"position: absolute; visibility: hidden;\" ></iframe>";
jq("#loadScripts").html(frame);
document.getElementById("iframeScripts").onload = onloadScripts;
jq("#loadScripts iframe").attr("src", urlScripts);
} else {
onloadScripts();
}
};
var onloadScripts = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("done").removeClass("current");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -266,7 +245,7 @@ if (typeof jQuery !== "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -327,10 +327,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </div>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span> <span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
<br /> <br />
<div class="error-message"> <div class="error-message">
@ -375,7 +372,7 @@
</div> </div>
</div> </div>
<span id="loadScripts" th:attr="data-docs=${datadocs}"></span> <iframe id="iframeScripts" th:attr="src=${datadocs}" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
<footer> <footer>
<div class="center"> <div class="center">

View File

@ -511,10 +511,6 @@ label .checkbox {
line-height: 150%; line-height: 150%;
} }
#loadScripts {
display: none;
}
#iframeScripts { #iframeScripts {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;

View File

@ -366,10 +366,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </div>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span> <span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
<br /> <br />
<div class="error-message"> <div class="error-message">
@ -414,7 +411,7 @@
</div> </div>
</div> </div>
<span id="loadScripts" data-docs="<%= ConfigManager.getProperty("files.docservice.url.site") + ConfigManager.getProperty("files.docservice.url.preloader") %>"></span> <iframe id="iframeScripts" src="<%= ConfigManager.getProperty("files.docservice.url.site") + ConfigManager.getProperty("files.docservice.url.preloader") %>" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
<footer> <footer>
<div class="center"> <div class="center">

View File

@ -126,7 +126,7 @@ if (typeof jQuery !== "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
@ -183,35 +183,14 @@ if (typeof jQuery !== "undefined") {
} else { } else {
jq("#uploadFileName").text(response.filename); jq("#uploadFileName").text(response.filename);
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("current");
if (jq("#loadScripts").is(":empty")) {
var urlScripts = jq("#loadScripts").attr("data-docs");
var frame = "<iframe id=\"iframeScripts\" width=1 height=1 style=\"position: absolute; visibility: hidden;\" ></iframe>";
jq("#loadScripts").html(frame);
document.getElementById("iframeScripts").onload = onloadScripts;
jq("#loadScripts iframe").attr("src", urlScripts);
} else {
onloadScripts();
}
};
var onloadScripts = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("done").removeClass("current");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -273,7 +252,7 @@ if (typeof jQuery !== "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -502,10 +502,6 @@ label .checkbox {
line-height: 150%; line-height: 150%;
} }
#loadScripts {
display: none;
}
#iframeScripts { #iframeScripts {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;

View File

@ -143,12 +143,12 @@ if (typeof jQuery != "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
if (jq("#checkOriginalFormat").is(":checked")) { if (jq("#checkOriginalFormat").is(":checked")) {
loadScripts(); onuploaded();
return; return;
} }
jq("#step2").addClass("current"); jq("#step2").addClass("current");
@ -215,35 +215,14 @@ if (typeof jQuery != "undefined") {
} else { } else {
jq("#uploadFileName").text(response.filename); jq("#uploadFileName").text(response.filename);
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("current");
if (jq("#loadScripts").is(":empty")) {
var urlScripts = jq("#loadScripts").attr("data-docs");
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
jq("#loadScripts").html(frame);
document.getElementById("iframeScripts").onload = onloadScripts;
jq("#loadScripts iframe").attr("src", urlScripts);
} else {
onloadScripts();
}
};
var onloadScripts = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("done").removeClass("current");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -299,7 +278,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -346,10 +346,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </div>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<span class="progress-descr">Note the speed of all operations depends <span class="progress-descr">Note the speed of all operations depends
on your connection quality and server location.</span> on your connection quality and server location.</span>
<br /> <br />
@ -395,7 +392,7 @@
</div> </div>
</div>form> </div>form>
<span id="loadScripts" data-docs="{{ $preloaderUrl }}"></span> <iframe id="iframeScripts" src="{{ $preloaderUrl }}" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
<footer> <footer>
<div class="center"> <div class="center">

View File

@ -510,10 +510,6 @@ label .checkbox {
line-height: 150%; line-height: 150%;
} }
#loadScripts {
display: none;
}
#iframeScripts { #iframeScripts {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;

View File

@ -134,12 +134,12 @@ if (typeof jQuery != "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
if (jq("#checkOriginalFormat").is(":checked")) { if (jq("#checkOriginalFormat").is(":checked")) {
loadScripts(); onuploaded();
return; return;
} }
jq("#step2").addClass("current"); jq("#step2").addClass("current");
@ -205,35 +205,14 @@ if (typeof jQuery != "undefined") {
} else { } else {
jq("#uploadFileName").text(response.filename); jq("#uploadFileName").text(response.filename);
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("current");
if (jq("#loadScripts").is(":empty")) {
var urlScripts = jq("#loadScripts").attr("data-docs");
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
jq("#loadScripts").html(frame);
document.getElementById("iframeScripts").onload = onloadScripts;
jq("#loadScripts iframe").attr("src", urlScripts);
} else {
onloadScripts();
}
};
var onloadScripts = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("done").removeClass("current");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -289,7 +268,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -187,10 +187,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </div>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<span class="progress-descr">Note the speed of all operations depends <span class="progress-descr">Note the speed of all operations depends
on your connection quality and server location.</span> on your connection quality and server location.</span>
<br /> <br />
@ -237,7 +234,7 @@
</div> </div>
</div> </div>
<span id="loadScripts" data-docs="{dataDocs}"></span> <iframe id="iframeScripts" src="{dataDocs}" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
<footer> <footer>
<div class="center"> <div class="center">

View File

@ -511,10 +511,6 @@ label .checkbox {
line-height: 150%; line-height: 150%;
} }
#loadScripts {
display: none;
}
#iframeScripts { #iframeScripts {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;

View File

@ -126,7 +126,7 @@ if (typeof jQuery !== "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
@ -183,35 +183,14 @@ if (typeof jQuery !== "undefined") {
} else { } else {
jq("#uploadFileName").text(response.filename); jq("#uploadFileName").text(response.filename);
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("current");
if (jq("#loadScripts").is(":empty")) {
var urlScripts = jq("#loadScripts").attr("data-docs");
var frame = "<iframe id=\"iframeScripts\" width=1 height=1 style=\"position: absolute; visibility: hidden;\" ></iframe>";
jq("#loadScripts").html(frame);
document.getElementById("iframeScripts").onload = onloadScripts;
jq("#loadScripts iframe").attr("src", urlScripts);
} else {
onloadScripts();
}
};
var onloadScripts = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("done").removeClass("current");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -273,7 +252,7 @@ if (typeof jQuery !== "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -341,10 +341,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </div>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span> <span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
<br /> <br />
<div class="error-message"> <div class="error-message">
@ -388,7 +385,7 @@
</div> </div>
</div> </div>
<span id="loadScripts" data-docs="{{ preloadurl }}"></span> <iframe id="iframeScripts" src="{{ preloadurl }}" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
<footer> <footer>
<div class="center"> <div class="center">

View File

@ -137,7 +137,7 @@ if (typeof jQuery != "undefined") {
if (!formatManager.isAutoConvertible(posExt)) { if (!formatManager.isAutoConvertible(posExt)) {
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
return; return;
} }
@ -194,35 +194,14 @@ if (typeof jQuery != "undefined") {
} else { } else {
jq("#uploadFileName").text(response.filename); jq("#uploadFileName").text(response.filename);
jq("#step2").addClass("done").removeClass("current"); jq("#step2").addClass("done").removeClass("current");
loadScripts(); onuploaded();
} }
} }
}); });
}, 1000); }, 1000);
}; };
var loadScripts = function () { var onuploaded = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("current");
if (jq("#loadScripts").is(":empty")) {
var urlScripts = jq("#loadScripts").attr("data-docs");
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
jq("#loadScripts").html(frame);
document.getElementById("iframeScripts").onload = onloadScripts;
jq("#loadScripts iframe").attr("src", urlScripts);
} else {
onloadScripts();
}
};
var onloadScripts = function () {
if (!jq("#mainProgress").is(":visible")) {
return;
}
jq("#step3").addClass("done").removeClass("current");
jq("#beginView, #beginEmbedded").removeClass("disable"); jq("#beginView, #beginEmbedded").removeClass("disable");
var fileName = jq("#hiddenFileName").val(); var fileName = jq("#hiddenFileName").val();
@ -278,7 +257,7 @@ if (typeof jQuery != "undefined") {
jq(document).on("click", "#skipPass", function () { jq(document).on("click", "#skipPass", function () {
jq("#blockPassword").hide(); jq("#blockPassword").hide();
loadScripts(); onuploaded();
}); });
jq(document).on("click", "#beginEdit:not(.disable)", function () { jq(document).on("click", "#beginEdit:not(.disable)", function () {

View File

@ -512,10 +512,6 @@ label .checkbox {
line-height: 150%; line-height: 150%;
} }
#loadScripts {
display: none;
}
#iframeScripts { #iframeScripts {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;

View File

@ -334,10 +334,7 @@
<span class="errorPass"></span> <span class="errorPass"></span>
<br /> <br />
</div> </div>
<span id="step3" class="step">3. Loading editor scripts.</span>
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" /> <input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span> <span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
<br /> <br />
<div class="error-message"> <div class="error-message">
@ -382,7 +379,7 @@
</div> </div>
</div> </div>
<span id="loadScripts" data-docs="<%= ConfigurationManager.new.document_server_preloader_uri.to_s %>"></span> <iframe id="iframeScripts" src="<%= ConfigurationManager.new.document_server_preloader_uri.to_s %>" width=1 height=1 style="position: absolute; visibility: hidden; top: 0;" ></iframe>
<footer> <footer>
<div class="center"> <div class="center">