mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
notes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
584f8dee65
commit
e278fa737c
@ -164,31 +164,40 @@ Items.nest = function(item, list, options){
|
||||
// Buttons...
|
||||
var buttons = Items.buttons = {}
|
||||
|
||||
|
||||
buttons.ToggleDisabled = [
|
||||
function(item){
|
||||
return item.disabled ?
|
||||
// XXX make this combinable by user...
|
||||
var Checkbox =
|
||||
buttons.Checkbox =
|
||||
function(attr){
|
||||
return function(item){
|
||||
return item[attr] ?
|
||||
'☐'
|
||||
: '☑' },
|
||||
: '☑' } }
|
||||
|
||||
|
||||
// XXX can we make these:
|
||||
// - different -- not use the same icon...
|
||||
// - configurable / combinable...
|
||||
// something like:
|
||||
// toggleDisabled: checkbox -- need checkbox to know the state...
|
||||
// toggleHidden: "×"
|
||||
// ...
|
||||
// XXX button combination/chaining would require:
|
||||
// - protocol to pass data from button to button
|
||||
// - protocol to fill data gradually...
|
||||
buttons.ToggleDisabled = [
|
||||
Checkbox('disabled'),
|
||||
'toggleDisabled: item',
|
||||
true]
|
||||
|
||||
buttons.ToggleHidden = [
|
||||
function(item){
|
||||
return item.hidden ?
|
||||
'☐'
|
||||
: '☑' },
|
||||
Checkbox('hidden'),
|
||||
'toggleHidden: item']
|
||||
|
||||
buttons.ToggleSelected = [
|
||||
function(item){
|
||||
return item.selected ?
|
||||
'☐'
|
||||
: '☑' },
|
||||
Checkbox('selected'),
|
||||
'toggleSelect: item']
|
||||
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// wrappers...
|
||||
|
||||
@ -197,12 +206,12 @@ Items.Item = function(value, options){ return this(...arguments) }
|
||||
|
||||
Items.Separator = function(){ return this('---') }
|
||||
Items.Spinner = function(){ return this('...') }
|
||||
Items.Action = function(value, options){}
|
||||
Items.Heading = function(value, options){}
|
||||
Items.Empty = function(value){}
|
||||
Items.Selected = function(value){}
|
||||
Items.Editable = function(value){}
|
||||
Items.Action = function(value, options){}
|
||||
Items.ConfirmAction = function(value){}
|
||||
Items.Editable = function(value){}
|
||||
|
||||
// lists...
|
||||
Items.List = function(values){}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user