rename loleaflet.html -> cool.html
Change-Id: Iaa28f1269f8192755ec323396ae4ff054529f412 Signed-off-by: Henry Castro <hcastro@collabora.com>pull/3597/head
parent
6b4dc708ad
commit
e0fe47be5f
|
@ -45,7 +45,7 @@
|
|||
<idle_timeout_secs desc="The maximum number of seconds before dimming and stopping updates when the user is no longer active (even if the browser is in focus). Defaults to 15 minutes." type="uint" default="900">900</idle_timeout_secs>
|
||||
</per_view>
|
||||
|
||||
<loleaflet_html desc="Allows UI customization by replacing the single endpoint of loleaflet.html" type="string" default="loleaflet.html">loleaflet.html</loleaflet_html>
|
||||
<loleaflet_html desc="Allows UI customization by replacing the single endpoint of cool.html" type="string" default="cool.html">cool.html</loleaflet_html>
|
||||
|
||||
<logging>
|
||||
<color type="bool">true</color>
|
||||
|
|
|
@ -455,13 +455,13 @@ run-one: setup-wsd
|
|||
endif
|
||||
|
||||
sync-writer:
|
||||
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/loleaflet.html?file_path=file://$(abs_top_srcdir)/test/data/hello-world.odt"
|
||||
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/cool.html?file_path=file://$(abs_top_srcdir)/test/data/hello-world.odt"
|
||||
|
||||
sync-calc:
|
||||
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/loleaflet.html?file_path=file://$(abs_top_srcdir)/test/data/hello-world.ods"
|
||||
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/cool.html?file_path=file://$(abs_top_srcdir)/test/data/hello-world.ods"
|
||||
|
||||
sync-impress:
|
||||
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/loleaflet.html?file_path=file://$(abs_top_srcdir)/test/data/hello-world.odp"
|
||||
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/cool.html?file_path=file://$(abs_top_srcdir)/test/data/hello-world.odp"
|
||||
|
||||
run-trace: setup-wsd
|
||||
./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" \
|
||||
|
|
|
@ -825,7 +825,7 @@ public class LOActivity extends AppCompatActivity {
|
|||
createLOOLWSD(dataDir, cacheDir, apkFile, assetManager, urlToLoad, uiMode, userName);
|
||||
|
||||
// trigger the load of the document
|
||||
String finalUrlToLoad = "file:///android_asset/dist/loleaflet.html?file_path=" +
|
||||
String finalUrlToLoad = "file:///android_asset/dist/cool.html?file_path=" +
|
||||
urlToLoad + "&closebutton=1";
|
||||
|
||||
// set the language
|
||||
|
|
|
@ -64,7 +64,7 @@ module.exports = {
|
|||
"reloadThrottle": 0,
|
||||
"plugins": [],
|
||||
"injectChanges": true,
|
||||
"startPath": "loleaflet/04597b4ec/loleaflet.html?file_path=./test/data/hello-world.odt",
|
||||
"startPath": "loleaflet/04597b4ec/cool.html?file_path=./test/data/hello-world.odt",
|
||||
"minify": true,
|
||||
"host": null,
|
||||
"localOnly": false,
|
||||
|
@ -105,4 +105,4 @@ module.exports = {
|
|||
"js": "script"
|
||||
},
|
||||
"injectNotification": false
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1251,7 +1251,7 @@ AS_IF([test "$ENABLE_IOSAPP" = "true"],
|
|||
(cd "$APP_BRANDING_DIR" && tar cf - .) | (cd ios/Mobile/Branding && tar xf -)
|
||||
else
|
||||
# A Branding/branding.css file must exist, it is
|
||||
# referenced unconditionally in loleaflet.html in the
|
||||
# referenced unconditionally in cool.html in the
|
||||
# iOS app.
|
||||
touch ios/Mobile/Branding/branding.css
|
||||
fi
|
||||
|
|
|
@ -45,12 +45,12 @@ function loadTestDocNoIntegration(fileName, subFolder, noFileCopy, isMultiUser)
|
|||
if (subFolder === undefined) {
|
||||
URI += '/loleaflet/' +
|
||||
Cypress.env('WSD_VERSION_HASH') +
|
||||
'/loleaflet.html?lang=en-US&file_path=file://' +
|
||||
'/cool.html?lang=en-US&file_path=file://' +
|
||||
Cypress.env('DATA_WORKDIR') + fileName;
|
||||
} else {
|
||||
URI += '/loleaflet/' +
|
||||
Cypress.env('WSD_VERSION_HASH') +
|
||||
'/loleaflet.html?lang=en-US&file_path=file://' +
|
||||
'/cool.html?lang=en-US&file_path=file://' +
|
||||
Cypress.env('DATA_WORKDIR') + subFolder + '/' + fileName;
|
||||
}
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ int main(int argc, char* argv[])
|
|||
fileURL = "file://" + FileUtil::realpath(argv[1]);
|
||||
|
||||
std::string urlAndQuery =
|
||||
"file://" TOPSRCDIR "/loleaflet/dist/loleaflet.html"
|
||||
"file://" TOPSRCDIR "/loleaflet/dist/cool.html"
|
||||
"?file_path=" + fileURL +
|
||||
"&closebutton=1"
|
||||
"&permission=edit"
|
||||
|
|
|
@ -17,7 +17,7 @@ coolServerUrl = "http://localhost:9980"
|
|||
solrServerUrl = "http://localhost:8983"
|
||||
|
||||
documentPath = "Docs/"
|
||||
coolInstance = coolServerUrl + "/loleaflet/f6d368a0a/loleaflet.html"
|
||||
coolInstance = coolServerUrl + "/loleaflet/f6d368a0a/cool.html"
|
||||
solrCollectionName = "documents"
|
||||
|
||||
# Templates
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
BE00F8A021396585001CE2D4 /* loleaflet.html in Resources */ = {isa = PBXBuildFile; fileRef = BE00F89621396585001CE2D4 /* loleaflet.html */; };
|
||||
BE00F8A021396585001CE2D4 /* cool.html in Resources */ = {isa = PBXBuildFile; fileRef = BE00F89621396585001CE2D4 /* cool.html */; };
|
||||
BE00F8A121396585001CE2D4 /* bundle.css in Resources */ = {isa = PBXBuildFile; fileRef = BE00F89721396585001CE2D4 /* bundle.css */; };
|
||||
BE00F8A321396585001CE2D4 /* bundle.js in Resources */ = {isa = PBXBuildFile; fileRef = BE00F89921396585001CE2D4 /* bundle.js */; };
|
||||
BE00F8A721396585001CE2D4 /* loleaflet-help.html in Resources */ = {isa = PBXBuildFile; fileRef = BE00F89D21396585001CE2D4 /* loleaflet-help.html */; };
|
||||
|
@ -76,7 +76,7 @@
|
|||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
BE00F89621396585001CE2D4 /* loleaflet.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = loleaflet.html; path = ../../../loleaflet/dist/loleaflet.html; sourceTree = "<group>"; };
|
||||
BE00F89621396585001CE2D4 /* cool.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = cool.html; path = ../../../loleaflet/dist/cool.html; sourceTree = "<group>"; };
|
||||
BE00F89721396585001CE2D4 /* bundle.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = bundle.css; path = ../../../loleaflet/dist/bundle.css; sourceTree = "<group>"; };
|
||||
BE00F89921396585001CE2D4 /* bundle.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = bundle.js; path = ../../../loleaflet/dist/bundle.js; sourceTree = "<group>"; };
|
||||
BE00F89D21396585001CE2D4 /* loleaflet-help.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = "loleaflet-help.html"; path = "../../../loleaflet/dist/loleaflet-help.html"; sourceTree = "<group>"; };
|
||||
|
@ -1526,7 +1526,7 @@
|
|||
BE00F89921396585001CE2D4 /* bundle.js */,
|
||||
BE00F89E21396585001CE2D4 /* images */,
|
||||
BE00F89D21396585001CE2D4 /* loleaflet-help.html */,
|
||||
BE00F89621396585001CE2D4 /* loleaflet.html */,
|
||||
BE00F89621396585001CE2D4 /* cool.html */,
|
||||
);
|
||||
path = Resources;
|
||||
sourceTree = "<group>";
|
||||
|
@ -3636,7 +3636,7 @@
|
|||
BE18C7DE226DE09A001AD27E /* Branding in Resources */,
|
||||
BE8D85D5214055F3009F1860 /* unorc in Resources */,
|
||||
BE8D85D1214055F3009F1860 /* services.rdb in Resources */,
|
||||
BE00F8A021396585001CE2D4 /* loleaflet.html in Resources */,
|
||||
BE00F8A021396585001CE2D4 /* cool.html in Resources */,
|
||||
BE8D85CA214055F3009F1860 /* offapi.rdb in Resources */,
|
||||
BE8D773A2136762600AC58EA /* Assets.xcassets in Resources */,
|
||||
BE8D85CC214055F3009F1860 /* config in Resources */,
|
||||
|
|
|
@ -69,7 +69,7 @@ static std::atomic<unsigned> appDocIdCounter(1);
|
|||
if (error != nil)
|
||||
return NO;
|
||||
|
||||
NSURL *url = [[NSBundle mainBundle] URLForResource:@"loleaflet" withExtension:@"html"];
|
||||
NSURL *url = [[NSBundle mainBundle] URLForResource:@"cool" withExtension:@"html"];
|
||||
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
|
||||
DocumentData::allocate(appDocId).coDocument = self;
|
||||
components.queryItems = @[ [NSURLQueryItem queryItemWithName:@"file_path" value:[copyFileURL absoluteString]],
|
||||
|
|
|
@ -468,7 +468,7 @@ build-loleaflet: \
|
|||
$(DIST_FOLDER)/device-tablet.css \
|
||||
$(DIST_FOLDER)/device-desktop.css \
|
||||
$(DIST_FOLDER)/bundle.js \
|
||||
$(DIST_FOLDER)/loleaflet.html
|
||||
$(DIST_FOLDER)/cool.html
|
||||
@echo "build loleaflet completed"
|
||||
if ENABLE_ANDROIDAPP
|
||||
@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)/branding.css" "$(APP_BRANDING_DIR)/branding.js" $(DIST_FOLDER)/ ; else touch $(DIST_FOLDER)/branding.css ; fi
|
||||
|
@ -518,13 +518,13 @@ $(DIST_FOLDER)/global.js: $(srcdir)/js/global.js
|
|||
@mkdir -p $(dir $@)
|
||||
$(call global_file)
|
||||
|
||||
$(DIST_FOLDER)/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 \
|
||||
$(DIST_FOLDER)/cool.html: $(srcdir)/html/cool.html.m4 \
|
||||
$(LOLEAFLET_HTML_DST) \
|
||||
$(LOLEAFLET_WELCOME_DST) \
|
||||
$(DIST_FOLDER)/bundle.css \
|
||||
$(DIST_FOLDER)/global.js \
|
||||
$(DIST_FOLDER)/bundle.js
|
||||
@echo "Generating loleaflet.html..."
|
||||
@echo "Generating cool.html..."
|
||||
m4 -PE -DBUNDLE=$(IS_BUNDLE) \
|
||||
-DENABLE_FEEDBACK=$(ENABLE_FEEDBACK) \
|
||||
-DIOSAPP=$(ENABLE_IOSAPP) \
|
||||
|
@ -537,7 +537,7 @@ $(DIST_FOLDER)/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 \
|
|||
$(LOLEAFLET_LIBS_JS) \
|
||||
$(patsubst %.ts,%.js,$(LOLEAFLET_JS_WEBORDER)))" \
|
||||
-DVENDOR="$(VENDOR)" \
|
||||
$(srcdir)/html/loleaflet.html.m4 > $@
|
||||
$(srcdir)/html/cool.html.m4 > $@
|
||||
|
||||
node_modules: package.json archived-packages
|
||||
@npm install
|
||||
|
|
|
@ -83,9 +83,9 @@ Note that this will, by default, set the loolwsd's file server's root to the par
|
|||
which means you can access all the files in loleaflet using /loleaflet/ path. It is advised to set
|
||||
file_server_root_path manually for more control. See wsd/README for more information.
|
||||
|
||||
* open dist/loleaflet.html through loolwsd's fileserver
|
||||
* open dist/cool.html through loolwsd's fileserver
|
||||
|
||||
https://localhost:9980/loleaflet/dist/loleaflet.html?file_path=file:///PATH/TO_DOC&host=wss://localhost:9980
|
||||
https://localhost:9980/loleaflet/dist/cool.html?file_path=file:///PATH/TO_DOC&host=wss://localhost:9980
|
||||
|
||||
and you should see the document in the browser.
|
||||
Note that accessing local storage is disabled by default for security reasons. You need to explicitly enable it
|
||||
|
@ -114,7 +114,7 @@ make sync-[writer|calc|impress]
|
|||
Your browser will open example document and now you can edit .css files and see the result without server restart.
|
||||
|
||||
To run another document use:
|
||||
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/loleaflet.html?file_path=file:///path/to/the/file.ods"
|
||||
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/cool.html?file_path=file:///path/to/the/file.ods"
|
||||
|
||||
Admin Panel
|
||||
-----------
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<!-- Proof of concept of running loleaflet.html in an iframe. Also
|
||||
<!-- Proof of concept of running cool.html in an iframe. Also
|
||||
shows how to, from outside the iframe, invoke Python scripting in
|
||||
the underlying LibreOffice instance that manipulates the document
|
||||
being edited.
|
||||
|
@ -207,7 +207,7 @@
|
|||
query = window.location.search + '&';
|
||||
query += 'NotWOPIButIframe=true';
|
||||
|
||||
var path = window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'loleaflet.html';
|
||||
var path = window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'cool.html';
|
||||
var uriBase = window.location.protocol + '//' + window.location.host + path + query;
|
||||
var iframe = document.getElementById("frame");
|
||||
iframe.src = uriBase;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<!-- Proof of concept of running loleaflet.html in an iframe. Also
|
||||
<!-- Proof of concept of running cool.html in an iframe. Also
|
||||
shows how to, from outside the iframe, invoke Python scripting in
|
||||
the underlying LibreOffice instance that manipulates the document
|
||||
being edited.
|
||||
|
@ -201,7 +201,7 @@
|
|||
|
||||
<!-- 127.0.0.2 allows us to test CSS issues -->
|
||||
<script>
|
||||
var uriBase = document.location.protocol + "//127.0.0.2:9980/loleaflet/42/loleaflet.html" + window.location.search;
|
||||
var uriBase = document.location.protocol + "//127.0.0.2:9980/loleaflet/42/cool.html" + window.location.search;
|
||||
var iframe = document.getElementById("frame");
|
||||
iframe.src = uriBase + "&NotWOPIButIframe=true";
|
||||
var msg = document.getElementById("link");
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
}
|
||||
|
||||
function submitform() {
|
||||
var path = window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'loleaflet.html';
|
||||
var path = window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'cool.html';
|
||||
var query = '?access_token=' + document.getElementById("access_token").value;
|
||||
query += '&file_path=' + document.getElementById("file_path").value;
|
||||
query += '&NotWOPIButIframe=true';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<!-- Proof of concept of running multiple instance of loleaflet.html
|
||||
<!-- Proof of concept of running multiple instance of cool.html
|
||||
at the same time (each one in a different iframe).
|
||||
|
||||
To open the first document add the path into the input and click
|
||||
|
@ -192,7 +192,7 @@
|
|||
query += 'file_path=file://' + path;
|
||||
query += '&NotWOPIButIframe=true';
|
||||
|
||||
var editorPath = window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'loleaflet.html';
|
||||
var editorPath = window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + 'cool.html';
|
||||
var src = window.location.protocol + '//' + window.location.host + editorPath + query;
|
||||
|
||||
return src;
|
||||
|
|
|
@ -723,7 +723,7 @@ window.app = { // Shouldn't have any functions defined.
|
|||
}
|
||||
};
|
||||
|
||||
// Some global variables are defined in loleaflet.html, among them:
|
||||
// Some global variables are defined in cool.html, among them:
|
||||
// global.host: the host URL, with ws(s):// protocol
|
||||
// global.serviceRoot: an optional root path on the server, typically blank.
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ L.Map.WOPI = L.Handler.extend({
|
|||
}
|
||||
|
||||
if (msg.MessageId === 'Host_PostmessageReady') {
|
||||
// We already have a listener for this in loleaflet.html, so ignore it here
|
||||
// We already have a listener for this in cool.html, so ignore it here
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ global.console = {
|
|||
const jsdom = require('jsdom');
|
||||
const { JSDOM } = jsdom;
|
||||
|
||||
var data = fs.readFileSync(top_builddir + '/loleaflet/dist/loleaflet.html', {encoding: 'utf8'});
|
||||
var data = fs.readFileSync(top_builddir + '/loleaflet/dist/cool.html', {encoding: 'utf8'});
|
||||
|
||||
data = data.replace(/%SERVICE_ROOT%\/loleaflet\/%VERSION%/g, top_builddir + '/loleaflet/dist');
|
||||
data = data.replace(/%SERVICE_ROOT%/g, '');
|
||||
|
@ -95,7 +95,7 @@ window = new JSDOM(data, {
|
|||
verbose: false,
|
||||
pretendToBeVisual: false,
|
||||
includeNodeLocations: false,
|
||||
url: 'file:///tmp/notthere/loleaflet.html?file_path=file:///' + to_load,
|
||||
url: 'file:///tmp/notthere/cool.html?file_path=file:///' + to_load,
|
||||
resources: 'usable',
|
||||
beforeParse(window) {
|
||||
console.debug('Before script parsing');
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<idle_timeout_secs desc="The maximum number of seconds before dimming and stopping updates when the user is no longer active (even if the browser is in focus). Defaults to 15 minutes." type="uint" default="900">900</idle_timeout_secs>
|
||||
</per_view>
|
||||
|
||||
<loleaflet_html desc="Allows UI customization by replacing the single endpoint of loleaflet.html" type="string" default="loleaflet.html">loleaflet.html</loleaflet_html>
|
||||
<loleaflet_html desc="Allows UI customization by replacing the single endpoint of cool.html" type="string" default="loleaflet.html">cool.html</loleaflet_html>
|
||||
<ver_suffix desc="Appended to etags to allow easy refresh of changed files during development" type="string" default=""></ver_suffix>
|
||||
|
||||
<logging>
|
||||
|
|
|
@ -1304,7 +1304,7 @@ void WhiteBoxTests::testRequestDetails_loleafletURI()
|
|||
|
||||
static const std::string URI
|
||||
= "/loleaflet/49c225146/"
|
||||
"loleaflet.html?WOPISrc=http%3A%2F%2Flocalhost%2Fnextcloud%2Findex.php%2Fapps%"
|
||||
"cool.html?WOPISrc=http%3A%2F%2Flocalhost%2Fnextcloud%2Findex.php%2Fapps%"
|
||||
"2Frichdocuments%2Fwopi%2Ffiles%2F593_ocqiesh0cngs&title=empty.odt&lang=en-us&"
|
||||
"closebutton=1&revisionhistory=1";
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ void WhiteBoxTests::testRequestDetails_loleafletURI()
|
|||
LOK_ASSERT(details.equals(RequestDetails::Field::Type, "loleaflet"));
|
||||
LOK_ASSERT(details.equals(0, "loleaflet"));
|
||||
LOK_ASSERT_EQUAL(std::string("49c225146"), details[1]);
|
||||
LOK_ASSERT_EQUAL(std::string("loleaflet.html"), details[2]);
|
||||
LOK_ASSERT_EQUAL(std::string("cool.html"), details[2]);
|
||||
LOK_ASSERT_EQUAL(std::string("WOPISrc=http%3A%2F%2Flocalhost%2Fnextcloud%2Findex.php%"
|
||||
"2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F593_ocqiesh0cngs&"
|
||||
"title=empty.odt&lang=en-us&closebutton=1&revisionhistory=1"),
|
||||
|
|
|
@ -119,7 +119,7 @@ public:
|
|||
|
||||
void HTTPServerTest::testLoleafletGet()
|
||||
{
|
||||
const auto pathAndQuery = "/loleaflet/dist/loleaflet.html?access_token=111111111";
|
||||
const auto pathAndQuery = "/loleaflet/dist/cool.html?access_token=111111111";
|
||||
const std::shared_ptr<const http::Response> httpResponse
|
||||
= http::get(_uri.toString(), pathAndQuery);
|
||||
|
||||
|
@ -141,7 +141,7 @@ void HTTPServerTest::testLoleafletPost()
|
|||
{
|
||||
std::unique_ptr<Poco::Net::HTTPClientSession> session(helpers::createSession(_uri));
|
||||
|
||||
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, "/loleaflet/dist/loleaflet.html");
|
||||
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, "/loleaflet/dist/cool.html");
|
||||
Poco::Net::HTMLForm form;
|
||||
form.set("access_token", "2222222222");
|
||||
form.prepareSubmit(request);
|
||||
|
@ -198,7 +198,7 @@ void HTTPServerTest::testScriptsAndLinksGet()
|
|||
{
|
||||
std::unique_ptr<Poco::Net::HTTPClientSession> session(helpers::createSession(_uri));
|
||||
|
||||
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, "/loleaflet/dist/loleaflet.html");
|
||||
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, "/loleaflet/dist/cool.html");
|
||||
session->sendRequest(request);
|
||||
|
||||
Poco::Net::HTTPResponse response;
|
||||
|
@ -219,7 +219,7 @@ void HTTPServerTest::testScriptsAndLinksPost()
|
|||
{
|
||||
std::unique_ptr<Poco::Net::HTTPClientSession> session(helpers::createSession(_uri));
|
||||
|
||||
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, "/loleaflet/dist/loleaflet.html");
|
||||
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, "/loleaflet/dist/cool.html");
|
||||
std::string body;
|
||||
request.setContentLength((int) body.length());
|
||||
session->sendRequest(request) << body;
|
||||
|
|
|
@ -554,7 +554,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request,
|
|||
if (FileHash.find(relPath) == FileHash.end())
|
||||
throw Poco::FileNotFoundException("Invalid URI request: [" + requestUri.toString() + "].");
|
||||
|
||||
const std::string loleafletHtml = config.getString("loleaflet_html", "loleaflet.html");
|
||||
const std::string loleafletHtml = config.getString("loleaflet_html", "cool.html");
|
||||
if (endPoint == loleafletHtml ||
|
||||
endPoint == "help-localizations.json" ||
|
||||
endPoint == "localizations.json" ||
|
||||
|
@ -868,9 +868,9 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
|
|||
LOG_DBG("Preprocessing file: " << relPath);
|
||||
std::string preprocess = *getUncompressedFile(relPath);
|
||||
|
||||
// We need to pass certain parameters from the loleaflet html GET URI
|
||||
// We need to pass certain parameters from the cool html GET URI
|
||||
// to the embedded document URI. Here we extract those params
|
||||
// from the GET URI and set them in the generated html (see loleaflet.html.m4).
|
||||
// from the GET URI and set them in the generated html (see cool.html.m4).
|
||||
HTMLForm form(request, message);
|
||||
const std::string accessToken = form.get("access_token", "");
|
||||
const std::string accessTokenTtl = form.get("access_token_ttl", "");
|
||||
|
@ -887,7 +887,7 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
|
|||
LOG_TRC("theme=" << theme);
|
||||
|
||||
// Escape bad characters in access token.
|
||||
// This is placed directly in javascript in loleaflet.html, we need to make sure
|
||||
// This is placed directly in javascript in cool.html, we need to make sure
|
||||
// that no one can do anything nasty with their clever inputs.
|
||||
std::string escapedAccessToken, escapedAccessHeader, escapedPostmessageOrigin;
|
||||
Poco::URI::encode(accessToken, "'", escapedAccessToken);
|
||||
|
|
|
@ -1053,7 +1053,7 @@ void LOOLWSD::innerInitialize(Application& self)
|
|||
{ "logging.file[@enable]", "false" },
|
||||
{ "logging.level", "trace" },
|
||||
{ "logging.lokit_sal_log", "-INFO-WARN" },
|
||||
{ "loleaflet_html", "loleaflet.html" },
|
||||
{ "loleaflet_html", "cool.html" },
|
||||
{ "loleaflet_logging", "false" },
|
||||
{ "mount_jail_tree", "true" },
|
||||
{ "net.connection_timeout_secs", "30" },
|
||||
|
@ -3724,7 +3724,7 @@ private:
|
|||
}
|
||||
|
||||
const auto& config = Application::instance().config();
|
||||
const std::string loleafletHtml = config.getString("loleaflet_html", "loleaflet.html");
|
||||
const std::string loleafletHtml = config.getString("loleaflet_html", "cool.html");
|
||||
|
||||
const std::string action = "action";
|
||||
const std::string favIconUrl = "favIconUrl";
|
||||
|
|
|
@ -261,7 +261,7 @@ Poco::URI RequestDetails::sanitizeURI(const std::string& uri)
|
|||
throw std::runtime_error("Invalid URI.");
|
||||
}
|
||||
|
||||
// We decoded access token before embedding it in loleaflet.html
|
||||
// We decoded access token before embedding it in cool.html
|
||||
// So, we need to decode it now to get its actual value
|
||||
Poco::URI::QueryParameters queryParams = uriPublic.getQueryParameters();
|
||||
for (auto& param : queryParams)
|
||||
|
|
|
@ -30,17 +30,17 @@
|
|||
* Example:
|
||||
* convert-to
|
||||
*
|
||||
* loleaflet URI: used to load loleaflet.html and other static files.
|
||||
* loleaflet URI: used to load cool.html and other static files.
|
||||
* Origin: the page where the document will be embedded.
|
||||
* Format:
|
||||
* /loleaflet/<loolwsd-version-hash>/[path/]<filename>.<ext>[?WOPISrc=<encoded-document-URI>]
|
||||
* Identifier: /loleaflet/.
|
||||
* Examples:
|
||||
* /loleaflet/49c225146/src/map/Clipboard.js
|
||||
* /loleaflet/49c225146/loleaflet.html?WOPISrc=http%3A%2F%2Flocalhost%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F593_ocqiesh0cngs&title=empty.odt&lang=en-us&closebutton=1&revisionhistory=1
|
||||
* /loleaflet/49c225146/cool.html?WOPISrc=http%3A%2F%2Flocalhost%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F593_ocqiesh0cngs&title=empty.odt&lang=en-us&closebutton=1&revisionhistory=1
|
||||
*
|
||||
* lool URI: used to load the document.
|
||||
* Origin: loleaflet.html
|
||||
* Origin: cool.html
|
||||
* Format:
|
||||
* /lool/<encoded-document-URI+options>/ws?WOPISrc=<encoded-document-URI>&compat=/ws[/<sessionId>/<command>/<serial>]
|
||||
* Identifier: /lool/.
|
||||
|
|
Loading…
Reference in New Issue