mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 19:00: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()
|
: args.shift()
|
||||||
options = args.shift() || {}
|
options = args.shift() || {}
|
||||||
|
|
||||||
return this.field(title, value,
|
// user open handler...
|
||||||
Object.assign(
|
var open = options.open
|
||||||
options,
|
// toggler default settings...
|
||||||
{
|
var toggler_defaults = options.__toggle_setup ?
|
||||||
|
{}
|
||||||
|
: {
|
||||||
|
__toggler_setup: true,
|
||||||
|
|
||||||
// XXX do we need a .type ???
|
// XXX do we need a .type ???
|
||||||
//type: options.type || 'toggle',
|
//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: function(evt){
|
||||||
|
open
|
||||||
|
&& open.call(this, ...arguments)
|
||||||
|
|
||||||
// XXX CONTEXT...
|
// XXX CONTEXT...
|
||||||
var actions = options.app || that.app
|
var actions = options.app || that.app
|
||||||
|
|
||||||
@ -1204,8 +1206,12 @@ function(title, options){
|
|||||||
} else {
|
} else {
|
||||||
// XXX should we be able to toggle values back???
|
// XXX should we be able to toggle values back???
|
||||||
set(values[(values.indexOf(current) + 1) % values.length]) }
|
set(values[(values.indexOf(current) + 1) % values.length]) }
|
||||||
},
|
} }
|
||||||
},
|
|
||||||
|
return this.field(title, value,
|
||||||
|
Object.assign(
|
||||||
|
options,
|
||||||
|
toggler_defaults,
|
||||||
options
|
options
|
||||||
// normalize value...
|
// normalize value...
|
||||||
.run(function(){
|
.run(function(){
|
||||||
@ -1271,8 +1277,7 @@ function(spec, callback){
|
|||||||
// the user to get it via closure...
|
// the user to get it via closure...
|
||||||
spec,
|
spec,
|
||||||
// XXX is this the right spot for this???
|
// XXX is this the right spot for this???
|
||||||
mode)
|
mode) })
|
||||||
})
|
|
||||||
return this }
|
return this }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user