aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/public.js
Commit message (Collapse)AuthorAgeFilesLines
* chore(files_sharing): Remove now unused legacy scriptsFerdinand Thiessen2024-09-061-392/+0
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: Remove legacy JS code for public page menu (header actions)Ferdinand Thiessen2024-09-031-120/+0
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: Add SPDX headerAndy Scherzinger2024-06-061-9/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: public dav and files_sharing testing fixesJohn Molakvoæ2024-01-091-5/+5
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* fix(files_sharing): Allow file actions other than download for hide download ↵Julius Härtl2023-03-131-1/+1
| | | | | | shares Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Replace custom tooltips with native ones in files_sharingjulia.kirschenheuter2022-12-221-2/+1
| | | | Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
* Fix grid view button in public pageVincent Petry2022-09-271-0/+25
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* fix: play single audio shares with the viewerMax2022-09-131-1/+1
| | | | Signed-off-by: Max <max@nextcloud.com>
* fix: use old singe file share rendering as fallbackMax2022-08-251-1/+44
| | | | | | | | | | Only render images and videos with the viewer. Text has its own way of handling single file shares for now. In case viewer does not support the file format fall back to the old way of handling single file shares. Signed-off-by: Max <max@nextcloud.com>
* fix: only use viewer when mimetype is supportedMax2022-08-251-5/+16
| | | | | | Also bring back the text fallback Signed-off-by: Max <max@nextcloud.com>
* feature: first take on using the viewer to render single file sharesMax2022-08-251-61/+2
| | | | Signed-off-by: Max <max@nextcloud.com>
* Remove more legacy idsVincent Petry2022-07-271-1/+0
| | | | | | | | Remove more unused legacy ids from early ownCloud times. This reduces the number of duplicate ids in the DOM. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Remove legacy #dir element in files listVincent Petry2022-07-271-1/+2
| | | | | | | | | | Removed legacy "#dir" input element in the DOM. Apps should use OCA.Files.App.currentFileList or OCA.Sharing.PublicApp.fileList and call getCurrentDirectory() to retrieve the current directory and changeDirectory() to change it. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Replace files app ids to classesVincent Petry2022-07-261-2/+2
| | | | | | | | | | | Replaced ids to classes for the following: - #filestable -> .files-filestable - #fileList -> .files-fileList - #controls -> .files-controls - #emptycontent -> .emptyfilelist.emptycontent Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Explicitly close div elementLouis Chemineau2022-04-041-2/+2
| | | | | | Fix: #30002 Signed-off-by: Louis Chemineau <louis@chmn.me> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* prevent right-click when hideDownload is enabledszaimen2022-03-031-0/+8
| | | | Signed-off-by: szaimen <szaimen@e.mail.de>
* Add generic type and description when its missingLouis Chemineau2022-01-111-6/+6
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Use DOMContentLoaded and fix sharebymail loading issueJohn Molakvoæ (skjnldsv)2020-07-201-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Don't load text file preview when text app is available (Fixes: #20615)Jonas Meurer2020-04-241-1/+2
| | | | | | | | | | | When opening a shared text document, the files_sharing app uses internal preview support in case no other app to open the text file is available. So far, it only checks for the old files_texteditor app, not for the new new text app. This commit fixes this by checking for both. Signed-off-by: Jonas Meurer <jonas@freesources.org>
* Allow opening files for editing in new tabsAzul2020-04-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a file list files with a default action have an href that will trigger the action. This way ctrl-click and middle button click open the default action in a new tab. In order to achieve this a new param `openfile` was introduced to the files app. It will make the files app trigger the default action for the file in question. This also allows linking to file content rather than just the details display. Introduce fileList.getDefaultActionUrl() to create a link with that param set. It's overwritten in the trashbin fileList so that anchors continue to have `#` as a href. Fix the link generation for subfolders of public shares: 58a87d0 was the last commit that touched the linkTo function in public.js. It included the params as arguments to the generateUrl function. Turns out this completely ignores the dir parameter now. The inclusion was reverted in other places so revert it here as well. Also change `dir` to `path` in the param as that is respected when following the link. Add Test for the new link url for files with default action. Remove test for multiple selects with ctrl-click as that is not what we are doing anymore. Signed-off-by: Azul <azul@riseup.net>
* refactor: fileActions.getCurrentDefaultFileAction()Azul2020-04-081-6/+2
| | | | | | | | | | fileActions.getCurrentDefaultFileAction() returns the default file action for the currently selected file. There were a number of places querying for the mime, type and permissions of that file first to then query for the default action. Signed-off-by: Azul <azul@riseup.net>
* Remove deprecated legacy file actionsJulius Härtl2019-10-141-2/+0
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Raised public txt file truncation size to 10kbJohannes Koenig2019-10-081-1/+1
| | | | Signed-off-by: Johannes Koenig <mail@jokoenig.de>
* Fix placement of icon in public share page for audio filesDaniel Calviño Sánchez2019-06-271-1/+4
| | | | | | | | | | | | | When the preview for audio files is used an HTML 5 audio element is shown in the public share page. This element is added by the template, so it is already there when the mimetype icon is added to the "#imgframe" element. Instead of appended the icon is now prepended, so it appears before the audio element (prepending instead of appending should make no difference for other types of files, as in that case the "#imgframe" element is empty). Besides that, the CSS was modified to show the icon centered above the audio preview instead of next to it. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix download link included in public share page with hidden downloadDaniel Calviño Sánchez2019-06-271-3/+5
| | | | | | | | The preview element in the public share page was always wrapped with a link to download the file; now that link is included only if the "Hide download" option of the share is not enabled. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Move OC.appswebroots to the bundle and deprecate oc_appswebrootsChristoph Wurst2019-05-071-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix whitespace and file action cleanupJulius Härtl2018-11-201-1/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Clear link to avoid downloadsRoeland Jago Douma2018-11-201-4/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow to hide download option for folders shared by linkJulius Härtl2018-11-201-0/+30
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Moves the terms of service into a dialogMichael Weimann2018-11-071-1/+15
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Fix min trhumbnail sizeJohn Molakvoæ (skjnldsv)2018-11-061-2/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Use preview-x & preview-y on public pagesJohn Molakvoæ (skjnldsv)2018-10-231-2/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix usage of deprecated OC.webrootChristoph Wurst2018-10-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove deprecated SVG helpers for old IEsChristoph Wurst2018-10-081-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix multiSelectMenu for public shares #10536MartB2018-08-061-1/+18
| | | | Signed-off-by: Martin Böh (MartB) <mart.b@outlook.de>
* Use OC.generateUrl to properly prefix preview imagesJulius Härtl2018-07-261-3/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fixed scrolling containerJohn Molakvoæ (skjnldsv)2018-07-241-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Cleanup structureJohn Molakvoæ (skjnldsv)2018-07-201-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix index.php linksRoeland Jago Douma2018-06-201-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move public preview endpoint overRoeland Jago Douma2018-06-201-6/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove ellipsis below public text file sharesMorris Jobke2018-05-221-0/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Move external share saving to templateJulius Härtl2018-04-051-10/+10
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Move styling and menu handling to publicpage.jsJulius Härtl2018-04-051-17/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fixed ext share style and use varable for popover heightJohn Molakvoæ (skjnldsv)2018-03-071-6/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Improved inline confirm icon with opacity and fixed ext share loading stateJohn Molakvoæ (skjnldsv)2018-03-071-19/+21
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix closing menu on second click in sharing pageDaniel Calviño Sánchez2017-12-211-2/+5
| | | | | | | | | | | | | | | | | When a "mouseup" event was triggered on any element except on the share menu or its descendants the share menu was closed. The share menu toggle is not a descendant of the share menu, so clicking on it when the share menu was shown closed it by removing its "open" CSS class. However, once that happened the click event was then handled by the share menu toggle, which toggled the "open" CSS class in the share menu and thus added it again. So, from the user point of view, nothing happened when clicking on the share menu toggle if the share menu was open. Now a "mouseup" event on the share menu toggle no longer closes the share menu, and thus toggling the "open" CSS class when handling the "click" event works as expected. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix Scrutinizer issueJan-Christoph Borchardt2017-11-021-1/+2
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Clicking publicly shared image opens direct preview urlJan-Christoph Borchardt2017-11-011-4/+5
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Use standard way of showing and hiding popover menuJan-Christoph Borchardt2017-11-011-2/+2
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Show and hide menu via Javascript, thanks @skjnldsvJan-Christoph Borchardt2017-11-011-0/+14
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>