mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
added auto-grouping...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fd4b663c1e
commit
277f5c25e5
@ -778,11 +778,17 @@ function(list, options){
|
||||
buttons = options.buttons =
|
||||
buttons
|
||||
.map(function(button){
|
||||
return button in __buttons ?
|
||||
var res = button in __buttons ?
|
||||
__buttons[button]
|
||||
: button[1] in __buttons ?
|
||||
[button[0], __buttons[button[1]][1]]
|
||||
: button.slice() })
|
||||
: button.slice()
|
||||
// group if at least one sort button is present...
|
||||
if(res !== button){
|
||||
options.groupList = true
|
||||
}
|
||||
return res
|
||||
})
|
||||
// clear out the unused button placeholders...
|
||||
.filter(function(b){
|
||||
return ['UP', 'DOWN', 'TO_TOP', 'TO_BOTTOM', 'REMOVE'].indexOf(b) < 0 })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user