This commit is contained in:
yumoqing 2024-06-28 11:41:39 +08:00
parent bff98def06
commit 4127eb025d
4 changed files with 12 additions and 9 deletions

View File

@ -4,7 +4,7 @@ SOURCES=" page_data_loader.js factory.js uitypesdef.js utils.js uitype.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 \
tree.js multiple_state_image.js dynamiccolumn.js form.js message.js conform.js \ tree.js multiple_state_image.js dynamiccolumn.js form.js message.js conform.js \
paging.js datagrid.js iframe.js \ paging.js datagrid.js iframe.js cols.js \
floaticonbar.js miniform.js wterm.js dynamicaccordion.js \ floaticonbar.js miniform.js wterm.js dynamicaccordion.js \
llm_dialog.js llm.js websocket.js datarow.js tabular.js " llm_dialog.js llm.js websocket.js datarow.js tabular.js "
echo ${SOURCES} echo ${SOURCES}

View File

@ -186,6 +186,10 @@ body {
border: 1px solid #c1c1c1; border: 1px solid #c1c1c1;
} }
.selected_record {
border-radius: 8px;
border: 1px solid #f00;
}
.inputbox { .inputbox {
background-color: #f8f8f8; background-color: #f8f8f8;
color: #111111; color: #111111;

View File

@ -19,14 +19,14 @@ bricks.DynamicColumn = class extends bricks.Layout {
opts.mobile_cols = opts.mobile_cols|| 1; opts.mobile_cols = opts.mobile_cols|| 1;
super(opts); super(opts);
this.set_style('display', 'grid'); this.set_style('display', 'grid');
this.set_column_width(); // this.set_column_width();
this.bind('on_parent', this.set_column_width.bind(this));
this.bind('resize', this.set_column_width.bind(this)); this.bind('resize', this.set_column_width.bind(this));
if (this.cwidth){ if (this.cwidth){
bricks.app.bind('charsize', this.set_column_width.bind(this)); bricks.app.bind('charsize', this.set_column_width.bind(this));
} }
} }
set_column_width(){ set_column_width(){
bricks.debug('set_column_width() called ....');
var cw; var cw;
var cols; var cols;
var gap; var gap;
@ -36,13 +36,12 @@ bricks.DynamicColumn = class extends bricks.Layout {
} else { } else {
cw = this.col_width; cw = this.col_width;
} }
gap = bricks.app.charsize * this.col_cgap; gap = bricks.app.charsize * (this.col_cgap || 0.1);
if (width > 0){ if (width > 0){
if (bricks.is_mobile()){ if (bricks.is_mobile() && (width < this.get_height())){
if (width < this.get_height()){ cols = this.mobile_cols || 1;
cw = (width - (cols - 1) * gap) / this.mobile_cols; } else {
alert('here: width=' + width + ' height=' + this.get_height()) cols = (width + gap) / (cw + gap)
}
} }
cols = Math.floor(width/cw); cols = Math.floor(width/cw);
cw = (width - (cols - 1) * gap) / cols; cw = (width - (cols - 1) * gap) / cols;

BIN
docs/.DS_Store vendored

Binary file not shown.