From e64e8ae621ce6c5a37231ff9be21c24f4d65f13d Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Mon, 22 Aug 2016 14:53:34 +0200 Subject: [PATCH] Removed select all Makes no sense anymore as albums can contain albums and photos and you can only select one type => Error when using select all --- docs/Keyboard Shortcuts.md | 8 ++++---- src/scripts/init.js | 4 ---- src/scripts/multiselect.js | 37 ------------------------------------- 3 files changed, 4 insertions(+), 45 deletions(-) diff --git a/docs/Keyboard Shortcuts.md b/docs/Keyboard Shortcuts.md index 6e7a4a9..62272ac 100644 --- a/docs/Keyboard Shortcuts.md +++ b/docs/Keyboard Shortcuts.md @@ -14,8 +14,8 @@ The following keys and shortcuts can be used in Lychee. | Key | Action | |:-----------|:------------| | `s` or `f` | Search | -| `cmd`+`a` | Select all albums | -| `ctrl`+`a` | Select all albums | +| `shift`+`left-click` | Select album individually | +| `right-click` | Open context-menu | ### Album | Key | Action | @@ -25,8 +25,8 @@ The following keys and shortcuts can be used in Lychee. | `i` | Show information | | `cmd`+`backspace` | Delete album | | `ctrl`+`backspace` | Delete album | -| `cmd`+`a` | Select all photos | -| `ctrl`+`a` | Select all photos | +| `shift`+`left-click` | Select album/photo individually | +| `right-click` | Open context-menu | ### Photo | Key | Action | diff --git a/src/scripts/init.js b/src/scripts/init.js index 54912a3..231b782 100755 --- a/src/scripts/init.js +++ b/src/scripts/init.js @@ -55,10 +55,6 @@ $(document).ready(function() { if (visible.photo() && basicModal.visible()===false) { photo.delete([photo.getID()]); return false } else if (visible.album() && basicModal.visible()===false) { album.delete([album.getID()]); return false } }) - .bind([ 'command+a', 'ctrl+a' ], function() { - if (visible.album() && basicModal.visible()===false) { multiselect.selectAll(); return false } - else if (visible.albums() && basicModal.visible()===false) { multiselect.selectAll(); return false } - }) Mousetrap.bindGlobal('enter', function() { if (basicModal.visible()===true) basicModal.action() diff --git a/src/scripts/multiselect.js b/src/scripts/multiselect.js index 3f94d4d..390e2be 100644 --- a/src/scripts/multiselect.js +++ b/src/scripts/multiselect.js @@ -120,43 +120,6 @@ multiselect.show = function(e) { } -multiselect.selectAll = function() { - - if (lychee.publicMode) return false - if (visible.search()) return false - if (!visible.albums() && !visible.album) return false - if (visible.multiselect()) $('#multiselect').remove() - - sidebar.setSelectable(false) - - multiselect.position.top = 70 - multiselect.position.right = 40 - multiselect.position.bottom = 90 - multiselect.position.left = 20 - - $('body').append(build.multiselect(multiselect.position.top, multiselect.position.left)) - - let documentSize = { - width : $(document).width(), - height : $(document).height() - } - - let newSize = { - width : documentSize.width - multiselect.position.right + 2, - height : documentSize.height - multiselect.position.bottom - } - - let e = { - pageX : documentSize.width - (multiselect.position.right / 2), - pageY : documentSize.height - multiselect.position.bottom - } - - $('#multiselect').css(newSize) - - multiselect.getSelection(e) - -} - multiselect.resize = function(e) { if (multiselect.position.top === null ||