mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
more tweaking + some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
70aa79d80b
commit
754094e6b3
@ -1629,7 +1629,7 @@ module.CropActions = actions.Actions({
|
|||||||
// XXX
|
// XXX
|
||||||
}],
|
}],
|
||||||
|
|
||||||
// XXX save a crop (catalog)...
|
// XXX save a crop (catalog)..
|
||||||
// XXX
|
// XXX
|
||||||
|
|
||||||
// XXX not sure if we actually need this...
|
// XXX not sure if we actually need this...
|
||||||
@ -1637,7 +1637,7 @@ module.CropActions = actions.Actions({
|
|||||||
{browseMode: function(){
|
{browseMode: function(){
|
||||||
return this.data.ribbon_order.length <= 1 && 'disabled' }},
|
return this.data.ribbon_order.length <= 1 && 'disabled' }},
|
||||||
function(list){ this.data.length > 0 && this.crop(list, true) }],
|
function(list){ this.data.length > 0 && this.crop(list, true) }],
|
||||||
cropRibbon: ['Crop/Crop $ribbon',
|
cropRibbon: ['Crop|Ribbon/Crop $ribbon',
|
||||||
function(ribbon, flatten){
|
function(ribbon, flatten){
|
||||||
if(this.data.length == 0){
|
if(this.data.length == 0){
|
||||||
return
|
return
|
||||||
@ -1649,7 +1649,7 @@ module.CropActions = actions.Actions({
|
|||||||
ribbon = ribbon || 'current'
|
ribbon = ribbon || 'current'
|
||||||
this.crop(this.data.getImages(ribbon), flatten)
|
this.crop(this.data.getImages(ribbon), flatten)
|
||||||
}],
|
}],
|
||||||
cropOutRibbon: ['Crop/Crop ribbon out',
|
cropOutRibbon: ['Crop|Ribbon/Crop ribbon out',
|
||||||
function(ribbon, flatten){
|
function(ribbon, flatten){
|
||||||
ribbon = ribbon || this.current_ribbon
|
ribbon = ribbon || this.current_ribbon
|
||||||
ribbon = ribbon instanceof Array ? ribbon : [ribbon]
|
ribbon = ribbon instanceof Array ? ribbon : [ribbon]
|
||||||
@ -1743,6 +1743,7 @@ module.CropActions = actions.Actions({
|
|||||||
if(gid in data.ribbons){
|
if(gid in data.ribbons){
|
||||||
delete data.ribbons[gid]
|
delete data.ribbons[gid]
|
||||||
data.ribbon_order.splice(data.ribbon_order.indexOf(gid), 1)
|
data.ribbon_order.splice(data.ribbon_order.indexOf(gid), 1)
|
||||||
|
focus = true
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -1767,7 +1768,22 @@ module.CropActions = actions.Actions({
|
|||||||
&& this.focusImage(
|
&& this.focusImage(
|
||||||
data.getImage(this.direction == 'left' ? 'before' : 'after')
|
data.getImage(this.direction == 'left' ? 'before' : 'after')
|
||||||
|| data.getImage(this.direction == 'left' ? 'after' : 'before'))
|
|| data.getImage(this.direction == 'left' ? 'after' : 'before'))
|
||||||
}]
|
}],
|
||||||
|
removeRibbonFromCrop:['Crop|Ribbon/Remove ribbon from crop',
|
||||||
|
core.doc`
|
||||||
|
|
||||||
|
NOTE: this is a shorthand for .removeFromCrop(..) but only supports
|
||||||
|
ribbon removal.`,
|
||||||
|
{browseMode: 'uncrop'},
|
||||||
|
function(gids){
|
||||||
|
var that = this
|
||||||
|
gids = gids || this.current_ribbon
|
||||||
|
gids = gids == 'current' ? this.current_ribbon : gids
|
||||||
|
gids = gids instanceof Array ?
|
||||||
|
gids.filter(function(gid){ return that.data.ribbons[gid] })
|
||||||
|
: [gids]
|
||||||
|
return this.removeFromCrop(gids)
|
||||||
|
}],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1275,13 +1275,14 @@ module.AutoCollections = core.ImageGridFeatures.Feature({
|
|||||||
var UICollectionActions = actions.Actions({
|
var UICollectionActions = actions.Actions({
|
||||||
config: {
|
config: {
|
||||||
|
|
||||||
// XXX should we add reasonable defaults here???
|
// Global default collections...
|
||||||
'default-collections': null,
|
//
|
||||||
|
// NOTE: delete or set to null for none...
|
||||||
|
//'default-collections': null,
|
||||||
},
|
},
|
||||||
|
|
||||||
editDefaultCollections: ['Interface/Edit default collections...',
|
editDefaultCollections: ['Interface/Edit default collections...',
|
||||||
widgets.makeUIDialog(function(action){
|
widgets.makeUIDialog(function(action){
|
||||||
|
|
||||||
var defaults =
|
var defaults =
|
||||||
this.config['default-collections'] =
|
this.config['default-collections'] =
|
||||||
(this.config['default-collections'] || []).slice()
|
(this.config['default-collections'] || []).slice()
|
||||||
@ -1304,7 +1305,6 @@ var UICollectionActions = actions.Actions({
|
|||||||
})
|
})
|
||||||
})],
|
})],
|
||||||
|
|
||||||
// XXX handle default collections...
|
|
||||||
browseCollections: ['Collections/$Collec$tions...',
|
browseCollections: ['Collections/$Collec$tions...',
|
||||||
core.doc`Collection list...
|
core.doc`Collection list...
|
||||||
|
|
||||||
|
|||||||
@ -1136,9 +1136,11 @@ var BrowseActionsActions = actions.Actions({
|
|||||||
'99:$Edit',
|
'99:$Edit',
|
||||||
'$Navigate',
|
'$Navigate',
|
||||||
'$Image',
|
'$Image',
|
||||||
'Image/-90:---',
|
'Image/-70:---',
|
||||||
'Image/-90:.*remove.*',
|
'Image/-70:.*remove.*',
|
||||||
'$Ribbon',
|
'$Ribbon',
|
||||||
|
'Ribbon/-70:---',
|
||||||
|
'Ribbon/-70:.*remove.*',
|
||||||
'$Crop',
|
'$Crop',
|
||||||
'Crop/80:Crop $marked images',
|
'Crop/80:Crop $marked images',
|
||||||
'Crop/80:Crop $bookmarked images',
|
'Crop/80:Crop $bookmarked images',
|
||||||
@ -1183,7 +1185,7 @@ var BrowseActionsActions = actions.Actions({
|
|||||||
'Crop/-82:$Uncrop',
|
'Crop/-82:$Uncrop',
|
||||||
'Collec$tions',
|
'Collec$tions',
|
||||||
'Collections/-70:---',
|
'Collections/-70:---',
|
||||||
'Collections/-90:.*remove.*',
|
'Collections/-70:.*remove.*',
|
||||||
'$Mark',
|
'$Mark',
|
||||||
//'Mark/-99:.*remove.*',
|
//'Mark/-99:.*remove.*',
|
||||||
'$Bookmark',
|
'$Bookmark',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user