Commit Graph

445 Commits

Author SHA1 Message Date
Tobias Reich
d2c7cab3e3 Prevent smart albums to be part of a selection #603
This bug has been introduced by #603
2016-08-28 12:51:24 +02:00
Tobias Reich
ff5637a7da Use cmd on macOS and ctrl on Windows to trigger multi select of individual items
Using https://api.jquery.com/event.metakey/
2016-08-28 12:29:21 +02:00
Tobias Reich
4b08f7e6f0 Trim whitespace on save 2016-08-28 12:21:34 +02:00
Nils Asmussen
774fda3a7c Don't show context menu on finished multiselect.
Previously, we showed the context menu if a multiselect was finished
right away. Since we can select items individually now, it makes more
sense to just select the items as well and show the context menu later
via right mouse button or similar.

A multiselect can only add items to the selection, because that seems to
be easier to use. As before, shift+click can be used to deselect items.

The selection is cleared if the multiselect rectangle is empty and shift
is not pressed. This allows the user to click somewhere on the free area
to clear the selection again. If the shift key is pressed, it is not
cleared to prevent that a user triggers that by accident if he misses a
photo/album.
2016-08-22 22:18:19 +02:00
Tobias Reich
e64e8ae621 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
2016-08-22 14:53:34 +02:00
Tobias Reich
9d5e9a4137 Code style adjustment 2016-08-22 14:20:24 +02:00
Tobias Reich
5c18fbeed8 Use shiftkey for multiselect
The only key that works on every OS (hopefully)
2016-08-22 14:19:20 +02:00
Tobias Reich
4c58ae0733 Code style adjustment 2016-08-22 14:17:35 +02:00
Tobias Reich
993738af49 Merge branch 'multiselect' of https://github.com/hrniels/Lychee into hrniels-multiselect 2016-08-22 14:10:18 +02:00
Tobias Reich
7ba384e70a Updated to minor version 2016-08-22 14:08:03 +02:00
Tobias Reich
9548f43b06 Use new album.isSmartID to check if it's a smart album 2016-08-22 14:06:54 +02:00
Tobias Reich
5bbac75481 Merge branch 'develop' into feature/subalbums 2016-08-22 14:01:10 +02:00
Tobias Reich
8a267c05c5 Hide sidebar when navigating to smart album 2016-08-22 13:45:48 +02:00
Tobias Reich
a0c33bb4a0 Updated version 2016-08-22 13:16:49 +02:00
Tobias Reich
c527534ee5 Prefetch big when medium not available 2016-08-22 12:54:12 +02:00
Nils Asmussen
7ebe2a1aa0 Clear selected items when multiselect starts. 2016-08-15 22:03:03 +02:00
Nils Asmussen
ea073b4324 Use outline for selected items, not border. 2016-08-15 22:02:03 +02:00
Tobias Reich
55ae8a4be2 Merge pull request #591 from hrniels/subalbums
Some cleanup, fixes and a new feature for subalbums.
2016-08-15 14:45:41 +02:00
Nils Asmussen
0746acda79 Allow to select photos/albums individually (fixes #339).
This commit adds support for selecting photos and albums individually
via ctrl+click. For that, the event handlers in init.js call to
multiselect now, which collects the photo/album ids and calls the
appropriate method of contextMenu in the end.
2016-08-14 20:15:20 +02:00
Nils Asmussen
3040ab1d62 Improved display of root album in move operation.
Root is now shown as the parent of all albums with parent=0.
2016-08-13 16:50:05 +02:00
Nils Asmussen
5ee34c50a4 Properly redirect after album {delete,move,merge}.
That is, we don't redirect to the albums view, but to the current album
or the parent album if the current one has been deleted.
2016-08-13 16:03:37 +02:00
Nils Asmussen
7126354d7a Hide "Photos" divider if photos are deleted.
If we have deleted all photos from an album, we need to remove the
divider between albums and photos.
2016-08-13 16:01:41 +02:00
Tobias Reich
d458feb55d Updated deps 2016-08-09 09:53:24 +02:00
Tobias Reich
0188cbba38 Merge branch 'hrniels-fullscreen' into develop 2016-08-09 09:42:34 +02:00
Nils Asmussen
58d3ad727d Hide download button only w/o photos and subalbums.
Previously, an album with subalbums, but without photos, was hiding
the download button.
2016-08-07 14:47:45 +02:00
Nils Asmussen
8181bd6ce6 Removed duplicated timeout for header.
Because of that, the timeout for going into fullscreen mode
has been changed from 500ms to 1s.
2016-08-06 15:19:55 +02:00
Nils Asmussen
20c194f00c Always show merge&move operations in context menu.
Previously, we calculated whether there are at least two albums so that
we can actually perform the operation. Due to subalbums this simple
check is not sufficient anymore. Since the rules are more complicated
and we don't have all albums loaded at that point to calculate it
properly, this commit removes the check entirely and always displays
the operations.

The only disadvantage is that if an installation really has just one
album (should rarely happen), the user still sees the merge operation
(not merge all), which results in an album-list with one disabled album.
I think this is okay.
2016-08-04 07:35:49 +02:00
Nils Asmussen
b91759e6c1 Added a move album operation.
Since albums can have subalbums now, it makes sense to not only merge
albums, but also move them.
2016-08-03 23:04:47 +02:00
Nils Asmussen
adaa23d39f Syntax adjustments in album.js. 2016-08-03 21:59:02 +02:00
Nils Asmussen
96bd6b240b Better highlighting of selected items.
Especially for albums, it is difficult to which ones are
chosen for an operation, because in contrast to photos, the
only change is the thin blue border.

This commit adds a new CSS class, that is set when items
have been selected. Currently, it sets a 2px border instead
of 1px.
2016-08-01 15:33:21 +02:00
Nils Asmussen
e41b0f81bd Improved fullscreen enter/leave in photo view.
Previously, document.mouse{enter,leave} was used for that. This
has the disadvantage that is doesn't work when the browser is
in fullscreen mode (at least, in Chromium), because the mouse
can no longer leave the document.

With this commit, mousemove is used to switch to fullscreen
in the photo view after the user has not moved the mouse for
some time. It is left again, if the user moves the mouse.
2016-08-01 14:20:21 +02:00
Tobias Reich
61a62421f4 Check if album.json exists
album.json is null when in the overview. album.getParent() was unusable in this case.
2016-07-31 16:17:41 +02:00
Tobias Reich
066fc90056 Syntax adjustment for contextMenu.js 2016-07-31 16:12:14 +02:00
Tobias Reich
2b698ca024 Removed disabled context menu item class
Removed unsed disabled class from context menu now where we are using the disabled option of basicContext
2016-07-31 16:11:59 +02:00
Tobias Reich
2da195f925 Use disabled functionality of basicContext 2016-07-31 16:03:08 +02:00
Tobias Reich
0c7d95fb15 Syntax adjustments 2016-07-31 15:53:34 +02:00
Tobias Reich
1020b0d1dc Merge branch 'subalbums' of https://github.com/hrniels/Lychee into feature/subalbums 2016-07-31 15:26:34 +02:00
Nils Asmussen
8b37d122b9 Fixed bug in countSubAlbums. 2016-07-30 15:11:49 +02:00
Nils Asmussen
f7e31c2be7 Fixed bug in album.setTitle. 2016-07-30 15:04:03 +02:00
Nils Asmussen
ffef7e3d8f Fixed bug in multiselect, introduced by 6d4df5f. 2016-07-30 14:51:24 +02:00
Nils Asmussen
daf7d37c84 Prevent album merge errors on client-side.
Previously, we allowed that and reported an error in this case. Now,
the user can no longer select a parent album for merging it into a
subalbum. It is still checked on the server, though.
2016-07-30 12:04:07 +02:00
Nils Asmussen
cdd130b243 Let the user know that deleting an album deletes subalbums, too. 2016-07-30 11:20:30 +02:00
Nils Asmussen
d121e2c4f6 Go to parent album on ESC. 2016-07-30 00:00:54 +02:00
Nils Asmussen
55247e4f56 Load album view just once. 2016-07-29 23:56:45 +02:00
Nils Asmussen
ef9040870a Added basic subalbum support.
That is, albums can now contain other albums, which are shown at
the top of the album view. This required some changes to album.js
and the contextMenu.js, because this view contains now both
photos and albums.

The contextMenu on this view has been kept simple by requiring
the user to select either only albums or only photos, but not
a mixture of both.

This feature required a database change, so that the version
has been updated to 3.1.3.

At the moment, album and photo operations (make public, download,
delete, merge) are still "flat", i.e. don't respect the album
hierarchy.
2016-07-29 22:36:41 +02:00
Nils Asmussen
6d4df5f6b7 Introduced album.isSmartID. 2016-07-29 22:36:41 +02:00
Tobias Reich
1b8dd24fe1 Prefetch the medium photo instead of the big one #446 2016-07-02 14:53:25 +02:00
Tobias Reich
06a7374098 Updated deps 2016-06-25 12:30:14 +02:00
Tobias Reich
5b6b64bce3 Updated version 2016-05-02 19:51:06 +02:00
Tobias Reich
4dd2155326 Updated version to 3.1.1 2016-04-30 15:32:41 +02:00