mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
abb20706ae
commit
509924db53
@ -1100,19 +1100,21 @@ function(title, options){
|
||||
: args.shift()
|
||||
options = args.shift() || {}
|
||||
|
||||
return this.field(title, value,
|
||||
Object.assign(
|
||||
options,
|
||||
{
|
||||
// user open handler...
|
||||
var open = options.open
|
||||
// toggler default settings...
|
||||
var toggler_defaults = options.__toggle_setup ?
|
||||
{}
|
||||
: {
|
||||
__toggler_setup: true,
|
||||
|
||||
// XXX do we need a .type ???
|
||||
//type: options.type || 'toggle',
|
||||
|
||||
// XXX need to:
|
||||
// - call options.open if it exists...
|
||||
// - do not define this if we already did...
|
||||
// ...currently this is added to handlers on
|
||||
// every .dialog.update(..)...
|
||||
open: function(evt){
|
||||
open
|
||||
&& open.call(this, ...arguments)
|
||||
|
||||
// XXX CONTEXT...
|
||||
var actions = options.app || that.app
|
||||
|
||||
@ -1204,8 +1206,12 @@ function(title, options){
|
||||
} else {
|
||||
// XXX should we be able to toggle values back???
|
||||
set(values[(values.indexOf(current) + 1) % values.length]) }
|
||||
},
|
||||
},
|
||||
} }
|
||||
|
||||
return this.field(title, value,
|
||||
Object.assign(
|
||||
options,
|
||||
toggler_defaults,
|
||||
options
|
||||
// normalize value...
|
||||
.run(function(){
|
||||
@ -1271,8 +1277,7 @@ function(spec, callback){
|
||||
// the user to get it via closure...
|
||||
spec,
|
||||
// XXX is this the right spot for this???
|
||||
mode)
|
||||
})
|
||||
mode) })
|
||||
return this }
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user