mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
fixes and cleanup....
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0a71d011f5
commit
e8950cebe8
@ -922,8 +922,7 @@ var ExampleUIActions = actions.Actions({
|
|||||||
widgets.makeUIDialog(function(spec, callback){
|
widgets.makeUIDialog(function(spec, callback){
|
||||||
var that = this
|
var that = this
|
||||||
var d0 = {}
|
var d0 = {}
|
||||||
var d1 = {}
|
var b1, b2
|
||||||
var d2 = {}
|
|
||||||
return browse.makeLister(null, function(path, make){
|
return browse.makeLister(null, function(path, make){
|
||||||
|
|
||||||
make([
|
make([
|
||||||
@ -941,22 +940,20 @@ var ExampleUIActions = actions.Actions({
|
|||||||
//make.field.Toggle('Toggle: ', 'on')
|
//make.field.Toggle('Toggle: ', 'on')
|
||||||
make.field.Toggle('Toggle: ', d0)
|
make.field.Toggle('Toggle: ', d0)
|
||||||
|
|
||||||
// XXX test callback...
|
make.batch(b1 = b1 || [
|
||||||
make.batch([
|
|
||||||
'---',
|
'---',
|
||||||
[['X', 'Y']],
|
[['X', 'Y']],
|
||||||
{title: 'foo', value: 123},
|
{title: 'foo', value: 123},
|
||||||
Object.assign(d1,
|
{type: 'field.Toggle', title: 'Batch toggle 1: '},
|
||||||
{type: 'field.Toggle', title: 'Batch toggle 1: '}),
|
|
||||||
])
|
])
|
||||||
// XXX test callback...
|
make.field.batch(b2 = b2 || [
|
||||||
make.field.batch([
|
|
||||||
'---',
|
'---',
|
||||||
['X', 'Y'],
|
['X', 'Y'],
|
||||||
{title: 'foo', value: 123},
|
{type: 'Toggle', title: 'foo', values: ['1','2','3'], list: false},
|
||||||
Object.assign(d2,
|
{type: 'Toggle', title: 'Batch toggle 2: '},
|
||||||
{type: 'Toggle', title: 'Batch toggle 2: '}),
|
], function(){
|
||||||
])
|
console.log('---', ...arguments)
|
||||||
|
})
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
cls: 'table-view',
|
cls: 'table-view',
|
||||||
|
|||||||
@ -1045,6 +1045,7 @@ browse.items.makeSubContext = function(name, obj){
|
|||||||
// ...this can be problematic as the wrapper is external to the browser...
|
// ...this can be problematic as the wrapper is external to the browser...
|
||||||
// - as a sub-path...
|
// - as a sub-path...
|
||||||
// ...this is hard without side-effects...
|
// ...this is hard without side-effects...
|
||||||
|
// XXX need to make this handle updates correctly...
|
||||||
browse.items.makeSubContext('field',
|
browse.items.makeSubContext('field',
|
||||||
function(title, value, options){
|
function(title, value, options){
|
||||||
// parse arguments...
|
// parse arguments...
|
||||||
@ -1086,6 +1087,7 @@ browse.items.makeSubContext('field',
|
|||||||
// - a way to define defaults -- global options?
|
// - a way to define defaults -- global options?
|
||||||
// - access to the .app -- should be configurable...
|
// - access to the .app -- should be configurable...
|
||||||
// - default methods .showEditableList(..) / .showList(..) on make(..)
|
// - default methods .showEditableList(..) / .showList(..) on make(..)
|
||||||
|
// XXX need to make this handle updates correctly...
|
||||||
browse.items.field.Toggle =
|
browse.items.field.Toggle =
|
||||||
function(title, options){
|
function(title, options){
|
||||||
var that = this
|
var that = this
|
||||||
@ -1102,8 +1104,6 @@ function(title, options){
|
|||||||
Object.assign(
|
Object.assign(
|
||||||
options,
|
options,
|
||||||
{
|
{
|
||||||
type: 'toggle',
|
|
||||||
|
|
||||||
open: function(evt){
|
open: function(evt){
|
||||||
// XXX CONTEXT...
|
// XXX CONTEXT...
|
||||||
var actions = options.app || that.app
|
var actions = options.app || that.app
|
||||||
@ -1221,6 +1221,7 @@ function(title, options){
|
|||||||
|
|
||||||
|
|
||||||
// XXX should this also take batch options???
|
// XXX should this also take batch options???
|
||||||
|
// XXX need to make this handle updates correctly...
|
||||||
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