')
- .text('Features: '
+ .html('Features: '
+ that.getHandlerSourceTags(action)
+ .map(feature2lnk)
.join(', ')))
.append($('
'))
// parse the action doc...
@@ -830,9 +844,6 @@ var UIIntrospectionActions = actions.Actions({
.append($('
')
.text(this.getHandlerDocStr(action))) )
})],
-
- // XXX not final...
- // XXX should we list feature actions???
showFeatureDoc: ['Help/Feature help...',
makeUIDialog(function(features){
features = features || this.features.features
@@ -846,10 +857,7 @@ var UIIntrospectionActions = actions.Actions({
.addClass('help-dialog')
var tag2lnk = function(tag){
- return tag != '-'?
- `${tag}`
- : '-'
- }
+ return tag != '-'? feature2lnk(tag) : '-' }
features.forEach(function(tag){
var feature = featureset[tag.startsWith('-') ? tag.slice(1) : tag]
@@ -869,6 +877,7 @@ var UIIntrospectionActions = actions.Actions({
: 'loaded'))
.append($('')
.html('Tag: '+ tag2lnk(tag) ))
+
.append($('
')
.html('Priority: '+ (feature.getPriority ?
feature.getPriority(true)
@@ -895,6 +904,30 @@ var UIIntrospectionActions = actions.Actions({
+ (feature.suggested || ['-'])
.map(tag2lnk)
.join(', ')))
+
+ // list actions, props and handlers...
+ .append($('
'))
+ .append($('
')
+ .html('Props:
not implemented'))
+ .append($('
')
+ .html('Actions: '
+ + Object.keys(feature.actions || {'-': null})
+ .filter(function(n){
+ return n == '-'
+ || (Object.getOwnPropertyDescriptor(feature.actions, n) || {}).value instanceof actions.Action })
+ .map(function(n){
+ return n == '-' ? n : action2lnk(n) })
+ .join(', ')))
+ .append($('
')
+ .html('Handlers: '
+ + (feature.handlers || [['-']])
+ .map(function(h){ return h[0] instanceof Array ? h[0] : [h[0]] })
+ .reduce(function(a, b){ return a.concat(b) }, [])
+ .unique()
+ .map(function(n){
+ return n == '-' ? n : action2lnk(n) })
+ .join(', ')))
+
// doc...
.append($('
'))
.append($('
')
@@ -925,44 +958,44 @@ var UIIntrospectionActions = actions.Actions({
makeUIDialog(function(){
var that = this
- var dialog = browse.makeLister(null, function(path, make){
- var features = that.features || {}
+ return browse
+ .makeLister(null, function(path, make){
+ var features = that.features || {}
- // XXX get feature doc...
- var draw = function(heading, list){
- make.Heading(heading)
- ;(list || [])
- .forEach(function(tag){
- make(tag)
- .attr('feature', tag)
- .on('open', function(){ that.showFeatureDoc(tag) })
- }) }
+ // XXX get feature doc...
+ var draw = function(heading, list){
+ make.Heading(heading)
+ ;(list || [])
+ .forEach(function(tag){
+ make(tag)
+ .attr('feature', tag)
+ .on('open', function(){ that.showFeatureDoc(tag) })
+ }) }
- draw('Loaded (in order)', that.features.features)
- draw('Excluded', that.features.excluded)
- draw('Disabled', that.features.disabled)
- draw('Not applicable', that.features.unapplicable)
+ draw('Loaded (in order)', that.features.features)
+ draw('Excluded', that.features.excluded)
+ draw('Disabled', that.features.disabled)
+ draw('Not applicable', that.features.unapplicable)
- if(features.error){
- var error = features.error
- error.missing_suggested && error.missing_suggested.length > 0
- && draw('Missing (non-critical)', error.missing_suggested)
- error.missing && error.missing.length > 0
- && draw('Missing (critical)', error.missing)
- // XXX loops...
- // XXX conflicts...
- }
- })
-
- // handle '?' button to browse path...
- dialog.showDoc = function(){
- var feature = dialog.select('!').attr('feature')
- feature
- && that.showFeatureDoc(feature)
- }
- dialog.keyboard.handler('General', '?', 'showDoc')
-
- return dialog
+ if(features.error){
+ var error = features.error
+ error.missing_suggested && error.missing_suggested.length > 0
+ && draw('Missing (non-critical)', error.missing_suggested)
+ error.missing && error.missing.length > 0
+ && draw('Missing (critical)', error.missing)
+ // XXX loops...
+ // XXX conflicts...
+ }
+ })
+ .run(function(){
+ // handle '?' button to browse path...
+ this.showDoc = function(){
+ var feature = this.select('!').attr('feature')
+ feature
+ && that.showFeatureDoc(feature)
+ }
+ this.keyboard.handler('General', '?', 'showDoc')
+ })
})],
// XXX is this the right way to go???
@@ -1509,17 +1542,18 @@ var BrowseActionsActions = actions.Actions({
config.showDisabled = dialog.options.showDisabled
config.showHidden = dialog.options.showHidden
})
+ .run(function(){
+ actions.config['browse-actions-keys']
+ && this.dom.addClass('show-keys')
- this.config['browse-actions-keys']
- && dialog.dom.addClass('show-keys')
-
- // handle '?' button to browse path...
- dialog.showDoc = function(){
- var action = dialog.select('!').attr('action')
- action
- && actions.showDoc(action)
- }
- dialog.keyboard.handler('General', '?', 'showDoc')
+ // handle '?' button to browse path...
+ this.showDoc = function(){
+ var action = this.select('!').attr('action')
+ action
+ && this.showDoc(action)
+ }
+ this.keyboard.handler('General', '?', 'showDoc')
+ })
return dialog
})],
@@ -1532,7 +1566,6 @@ var BrowseActionsActions = actions.Actions({
this.modal.client.dom.hasClass('browse-actions')
&& this.modal.client.dom[state == 'on' ? 'addClass' : 'removeClass']('show-keys')
})],
-
})
var BrowseActions =
diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js
index 0a642ef9..801d317e 100755
--- a/ui (gen4)/lib/widget/browse.js
+++ b/ui (gen4)/lib/widget/browse.js
@@ -3678,6 +3678,13 @@ var BrowserPrototype = {
return m ? m.apply(this, arguments) : []
},
+ // Run a function in the context of the object...
+ //
+ run: function(func){
+ var res = func ? func.call(this) : undefined
+ return res === undefined ? this : res
+ },
+
// XXX need to get a container -- UI widget API....
// XXX paste does not work on IE yet...
// XXX handle copy...