mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
revisions and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c2c9af5310
commit
249fa17cef
@ -941,9 +941,19 @@ var ExampleUIActions = actions.Actions({
|
||||
|
||||
// XXX need more testing...
|
||||
make.batch([
|
||||
'---',
|
||||
[['X', 'Y']],
|
||||
// XXX this does not show the correct value...
|
||||
{title: 'foo', value: 123},
|
||||
{type: 'field.Toggle', title: 'Batch toggle: '},
|
||||
])
|
||||
make.field.batch([
|
||||
// XXX this does not do the right thing...
|
||||
'---',
|
||||
['X', 'Y'],
|
||||
{text: 'foo', value: 123},
|
||||
{type: 'field.Toggle', text: 'Batch toggle: '},
|
||||
// XXX this does not show the correct value...
|
||||
{title: 'foo', value: 123},
|
||||
{type: 'Toggle', title: 'Batch toggle: '},
|
||||
])
|
||||
|
||||
}, {
|
||||
|
||||
@ -980,6 +980,7 @@ module.Dialogs = core.ImageGridFeatures.Feature({
|
||||
// XXX move this to browse.js/browse2.js???
|
||||
// ...there seems to be no way to make this generic...
|
||||
// XXX think of a better name... (???)
|
||||
// XXX should the client be able to override shorthands???
|
||||
browse.items.makeSubContext = function(name, obj){
|
||||
// arse args...
|
||||
var args = [...arguments].slice(1)
|
||||
@ -998,10 +999,15 @@ browse.items.makeSubContext = function(name, obj){
|
||||
func ?
|
||||
// NOTE: we always call func(..) in the root context...
|
||||
function(){
|
||||
return func.call(that, ...arguments) }
|
||||
// XXX should the client be able to override shorthands???
|
||||
var shorthands = (that.dialog.options || {}).elementShorthand || {}
|
||||
return arguments[0] in shorthands ?
|
||||
that.call(that, ...arguments)
|
||||
: func.call(that, ...arguments) }
|
||||
//return func.call(that, ...arguments) }
|
||||
: this instanceof Function ?
|
||||
function(){
|
||||
return root.call(this, ...arguments) }
|
||||
return that.call(this, ...arguments) }
|
||||
: {}
|
||||
nested.__proto__ = this
|
||||
|
||||
@ -1018,7 +1024,6 @@ browse.items.makeSubContext = function(name, obj){
|
||||
return this[name] }
|
||||
|
||||
|
||||
|
||||
// XXX EXPERIMENT...
|
||||
// XXX Q: should we add an ImageGrid context to make(..)???
|
||||
// ...something like .app for making it generic-ish for example...
|
||||
@ -1051,7 +1056,6 @@ browse.items.makeSubContext('field',
|
||||
], options) })
|
||||
|
||||
|
||||
|
||||
//
|
||||
// .field.Toggle(title, value[, options])
|
||||
// .field.Toggle(title, options)
|
||||
@ -1202,11 +1206,7 @@ function(title, options){
|
||||
: 'off' } }))) }
|
||||
|
||||
|
||||
|
||||
// XXX like .makeEditor(..) but local to make(..) (i.e. generic)...
|
||||
// XXX should we have a batch callback???
|
||||
// ...otherwise what's the point in this?
|
||||
//browse.items.makeEditor =
|
||||
browse.items.batch =
|
||||
function(spec, callback){
|
||||
var that = this
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user