mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
92bf8df8f8
commit
f44a90c7c8
@ -67,9 +67,12 @@ var SlideshowActions = actions.Actions({
|
|||||||
return Date.str2ms(a) - Date.str2ms(b) },
|
return Date.str2ms(a) - Date.str2ms(b) },
|
||||||
// NOTE: this is called when adding a new value and
|
// NOTE: this is called when adding a new value and
|
||||||
// list maximum length is reached...
|
// list maximum length is reached...
|
||||||
callback: function(value){
|
overflow: function(value){
|
||||||
|
that.config['slideshow-interval'] = value
|
||||||
|
o.parent.close()
|
||||||
|
},
|
||||||
|
itemopen: function(value){
|
||||||
that.config['slideshow-interval'] = value
|
that.config['slideshow-interval'] = value
|
||||||
|
|
||||||
o.parent.close()
|
o.parent.close()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@ -214,6 +214,12 @@ function(list, options){
|
|||||||
//
|
//
|
||||||
// length_limit: <number>,
|
// length_limit: <number>,
|
||||||
//
|
//
|
||||||
|
// // called when an item is opend...
|
||||||
|
// //
|
||||||
|
// // NOTE: this is simpler that binding to the global open event
|
||||||
|
// // and filtering through the results...
|
||||||
|
// itemopen: function(value){ ... },
|
||||||
|
//
|
||||||
// // check input value...
|
// // check input value...
|
||||||
// check: function(value){ ... },
|
// check: function(value){ ... },
|
||||||
//
|
//
|
||||||
@ -249,13 +255,15 @@ function(list, options){
|
|||||||
|
|
||||||
var write = function(list, lst){
|
var write = function(list, lst){
|
||||||
// write back the list...
|
// write back the list...
|
||||||
return list instanceof Function ?
|
return (list instanceof Function ?
|
||||||
// call the writer...
|
// call the writer...
|
||||||
list(lst)
|
list(lst)
|
||||||
// in-place replace list elements...
|
// in-place replace list elements...
|
||||||
// NOTE: this is necessary as not everything we do with lst
|
// NOTE: this is necessary as not everything we do with lst
|
||||||
// is in-place...
|
// is in-place...
|
||||||
: list.splice.apply(list, [0, list.length].concat(lst))
|
: list.splice.apply(list, [0, list.length].concat(lst)))
|
||||||
|
// in case the list(..) returns nothing...
|
||||||
|
|| lst
|
||||||
}
|
}
|
||||||
|
|
||||||
var to_remove = []
|
var to_remove = []
|
||||||
@ -274,7 +282,9 @@ function(list, options){
|
|||||||
: list
|
: list
|
||||||
var editable = lst instanceof Array
|
var editable = lst instanceof Array
|
||||||
// view objects...
|
// view objects...
|
||||||
lst = !editable ? Object.keys(lst) : lst
|
// NOTE: we .slice() here to make the changes a bit better packaged
|
||||||
|
// or discrete and not done as they come in...
|
||||||
|
lst = !editable ? Object.keys(lst) : lst.slice()
|
||||||
|
|
||||||
// add the 'x' button if not disabled...
|
// add the 'x' button if not disabled...
|
||||||
var buttons = options.buttons = (options.buttons || []).slice()
|
var buttons = options.buttons = (options.buttons || []).slice()
|
||||||
@ -283,7 +293,12 @@ function(list, options){
|
|||||||
|
|
||||||
|
|
||||||
// make the list...
|
// make the list...
|
||||||
var res = make.List(lst, options).toArray()
|
var res = make.List(lst, options)
|
||||||
|
|
||||||
|
options.itemopen
|
||||||
|
&& res.on('open', function(){ options.itemopen(dialog.selected) })
|
||||||
|
|
||||||
|
res = res.toArray()
|
||||||
|
|
||||||
// new button...
|
// new button...
|
||||||
var new_button = options.new_button || true
|
var new_button = options.new_button || true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user