2022-12-12 15:10:27 +01:00
|
|
|
m4_dnl -*- Mode: HTML -*-x
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_changequote([,])m4_dnl
|
|
|
|
m4_dnl# m4_foreachq(x, `item_1, item_2, ..., item_n', stmt)
|
|
|
|
m4_dnl# quoted list, alternate improved version
|
|
|
|
m4_define([m4_foreachq],[m4_ifelse([$2],[],[],[m4_pushdef([$1])_$0([$1],[$3],[],$2)m4_popdef([$1])])])m4_dnl
|
|
|
|
m4_define([_m4_foreachq],[m4_ifelse([$#],[3],[],[m4_define([$1],[$4])$2[]$0([$1],[$2],m4_shift(m4_shift(m4_shift($@))))])])m4_dnl
|
|
|
|
m4_define(_YEAR_,m4_esyscmd(date +%Y|tr -d '\n'))
|
2016-02-08 17:20:05 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<!-- saved from url=(0054)http://leafletjs.com/examples/quick-start-example.html -->
|
2023-03-11 23:40:07 +01:00
|
|
|
m4_ifelse(IOSAPP,[true],
|
|
|
|
<!-- Related to issue #5841: the iOS app sets the base text direction via the "dir" parameter -->
|
2023-05-25 23:51:17 +02:00
|
|
|
<html dir="" style="height:100%"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" data-theme="%UI_THEME%">
|
2023-03-11 23:40:07 +01:00
|
|
|
,
|
2021-12-21 17:01:34 +01:00
|
|
|
<html %UI_RTL_SETTINGS% style="height:100%"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
2023-03-11 23:40:07 +01:00
|
|
|
)m4_dnl
|
2016-04-13 18:24:19 +02:00
|
|
|
<title>Online Editor</title>
|
2016-02-08 17:20:05 +01:00
|
|
|
<meta charset="utf-8">
|
2022-04-15 11:22:44 +02:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0 minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
2016-02-08 17:20:05 +01:00
|
|
|
|
2016-10-25 09:13:00 +02:00
|
|
|
<script>
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_dnl# Define MOBILEAPP as true if this is either for the iOS app or for the gtk+ "app" testbed
|
|
|
|
m4_define([MOBILEAPP],[])
|
|
|
|
m4_ifelse(IOSAPP,[true],[m4_define([MOBILEAPP],[true])])
|
|
|
|
m4_ifelse(GTKAPP,[true],[m4_define([MOBILEAPP],[true])])
|
|
|
|
m4_ifelse(ANDROIDAPP,[true],[m4_define([MOBILEAPP],[true])])
|
2022-12-01 14:30:08 +01:00
|
|
|
|
2022-12-12 15:10:27 +01:00
|
|
|
// FIXME: This is temporary and not what we actually eventually want.
|
|
|
|
|
|
|
|
// What we really want is not a separate HTML file (produced with M4 conditionals on the below
|
|
|
|
// EMSCRIPTENAPP) for a "WASM app". What we want is that the same cool.html page adapts on demand to
|
|
|
|
// instead run locally using WASM, if the connection to the COOL server breaks. (And then
|
|
|
|
// re-connects to the COOL server when possible.)
|
|
|
|
|
|
|
|
m4_ifelse(EMSCRIPTENAPP,[true],[m4_define([MOBILEAPP],[true])])
|
|
|
|
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(MOBILEAPP,[],
|
2023-03-11 23:40:07 +01:00
|
|
|
window.welcomeUrl = '%WELCOME_URL%';
|
|
|
|
window.feedbackUrl = '%FEEDBACK_URL%';
|
|
|
|
window.buyProductUrl = '%BUYPRODUCT_URL%';
|
|
|
|
|
2019-03-15 17:45:57 +01:00
|
|
|
// Start listening for Host_PostmessageReady message and save the
|
2016-10-25 09:13:00 +02:00
|
|
|
// result for future
|
2023-03-11 23:40:07 +01:00
|
|
|
window.WOPIpostMessageReady = false;
|
|
|
|
var PostMessageReadyListener = function(e) {
|
2019-12-10 22:05:13 +01:00
|
|
|
if (!(e && e.data))
|
|
|
|
return;
|
2021-10-22 14:32:56 +02:00
|
|
|
|
|
|
|
try {
|
|
|
|
var msg = JSON.parse(e.data);
|
|
|
|
} catch (err) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-10-25 09:13:00 +02:00
|
|
|
if (msg.MessageId === 'Host_PostmessageReady') {
|
|
|
|
window.WOPIPostmessageReady = true;
|
|
|
|
window.removeEventListener('message', PostMessageReadyListener, false);
|
2023-10-18 20:45:20 +02:00
|
|
|
console.log('Received Host_PostmessageReady.');
|
2016-10-25 09:13:00 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
window.addEventListener('message', PostMessageReadyListener, false);
|
2020-03-03 15:44:19 +01:00
|
|
|
)m4_dnl
|
2019-02-19 23:56:59 +01:00
|
|
|
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_dnl# For use in conditionals in JS: window.ThisIsAMobileApp, window.ThisIsTheiOSApp,
|
|
|
|
m4_dnl# and window.ThisIsTheGtkApp
|
2019-03-21 11:28:05 +01:00
|
|
|
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(MOBILEAPP,[true],
|
2019-03-21 11:28:05 +01:00
|
|
|
[ window.ThisIsAMobileApp = true;
|
2023-03-11 23:40:07 +01:00
|
|
|
// Fix issue #5841 by setting the welcome, feedback, and buy product URLs
|
|
|
|
// to empty for mobile
|
|
|
|
window.welcomeUrl = '';
|
|
|
|
window.feedbackUrl = '';
|
|
|
|
window.buyProductUrl = '';
|
2021-11-01 13:25:21 +01:00
|
|
|
window.HelpFile = String.raw`m4_syscmd([cat html/cool-help.html])`;
|
2020-02-14 17:08:56 +01:00
|
|
|
window.open = function (url, windowName, windowFeatures) {
|
|
|
|
window.postMobileMessage('HYPERLINK ' + url); /* don't call the 'normal' window.open on mobile at all */
|
|
|
|
}
|
2020-07-06 12:31:30 +02:00
|
|
|
window.MobileAppName='MOBILEAPPNAME';
|
|
|
|
brandProductName='MOBILEAPPNAME';],
|
2019-03-21 11:28:05 +01:00
|
|
|
[ window.ThisIsAMobileApp = false;]
|
|
|
|
)
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(IOSAPP,[true],
|
2019-03-21 11:28:05 +01:00
|
|
|
[ window.ThisIsTheiOSApp = true;
|
2022-09-07 09:23:07 +02:00
|
|
|
window.postMobileMessage = function(msg) { window.webkit.messageHandlers.lok.postMessage(msg); };
|
2020-08-15 16:15:42 +02:00
|
|
|
window.postMobileError = function(msg) { window.webkit.messageHandlers.error.postMessage(msg); };
|
|
|
|
window.postMobileDebug = function(msg) { window.webkit.messageHandlers.debug.postMessage(msg); };],
|
2019-03-21 11:28:05 +01:00
|
|
|
[ window.ThisIsTheiOSApp = false;]
|
|
|
|
)
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(GTKAPP,[true],
|
2019-03-21 11:28:05 +01:00
|
|
|
[ window.ThisIsTheGtkApp = true;
|
2021-11-17 11:36:23 +01:00
|
|
|
window.postMobileMessage = function(msg) { window.webkit.messageHandlers.cool.postMessage(msg, '*'); };
|
2019-03-21 11:28:05 +01:00
|
|
|
window.postMobileError = function(msg) { window.webkit.messageHandlers.error.postMessage(msg, '*'); };
|
|
|
|
window.postMobileDebug = function(msg) { window.webkit.messageHandlers.debug.postMessage(msg, '*'); };],
|
|
|
|
[ window.ThisIsTheGtkApp = false;]
|
|
|
|
)
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(ANDROIDAPP,[true],
|
2019-03-21 11:28:05 +01:00
|
|
|
[ window.ThisIsTheAndroidApp = true;
|
2021-11-18 13:08:14 +01:00
|
|
|
window.postMobileMessage = function(msg) { window.COOLMessageHandler.postMobileMessage(msg); };
|
|
|
|
window.postMobileError = function(msg) { window.COOLMessageHandler.postMobileError(msg); };
|
|
|
|
window.postMobileDebug = function(msg) { window.COOLMessageHandler.postMobileDebug(msg); };],
|
2019-03-21 11:28:05 +01:00
|
|
|
[ window.ThisIsTheAndroidApp = false;]
|
|
|
|
)
|
2022-12-12 15:10:27 +01:00
|
|
|
m4_ifelse(EMSCRIPTENAPP,[true],
|
|
|
|
[ window.ThisIsTheEmscriptenApp = true;
|
Make the temporary "WASM app" work
Now I hope things are initialised in the right order and the plumbing
gets set up so that messages are passed as expected. It seems to work
most of the time.
Main changes are:
- The online WASM executable is built using the -s MODULARIZE -s
EXPORT_NAME=createOnlineModule options. This means that the WASM
runtime is not automatically initialized and the main() function
is not automatically started. Only when the createOnlineModule()
function is called is that done. Calling exported C/C++ functions
is a little bit more complicated.
- Code to actually Base64-encode strings to be executed as
JavaScript when expected is now present in wasmapp.cpp. (After
being passed through the Base64ToArrayBuffer function on the JS
side.) Whether this is actually necessary is not fully clear, but
to keep the code similar to that in the GTK, iOS, and Android
apps, this is kept as such for now. It would probably work fine to
just directly create the ArrayBuffer in the C++ (using the EM_ASM
magic).
- The COOLWSD::run() function is now run in a separate thread so
that main() can return.
- The FakeWebSocket's onopen() function is now called from
innerMain(), where the HULLO message is sent. It remains a bit
unclear if this really is the ideal place.
In the mobile apps the HULLO message is sent and the onopen()
function is called in the window.socket.onopen() function in
global.js.
But note that despite that the WASM app and the mobile apps are
largely quite similarly constructed and the FakeSocket and
FakeWebSocket plumbing is the same, there is an important
difference. In a mobile app the C++ code is what runs first, and
that then loads the HTML page into WebKit, in which the JS
runs. In the WASM app it is the other way around. The web page is
naturaly the one that is loaded and the JS code then starts
running the C++ code as WASM.
Finally, note that the whole concept that there is a separate "WASM
app" is temporary.
What we eventually want to achieve is that the COOL webpage upon
loading will connect a COOL server. As it does currently. The COOL
server runs the online and core C++ code to load a document, and
renders document tiles and sends those to the client JS code to
dispay.
The new thing will be that, if enabled, in addition to the HTML and JS
resources, the client will also download the WASM code and data
resources. Also, the document and updates to it will be downloaded
while being edited so that a copy can be kept in client memory. But
the WASM code and the downloaded document will remain unused most of
the time. Only if the connection to the COOL server breaks will the JS
start running the WASM code and the JS will talk to online code
running locally as WASM instead of to a COOL server. Obviously there
are still lots of things hanging in the air here regarding how exactly
this will work.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ib1786a0b485d51797b0f2302d4296aa1ff9df5c1
2023-01-05 19:11:01 +01:00
|
|
|
window.postMobileMessage = function(msg) { app.HandleCOOLMessage(app.AllocateUTF8(msg)); };
|
2022-12-14 19:23:09 +01:00
|
|
|
window.postMobileError = function(msg) { console.log('COOL Error: ' + msg); };
|
|
|
|
window.postMobileDebug = function(msg) { console.log('COOL Debug: ' + msg); };],
|
2022-12-12 15:10:27 +01:00
|
|
|
[ window.ThisIsTheEmscriptenApp = false;]
|
2022-11-28 14:35:42 +01:00
|
|
|
)
|
2019-03-21 11:28:05 +01:00
|
|
|
|
2019-07-03 06:29:43 +02:00
|
|
|
window.bundlejsLoaded = false;
|
|
|
|
window.fullyLoadedAndReady = false;
|
|
|
|
window.addEventListener('load', function() {
|
|
|
|
window.fullyLoadedAndReady = true;
|
|
|
|
}, false);
|
|
|
|
|
2018-09-19 00:04:22 +02:00
|
|
|
</script>
|
|
|
|
|
2022-12-19 13:43:54 +01:00
|
|
|
m4_ifelse(EMSCRIPTENAPP,[true],[
|
2022-12-20 08:19:38 +01:00
|
|
|
<script>
|
2022-12-28 14:43:36 +01:00
|
|
|
console.log('================ Before including online.js');
|
2022-12-20 08:19:38 +01:00
|
|
|
</script>
|
2022-12-28 14:43:36 +01:00
|
|
|
<script type="text/javascript" src="online.js"></script>
|
2022-12-20 08:19:38 +01:00
|
|
|
<script>
|
2022-12-28 14:43:36 +01:00
|
|
|
console.log('================ After including online.js');
|
2022-12-19 13:43:54 +01:00
|
|
|
</script>
|
|
|
|
])
|
2022-12-14 19:23:09 +01:00
|
|
|
|
2021-10-13 12:44:41 +02:00
|
|
|
m4_ifelse(BUNDLE,[],
|
|
|
|
<!-- Using individual CSS files -->
|
2021-11-03 15:13:42 +01:00
|
|
|
m4_foreachq([fileCSS],[COOL_CSS],[<link rel="stylesheet" href="][m4_ifelse(MOBILEAPP,[],[%SERVICE_ROOT%/browser/%VERSION%/])][fileCSS" />
|
2020-03-30 16:54:28 +02:00
|
|
|
]),
|
2020-03-30 17:40:14 +02:00
|
|
|
[<!-- Dynamically load the bundle.css -->
|
|
|
|
<script>
|
|
|
|
var link = document.createElement('link');
|
|
|
|
link.setAttribute("rel", "stylesheet");
|
|
|
|
link.setAttribute("type", "text/css");
|
2021-11-03 15:04:41 +01:00
|
|
|
link.setAttribute("href", '][m4_ifelse(MOBILEAPP,[],[%SERVICE_ROOT%/browser/%VERSION%/])][bundle.css');
|
2020-03-30 17:40:14 +02:00
|
|
|
document.getElementsByTagName("head")[[0]].appendChild(link);
|
|
|
|
</script>
|
2020-03-30 16:54:28 +02:00
|
|
|
])
|
2019-03-15 17:44:58 +01:00
|
|
|
<!--%BRANDING_CSS%--> <!-- add your logo here -->
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(IOSAPP,[true],
|
2019-04-22 14:22:04 +02:00
|
|
|
[<link rel="stylesheet" href="Branding/branding.css">])
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(ANDROIDAPP,[true],
|
2019-07-09 13:46:23 +02:00
|
|
|
[<link rel="stylesheet" href="branding.css">])
|
2023-01-10 11:09:24 +01:00
|
|
|
m4_ifelse(EMSCRIPTENAPP,[true],
|
|
|
|
[<link rel="stylesheet" href="branding.css">])
|
2020-04-07 10:24:39 +02:00
|
|
|
|
|
|
|
m4_dnl Handle localization
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(MOBILEAPP,[true],
|
2019-04-22 15:08:49 +02:00
|
|
|
[
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(IOSAPP,[true],
|
2019-04-22 15:08:49 +02:00
|
|
|
[],
|
|
|
|
[<link rel="localizations" href="l10n/uno-localizations-override.json" type="application/vnd.oftn.l10n+json"/>
|
|
|
|
<link rel="localizations" href="l10n/localizations.json" type="application/vnd.oftn.l10n+json"/>
|
|
|
|
<link rel="localizations" href="l10n/locore-localizations.json" type="application/vnd.oftn.l10n+json"/>
|
|
|
|
<link rel="localizations" href="l10n/help-localizations.json" type="application/vnd.oftn.l10n+json"/>
|
|
|
|
<link rel="localizations" href="l10n/uno-localizations.json" type="application/vnd.oftn.l10n+json"/>])],
|
2021-11-03 15:04:41 +01:00
|
|
|
[<link rel="localizations" href="%SERVICE_ROOT%/browser/%VERSION%/l10n/uno-localizations-override.json" type="application/vnd.oftn.l10n+json"/>
|
|
|
|
<link rel="localizations" href="%SERVICE_ROOT%/browser/%VERSION%/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/>
|
|
|
|
<link rel="localizations" href="%SERVICE_ROOT%/browser/%VERSION%/l10n/locore-localizations.json" type="application/vnd.oftn.l10n+json"/>
|
|
|
|
<link rel="localizations" href="%SERVICE_ROOT%/browser/%VERSION%/l10n/help-localizations.json" type="application/vnd.oftn.l10n+json"/>
|
|
|
|
<link rel="localizations" href="%SERVICE_ROOT%/browser/%VERSION%/l10n/uno-localizations.json" type="application/vnd.oftn.l10n+json"/>]
|
2020-03-03 15:44:19 +01:00
|
|
|
)m4_dnl
|
2018-01-16 13:16:06 +01:00
|
|
|
</head>
|
|
|
|
|
2022-12-28 14:43:36 +01:00
|
|
|
<body style="user-select: none;height:100%;display:flex;flex-direction:column">
|
2016-02-08 17:20:05 +01:00
|
|
|
<!--The "controls" div holds map controls such as the Zoom button and
|
|
|
|
it's separated from the map in order to have the controls on the top
|
|
|
|
of the page all the time.
|
|
|
|
|
|
|
|
The "document-container" div is the actual display of the document, is
|
|
|
|
what the user sees and it should be no larger than the screen size.
|
|
|
|
|
|
|
|
The "map" div is the actual document and it has the document's size
|
|
|
|
and width, this being inside the smaller "document-container" will
|
|
|
|
cause the content to overflow, creating scrollbars -->
|
2017-01-10 16:26:08 +01:00
|
|
|
|
2021-11-17 19:52:11 +01:00
|
|
|
<nav class="main-nav" role="navigation">
|
|
|
|
<!-- Mobile menu toggle button (hamburger/x icon) -->
|
|
|
|
<input id="main-menu-state" type="checkbox" style="display: none"/>
|
|
|
|
<ul id="main-menu" class="sm sm-simple lo-menu readonly"></ul>
|
|
|
|
<div id="document-titlebar">
|
|
|
|
<div class="document-title">
|
|
|
|
<!-- visuallyhidden: hide it visually but keep it available to screen reader and other assistive technology -->
|
|
|
|
<label class="visuallyhidden" for="document-name-input" aria-hidden="false">Document name</label>
|
2023-11-23 09:35:37 +01:00
|
|
|
<input id="document-name-input" type="text" spellcheck="false" disabled="true" style="display: none"/>
|
2024-02-05 16:37:16 +01:00
|
|
|
<div id="document-name-input-loading-bar"></div>
|
2021-11-17 19:52:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-11-16 17:46:30 +01:00
|
|
|
<div id="userListHeader">
|
2024-02-28 12:05:58 +01:00
|
|
|
<div id="followingChipBackground">
|
2024-03-13 14:35:07 +01:00
|
|
|
<div id="followingChip"></div>
|
2024-02-28 12:05:58 +01:00
|
|
|
</div>
|
2024-02-27 15:54:52 +01:00
|
|
|
<div id="userListSummaryBackground"><button id="userListSummary"></button></div>
|
2021-11-16 17:46:30 +01:00
|
|
|
<div id="userListPopover"></div>
|
|
|
|
</div>
|
|
|
|
|
2021-11-17 19:52:11 +01:00
|
|
|
<div id="closebuttonwrapper">
|
|
|
|
<div class="closebuttonimage" id="closebutton"></div>
|
|
|
|
</div>
|
2018-11-12 19:32:48 +01:00
|
|
|
</nav>
|
|
|
|
|
|
|
|
<table id="toolbar-wrapper">
|
|
|
|
<tr>
|
|
|
|
<td id="toolbar-logo"></td>
|
2022-02-07 09:10:12 +01:00
|
|
|
<td id="toolbar-mobile-back" class="editmode-off"></td>
|
2018-11-12 19:32:48 +01:00
|
|
|
<td id="toolbar-up"></td>
|
|
|
|
<td id="toolbar-hamburger">
|
|
|
|
<label class="main-menu-btn" for="main-menu-state">
|
2019-10-14 15:35:34 +02:00
|
|
|
<span class="main-menu-btn-icon" id="main-menu-btn-icon"></span>
|
2018-11-12 19:32:48 +01:00
|
|
|
</label>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2022-02-07 20:25:53 +01:00
|
|
|
<td colspan="4" id="formulabar" style="display: none"></td>
|
2018-11-12 19:32:48 +01:00
|
|
|
</tr>
|
2018-10-14 21:24:12 +02:00
|
|
|
</table>
|
2016-02-08 17:20:05 +01:00
|
|
|
|
2021-10-28 13:26:36 +02:00
|
|
|
<input id="insertgraphic" aria-labelledby="menu-insertgraphic" type="file" accept="image/*" style="position: fixed; top: -100em">
|
2021-10-28 15:26:10 +02:00
|
|
|
<input id="selectbackground" aria-labelledby="menu-selectbackground" type="file" accept="image/*" style="position: fixed; top: -100em">
|
2017-10-31 17:58:58 +01:00
|
|
|
|
2021-07-13 14:16:27 +02:00
|
|
|
<div id="main-document-content" style="display:flex; flex-direction: row; flex: 1; margin: 0; padding: 0; min-height: 0">
|
2021-07-05 12:53:55 +02:00
|
|
|
<div id="presentation-controls-wrapper" class="readonly">
|
|
|
|
<div id="slide-sorter"></div>
|
|
|
|
<div id="presentation-toolbar" style="display: none"></div>
|
|
|
|
</div>
|
2022-01-18 10:41:47 +01:00
|
|
|
<div id="document-container" class="readonly" dir="ltr">
|
2021-07-05 12:53:55 +02:00
|
|
|
<div id="map"></div>
|
|
|
|
</div>
|
2021-09-23 11:39:55 +02:00
|
|
|
<div id="sidebar-dock-wrapper" style="display: none;">
|
2021-07-05 12:53:55 +02:00
|
|
|
<div id="sidebar-panel"></div>
|
|
|
|
</div>
|
2016-02-08 17:20:05 +01:00
|
|
|
</div>
|
2018-11-27 14:54:51 +01:00
|
|
|
|
|
|
|
<div id="spreadsheet-toolbar" style="display: none"></div>
|
2017-01-11 07:52:03 +01:00
|
|
|
|
2018-11-30 16:29:18 +01:00
|
|
|
<div id="mobile-edit-button" style="display: none">
|
2018-11-30 12:17:48 +01:00
|
|
|
<div id="mobile-edit-button-image"></div>
|
|
|
|
</div>
|
|
|
|
|
2018-11-30 16:18:43 +01:00
|
|
|
<div id="toolbar-down" style="display: none"></div>
|
2019-10-19 15:33:29 +02:00
|
|
|
<div id="toolbar-search" style="display: none"></div>
|
2019-08-28 20:42:12 +02:00
|
|
|
<div id="mobile-wizard" style="display: none">
|
2019-10-09 14:05:29 +02:00
|
|
|
<div id="mobile-wizard-tabs"></div>
|
2021-08-26 16:33:59 +02:00
|
|
|
<table id="mobile-wizard-titlebar" class="mobile-wizard-titlebar" width="100%">
|
2019-08-28 20:42:12 +02:00
|
|
|
<tr>
|
2021-08-26 16:33:59 +02:00
|
|
|
<td id="mobile-wizard-back" class="mobile-wizard-back"></td>
|
|
|
|
<td id="mobile-wizard-title" class="mobile-wizard-title ui-widget"></td>
|
2019-08-28 20:42:12 +02:00
|
|
|
</tr>
|
|
|
|
</table>
|
2019-10-08 16:42:01 +02:00
|
|
|
<div id="mobile-wizard-content"></div>
|
2019-08-28 20:42:12 +02:00
|
|
|
</div>
|
2016-02-08 17:20:05 +01:00
|
|
|
|
2017-05-26 10:18:05 +02:00
|
|
|
<!-- Remove if you don't want the About dialog -->
|
2023-03-23 12:27:30 +01:00
|
|
|
<div id="about-dialog" style="display:none; user-select: text" tabIndex="0">
|
2021-11-08 16:32:58 +01:00
|
|
|
<div id="about-dialog-header">
|
|
|
|
<fig id="integrator-logo"></fig>
|
|
|
|
<h1 id="product-name">Collabora Online</h1>
|
|
|
|
</div>
|
2017-05-26 10:03:33 +02:00
|
|
|
<hr/>
|
2021-11-08 16:32:58 +01:00
|
|
|
<div id="about-dialog-container">
|
|
|
|
<div id="about-dialog-logos">
|
|
|
|
<fig id="product-logo"></fig>
|
|
|
|
<fig id="lokit-logo"></fig>
|
|
|
|
</div>
|
|
|
|
<div id="about-dialog-info-container">
|
|
|
|
<div id="about-dialog-info">
|
2021-11-23 14:06:54 +01:00
|
|
|
<div id="coolwsd-version-label"></div>
|
2022-01-12 18:04:08 +01:00
|
|
|
<div style="margin-inline-end: auto;"><div id="coolwsd-version" dir="ltr"></div></div>
|
2021-11-30 15:28:35 +01:00
|
|
|
<div class="spacer"></div>
|
2021-11-23 14:06:54 +01:00
|
|
|
<div id="lokit-version-label"></div>
|
2022-01-12 18:04:08 +01:00
|
|
|
<div style="margin-inline-end: auto;"><div id="lokit-version" dir="ltr"></div></div>
|
2021-11-30 15:36:13 +01:00
|
|
|
m4_ifelse(MOBILEAPP,[],[<div id="served-by"><span id="served-by-label"></span> <span id="os-info"></span> <wbr><span id="coolwsd-id"></span></div>],[<p></p>])
|
2021-11-08 16:32:58 +01:00
|
|
|
<div id="slow-proxy"></div>
|
2023-03-16 09:01:32 +01:00
|
|
|
m4_ifelse(DEBUG,[true],[<div id="js-dialog">JSDialogs: <a href="javascript:void(function() { app.socket.sendMessage('uno .uno:WidgetTestDialog') }() )">View widgets</a></div>])
|
2023-05-31 09:57:33 +02:00
|
|
|
<div id="routeToken"></div>
|
2022-01-12 16:51:54 +01:00
|
|
|
<p style="margin-inline-end: auto;"><span dir="ltr">Copyright © _YEAR_, VENDOR.</span></p>
|
2021-11-08 16:32:58 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-26 10:03:33 +02:00
|
|
|
</div>
|
2016-06-21 11:35:11 +02:00
|
|
|
|
2020-03-30 11:59:20 +02:00
|
|
|
<script>
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(MOBILEAPP,[true],
|
2019-03-15 17:24:21 +01:00
|
|
|
[window.host = '';
|
|
|
|
window.serviceRoot = '';
|
2021-08-29 19:35:47 +02:00
|
|
|
window.hexifyUrl = false;
|
2022-01-18 09:09:30 +01:00
|
|
|
// We can't use %VERSION% here as there is no FileServer.cpp involved in a mobile app that
|
|
|
|
// would expand the %FOO% things. But it seems that window.versionPath is not used in the
|
|
|
|
// mobile apps anyway.
|
|
|
|
// window.versionPath = 'UNKNOWN';
|
2023-11-21 16:38:08 +01:00
|
|
|
m4_ifelse(EMSCRIPTENAPP,[true],
|
|
|
|
[window.accessToken = '%ACCESS_TOKEN%';
|
|
|
|
window.accessTokenTTL = '%ACCESS_TOKEN_TTL%';
|
|
|
|
window.accessHeader = '%ACCESS_HEADER%';],
|
|
|
|
[window.accessToken = '';
|
|
|
|
window.accessTokenTTL = '';
|
|
|
|
window.accessHeader = '';]
|
|
|
|
)
|
2021-09-03 12:20:52 +02:00
|
|
|
window.postMessageOriginExt = '';
|
2021-11-03 15:52:00 +01:00
|
|
|
window.coolLogging = 'true';
|
2020-04-15 23:59:43 +02:00
|
|
|
window.enableWelcomeMessage = false;
|
2022-06-29 15:46:01 +02:00
|
|
|
window.autoShowWelcome = false;
|
|
|
|
window.autoShowFeedback = true;
|
2019-03-15 17:24:21 +01:00
|
|
|
window.outOfFocusTimeoutSecs = 1000000;
|
|
|
|
window.idleTimeoutSecs = 1000000;
|
2019-11-15 19:01:02 +01:00
|
|
|
window.protocolDebug = false;
|
2020-01-14 17:56:01 +01:00
|
|
|
window.frameAncestors = '';
|
2020-03-04 14:52:51 +01:00
|
|
|
window.socketProxy = false;
|
2020-06-03 18:46:42 +02:00
|
|
|
window.tileSize = 256;
|
2021-12-10 23:07:03 +01:00
|
|
|
window.uiDefaults = {};
|
2022-10-10 17:21:27 +02:00
|
|
|
window.useIntegrationTheme = 'false';
|
2022-11-01 12:04:47 +01:00
|
|
|
window.checkFileInfoOverride = {};
|
2023-01-14 09:34:31 +01:00
|
|
|
window.deeplEnabled = false;
|
2022-12-03 07:43:02 +01:00
|
|
|
window.zoteroEnabled = false;
|
2024-01-01 16:00:43 +01:00
|
|
|
window.savedUIState = false;
|
2024-01-05 16:37:27 +01:00
|
|
|
window.wasmEnabled = false;
|
2022-12-03 07:43:02 +01:00
|
|
|
window.indirectionUrl='';],
|
2019-03-15 17:44:58 +01:00
|
|
|
[window.host = '%HOST%';
|
|
|
|
window.serviceRoot = '%SERVICE_ROOT%';
|
2021-08-29 19:35:47 +02:00
|
|
|
window.hexifyUrl = %HEXIFY_URL%;
|
2020-06-08 14:28:55 +02:00
|
|
|
window.versionPath = '%VERSION%';
|
2019-03-15 17:44:58 +01:00
|
|
|
window.accessToken = '%ACCESS_TOKEN%';
|
|
|
|
window.accessTokenTTL = '%ACCESS_TOKEN_TTL%';
|
|
|
|
window.accessHeader = '%ACCESS_HEADER%';
|
2021-09-03 12:20:52 +02:00
|
|
|
window.postMessageOriginExt = '%POSTMESSAGE_ORIGIN%';
|
2021-11-11 10:16:59 +01:00
|
|
|
window.coolLogging = '%BROWSER_LOGGING%';
|
2022-03-12 19:31:20 +01:00
|
|
|
window.coolwsdVersion = '%COOLWSD_VERSION%';
|
2020-04-15 23:59:43 +02:00
|
|
|
window.enableWelcomeMessage = %ENABLE_WELCOME_MSG%;
|
2022-06-29 15:46:01 +02:00
|
|
|
window.autoShowWelcome = %AUTO_SHOW_WELCOME%;
|
2022-07-19 18:52:57 +02:00
|
|
|
window.autoShowFeedback = %AUTO_SHOW_FEEDBACK%;
|
2020-04-21 13:20:41 +02:00
|
|
|
window.userInterfaceMode = '%USER_INTERFACE_MODE%';
|
2021-12-10 23:07:03 +01:00
|
|
|
window.useIntegrationTheme = '%USE_INTEGRATION_THEME%';
|
2021-03-11 15:54:13 +01:00
|
|
|
window.enableMacrosExecution = '%ENABLE_MACROS_EXECUTION%';
|
2023-06-19 18:02:16 +02:00
|
|
|
window.enableAccessibility = '%ENABLE_ACCESSIBILITY%' === 'true';
|
2019-03-15 17:44:58 +01:00
|
|
|
window.outOfFocusTimeoutSecs = %OUT_OF_FOCUS_TIMEOUT_SECS%;
|
|
|
|
window.idleTimeoutSecs = %IDLE_TIMEOUT_SECS%;
|
2019-11-15 19:01:02 +01:00
|
|
|
window.protocolDebug = %PROTOCOL_DEBUG%;
|
2021-12-07 11:04:14 +01:00
|
|
|
window.frameAncestors = decodeURIComponent('%FRAME_ANCESTORS%');
|
2020-03-04 14:52:51 +01:00
|
|
|
window.socketProxy = %SOCKET_PROXY%;
|
2020-06-03 18:46:42 +02:00
|
|
|
window.tileSize = 256;
|
2022-10-10 17:21:27 +02:00
|
|
|
window.uiDefaults = %UI_DEFAULTS%;
|
2022-11-01 12:04:47 +01:00
|
|
|
window.checkFileInfoOverride = %CHECK_FILE_INFO_OVERRIDE%;
|
2024-01-01 10:09:23 +01:00
|
|
|
window.deeplEnabled = %DEEPL_ENABLED%;
|
2022-12-03 07:43:02 +01:00
|
|
|
window.zoteroEnabled = %ZOTERO_ENABLED%;
|
2024-01-01 16:00:43 +01:00
|
|
|
window.savedUIState = %SAVED_UI_STATE%;
|
2024-01-05 16:37:27 +01:00
|
|
|
window.wasmEnabled = %WASM_ENABLED%;
|
2022-12-03 07:43:02 +01:00
|
|
|
window.indirectionUrl='%INDIRECTION_URL%';])
|
2021-10-13 12:44:41 +02:00
|
|
|
|
|
|
|
// This is GLOBAL_JS:
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_syscmd([cat ]GLOBAL_JS)m4_dnl
|
2020-03-30 11:59:20 +02:00
|
|
|
|
2023-03-11 23:40:07 +01:00
|
|
|
// Related to issue #5841: the iOS app sets the base text direction via the
|
|
|
|
// "dir" parameter
|
|
|
|
m4_ifelse(IOSAPP,[true],
|
2023-08-21 20:59:47 +02:00
|
|
|
[document.dir = window.coolParams.get('dir');])
|
2023-03-11 23:40:07 +01:00
|
|
|
|
2020-10-20 14:00:03 +02:00
|
|
|
m4_ifelse(IOSAPP,[true],
|
2023-08-21 20:59:47 +02:00
|
|
|
[window.userInterfaceMode = window.coolParams.get('userinterfacemode');])
|
2020-10-20 14:00:03 +02:00
|
|
|
|
2020-11-03 17:02:07 +01:00
|
|
|
m4_ifelse(ANDROIDAPP,[true],
|
2023-08-21 20:59:47 +02:00
|
|
|
[window.userInterfaceMode = window.coolParams.get('userinterfacemode');])
|
2020-11-03 17:02:07 +01:00
|
|
|
|
2023-08-09 11:29:08 +02:00
|
|
|
m4_ifelse(ANDROIDAPP,[true],
|
2023-08-21 20:59:47 +02:00
|
|
|
[var darkTheme = window.coolParams.get('darkTheme');
|
2023-08-09 11:29:08 +02:00
|
|
|
if (darkTheme) {window.uiDefaults = {'darkTheme': true};}])
|
|
|
|
|
2023-01-02 11:03:23 +01:00
|
|
|
m4_ifelse(EMSCRIPTENAPP,[true],
|
|
|
|
[window.userInterfaceMode = 'notebookbar';])
|
|
|
|
|
2020-09-14 15:37:35 +02:00
|
|
|
// Dynamically load the appropriate *-mobile.css, *-tablet.css or *-desktop.css
|
2020-03-30 11:59:20 +02:00
|
|
|
var link = document.createElement('link');
|
|
|
|
link.setAttribute("rel", "stylesheet");
|
|
|
|
link.setAttribute("type", "text/css");
|
2020-04-07 10:24:39 +02:00
|
|
|
var brandingLink = document.createElement('link');
|
|
|
|
brandingLink.setAttribute("rel", "stylesheet");
|
|
|
|
brandingLink.setAttribute("type", "text/css");
|
2021-12-01 14:41:02 +01:00
|
|
|
|
2023-07-21 17:49:17 +02:00
|
|
|
var theme_name = '%BRANDING_THEME%';
|
2021-12-01 14:41:02 +01:00
|
|
|
var theme_prefix = '';
|
2022-07-08 20:33:28 +02:00
|
|
|
if(window.useIntegrationTheme === 'true' && theme_name !== '') {
|
|
|
|
theme_prefix = theme_name + '/';
|
2021-12-03 13:57:42 +01:00
|
|
|
}
|
2021-12-01 14:41:02 +01:00
|
|
|
|
2020-04-07 10:24:39 +02:00
|
|
|
if (window.mode.isMobile()) {
|
2021-11-03 15:04:41 +01:00
|
|
|
[link.setAttribute("href", ']m4_ifelse(MOBILEAPP,[],[%SERVICE_ROOT%/browser/%VERSION%/])[device-mobile.css');]
|
2021-12-01 14:41:02 +01:00
|
|
|
[brandingLink.setAttribute("href", ']m4_ifelse(MOBILEAPP,[],[%SERVICE_ROOT%/browser/%VERSION%/])m4_ifelse(IOSAPP,[true],[Branding/])[' + theme_prefix + 'branding-mobile.css');]
|
2020-04-07 10:24:39 +02:00
|
|
|
} else if (window.mode.isTablet()) {
|
2021-11-03 15:04:41 +01:00
|
|
|
[link.setAttribute("href", ']m4_ifelse(MOBILEAPP,[],[%SERVICE_ROOT%/browser/%VERSION%/])[device-tablet.css');]
|
2021-12-01 14:41:02 +01:00
|
|
|
[brandingLink.setAttribute("href", ']m4_ifelse(MOBILEAPP,[],[%SERVICE_ROOT%/browser/%VERSION%/])m4_ifelse(IOSAPP,[true],[Branding/])[' + theme_prefix + 'branding-tablet.css');]
|
2020-04-07 10:24:39 +02:00
|
|
|
} else {
|
2021-11-03 15:04:41 +01:00
|
|
|
[link.setAttribute("href", ']m4_ifelse(MOBILEAPP,[],[%SERVICE_ROOT%/browser/%VERSION%/])[device-desktop.css');]
|
2021-12-01 14:41:02 +01:00
|
|
|
[brandingLink.setAttribute("href", ']m4_ifelse(MOBILEAPP,[],[%SERVICE_ROOT%/browser/%VERSION%/])[' + theme_prefix + 'branding-desktop.css');]
|
2020-04-07 10:24:39 +02:00
|
|
|
}
|
2020-03-30 11:59:20 +02:00
|
|
|
document.getElementsByTagName("head")[[0]].appendChild(link);
|
2020-04-07 10:24:39 +02:00
|
|
|
document.getElementsByTagName("head")[[0]].appendChild(brandingLink);
|
2020-03-30 11:59:20 +02:00
|
|
|
</script>
|
2018-09-07 15:27:00 +02:00
|
|
|
|
2020-03-03 15:44:19 +01:00
|
|
|
m4_ifelse(MOBILEAPP,[true],
|
2021-10-13 12:44:41 +02:00
|
|
|
<!-- This is for a mobile app so the script files are in the same folder -->
|
2021-11-03 15:13:42 +01:00
|
|
|
m4_ifelse(BUNDLE,[],m4_foreachq([fileJS],[COOL_JS],
|
2019-03-06 11:35:16 +01:00
|
|
|
[ <script src="fileJS" defer></script>
|
2018-09-07 15:27:00 +02:00
|
|
|
]),
|
2019-03-06 11:35:16 +01:00
|
|
|
[ <script src="bundle.js" defer></script>
|
2018-09-07 15:27:00 +02:00
|
|
|
]),
|
2021-10-13 12:44:41 +02:00
|
|
|
m4_ifelse(BUNDLE,[],
|
|
|
|
<!-- Using indivisual JS files -->
|
2021-11-03 15:13:42 +01:00
|
|
|
m4_foreachq([fileJS],[COOL_JS],
|
2021-11-03 15:04:41 +01:00
|
|
|
[ <script src="%SERVICE_ROOT%/browser/%VERSION%/fileJS" defer></script>
|
2021-10-13 12:44:41 +02:00
|
|
|
]),
|
|
|
|
[
|
|
|
|
<!-- Using bundled JS files -->
|
2021-11-03 15:04:41 +01:00
|
|
|
<script src="%SERVICE_ROOT%/browser/%VERSION%/bundle.js" defer></script>
|
2018-09-07 15:27:00 +02:00
|
|
|
])
|
2020-03-03 15:44:19 +01:00
|
|
|
)m4_dnl
|
2021-11-30 12:26:07 +01:00
|
|
|
|
|
|
|
m4_ifelse(MOBILEAPP,[true],
|
|
|
|
[<script src="m4_ifelse(IOSAPP,[true],[Branding/])branding.js"></script>],
|
|
|
|
[<!--%BRANDING_JS%--> <!-- logo onclick handler -->
|
|
|
|
<!--%CSS_VARIABLES%-->])
|
2016-02-08 17:20:05 +01:00
|
|
|
</body></html>
|