Introduced album.isSmartID.

pull/581/head
Nils Asmussen 8 years ago
parent 475ae5748b
commit 6d4df5f6b7

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

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

@ -199,7 +199,7 @@ multiselect.getSelection = function(e) {
let id = $(this).data('id') 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) ids.push(id)
$(this).addClass('active') $(this).addClass('active')

Loading…
Cancel
Save