Commit Graph

60 Commits

Author SHA1 Message Date
Aaron 70e6001c85 Replace event.keyCode with event.key equivalents. 2021-02-16 15:26:57 +01:00
Aaron 4402521051 Highlight matching string in autosuggest entries. 2021-02-15 12:14:24 +01:00
Aaron 889302cd36 Modernise AutoSuggest and TagAutoSuggest classes. 2021-02-15 12:14:23 +01:00
Aaron d069ddca18 Merge pull request 'Make crop editor usable' (#22) from crop-editor into master
Reviewed-on: Public/pics#22
2020-12-30 20:06:15 +01:00
Aaron 5c4a075231 Constrain aspect ratio conservation to image boundaries as well. 2020-12-30 13:26:31 +01:00
Aaron 6ddf518294 Grow image and its container with document height. 2020-12-30 13:26:31 +01:00
Aaron 66a411973a Constrain crop proportions by default, with checkbox to disable. 2020-12-30 13:26:31 +01:00
Aaron a83b938f8a Reposition crop boundary when window resizes. 2020-12-30 13:26:31 +01:00
Aaron 5344378333 Crop editor: interpret 'cs' as centre-sliced crop.
At some point, I started using 'cs' instead of 'cc'. Let's just support both.
2020-12-30 13:26:31 +01:00
Aaron 8147e2b97d Crop editor: do not allow selections starting outside image bounds. 2020-12-30 13:26:31 +01:00
Aaron d562c70667 Improve styling of form elements. 2020-12-30 13:06:44 +01:00
Aaron 5599ff8d9b Crop editor: use numeric input boxes with appropriate constraints. 2020-12-30 13:05:23 +01:00
Aaron 93884e2e93 Fix initial slicing dimensions in CropEditor.setDefaultCrop.
Subtle bug. This has been in for years... :)
2020-12-30 13:05:22 +01:00
Aaron 2a740d8cef Constrain boundary movement to image canvas. 2020-12-30 13:05:22 +01:00
Aaron 5e0d4df2f7 Allow moving/dragging the crop boundary.
Currently unconstrained.
2020-12-30 13:05:22 +01:00
Aaron e84c4f2b43 Constrain crop selection to image dimensions. 2020-12-30 13:05:22 +01:00
Aaron 893d31af52 Proper dragging of the crop bounding rectangle/area. 2020-12-30 13:05:22 +01:00
Aaron 5895f4faa6 Rewrite CropEditor.positionBoundary 2020-12-30 13:05:22 +01:00
Aaron 8e7a09f3f3 Initial version of crop boundary dragging. 2020-12-30 13:05:22 +01:00
Aaron 837c92db44 CropEditor: split setDefaultCrop from setInputValues and rename. 2020-12-30 13:05:22 +01:00
Aaron c392105814 Refactor crop editor DOM functions. 2020-12-30 13:05:22 +01:00
Aaron 9d95df81fe WIP: finally implement drag events. 2020-12-30 13:05:22 +01:00
Aaron d4cc72304e Use flexbox for crop editor box sizing. 2020-12-30 13:05:21 +01:00
Aaron 2c68b6a798 Improve crop editor styling. 2020-12-30 13:05:21 +01:00
Aaron fd84e1c9f8 Refactor crop editor into a proper class. 2020-12-30 13:05:21 +01:00
Aaron a208c0482f Invoke Dispatcher::kickGuest from Session for invalid sessions.
Previously, a NotAllowedException would be thrown if an invalid session
was encountered. However, these exceptions were not caught, and hence
would yield a fatal uncaught exception error.

At this point in Kabuki, the ErrorHandler class has not been registered yet
for error handling purposes. This error is therefore not visible if the PHP
ini directive 'display_errors' is set to 'Off'. As this is the default
production value, the script would fail with a blank page in such cases.
2020-03-11 22:38:15 +01:00
Aaron 12ea378b02 Photo uploader: reduce client memory usage.
To create inline thumbnails locally, the previous version of the photo uploader
used base64 representations of the local files to be uploaded. While this is
effective, it is a little wasteful. When uploading several photos at once, this
could even lead to the page becoming less responsive.

This commit changes the process such that the photos are actually resized on a
canvas, only using the local original as a buffer. Hence, only the resized
photo is retained in memory.
2020-02-08 20:35:26 +01:00
Aaron 8ec6c227d5 Remove leftover debug statements. 2019-03-09 13:58:37 +01:00
Aaron 42e5c7fe37 Allow regular users to unlink tags from photos. 2019-03-09 13:48:18 +01:00
Roflin 16ec547064 Changes the ConfirmDelete page and updates database code.
The ConfirmDelete page now uses parts of the photopage. The
Confirmation dialog is its own template which is based on Alert.

The database now updates the album thumb to the most recent
addition to the album, when the album thumb asset is being deleted.
When there are no pictures left in the album 0 will be set.
2018-07-13 23:00:36 +02:00
Roflin e40c05c1f8 Adds a Confirm Delete page and actually delete the assets. 2018-07-07 19:53:46 +00:00
Roflin 344db6e4c5 Adds a Delete button to the ViewPhotoPage.
The Delete button is non functional yet and is only available for
admins and the photo owner.
2018-07-07 12:19:31 +00:00
Aaron 981b652e25 Fix album title box on mobile. 2017-11-22 11:22:38 +01:00
Aaron cda7f3115c Fix crop editor. 2017-11-09 17:00:36 +01:00
Aaron ee9bdd45c0 Leave out labels on photo index pages.
They were pretty much only displaying filenames, so not adding much.
2017-11-09 17:00:36 +01:00
Aaron 9fe8acc747 Change colour palette into something more befitting #RU. 2017-11-09 17:00:36 +01:00
Aaron 9f92ed6d7a JS photo nav: scroll to #photo_frame automatically. 2017-11-09 17:00:35 +01:00
Aaron fa5ef75205 Basic styling for (long) tag lists. 2017-11-09 17:00:35 +01:00
Aaron 1f7fe35cec Accept tags consisting of only two letters, too. 2017-11-09 17:00:35 +01:00
Aaron 0a55730696 Allow all users to create and link people tags. 2017-11-09 17:00:35 +01:00
Aaron 7f5ce1820d Split preview box creation from preview generation. 2017-11-09 17:00:35 +01:00
Aaron 2a7b44dfb2 Added favicon. 2017-11-09 17:00:35 +01:00
Aaron 2d77fbdbb7 Add very basic context buttons to album pages. 2017-11-09 17:00:35 +01:00
Aaron ddcc28aff6 Implement upload throttling: one file at a time. 2017-11-09 17:00:35 +01:00
Aaron 790d5fc5d0 Uploading of new photos now fully working. 2017-11-09 17:00:35 +01:00
Aaron 77a9cd5d53 Add mockup progress bars to uploads. 2017-11-09 17:00:35 +01:00
Aaron c13442cac6 Add label next to spinner to indicate what's happening. 2017-11-09 17:00:35 +01:00
Aaron c912c3327e Add spinner; retain preview image order. 2017-11-09 17:00:35 +01:00
Aaron 6aaa21b176 WIP: new photo uploader. 2017-11-09 17:00:35 +01:00
Aaron 3220d361c3 Introducing the AlbumHeaderBox. Removes a hack. 2017-11-09 17:00:35 +01:00