some refactoring and cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-12-24 07:14:57 +03:00
parent 2557947a15
commit a0f08b9531

View File

@ -735,7 +735,7 @@ var CollectionActions = actions.Actions({
.collectionToTop(gid) .collectionToTop(gid)
-> this -> this
`, `,
{browseMode: function(){ return !this.collection && 'disabled' }}, {browseMode: 'uncollect'},
function(collection){ function(collection){
collection = collection || this.collection collection = collection || this.collection
collection = this.collectionGIDs[collection] || collection collection = this.collectionGIDs[collection] || collection
@ -775,7 +775,7 @@ var CollectionActions = actions.Actions({
// aliases... // aliases...
// //
loadMainCollection: ['Collections/Exit collection view', loadMainCollection: ['Collections/Exit collection view',
{browseMode: function(){ return !this.collection && 'disabled' }}, {browseMode: 'uncollect'},
`loadCollection: "${MAIN_COLLECTION_TITLE}"`], `loadCollection: "${MAIN_COLLECTION_TITLE}"`],
@ -1033,7 +1033,7 @@ var CollectionActions = actions.Actions({
i.e. each gid given will be resolved to a ribbon which will be i.e. each gid given will be resolved to a ribbon which will be
removed. removed.
`, `,
{browseMode: function(){ return !this.collection && 'disabled' }}, {browseMode: 'uncollect'},
function(gids, collection){ function(gids, collection){
var that = this var that = this
gids = gids || 'current' gids = gids || 'current'
@ -2595,12 +2595,8 @@ var UICollectionActions = actions.Actions({
} }
this.collect(gids || 'current', title) }, 2)], this.collect(gids || 'current', title) }, 2)],
collectRibbon: ['Collections|Ribbon/Add $ribbon to collection...', collectRibbon: ['Collections|Ribbon/Add $ribbon to collection...',
// NOTE: this is not an alias as we need it to be marked as a dialog...
//widgets.uiDialog(function(){ return this.collect('ribbon') })],
'collect: "ribbon"'], 'collect: "ribbon"'],
collectLoaded: ['Collections/$Add loaded images to collection...', collectLoaded: ['Collections/$Add loaded images to collection...',
// NOTE: this is not an alias as we need it to be marked as a dialog...
//widgets.uiDialog(function(){ return this.collect('loaded') })],
'collect: "loaded"'], 'collect: "loaded"'],
joinCollect: [ joinCollect: [
collectionGetterWrapper(function(title){ this.joinCollect(title) })], collectionGetterWrapper(function(title){ this.joinCollect(title) })],