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_item: new_message ?
|
||||||
new_message
|
new_message
|
||||||
: action ?
|
: action ?
|
||||||
'$New..'
|
'$New...'
|
||||||
: '$New from current state...',
|
: '$New from current state...',
|
||||||
|
|
||||||
unique: true,
|
unique: true,
|
||||||
@ -2168,7 +2168,7 @@ var UICollectionActions = actions.Actions({
|
|||||||
|
|
||||||
// element edit...
|
// element edit...
|
||||||
// XXX should this be generic???
|
// XXX should this be generic???
|
||||||
menu: function(_, from){
|
menu: function(_, from){
|
||||||
var elem = $(this).find('.text').last()
|
var elem = $(this).find('.text').last()
|
||||||
from = elem.attr('text') || from
|
from = elem.attr('text') || from
|
||||||
|
|
||||||
@ -2213,15 +2213,20 @@ var UICollectionActions = actions.Actions({
|
|||||||
}, {
|
}, {
|
||||||
cls: 'collection-list',
|
cls: 'collection-list',
|
||||||
// focus current collection...
|
// focus current collection...
|
||||||
selected: JSON.stringify(
|
selected: (action && that.config['collection-last-used']) ?
|
||||||
(that.collection || MAIN_COLLECTION_TITLE)
|
that.config['collection-last-used']
|
||||||
// XXX not sure it is good that we have to do this...
|
: JSON.stringify(
|
||||||
.replace(/\$/g, '')),
|
(that.collection || MAIN_COLLECTION_TITLE)
|
||||||
|
// XXX not sure it is good that we have to do this...
|
||||||
|
.replace(/\$/g, '')),
|
||||||
})
|
})
|
||||||
// keyboard...
|
// keyboard...
|
||||||
.run(function(){
|
.run(function(){
|
||||||
this.keyboard
|
this.keyboard
|
||||||
.handler('General', 'F2', 'Menu') })
|
.handler('General', 'F2', 'Menu') })
|
||||||
|
.open(function(_, title){
|
||||||
|
action
|
||||||
|
&& (that.config['collection-last-used'] = title) })
|
||||||
.close(function(){
|
.close(function(){
|
||||||
that.collection_order = collections
|
that.collection_order = collections
|
||||||
|
|
||||||
@ -2310,31 +2315,15 @@ var UICollectionActions = actions.Actions({
|
|||||||
}) })],
|
}) })],
|
||||||
addToCollection: ['Collections|Image/Add $image to collection...',
|
addToCollection: ['Collections|Image/Add $image to collection...',
|
||||||
widgets.uiDialog(function(gids){
|
widgets.uiDialog(function(gids){
|
||||||
var that = this
|
|
||||||
return this.browseCollections(function(title){
|
return this.browseCollections(function(title){
|
||||||
this.collect(gids || 'current', 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 })
|
|
||||||
})],
|
|
||||||
addRibbonToCollection: ['Collections|Ribbon/Add $ribbon to collection...',
|
addRibbonToCollection: ['Collections|Ribbon/Add $ribbon to collection...',
|
||||||
widgets.uiDialog(function(){ return this.addToCollection('ribbon') })],
|
widgets.uiDialog(function(){ return this.addToCollection('ribbon') })],
|
||||||
addLoadedToCollection: ['Collections/$Add loaded images to collection...',
|
addLoadedToCollection: ['Collections/$Add loaded images to collection...',
|
||||||
widgets.uiDialog(function(){ return this.addToCollection('loaded') })],
|
widgets.uiDialog(function(){ return this.addToCollection('loaded') })],
|
||||||
joinToCollection: ['Collections/$Merge view to collection...',
|
joinToCollection: ['Collections/$Merge view to collection...',
|
||||||
widgets.uiDialog(function(){
|
widgets.uiDialog(function(){
|
||||||
var that = this
|
return this.browseCollections(function(title){ this.joinCollect(title) }) })],
|
||||||
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 })
|
|
||||||
})],
|
|
||||||
|
|
||||||
// XXX should this be here or in marks???
|
// XXX should this be here or in marks???
|
||||||
addMarkedToCollection: ['Collections|Mark/Add marked to $collection...',
|
addMarkedToCollection: ['Collections|Mark/Add marked to $collection...',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user