diff --git a/ui (gen4)/features/collections.js b/ui (gen4)/features/collections.js index eda7d1a2..52a04da3 100755 --- a/ui (gen4)/features/collections.js +++ b/ui (gen4)/features/collections.js @@ -2243,7 +2243,6 @@ var UICollectionActions = actions.Actions({ //'collection-last-used': null, }, - // XXX BUG: renaming a collection with a '$' loses selection... // XXX would be nice to make this nested (i.e. path list) -- collection grouping... browseCollections: ['Collections/$Collections...', core.doc`Collection list... @@ -2601,7 +2600,7 @@ var UICollectionActions = actions.Actions({ /*/ XXX experementing... // would be nice to: - // - have an action accessible withing the action menu and standalone + // - have an action accessible within the action menu and standalone // - topology: // / // : diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index 9850fc75..18087eb6 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -848,6 +848,7 @@ function(list, options){ }) .on('edit-abort edit-commit', function(_, title){ title = title.trim() == '' ? from : title + title = title.replace(/\$/g, '') dialog.update() .then(function(){ dialog.select(`"${title}"`) }) }) diff --git a/ui (gen4)/lib/widget/browse2.js b/ui (gen4)/lib/widget/browse2.js index fd365ac3..370ab28a 100755 --- a/ui (gen4)/lib/widget/browse2.js +++ b/ui (gen4)/lib/widget/browse2.js @@ -42,16 +42,32 @@ var Items = module.items = function(){} // -> ??? // var Items.Item = function(value, make, options){ + // XXX check if we are in a container -> create if needed and update context... + // XXX ??? + + // create item... + return make(value, make, options) } -var Items.Editable = function(value){} -var Items.Selected = function(value){} -var Items.Action = function(value){} -var Items.ConfirmAction = function(value){} +var Items.Action = function(value, make, options){ + options = Object.create(options || {}) + options.cls = (options.cls || '') + ' action' + return this.Item(value, make, options) +} +var Items.Heading = function(value, make, options){ + options = Object.create(options || {}) + options.cls = (options.cls || '') + ' heading' + var attrs = options.doc ? {doc: options.doc} : {} + attrs.__proto__ = options.attrs || {} + options.attrs = attrs + return this.Item(value, make, options) +} var Items.Empty = function(value){} var Items.Separator = function(value){} var Items.Spinner = function(value){} -var Items.Heading = function(value){} +var Items.Selected = function(value){} +var Items.Editable = function(value){} +var Items.ConfirmAction = function(value){} // groups... var Items.Group = function(items){}