mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
some refactoring and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d48f1b5511
commit
cac15fb4ba
@ -2141,7 +2141,7 @@ var UICollectionActions = actions.Actions({
|
||||
new_item: new_message ?
|
||||
new_message
|
||||
: action ?
|
||||
'$New..'
|
||||
'$New...'
|
||||
: '$New from current state...',
|
||||
|
||||
unique: true,
|
||||
@ -2213,15 +2213,20 @@ var UICollectionActions = actions.Actions({
|
||||
}, {
|
||||
cls: 'collection-list',
|
||||
// focus current collection...
|
||||
selected: JSON.stringify(
|
||||
(that.collection || MAIN_COLLECTION_TITLE)
|
||||
// XXX not sure it is good that we have to do this...
|
||||
.replace(/\$/g, '')),
|
||||
selected: (action && that.config['collection-last-used']) ?
|
||||
that.config['collection-last-used']
|
||||
: JSON.stringify(
|
||||
(that.collection || MAIN_COLLECTION_TITLE)
|
||||
// XXX not sure it is good that we have to do this...
|
||||
.replace(/\$/g, '')),
|
||||
})
|
||||
// keyboard...
|
||||
.run(function(){
|
||||
this.keyboard
|
||||
.handler('General', 'F2', 'Menu') })
|
||||
.open(function(_, title){
|
||||
action
|
||||
&& (that.config['collection-last-used'] = title) })
|
||||
.close(function(){
|
||||
that.collection_order = collections
|
||||
|
||||
@ -2310,31 +2315,15 @@ var UICollectionActions = actions.Actions({
|
||||
}) })],
|
||||
addToCollection: ['Collections|Image/Add $image to collection...',
|
||||
widgets.uiDialog(function(gids){
|
||||
var that = this
|
||||
return this.browseCollections(function(title){
|
||||
this.collect(gids || 'current', title) })
|
||||
.run(function(){
|
||||
var title = that.config['collection-last-used']
|
||||
title
|
||||
&& this.select(`"${title}"`) })
|
||||
.open(function(_, title){
|
||||
that.config['collection-last-used'] = title })
|
||||
})],
|
||||
this.collect(gids || 'current', title) }) })],
|
||||
addRibbonToCollection: ['Collections|Ribbon/Add $ribbon to collection...',
|
||||
widgets.uiDialog(function(){ return this.addToCollection('ribbon') })],
|
||||
addLoadedToCollection: ['Collections/$Add loaded images to collection...',
|
||||
widgets.uiDialog(function(){ return this.addToCollection('loaded') })],
|
||||
joinToCollection: ['Collections/$Merge view to collection...',
|
||||
widgets.uiDialog(function(){
|
||||
var that = this
|
||||
return this.browseCollections(function(title){ this.joinCollect(title) })
|
||||
.run(function(){
|
||||
var title = that.config['collection-last-used']
|
||||
title
|
||||
&& this.select(`"${title}"`) })
|
||||
.open(function(_, title){
|
||||
that.config['collection-last-used'] = title })
|
||||
})],
|
||||
return this.browseCollections(function(title){ this.joinCollect(title) }) })],
|
||||
|
||||
// XXX should this be here or in marks???
|
||||
addMarkedToCollection: ['Collections|Mark/Add marked to $collection...',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user