mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
a more compatible DOM structure...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f129191366
commit
a25b47b7d9
@ -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')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user