bugfix
This commit is contained in:
parent
3b5663e59a
commit
0c6000432b
@ -108,7 +108,7 @@ bricks.widgetBuild = async function(desc, widget, data){
|
||||
var klassname = desc.widgettype;
|
||||
var base_url = widget.baseURI;
|
||||
while (klassname == 'urlwidget'){
|
||||
let url = absurl(desc.options.url, widget);
|
||||
let url = bricks.absurl(desc.options.url, widget);
|
||||
base_url = url;
|
||||
let method = desc.options.method || 'GET';
|
||||
let opts = desc.options.params || {};
|
||||
@ -476,7 +476,7 @@ bricks.App = class extends bricks.Layout {
|
||||
}
|
||||
async build(){
|
||||
var opts = structuredClone(this.opts.widget);
|
||||
var w = await (bricks.widgetBuild(opts, bricks.Body));
|
||||
var w = await bricks.widgetBuild(opts, bricks.Body);
|
||||
if (!w){
|
||||
bricks.debug('w=', w, 'Body=', bricks.Body, 'Factory=', bricks.Factory)
|
||||
}
|
||||
@ -484,7 +484,7 @@ bricks.App = class extends bricks.Layout {
|
||||
}
|
||||
async run(){
|
||||
await (this.change_language(this));
|
||||
var w = await (this.build());
|
||||
var w = await this.build();
|
||||
this.root = w;
|
||||
if (!w){
|
||||
bricks.debug('w=', w, 'Body=', bricks.Body, 'Factory=', bricks.Factory)
|
||||
|
@ -173,7 +173,7 @@ bricks.DataGrid = class extends bricks.VBox {
|
||||
this.loader = new bricks.BufferedDataLoader(this, {
|
||||
pagerows: 80,
|
||||
buffer_pages: 5,
|
||||
url: absurl(this.dataurl, this),
|
||||
url: bricks.absurl(this.dataurl, this),
|
||||
method: this.method,
|
||||
params: this.params
|
||||
})
|
||||
|
@ -81,7 +81,7 @@ bricks.MarkdownViewer = class extends bricks.VBox {
|
||||
constructor(options){
|
||||
super(options);
|
||||
this.back_stack = [];
|
||||
this.md_url = this.absurl(this.opts.md_url);
|
||||
this.md_url = bricks.absurl(this.opts.md_url);
|
||||
if (this.opts.navigator){
|
||||
this.createBackButton();
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ Array.prototype.remove = function(item){
|
||||
return this;
|
||||
}
|
||||
|
||||
var absurl = function(url, widget){
|
||||
bricks.absurl = function(url, widget){
|
||||
if (url.startsWith('http://') || url.startsWith('https://')){
|
||||
return url;
|
||||
}
|
||||
|
@ -194,12 +194,6 @@ bricks.JsWidget = class {
|
||||
set_baseURI(url){
|
||||
this.baseURI = url;
|
||||
}
|
||||
absurl(url){
|
||||
if (this.baseURI){
|
||||
return absurl(url, this);
|
||||
}
|
||||
return url
|
||||
}
|
||||
show(){
|
||||
this.dom_element.style.display = '';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user