[Libreoffice-commits] online.git: loleaflet/debug loleaflet/dist
Andras Timar
andras.timar at collabora.com
Sat May 28 22:05:00 UTC 2016
loleaflet/debug/document/loleaflet.html | 26 ++++++++++++--------------
loleaflet/dist/loleaflet.html | 26 ++++++++++++--------------
2 files changed, 24 insertions(+), 28 deletions(-)
New commits:
commit 9c1ff7ef9673612725bad223cffc5bec086fe013
Author: Andras Timar <andras.timar at collabora.com>
Date: Sun May 29 00:04:35 2016 +0200
loleaflet: decide UI language early
diff --git a/loleaflet/debug/document/loleaflet.html b/loleaflet/debug/document/loleaflet.html
index ba2b8b1..4e03ac0 100644
--- a/loleaflet/debug/document/loleaflet.html
+++ b/loleaflet/debug/document/loleaflet.html
@@ -35,6 +35,18 @@
<script src="/loleaflet/%VERSION%/l10n/json2.min.js"></script>
<script src="/loleaflet/%VERSION%/l10n/l10n.min.js"></script>
<script>var _ = function (string) {return string.toLocaleString();};</script>
+ <script>
+ function getParameterByName(name) {
+ name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
+ var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
+ results = regex.exec(location.search);
+ return results === null ? "" : results[1].replace(/\+/g, " ");
+ }
+ var lang = getParameterByName('lang');
+ if (lang) {
+ String.locale = lang;
+ }
+ </script>
<script src="/loleaflet/%VERSION%/toolbar/w2ui.min.js"></script>
<script src="/loleaflet/%VERSION%/toolbar/select2.min.js"></script>
<script src="/loleaflet/%VERSION%/jqueryui/1.11.1/jquery-ui.min.js"></script>
@@ -78,14 +90,6 @@
<div id="toolbar-down"></div>
<script>
-
- function getParameterByName(name) {
- name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
- var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
- results = regex.exec(location.search);
- return results === null ? "" : results[1].replace(/\+/g, " ");
- }
-
var wopiSrc = getParameterByName('WOPISrc');
var access_token = '%ACCESS_TOKEN%';
if (wopiSrc !== '' && access_token !== '') {
@@ -102,12 +106,6 @@
var permission = getParameterByName('permission') || 'edit';
var timestamp = getParameterByName('timestamp');
var closebutton = getParameterByName('closebutton');
- var lang = getParameterByName('lang');
- if (lang) {
- String.locale = lang;
- wrongwopisrc = _('Wrong WOPISrc, usage: WOPISrc=valid encoded URI, or file_path, usage: file_path=/path/to/doc/');
- emptyhosturl = _('The host URL is empty. The loolwsd server is probably misconfigured, please contact the administrator.');
- }
if (wopiSrc === '' && filePath === '') {
vex.dialog.alert(wrongwopisrc);
}
diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html
index 6d5546d..bb87b6c 100644
--- a/loleaflet/dist/loleaflet.html
+++ b/loleaflet/dist/loleaflet.html
@@ -35,6 +35,18 @@
<script src="/loleaflet/%VERSION%/l10n/json2.min.js"></script>
<script src="/loleaflet/%VERSION%/l10n/l10n.min.js"></script>
<script>var _ = function (string) {return string.toLocaleString();};</script>
+ <script>
+ function getParameterByName(name) {
+ name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
+ var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
+ results = regex.exec(location.search);
+ return results === null ? "" : results[1].replace(/\+/g, " ");
+ }
+ var lang = getParameterByName('lang');
+ if (lang) {
+ String.locale = lang;
+ }
+ </script>
<script src="/loleaflet/%VERSION%/toolbar/w2ui.min.js"></script>
<script src="/loleaflet/%VERSION%/toolbar/select2.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
@@ -78,14 +90,6 @@
<div id="toolbar-down"></div>
<script>
-
- function getParameterByName(name) {
- name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
- var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
- results = regex.exec(location.search);
- return results === null ? "" : results[1].replace(/\+/g, " ");
- }
-
var wopiSrc = getParameterByName('WOPISrc');
var access_token = '%ACCESS_TOKEN%';
if (wopiSrc !== '' && access_token !== '') {
@@ -102,12 +106,6 @@
var permission = getParameterByName('permission') || 'edit';
var timestamp = getParameterByName('timestamp');
var closebutton = getParameterByName('closebutton');
- var lang = getParameterByName('lang');
- if (lang) {
- String.locale = lang;
- wrongwopisrc = _('Wrong WOPISrc, usage: WOPISrc=valid encoded URI, or file_path, usage: file_path=/path/to/doc/');
- emptyhosturl = _('The host URL is empty. The loolwsd server is probably misconfigured, please contact the administrator.');
- }
if (wopiSrc === '' && filePath === '') {
vex.dialog.alert(wrongwopisrc);
}
More information about the Libreoffice-commits
mailing list