diff --git a/ui (gen4)/lib/widget/browse2.js b/ui (gen4)/lib/widget/browse2.js index f96b540f..f1c848da 100755 --- a/ui (gen4)/lib/widget/browse2.js +++ b/ui (gen4)/lib/widget/browse2.js @@ -544,6 +544,7 @@ var BaseBrowserPrototype = { splice: function(){}, + // Events... // // Format: // { @@ -563,6 +564,8 @@ var BaseBrowserPrototype = { // XXX should these be defined on this level or should we use DOM??? // XXX add support for item events... // e.g. item.focus(..) -> root.focus(..) + // XXX also need to design a means for this system to interact both + // ways with DOM events... on: function(evt, handler){ var handlers = this.__event_handlers = this.__event_handlers || {} handlers = handlers[evt] = handlers[evt] || [] @@ -702,6 +705,33 @@ var BrowserPrototype = { // XXX need to mix these into the header only... headerItemButtons: [ ], + + // Shorthand elements... + // + // Format: + // { + // : { + // class: , + // html: , + // }, + // ... + // } + // + // If make(..) gets passed it will construct and element + // via with an optional + // + // NOTE: .class is optional... + // NOTE: set this to null to disable shorthands... + elementShorthand: { + '---': { + 'class': 'separator', + 'html': '
' + }, + '...': { + 'class': 'separator', + 'html': '
', + }, + }, }, // parent element (optional)... @@ -899,6 +929,10 @@ var BrowserPrototype = { if(options.hidden && !options.renderHidden){ return null } + + // XXX handle special items... + // XXX + var text = JSON.stringify(item.value) var elem = document.createElement('div')