a more compatible DOM structure...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-02-07 01:30:30 +03:00
parent f129191366
commit a25b47b7d9

View File

@ -453,25 +453,50 @@ var BrowserPrototype = {
__proto__: BaseBrowser.prototype, __proto__: BaseBrowser.prototype,
options: { options: {
hideListHeader: false,
renderHidden: false, renderHidden: false,
}, },
dom: null, dom: null,
// XXX instrument interactions...
renderList: function(items, options){ renderList: function(items, options){
var that = this var that = this
var e = document.createElement('div') options = options || this.options
e.classList.add('list') // dialog...
var dialog = document.createElement('div')
dialog.classList.add('browse-widget')
// header...
options.hideListHeader
|| dialog.appendChild(this.renderListHeader(options))
// list...
var list = document.createElement('div')
list.classList.add('list', 'v-block')
items items
.forEach(function(item){ .forEach(function(item){
e.appendChild(item instanceof Array ? list.appendChild(item instanceof Array ?
that.renderGroup(item) that.renderGroup(item)
: item) }) : item) })
dialog.appendChild(list)
return e }, return dialog
},
// XXX populate this...
renderListHeader: function(options){
var header = document.createElement('div')
header.classList.add('path', 'v-block')
// XXX path...
// XXX search...
return header
},
renderNested: function(header, sublist, item, options){ renderNested: function(header, sublist, item, options){
var e = document.createElement('div') var e = document.createElement('div')
e.classList.add('list') e.classList.add('list')