mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +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...
|
// XXX need more testing...
|
||||||
make.batch([
|
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'],
|
['X', 'Y'],
|
||||||
{text: 'foo', value: 123},
|
// XXX this does not show the correct value...
|
||||||
{type: 'field.Toggle', text: 'Batch toggle: '},
|
{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???
|
// XXX move this to browse.js/browse2.js???
|
||||||
// ...there seems to be no way to make this generic...
|
// ...there seems to be no way to make this generic...
|
||||||
// XXX think of a better name... (???)
|
// XXX think of a better name... (???)
|
||||||
|
// XXX should the client be able to override shorthands???
|
||||||
browse.items.makeSubContext = function(name, obj){
|
browse.items.makeSubContext = function(name, obj){
|
||||||
// arse args...
|
// arse args...
|
||||||
var args = [...arguments].slice(1)
|
var args = [...arguments].slice(1)
|
||||||
@ -998,10 +999,15 @@ browse.items.makeSubContext = function(name, obj){
|
|||||||
func ?
|
func ?
|
||||||
// NOTE: we always call func(..) in the root context...
|
// NOTE: we always call func(..) in the root context...
|
||||||
function(){
|
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 ?
|
: this instanceof Function ?
|
||||||
function(){
|
function(){
|
||||||
return root.call(this, ...arguments) }
|
return that.call(this, ...arguments) }
|
||||||
: {}
|
: {}
|
||||||
nested.__proto__ = this
|
nested.__proto__ = this
|
||||||
|
|
||||||
@ -1018,7 +1024,6 @@ browse.items.makeSubContext = function(name, obj){
|
|||||||
return this[name] }
|
return this[name] }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// XXX EXPERIMENT...
|
// XXX EXPERIMENT...
|
||||||
// XXX Q: should we add an ImageGrid context to make(..)???
|
// XXX Q: should we add an ImageGrid context to make(..)???
|
||||||
// ...something like .app for making it generic-ish for example...
|
// ...something like .app for making it generic-ish for example...
|
||||||
@ -1051,7 +1056,6 @@ browse.items.makeSubContext('field',
|
|||||||
], options) })
|
], options) })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// .field.Toggle(title, value[, options])
|
// .field.Toggle(title, value[, options])
|
||||||
// .field.Toggle(title, options)
|
// .field.Toggle(title, options)
|
||||||
@ -1202,11 +1206,7 @@ function(title, options){
|
|||||||
: 'off' } }))) }
|
: 'off' } }))) }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// XXX like .makeEditor(..) but local to make(..) (i.e. generic)...
|
// 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 =
|
browse.items.batch =
|
||||||
function(spec, callback){
|
function(spec, callback){
|
||||||
var that = this
|
var that = this
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user