mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
minor tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
098715bbae
commit
adf094cbec
@ -98,6 +98,7 @@ module.SortActions = actions.Actions({
|
|||||||
Expand one specific method...
|
Expand one specific method...
|
||||||
.expandSortMethod(method)
|
.expandSortMethod(method)
|
||||||
-> [method, ..]
|
-> [method, ..]
|
||||||
|
-> null
|
||||||
|
|
||||||
Expand specific methods...
|
Expand specific methods...
|
||||||
.expandSortMethod(method, method, ..)
|
.expandSortMethod(method, method, ..)
|
||||||
@ -146,7 +147,8 @@ module.SortActions = actions.Actions({
|
|||||||
|
|
||||||
// return a single method...
|
// return a single method...
|
||||||
if(!(methods instanceof Array)){
|
if(!(methods instanceof Array)){
|
||||||
return get(methods)
|
// XXX can we return a function from an action???
|
||||||
|
return get(methods) || null
|
||||||
}
|
}
|
||||||
|
|
||||||
// return multiple methods...
|
// return multiple methods...
|
||||||
@ -725,6 +727,7 @@ var SortUIActions = actions.Actions({
|
|||||||
// XXX do a better action calling scheme...
|
// XXX do a better action calling scheme...
|
||||||
showSortMethodDoc: ['- Sort/',
|
showSortMethodDoc: ['- Sort/',
|
||||||
widgets.makeUIDialog(function(method){
|
widgets.makeUIDialog(function(method){
|
||||||
|
var that = this
|
||||||
var data = this.expandSortMethod(method)
|
var data = this.expandSortMethod(method)
|
||||||
|
|
||||||
return $('<div class="help-dialog">')
|
return $('<div class="help-dialog">')
|
||||||
@ -739,7 +742,9 @@ var SortUIActions = actions.Actions({
|
|||||||
'Sort order:\n '
|
'Sort order:\n '
|
||||||
+data
|
+data
|
||||||
.map(function(m){
|
.map(function(m){
|
||||||
return `<a href="javascript:ig.showSortMethodDoc('${m}')">${m}</a>`})
|
return that.expandSortMethod(m) ?
|
||||||
|
`<a href="javascript:ig.showSortMethodDoc('${m}')">${m}</a>`
|
||||||
|
: m })
|
||||||
.join('\n '))))
|
.join('\n '))))
|
||||||
})],
|
})],
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user