Skip to content
Snippets Groups Projects
Commit 6001ed78 authored by Sergey Linev's avatar Sergey Linev
Browse files

jsroot: dev 6/03/2019 with openui5-related changes

parent 65cd2257
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
"use strict"; "use strict";
JSROOT.version = "dev 5/03/2019"; JSROOT.version = "dev 6/03/2019";
JSROOT.source_dir = ""; JSROOT.source_dir = "";
JSROOT.source_min = false; JSROOT.source_min = false;
......
...@@ -1952,6 +1952,7 @@ ...@@ -1952,6 +1952,7 @@
var conn = null; var conn = null;
if (!href) { if (!href) {
href = window.location.href; href = window.location.href;
if (href && href.indexOf("#")>0) href = href.substr(0, href.indexOf("#"));
if (href && href.lastIndexOf("/")>0) href = href.substr(0, href.lastIndexOf("/")+1); if (href && href.lastIndexOf("/")>0) href = href.substr(0, href.lastIndexOf("/")+1);
} }
pthis.href = href; pthis.href = href;
......
...@@ -34,25 +34,18 @@ ...@@ -34,25 +34,18 @@
delete JSROOT.complete_script_load; // normal callback is intercepted - we need to instantiate openui5 delete JSROOT.complete_script_load; // normal callback is intercepted - we need to instantiate openui5
JSROOT.completeUI5Loading = function() { JSROOT.completeUI5Loading = function() {
console.log('complete ui5 loading'); // when running with THttpServer, automatically set "rootui5" folder
JSROOT.sap = sap; var rootui5sys = undefined;
if (JSROOT.source_dir.indexOf("jsrootsys") >= 0)
var rootui5sys = JSROOT.source_dir.replace(/jsrootsys/g, "rootui5sys"); rootui5sys = JSROOT.source_dir.replace(/jsrootsys/g, "rootui5sys");
sap.ui.loader.config({ sap.ui.loader.config({
paths: { paths: {
"jsroot": JSROOT.source_dir, jsroot: JSROOT.source_dir,
"rootui5": rootui5sys rootui5: rootui5sys
} }
}); });
// var cust_style = document.createElement("link");
// cust_style.setAttribute("rel", "stylesheet");
// cust_style.setAttribute("type", "text/css");
// cust_style.setAttribute("href", JSROOT.source_dir + "openui5/custom.css");
// document.getElementsByTagName("head")[0].appendChild(cust_style);
JSROOT.CallBack(load_callback); JSROOT.CallBack(load_callback);
load_callback = null; load_callback = null;
} }
...@@ -198,8 +191,8 @@ ...@@ -198,8 +191,8 @@
rm.write("</li>"); rm.write("</li>");
} }
JSROOT.sap.ui.define([ 'sap/ui/unified/Menu', 'sap/ui/unified/MenuItem', 'sap/ui/unified/MenuItemBase' ], sap.ui.define(['sap/ui/unified/Menu', 'sap/ui/unified/MenuItem', 'sap/ui/unified/MenuItemBase'],
function(sapMenu, sapMenuItem, sapMenuItemBase) { function(sapMenu, sapMenuItem, sapMenuItemBase) {
menu.add = function(name, arg, func) { menu.add = function(name, arg, func) {
if (name == "separator") { this.separ = true; return; } if (name == "separator") { this.separ = true; return; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment