bugfix
This commit is contained in:
parent
8e1239a8e6
commit
1fff530118
@ -1,10 +1,10 @@
|
||||
SOURCES=" factory.js uitypesdef.js utils.js i18n.js widget.js \
|
||||
bricks.js image.js \
|
||||
jsoncall.js myoperator.js layout.js menu.js modal.js \
|
||||
jsoncall.js myoperator.js layout.js scroll.js menu.js modal.js \
|
||||
markdown_viewer.js video.js audio.js toolbar.js tab.js \
|
||||
input.js registerfunction.js button.js accordion.js \
|
||||
tree.js multiple_state_image.js form.js message.js \
|
||||
paging.js scroll.js datagrid.js dataviewer.js \
|
||||
paging.js datagrid.js dataviewer.js \
|
||||
miniform.js wterm.js "
|
||||
echo ${SOURCES}
|
||||
cat ${SOURCES} > ../dist/bricks.js
|
||||
|
@ -21,13 +21,25 @@ bricks.FormBody = class extends bricks.VBox {
|
||||
opts.width = '100%';
|
||||
opts.scrollY = 'scroll';
|
||||
super(opts);
|
||||
console.log('dxcygvuhbijnokmpl,;lmknjbhvgcfx');
|
||||
this.name_inputs = {};
|
||||
this.form_body = new bricks.Layout({width:'100%',
|
||||
overflow:'auto'
|
||||
});
|
||||
this.add_widget(this.form_body);
|
||||
this.form_body.set_css('multicolumns');
|
||||
this.max_item_height = 50;
|
||||
this.build_fields();
|
||||
console.log('max_item_height=', this.max_item_height);
|
||||
var v = this.max_item_height + 'px';
|
||||
console.log('v=', v);
|
||||
// this.set_style('columnHeight', v);
|
||||
v = this.opts.input_width || 400 + 'px';
|
||||
console.log('v=', v);
|
||||
this.set_style('columnWidth', v);
|
||||
this.set_style('columnGap', '40px');
|
||||
this.set_style('overflowX', 'none');
|
||||
console.log('v=============================', v);
|
||||
|
||||
}
|
||||
reset_data(){
|
||||
for (var name in this.name_inputs){
|
||||
@ -90,6 +102,9 @@ bricks.FormBody = class extends bricks.VBox {
|
||||
if (w){
|
||||
box.add_widget(w);
|
||||
this.name_inputs[fields[i].name] = w;
|
||||
if (this.max_item_height < box.height){
|
||||
this.max_item_height = box.height;
|
||||
}
|
||||
console.log(fields[i].uitype, 'create Input ok');
|
||||
} else {
|
||||
console.log(fields[i], 'createInput failed');
|
||||
|
@ -27,7 +27,7 @@ bricks.HScrollPanel = class extends bricks.HBox {
|
||||
opts.width = '100%';
|
||||
opts.height = '100%';
|
||||
super(opts);
|
||||
|
||||
this.set_css('hscroll');
|
||||
this.min_threshold = opts.min_threshold || 0.02;
|
||||
this.max_threshold = opts.max_threshold || 0.95;
|
||||
this.bind('scroll', this.scroll_handle.bind(this))
|
||||
@ -64,6 +64,7 @@ bricks.VScrollPanel = class extends bricks.VBox {
|
||||
opts.width = '100%';
|
||||
opts.height = '100%';
|
||||
super(opts);
|
||||
this.set_css('vscroll');
|
||||
this.min_threshold = opts.min_threshold || 0.02;
|
||||
this.max_threshold = opts.max_threshold || 0.95;
|
||||
this.bind('scroll', this.scroll_handle.bind(this))
|
||||
|
@ -122,7 +122,7 @@ bricks. TreeNode = class extends bricks.VBox {
|
||||
}
|
||||
}
|
||||
|
||||
bricks. Tree = class extends bricks.VBox {
|
||||
bricks.Tree = class extends bricks.VScrollPanel {
|
||||
/*
|
||||
{
|
||||
row_height:
|
||||
@ -151,12 +151,11 @@ bricks. Tree = class extends bricks.VBox {
|
||||
*/
|
||||
constructor(options){
|
||||
super(options);
|
||||
this.set_height('100%');
|
||||
this.row_height = this.opts.row_height || '35px';
|
||||
this.multitype_tree = this.opts.multitype_tree||false;
|
||||
this.selected_node = null;
|
||||
this.create_toolbar();
|
||||
this.container = new bricks.VScrollPanel({});
|
||||
this.container = this;
|
||||
this.add_widget(this.container);
|
||||
this.data_id = null;
|
||||
if (this.opts.dataurl){
|
||||
|
@ -1,6 +1,10 @@
|
||||
var bricks = window.bricks || {};
|
||||
bricks.isMobile = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
|
||||
bricks.is_mobile = function(){
|
||||
return typeof screen.orientation !== 'undefined';
|
||||
}
|
||||
|
||||
class _TypeIcons {
|
||||
constructor(){
|
||||
this.kv = {}
|
||||
|
Loading…
Reference in New Issue
Block a user