Introduced album.isSmartID.

This commit is contained in:
Nils Asmussen 2016-07-28 12:54:03 +02:00
parent 475ae5748b
commit 6d4df5f6b7
3 changed files with 9 additions and 3 deletions

View File

@ -9,12 +9,18 @@ album = {
}
album.isSmartID = function(id) {
return id==='0' || id==='f' || id==='s' || id==='r'
}
album.getID = function() {
let id = null
let isID = (id) => {
if (id==='0' || id==='f' || id==='s' || id==='r') return true
if (album.isSmartID(id)) return true
return $.isNumeric(id)
}

View File

@ -47,7 +47,7 @@ contextMenu.album = function(albumID, e) {
// fn must call basicContext.close() first,
// in order to keep the selection
if (albumID==='0' || albumID==='f' || albumID==='s' || albumID==='r') return false
if (album.isSmartID(albumID)) return false
// Show merge-item when there's more than one album
let showMerge = (albums.json && albums.json.albums && Object.keys(albums.json.albums).length>1)

View File

@ -199,7 +199,7 @@ multiselect.getSelection = function(e) {
let id = $(this).data('id')
if (id!=='0' && id!==0 && id!=='f' && id!=='s' && id!=='r' && id!=null) {
if (!album.isSmartID(id) && id!=null) {
ids.push(id)
$(this).addClass('active')