diff --git a/bricks/.DS_Store b/bricks/.DS_Store index e4be936..d0b7b69 100755 Binary files a/bricks/.DS_Store and b/bricks/.DS_Store differ diff --git a/bricks/bricks.js b/bricks/bricks.js index 0157ffe..e55be95 100755 --- a/bricks/bricks.js +++ b/bricks/bricks.js @@ -2,25 +2,6 @@ var bricks = window.bricks || {}; var tooltip = null; -bricks.createTooltip = function(){ - tooltip = document.createElement('div'); - tooltip.className = 'tooltip'; - tooltip.style.left = '50%'; - tooltip.style.trabsform = 'translateX(-50%)'; - var mouseoutHandler = (event) => { - event.target.removeChild(tooltip); - } - window.addEventListener('mouseover', event => { - if (!event.target.tooltop) return true; - tooltip.textContent = event.target.tooltip; - event.target.addEventListener( - 'mouseout', - mouseoutHandler, - {once:true} - ); - }); -} - bricks.app = null; /* all type of bind action's desc has the following attributes: @@ -411,7 +392,8 @@ bricks.App = class extends bricks.Layout { this.textList = []; this.i18n = new bricks.I18n(objget(opts, 'i18n', {})); this.session_id = null; - bricks.createTooltip(); + this.tooltip = new bricks.Tooltip({otext:'test',i18n:true, wrap:true}); + this.add_widget(this.tooltip); } create(){ this.dom_element = document.getElementsByTagName('body')[0]; diff --git a/bricks/build.sh b/bricks/build.sh index 625c1e4..7697107 100755 --- a/bricks/build.sh +++ b/bricks/build.sh @@ -5,6 +5,7 @@ SOURCES=" page_data_loader.js factory.js uitypesdef.js utils.js \ input.js registerfunction.js button.js accordion.js \ tree.js multiple_state_image.js dynamiccolumn.js form.js message.js \ paging.js datagrid.js dataviewer.js iframe.js \ + floaticonbar.js \ miniform.js wterm.js dynamicaccordion.js " echo ${SOURCES} cat ${SOURCES} > ../dist/bricks.js diff --git a/bricks/css/bricks.css b/bricks/css/bricks.css index 4ff6675..0f21424 100755 --- a/bricks/css/bricks.css +++ b/bricks/css/bricks.css @@ -13,6 +13,8 @@ body { } .modal { + display:none; + position: absolute; padding: 10px; color: #e8e8e8; background-color: rgba(0.3, 0.3, 0.3, 1); diff --git a/bricks/dynamicaccordion.js b/bricks/dynamicaccordion.js index 3804e45..1dd65bf 100644 --- a/bricks/dynamicaccordion.js +++ b/bricks/dynamicaccordion.js @@ -78,15 +78,21 @@ bricks.DynamicAccordion = class extends bricks.VScrollPanel { await this.render(); } async build_header(){ - return await this.build_info(); + await this.build_info(this); } - async build_info(record){ + async build_info(item, record){ if (! this.fields && !record){ return; } var w; - const info = new bricks.AccordionInfo({}); + var tb; + var info = new bricks.AccordionInfo({}); + info.data = record; + item.add_widget(info); + if (this.editable){ + tb = this.build_record_toolbar(info, record); + } if (! record){ record = {}; for (var i=0;i