Skip to content

TagSpaces is an offline, open source, document manager with tagging support

optimizing loading speed, by sciping about.html and license files on startup

uggrock8d868cd7bcee
diff --git a/data/index.html b/data/index.html
index 6ca2ac7ae..cb24d38f9 100644
--- a/data/index.html
+++ b/data/index.html
@@ -377,7 +377,7 @@
<h4 class="modal-title" id="myModalLabel1" data-i18n="ns.dialogs:aboutTitle"></h4>
</div>
<div class="modal-body">
- <iframe id="aboutIframe" sandbox="allow-same-origin allow-scripts" nwdisable style="width: 100%; height: 100%; min-height: 350px; border: 0;" src="about.html"></iframe>
+ <iframe id="aboutIframe" sandbox="allow-same-origin allow-scripts" nwdisable style="width: 100%; height: 100%; min-height: 350px; border: 0;"></iframe>
</div>
<div class="modal-footer">
<button class="btn btn-default pull-left" id="aboutDialogBack" title="Go Back"><i class="fa fa-arrow-left fa-lg"></i></button>
@@ -570,7 +570,7 @@
<h4 class="modal-title" data-i18n="ns.common:license"></h4>
</div>
<div class="modal-body">
- <iframe id="eulaIframe" sandbox="allow-same-origin allow-scripts" nwdisable style="width: 100%; height: 100%; min-height: 350px; border: 0;" src="LICENSE.txt"></iframe>
+ <iframe id="eulaIframe" sandbox="allow-same-origin allow-scripts" nwdisable style="width: 100%; height: 100%; min-height: 350px; border: 0;"></iframe>
</div>
<div class="modal-footer">
<button class="btn btn-default pull-left" id="eulaDialogBack" title="Go Back"><i class="fa fa-arrow-left fa-lg"></i></button>
diff --git a/data/js/core.ui.js b/data/js/core.ui.js
index da9a64b04..491b052bf 100644
--- a/data/js/core.ui.js
+++ b/data/js/core.ui.js
@@ -213,12 +213,8 @@ define(function(require, exports) {
}
}
- $('#aboutDialogBack').click(function() {
- reloadAboutContent();
- });
- $('#dialogAboutTS').on('show.bs.modal', function() {
- reloadAboutContent();
- });
+ $('#aboutDialogBack').on('click', reloadAboutContent);
+ $('#dialogAboutTS').on('show.bs.modal', reloadAboutContent);
// Open About Dialog
$('#openAboutBox').on('click', function() {
@@ -965,11 +961,6 @@ define(function(require, exports) {
}
function showLicenseDialog() {
- if (TSCORE.PRO) {
- $('#licenseIframe').attr('src', 'pro/EULA.txt');
- } else {
- $('#licenseIframe').attr('src', 'LICENSE.txt');
- }
$('#aboutLicenseModal').modal({
backdrop: 'static',
show: true
@@ -979,18 +970,16 @@ define(function(require, exports) {
});
}
+ $('#aboutLicenseModal').on('show.bs.modal', reloadEulaContent);
+
function reloadEulaContent() {
if (TSCORE.PRO) {
- $('#licenseIframe').attr('src', 'pro/EULA.txt');
+ $('#eulaIframe').attr('src', 'pro/EULA.txt');
} else {
- $('#licenseIframe').attr('src', 'LICENSE.txt');
+ $('#eulaIframe').attr('src', 'LICENSE.txt');
}
}
- $('#aboutLicenseModal').on('show.bs.modal', function() {
- reloadEulaContent();
- });
-
function disableTopToolbar() {
$('#perspectiveSwitcherButton').prop('disabled', true);
$('#searchBox').prop('disabled', true);