Commit Graph

141 Commits

Author SHA1 Message Date
John Molakvoæ (skjnldsv) 6fcd075730
Use DOMContentLoaded and fix sharebymail loading issue
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-07-20 12:42:08 +02:00
Jonas Meurer afeeb1eb1f
Don't load text file preview when text app is available (Fixes: #20615)
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>
2020-04-24 11:14:21 +02:00
Azul 43f0d2a3b5 Allow opening files for editing in new tabs
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>
2020-04-09 16:41:09 +02:00
Azul d2728cbdc1 refactor: fileActions.getCurrentDefaultFileAction()
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>
2020-04-08 18:19:58 +02:00
Julius Härtl 5e4eda1ae0
Remove deprecated legacy file actions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-10-14 19:19:16 +02:00
Johannes Koenig 58b93b65d3 Raised public txt file truncation size to 10kb
Signed-off-by: Johannes Koenig <mail@jokoenig.de>
2019-10-08 18:38:49 +02:00
Daniel Calviño Sánchez a8323bbc05 Fix placement of icon in public share page for audio files
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>
2019-06-27 13:33:22 +02:00
Daniel Calviño Sánchez 443c1db3a3 Fix download link included in public share page with hidden download
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>
2019-06-27 12:21:34 +02:00
Christoph Wurst acf0ca1541
Move OC.appswebroots to the bundle and deprecate oc_appswebroots
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-05-07 14:03:14 +02:00
Julius Härtl 78056a3bef
Fix whitespace and file action cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-20 19:46:49 +01:00
Roeland Jago Douma fc99811d0a
Clear link to avoid downloads
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-11-20 19:46:49 +01:00
Julius Härtl fb8aa31dbf
Allow to hide download option for folders shared by link
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-20 19:46:35 +01:00
Michael Weimann e0ab2902d6
Moves the terms of service into a dialog
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-11-07 10:19:19 +01:00
John Molakvoæ (skjnldsv) 98edf3612c
Fix min trhumbnail size
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-06 11:45:19 +01:00
John Molakvoæ (skjnldsv) bf6a1650ce
Use preview-x & preview-y on public pages
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-10-23 08:59:34 +02:00
Christoph Wurst 9af69ca2a5
Fix usage of deprecated OC.webroot
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-10-09 13:53:59 +02:00
Christoph Wurst dccb3ab5b2
Remove deprecated SVG helpers for old IEs
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-10-08 16:33:41 +02:00
MartB 5109743383 Fix multiSelectMenu for public shares #10536
Signed-off-by: Martin Böh (MartB) <mart.b@outlook.de>
2018-08-06 12:42:13 +02:00
Julius Härtl 093799f4b0
Use OC.generateUrl to properly prefix preview images
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-07-26 22:41:41 +02:00
John Molakvoæ (skjnldsv) 440b5c944f
Fixed scrolling container
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-24 11:01:11 +02:00
John Molakvoæ (skjnldsv) 842583038b
Cleanup structure
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-20 23:35:21 +02:00
Roeland Jago Douma a596b062f5
Fix index.php links
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-20 17:54:11 +02:00
Roeland Jago Douma 366981fba6
Move public preview endpoint over
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-20 08:53:37 +02:00
Morris Jobke 8c043dd00d
Remove ellipsis below public text file shares
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-05-22 15:14:23 +02:00
Julius Härtl 2e60f91ab1
Move external share saving to template
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-05 13:11:55 +02:00
Julius Härtl bbeb3402b6
Move styling and menu handling to publicpage.js
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-05 12:21:39 +02:00
John Molakvoæ (skjnldsv) 446a3a9d5a
Fixed ext share style and use varable for popover height
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-07 15:12:06 +01:00
John Molakvoæ (skjnldsv) 8d986160b8
Improved inline confirm icon with opacity and fixed ext share loading state
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-07 13:17:37 +01:00
Daniel Calviño Sánchez 372e7acfaf Fix closing menu on second click in sharing page
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>
2017-12-21 12:37:35 +01:00
Jan-Christoph Borchardt eebf19e2e6 Fix Scrutinizer issue
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-11-02 15:26:37 +01:00
Jan-Christoph Borchardt 84b8cb12be Clicking publicly shared image opens direct preview url
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-11-01 14:49:52 +01:00
Jan-Christoph Borchardt bc47668206 Use standard way of showing and hiding popover menu
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-11-01 12:06:04 +01:00
Jan-Christoph Borchardt 116cb58c3c Show and hide menu via Javascript, thanks @skjnldsv
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-11-01 11:52:58 +01:00
Bjoern Schiessle 2b3549610b
fix 'add to your nextcloud' input field, this is not an email address
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-06-13 17:46:46 +02:00
John Molakvoæ (skjnldsv) 0a400c4259
Fixed sharing js
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2017-01-22 17:26:59 +01:00
Vincent Petry 59c5be1cc5
Use Webdav PUT for uploads in the web browser
- uses PUT method with jquery.fileupload for regular and public file
  lists
- for IE and browsers that don't support it, use POST with iframe
  transport
- implemented Sabre plugin to handle iframe transport and redirect the
  embedded PUT request to the proper handler
- added RFC5995 POST to file collection with "add-member" property to
  make it possible to auto-rename conflicting file names
- remove obsolete ajax/upload.php and obsolete ajax routes

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 21:45:00 +02:00
Bjoern Schiessle c7f6461c53
rename SaveToNextcloudController to MountPublicLinkController 2016-07-14 16:39:48 +02:00
Bjoern Schiessle 56d3100f44
adjust copyright notices 2016-07-14 16:39:48 +02:00
Bjoern Schiessle 5bbba490c4
move some stuff over to the federatedfilesharing app 2016-07-14 16:39:48 +02:00
Bjoern Schiessle 2f23054b01
s/ownCloud/Nextcloud 2016-07-14 16:39:48 +02:00
Bjoern Schiessle 33a685bc41
continue to accept the URL of the remote server instead of the federated cloud id 2016-07-14 16:39:48 +02:00
Bjoern Schiessle 1394b0afb9
replace 'ownCloud' with 'Nextcloud' 2016-07-14 11:22:35 +02:00
Björn Schießle f5d0b464a7
create a real federated share if a user add a public link to his ownCloud
this way the owner sees all mounted public links and control them individually
2016-07-14 11:22:35 +02:00
Morris Jobke d15fd5cb96 Change occurence of ownCloud (#352) 2016-07-11 13:49:19 +02:00
Lukas Reschke e878e786e0
Fix public upload for normal shares 2016-06-09 18:12:58 +02:00
Lukas Reschke 6e99b0f59d
Make uploading possible via select and cleanup CSS 2016-06-09 17:55:26 +02:00
Bjoern Schiessle bb54ab0db8
add hide file list option 2016-06-09 15:15:17 +02:00
Piotr Filiciak df59c5d1ee bug fix 2016-05-24 12:43:43 +02:00
Piotr Filiciak 11b2e98a30 video poster 2016-05-24 12:34:37 +02:00
Piotr Filiciak 53437ecced Fix: Bugs in shared link with video #24331 2016-05-15 15:41:02 +02:00