mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
minor tweak...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0dec42c2b0
commit
849b4f3a47
@ -1707,7 +1707,7 @@ var WidgetTestActions = actions.Actions({
|
||||
|
||||
// NOTE: passing things other than strings into a list editor
|
||||
// is not supported...
|
||||
var pins = ['a', 'b']
|
||||
var pins = ['b', 'a']
|
||||
var letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
|
||||
|
||||
return browse.makeLister(null, function(path, make){
|
||||
@ -1718,6 +1718,7 @@ var WidgetTestActions = actions.Actions({
|
||||
})
|
||||
make.EditablePinnedList(letters, pins, {
|
||||
list_id: 'letters',
|
||||
//pins_sortable: false,
|
||||
})
|
||||
|
||||
// NOTE: the dialog's .parent is not yet set at this point...
|
||||
|
||||
@ -944,7 +944,7 @@ function(list, pins, options){
|
||||
sortable
|
||||
|| (options.sort instanceof Function ?
|
||||
pins.sort(options.sort)
|
||||
: pins.sortAs(list))
|
||||
: pins.sortAs(dialog.__list[id]))
|
||||
|
||||
// unpin...
|
||||
} else {
|
||||
@ -970,11 +970,14 @@ function(list, pins, options){
|
||||
isItemDisabled: null,
|
||||
}
|
||||
pins_options.__proto__ = options
|
||||
var sortable = pins_options.sortable = options.pins_sortable !== false || true
|
||||
sortable
|
||||
|| (options.sort instanceof Function ?
|
||||
pins.sort(options.sort)
|
||||
: pins.sortAs(list))
|
||||
var sortable = pins_options.sortable =
|
||||
options.pins_sortable === undefined
|
||||
|| options.pins_sortable
|
||||
if(!sortable){
|
||||
pins_options.sort = options.sort instanceof Function ?
|
||||
options.sort
|
||||
: pins.sortAs(dialog.__list[id])
|
||||
}
|
||||
|
||||
//---------------------------------------------- build the list ---
|
||||
var res = this.EditableList(pins, pins_options)
|
||||
@ -982,7 +985,6 @@ function(list, pins, options){
|
||||
.toArray()
|
||||
|
||||
res.length > 0
|
||||
&& list.length > 0
|
||||
&& res.push(this.Separator()[0])
|
||||
|
||||
res.concat(this.EditableList(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user