mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +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...
|
// Buttons...
|
||||||
var buttons = Items.buttons = {}
|
var buttons = Items.buttons = {}
|
||||||
|
|
||||||
|
// XXX make this combinable by user...
|
||||||
buttons.ToggleDisabled = [
|
var Checkbox =
|
||||||
function(item){
|
buttons.Checkbox =
|
||||||
return item.disabled ?
|
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',
|
'toggleDisabled: item',
|
||||||
true]
|
true]
|
||||||
|
|
||||||
buttons.ToggleHidden = [
|
buttons.ToggleHidden = [
|
||||||
function(item){
|
Checkbox('hidden'),
|
||||||
return item.hidden ?
|
|
||||||
'☐'
|
|
||||||
: '☑' },
|
|
||||||
'toggleHidden: item']
|
'toggleHidden: item']
|
||||||
|
|
||||||
buttons.ToggleSelected = [
|
buttons.ToggleSelected = [
|
||||||
function(item){
|
Checkbox('selected'),
|
||||||
return item.selected ?
|
|
||||||
'☐'
|
|
||||||
: '☑' },
|
|
||||||
'toggleSelect: item']
|
'toggleSelect: item']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// wrappers...
|
// wrappers...
|
||||||
|
|
||||||
@ -197,12 +206,12 @@ Items.Item = function(value, options){ return this(...arguments) }
|
|||||||
|
|
||||||
Items.Separator = function(){ return this('---') }
|
Items.Separator = function(){ return this('---') }
|
||||||
Items.Spinner = function(){ return this('...') }
|
Items.Spinner = function(){ return this('...') }
|
||||||
Items.Action = function(value, options){}
|
|
||||||
Items.Heading = function(value, options){}
|
Items.Heading = function(value, options){}
|
||||||
Items.Empty = function(value){}
|
Items.Empty = function(value){}
|
||||||
Items.Selected = function(value){}
|
Items.Selected = function(value){}
|
||||||
Items.Editable = function(value){}
|
Items.Action = function(value, options){}
|
||||||
Items.ConfirmAction = function(value){}
|
Items.ConfirmAction = function(value){}
|
||||||
|
Items.Editable = function(value){}
|
||||||
|
|
||||||
// lists...
|
// lists...
|
||||||
Items.List = function(values){}
|
Items.List = function(values){}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user