Clear selected items when multiselect starts.
This commit is contained in:
parent
ea073b4324
commit
7ebe2a1aa0
@ -66,14 +66,13 @@ multiselect.albumContextMenu = function(e, albumObj) {
|
||||
|
||||
if ($.inArray(id, multiselect.ids)!=-1) {
|
||||
contextMenu.albumMulti(multiselect.ids, e)
|
||||
multiselect.ids = []
|
||||
}
|
||||
else {
|
||||
multiselect.deselect('.photo.active, .album.active')
|
||||
multiselect.clearSelection()
|
||||
contextMenu.album(album.getID(), e)
|
||||
}
|
||||
|
||||
multiselect.ids = []
|
||||
|
||||
}
|
||||
|
||||
multiselect.photoContextMenu = function(e, photoObj) {
|
||||
@ -82,12 +81,18 @@ multiselect.photoContextMenu = function(e, photoObj) {
|
||||
|
||||
if ($.inArray(id, multiselect.ids)!=-1) {
|
||||
contextMenu.photoMulti(multiselect.ids, e)
|
||||
multiselect.ids = []
|
||||
}
|
||||
else {
|
||||
multiselect.deselect('.photo.active, .album.active')
|
||||
multiselect.clearSelection()
|
||||
contextMenu.photo(photo.getID(), e)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
multiselect.clearSelection = function() {
|
||||
|
||||
multiselect.deselect('.photo.active, .album.active')
|
||||
multiselect.ids = []
|
||||
|
||||
}
|
||||
@ -100,6 +105,8 @@ multiselect.show = function(e) {
|
||||
if (visible.search()) return false
|
||||
if (visible.multiselect()) $('#multiselect').remove()
|
||||
|
||||
multiselect.clearSelection()
|
||||
|
||||
sidebar.setSelectable(false)
|
||||
|
||||
multiselect.position.top = e.pageY
|
||||
@ -304,8 +311,7 @@ multiselect.deselect = function(id) {
|
||||
|
||||
multiselect.close = function() {
|
||||
|
||||
multiselect.deselect('.photo.active, .album.active')
|
||||
multiselect.ids = []
|
||||
multiselect.clearSelection()
|
||||
|
||||
sidebar.setSelectable(true)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user