Commit Graph

381 Commits

Author SHA1 Message Date
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
Daniel Calviño Sánchez 4d003c812d Do not iterate over the files
As "singleFileUpload" is used the "add" callback (which in turn calls
"addFileToUpload") will always be called with a single file. Therefore
there is no need to iterate over the files (and it is not done in the
other callbacks either, so this aligns the code with the rest of the
callbacks).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-18 15:18:20 +02:00
Daniel Calviño Sánchez 313b824dd7 Replace fileName variable with data.files[0].name
There is no need to store the file name, as the "data" parameter given to
all the callbacks provides a "files" attribute with all the files that
the callback refers to; moreover, it will always be a single file due to
the use of "singleFileUploads" in the jQuery File Upload plugin.

This also fixes the loading icon not disappearing when several files were
uploaded at once. "singleFileUploads" causes the "add" callback to be
called once for each file to be uploaded, so "fileName" was overwritten
with the name of each new file in the upload set; when "fileName" was
later used in the "done" callback to find the file in the list whose
loading icon replace with the MIME type icon "fileName" always had the
name of the last file, and thus its icon was the only one replaced.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-18 15:14:32 +02:00
Daniel Calviño Sánchez c70688e5d0 Update the whole file item instead of only its contents
The "done" and "fail" callbacks both update the item for the uploaded
file using "setFileIcon". "setFileIcon" updates the contents of the
"<li>" element for the file, but the "fail" callback was giving
"setFileIcon" an element generated by the template,  so the resulting
HTML contained a "<li>" element nested in another "<li>" element.

However, generating the HTML is better done through a template, so the
template now receives the icon to show in order to be used by a
successful upload and a failed one, and "setFileIcon" was changed to
"updateFileItem".

Note that the mimeTypeUrl does no longer need to be escaped, as
Handlebars templates escape the needed characters automatically.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-18 14:26:15 +02:00
Daniel Calviño Sánchez 2860ce027a Remove "errorThrown" parameter
When the "fail" callback is called, "errorThrown" is a property of the
data object instead of a parameter.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-18 14:08:51 +02: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
Artur Neumann f2f2e7b6fb some small refactoring and reformating
Signed-off-by: Artur Neumann <info@individual-it.net>
2017-04-27 14:16:55 +05:45
Artur Neumann 79c760a10c use jqXHR.fail() to check for failures
Signed-off-by: Artur Neumann <info@individual-it.net>
2017-04-27 14:16:36 +05:45
Vincent Petry 17a31a51c6
Fix share indicator handling
Properly update the fileInfoModel with the updated share types, which
also updates the file list row indicator properly
2017-04-26 13:38:12 +02:00
Joas Schilling b469882595 Merge pull request #4212 from individual-it/master
validate file name before uploading in upload only folder
2017-04-20 10:50:56 +02:00
Artur Neumann cdb65eff34 refactor to make it easier to test
Signed-off-by: Artur Neumann <info@individual-it.net>
2017-04-18 20:42:36 +05:45
Jan-Christoph Borchardt 37145a275f Fix AdBlock blocking share icon, ref #866
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-04-12 15:04:12 +02:00
Michael Jobst 81b1dc4930
share api expanded by tags (#26583)
* share api expanded by tags

* Modified files_sharing JS Unit tests

* modified tests. renamed request parameter. refactoring

* Update Share20OCS.php

Added missing function description

* Update Helper.php

Added missing function description

* Update Helper.php

implicit boolean conversion to !empty()

* Update Share20OCSTest.php

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-11 11:54:13 -05:00
Roeland Jago Douma 8c01e45d6b
Do reload shared views
Fixes #4248

The magic introduced in #3686 caused the shared views not to be updated
properly. Thus we just overwrite the _onUrlChange method in the
sharedfilelist.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-11 09:33:27 +02:00
Artur Neumann 3795636b90 validate file name before uploading in upload only folder
fixes #4211

Signed-off-by: Artur Neumann <info@individual-it.net>
2017-04-05 13:26:40 +05:45
Roeland Jago Douma 48158c8bec
Combine additional files_sharing scripts
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-24 10:58:11 +01:00
Maxence Lange 69694012ab shares-circles
Signed-off-by: Maxence Lange <maxence@nextcloud.com>
2017-03-17 18:48:33 -01:00
Morris Jobke 200a28255e
Always enable avatars
* we introduced this setting in the begining because our
  avatar support caused some performance issues, but we
  fixed them and should only provide one way how Nextcloud
  looks

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-13 17:53:33 -06: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
Michael Jobst 969c19b2e9
Fixed size issues on main detail view and disappearing of share recipients (#26603)
* fixed size issues on main detail view and disappearing of share recipients

* Changes due to code comments

* Moved reloadProperties() to FileInfoModel

* Solved Scrutinizer issues

* Bugfix: undefined value used on error

* check if options are set for FileInfoModel.initialize()

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-12-23 16:56:55 +01:00
Roeland Jago Douma 05b86faccc
Display link share icon when toggling share
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-30 09:35:38 +01:00
Joas Schilling 09e5e38591
Add an icon when the file is shared by mail
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-30 09:21:58 +01:00
Roeland Jago Douma 1056692fff
Fixes files_drop when avatars are disabled
Fixes: #2080

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-13 14:39:38 +01:00
Christoph Wurst 6c323496ab
fix share icon position and remove debug log 2016-11-08 10:36:39 +01:00
Roeland Jago Douma 07d027feeb
Show link icon when shared by link
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-07 15:38:56 +01:00
Roeland Jago Douma b39a17e499
Actually update the state
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-07 14:58:45 +01:00
Jan-Christoph Borchardt 8de4d4f76e
detail fixes for share current folder
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2016-11-07 14:58:45 +01:00
Roeland Jago Douma 1190ce1dd5
Listen to sharetab changes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-07 14:58:45 +01:00
Christoph Wurst c55718ae5e
update breadcrumb view whenever the share information on the directory info model changes
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-07 14:58:45 +01:00
Christoph Wurst 36cf779140
the root folder must not be shared
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-07 14:58:45 +01:00
Christoph Wurst 5bf7e5533d
visually reflect sharing state of current folder
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-07 14:58:45 +01:00
Christoph Wurst 9e5e120ef9
refactor share permission logic into own method to reuse it for the share tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-07 14:58:45 +01:00
Christoph Wurst bc1cb8a6d0
let users share the curren folder
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-07 14:58:45 +01:00
Christoph Wurst c5597baf88
show whether the current folder was shared or not
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-07 14:58:45 +01:00
Michael Jobst bf9376a7f6
Fixed disappearing of share info in file view 2016-11-04 10:37:30 +01:00
Roeland Jago Douma 0abcc630a5
Fix public files_drop page
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 21:45:00 +02:00
Roeland Jago Douma 7a6dbeb398
Make files_drop work
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 21:45:00 +02: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
Vincent Petry f07d146644
Display "Share" alt text for share action icon (#26158)
Downstreaming of https://github.com/owncloud/core/pull/26158

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-26 10:30:11 +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