mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
tweaks and fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0ead526ea9
commit
0ffcda0e4e
@ -921,6 +921,7 @@ var ExampleUIActions = actions.Actions({
|
||||
exampleEditor2: ['Test/Universal Editor (2)...',
|
||||
widgets.makeUIDialog(function(spec, callback){
|
||||
var that = this
|
||||
var data = {}
|
||||
return browse.makeLister(null, function(path, make){
|
||||
|
||||
make([
|
||||
@ -934,11 +935,9 @@ var ExampleUIActions = actions.Actions({
|
||||
return that.features.features.length })
|
||||
|
||||
make.field('A', 'B')
|
||||
//make.field.field('C', 'D')
|
||||
//make.field.field.field('E', 'F')
|
||||
make.field.field.field.field('G', 'H')
|
||||
|
||||
make.field.Toggle('Toggle', 'on')
|
||||
//make.field.Toggle('Toggle: ', 'on')
|
||||
make.field.Toggle('Toggle: ', data)
|
||||
|
||||
}, {
|
||||
cls: 'table-view',
|
||||
|
||||
@ -658,8 +658,7 @@ var DialogsActions = actions.Actions({
|
||||
.last()
|
||||
return modal.data('widget-controller')
|
||||
|| (modal.length > 0 && modal)
|
||||
|| null
|
||||
},
|
||||
|| null },
|
||||
|
||||
// testers...
|
||||
//
|
||||
@ -1059,13 +1058,28 @@ browse.items.makeSubContext('field',
|
||||
|
||||
|
||||
|
||||
//
|
||||
// .field.Toggle(title, value)
|
||||
// .field.Toggle(title, options)
|
||||
// .field.Toggle(title, value, options)
|
||||
//
|
||||
// XXX need to open a list dialog (currently context is used)...
|
||||
// ...this can be set via options.list but would be nice to provide
|
||||
// a reasonable default...
|
||||
// ...one way to resole context access is to add a .app attribute to
|
||||
// the dialog...
|
||||
browse.items.field.Toggle =
|
||||
function(title, value, options){
|
||||
function(title, options){
|
||||
var that = this
|
||||
options = options || {}
|
||||
// parse args...
|
||||
var args = [...arguments].slice(1)
|
||||
var value = args[0] instanceof Object ?
|
||||
(args[0].value
|
||||
|| (args[0].values || [])[0]
|
||||
|| 'off')
|
||||
: args.shift()
|
||||
options = args.shift() || {}
|
||||
|
||||
return this.field(title, value,
|
||||
Object.assign(
|
||||
options,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user