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