This commit is contained in:
yumoqing 2024-05-08 11:15:05 +08:00
parent b7e95a8411
commit 145bf1c6ed
6 changed files with 23 additions and 21 deletions

View File

@ -1,5 +1,5 @@
SOURCES=" page_data_loader.js factory.js uitypesdef.js utils.js uitype.js domelement.js \ SOURCES=" page_data_loader.js factory.js uitypesdef.js utils.js uitype.js \
i18n.js widget.js layout.js bricks.js image.js \ i18n.js widget.js layout.js bricks.js image.js html.js \
jsoncall.js myoperator.js scroll.js menu.js modal.js running.js \ jsoncall.js myoperator.js scroll.js menu.js modal.js running.js \
markdown_viewer.js video.js audio.js toolbar.js tab.js \ markdown_viewer.js video.js audio.js toolbar.js tab.js \
input.js registerfunction.js button.js accordion.js \ input.js registerfunction.js button.js accordion.js \

View File

@ -108,7 +108,7 @@ bricks.DataRow = class extends bricks.HBox {
if (this.browserfields && this.browserfields.exclouded){ if (this.browserfields && this.browserfields.exclouded){
exclouded = this.browserfields.exclouded; exclouded = this.browserfields.exclouded;
} }
if (this.browserfields && this.browserfields.cwidths}{ if (this.browserfields && this.browserfields.cwidths){
cwidths = this.browserfields.cwidths; cwidths = this.browserfields.cwidths;
} }
for (var i=0;i<this.fields.length;i++){ for (var i=0;i<this.fields.length;i++){

View File

@ -1,14 +0,0 @@
var bricks = window.bricks || {};
bricks.DomElement = class extends bricks.JsWidget {
/*
{
html:
}
constructor(opts){
super(opts);
this.dom_element.interHtml = opts.html;
}
}
bricks.Factory.register('DomElement', bricks.DomElement);

15
bricks/html.js Normal file
View File

@ -0,0 +1,15 @@
var bricks = window.bricks || {};
bricks.Html = class extends bricks.JsWidget {
/*
{
html:
}
*/
constructor(opts){
super(opts);
this.dom_element.innerHTML = opts.html;
}
}
bricks.Factory.register('Html', bricks.Html);

View File

@ -2,9 +2,10 @@ var bricks = window.bricks || {};
bricks.Tabular = class extends bricks.DynamicAccordion { bricks.Tabular = class extends bricks.DynamicAccordion {
constructor(opts){ constructor(opts){
super(opts); super(opts);
this.fields = this.record_view.options.fields; // this.fields = this.record_view.options.fields;
this.get_edit_fields();
} }
get_eidt_fields(){ get_edit_fields(){
var fs = this.record_view_.optiosn.fields; var fs = this.record_view_.optiosn.fields;
this.fields = []; this.fields = [];
var exclouded = []; var exclouded = [];
@ -12,10 +13,10 @@ bricks.Tabular = class extends bricks.DynamicAccordion {
exclouded = this.record_view.options.eiditexclouded; exclouded = this.record_view.options.eiditexclouded;
} }
fs.forEach(f => { fs.forEach(f => {
if (!exclouded.includes(f.name){ if (!exclouded.includes(f.name)){
this.fields.push(f); this.fields.push(f);
} }
} });
} }
async build_info(item, record){ async build_info(item, record){