tweaking and notes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-08-28 05:43:37 +03:00
parent 8f17dff5c7
commit 76cb68a725
3 changed files with 24 additions and 17 deletions

View File

@ -256,7 +256,7 @@
text-decoration: line-through;
opacity: 0.3;
}
.browse-widget .list .item.highlighted {
.browse-widget .list .item.highlighted .text {
font-style: italic;
font-weight: bold;
}

View File

@ -79,7 +79,6 @@ var CollectionActions = actions.Actions({
// }
collections: null,
get collection(){
return this.location.collection },
set collection(value){
@ -399,6 +398,9 @@ var CollectionActions = actions.Actions({
// XXX should we do anything special if collection is loaded???
removeCollection: ['- Collections/',
function(collection){
if(collection == MAIN_COLLECTION_TITLE){
return
}
delete this.collections[collection]
}],
@ -419,6 +421,10 @@ var CollectionActions = actions.Actions({
NOTE: this will not account for item topology.`,
function(gids, collection){
collection = collection || this.collection
if(collection == null || collection == MAIN_COLLECTION_TITLE){
return
}
var that = this
gids = gids == 'loaded' ? this.data.getImages('loaded')
@ -432,12 +438,6 @@ var CollectionActions = actions.Actions({
: [that.data.getImage(gid)] })
.reduce(function(a, b){ return a.concat(b) }, [])
collection = collection || this.collection
if(collection == null){
return
}
// add to collection...
var data = this.data.constructor.fromArray(gids)
@ -468,7 +468,7 @@ var CollectionActions = actions.Actions({
`,
function(align, collection, data){
collection = arguments.length == 1 ? align : collection
if(collection == null){
if(collection == null || collection == MAIN_COLLECTION_TITLE){
return
}
// if only collection is given, reset align to null...
@ -487,6 +487,11 @@ var CollectionActions = actions.Actions({
uncollect: ['Collections|Image/$Uncollect image',
{browseMode: function(){ return !this.collection && 'disabled' }},
function(gids, collection){
collection = collection || this.collection
if(collection == null || collection == MAIN_COLLECTION_TITLE){
return
}
var that = this
gids = gids == 'loaded' ? this.data.getImages('loaded')
@ -500,12 +505,6 @@ var CollectionActions = actions.Actions({
: [that.data.getImage(gid)] })
.reduce(function(a, b){ return a.concat(b) }, [])
collection = collection || this.collection
if(collection == null){
return
}
/*/ NOTE: we are not using .data.updateImagePositions(gids, 'hide')
// here because it will remove the gids from everything
// while we need them removed only from ribbons...
@ -533,6 +532,9 @@ var CollectionActions = actions.Actions({
.removeEmptyRibbons()
}],
// Serialization...
//
// NOTE: this will handle collection title and data only, the rest
// is copied in as-is.
// It is the responsibility of the extending features to transform
@ -651,7 +653,6 @@ var CollectionActions = actions.Actions({
delete this.__collection_order
delete this.location.collection
}],
clone: [function(full){
return function(res){
if(this.collections){
@ -794,6 +795,12 @@ var UICollectionActions = actions.Actions({
check: function(title){
return title.length > 0 },
// remove the 'x' button from main collection...
// XXX is this the correct way to go???
each: function(title){
title == MAIN_COLLECTION_TITLE
&& this.find('.button-container').remove() },
// XXX should this be "on close"???
itemadded: function(title){
action ?

View File

@ -138,7 +138,7 @@ module.GLOBAL_KEYBOARD = {
'Collection': {
pattern: '.collection-mode',
Esc: 'loadCollection: "All"',
Esc: 'loadCollection: "All" -- Load all images',
},
'Range': {