Commit Graph

141 Commits

Author SHA1 Message Date
Erik Pellikka 73d5889c5d add loading spinner to add to owncloud input field
Update public.js

Update public.js
2016-04-07 04:33:46 -04:00
Vincent Petry dbea268332 Remove "files" arg from download URL in public link page
When no files were specified for download, it means folder download.
In this case, no need to pass an empty "files" argument.
2016-03-07 11:55:55 +01:00
Vincent Petry f79fafcf06 Revert back to non-webdav download link for public URLs
Fixes issues with browsers not happy with the token.
Fixes activities which were not sent.
2016-02-10 19:09:52 +01:00
Roeland Jago Douma 4bb96a5553 Construct valid URL 2016-02-03 11:29:36 +01:00
Vincent Petry 9742e9b113 Add token in webdav download link of public page 2016-01-07 13:37:18 +01:00
Björn Schießle c4b65170f2 show display name but internally use the user name 2015-12-14 17:25:10 +01:00
Thomas Müller 00b592f2a6 Merge pull request #20581 from owncloud/public-page-preview-hidpi-scale
Fix hidpi previews on public page
2015-12-07 10:23:58 +01:00
Thomas Müller fd79511d68 Merge pull request #20688 from owncloud/publiclink-getdownloadurl-webdav
Fix public link getDownloadUrl to return Webdav public link
2015-11-30 15:07:36 +01:00
Vincent Petry 42091cecf9 Fix public link getDownloadUrl to return Webdav public link
This is for apps that use getDownloadUrl() to access the Webdav endpoint
for example for streaming.
Also happens when clicking on the download action of a file.

Note that the regular visible download URL is still the same.
2015-11-25 17:39:49 +01:00
Thomas Müller 6ce6e27560 Merge pull request #20595 from owncloud/fix-double-slashes
Avoid double slashes in URL when trying to add an remote share
2015-11-24 16:04:03 +01:00
Vincent Petry f20232d4bd Make public link share page work with Webdav and add operations
The public page now uses the public.php/webdav endpoint.

Also enabled more file operations like rename, move, delete and create
folder from the public page, which are now all possible thanks to the
public.php/webdav endpoint.
2015-11-22 16:05:50 +01:00
blizzz 5d2e1268cd Avoid double slashes in URL when trying to add an remote share
When being on a link share and clicking "Add to your ownCloud" a double slash might be inserted in the URL if the entered ownCloud host ended with a slash. Results in a server error.
2015-11-18 22:48:35 +01:00
Robin Appelman ee87f12c09 Fix hidpi previews on public page 2015-11-18 16:45:19 +01:00
Hendrik Leppelsack 480a005b47 fix pagination on public file list 2015-10-20 16:11:10 +02:00
Thomas Müller d6e3195b38 Merge pull request #19421 from owncloud/fix_19382
Do noy allow empty urls to be submitted in "add to your owncloud"
2015-09-30 22:17:18 +02:00
Morris Jobke 2d1214d21d adjust style of disabled button 2015-09-30 15:28:28 +02:00
Roeland Jago Douma 08fd4b38f8 Do noy allow empty urls to be submitted in "add to your owncloud"
Fixes #19382
2015-09-30 13:55:13 +02:00
Morris Jobke 1051a3c6f5 Change small thumbnails to 32 px
* fixes #16913
* fixes issues in IE8 where the thumbnail is too big
2015-09-30 10:49:48 +02:00
Olivier Paroz 46475b8114 Switch from Math.floor() to Math.ceil() when sending the dimension to Preview
Fixes #18203
2015-09-27 12:46:25 +02:00
Olivier Paroz 04b14df35c Fix preview of old file on public upload conflicts 2015-09-20 12:38:21 +02:00
Vincent Petry b6192db610 Disable right sidebar in public file list page 2015-08-07 01:22:43 +02:00
Olivier Paroz 7b84343cfc floats are not welcome when setting the size of a preview 2015-06-12 18:56:18 +02:00
Olivier Paroz 8ff4a66f01 Determine the size we need before asking for a thumbnail
We need to set the size of the preview using the devicePixelRatio and use that as arguments when using the preview endpoint or that endpoint will use the default 36x36 and thumbnails will be blurry on high DPI devices
2015-06-12 18:50:21 +02:00
Espen Fjellvær Olsen 308b97db4c Fix regression in preview height calculation
Fix regressions introduced in a672e9d regarding the image height calculation
2015-06-08 20:57:19 +02:00
Vincent Petry 2daef7c7dc Fallback to picture preview for IE <= 9
IE 9 and below do not provide window.btoa and there is currently no way
to generate base64 strings without introducting further dependencies.

So for now the solution is to fall back to the ugly picture mode for
text files whenever IE <= 9 is used.
2015-05-28 15:36:28 +02:00
Vincent Petry f7a2b5e7a9 Added unit tests for download URL in public sharing page 2015-05-19 17:41:06 +02:00
Lukas Reschke 07483033c1 Fix URL generation
`params` in the `OC.generateUrl` function call only replaces all specified occurences of a key just like the l10n PHP functionality does.

This means that to build a query string we have to use `OC.buildQueryString` instead of the params parameters.

Fixes https://github.com/owncloud/core/issues/16336 which is a regression introduced with 58a87d0bab of https://github.com/owncloud/core/pull/15652.

Without this fix downloading single files from a public shared folder is not possible.
2015-05-19 15:12:08 +02:00
Olivier Paroz 0729fc2fbc Remove overflow+watermark 2015-04-23 18:19:34 +02:00
Olivier Paroz 58a87d0bab Use authorization headers for better compatibility
+ add ellipsis
+ fix OC.generateUrl calls
2015-04-23 18:19:29 +02:00
Olivier Paroz a968877a8b An idea to suggest that this is just a sample of the full text 2015-04-23 18:19:21 +02:00
Olivier Paroz 530c290555 Use webDAV to have access to HTTP byte ranges 2015-04-23 18:19:17 +02:00
Olivier Paroz e113d67430 Cache the token value 2015-04-23 18:19:12 +02:00
Olivier Paroz 8d3f88cf16 Show a text preview instead of a bitmap preview of text
+ fix the preview height
2015-04-23 18:19:07 +02:00
Vincent Petry 53a23364ef Added empty content message for empty read-only folders 2015-04-21 14:31:13 +02:00
Georg Ehrke 374ddbff55 show animated gifs on public sharing page 2015-01-19 16:20:06 +01:00
Olivier Paroz 356bfb36dc Download the current public folder only
From within a shared/public directory, when drilling down folders, some
users want to be able to download what they're currently looking at, not
the whole shared folder. The whole archive is always a click away anyway
since a user can click on the home button.
2015-01-14 11:28:36 +01:00
Morris Jobke 28c8f5a0f9 Check for version before mounting a public link
* ownCloud 7.0.0 is needed - version of merge of server <-> server
  sharing - https://github.com/owncloud/core/pull/8399
* adjust error message
2015-01-05 11:50:05 +01:00
Jan-Christoph Borchardt 9009f5f727 add empty alt text to decorative preview of public share image 2014-12-18 16:00:55 +01:00
Vincent Petry c02ef69521 Simple Plugin system for Javascript 2014-12-01 16:20:44 +01:00
Lukas Reschke 988c85d292 Refactor file sharing public link handling
fixes download issue introduced by #10755

Conflicts:
	apps/files_sharing/public.php
2014-11-14 16:26:59 +01:00
Vincent Petry 0f3e6cb50a Improved Javascript docs for JSDoc
Added namespaces so that JSDoc can find them.
Fixed a few warnings.
Improved some comments.
2014-10-31 13:43:30 +01:00
Lukas Reschke 9cfbf7ed1c Fix SVG icons
FIXME: Ugly hack to prevent SVG of being returned if the SVG
provider is not enabled.
This is required because the preview system is designed in a
bad way and relies on opt-in with asterisks (i.e. image/*)
which will lead to the fact that a SVG will also match the image
provider.

Conflicts:
	lib/private/preview.php
2014-10-16 12:35:51 +02:00
Lukas Reschke 306bf71c62 Use SVG previews for public sharing
Fixes https://github.com/owncloud/core/pull/11367#issuecomment-57306037 and https://github.com/owncloud/core/issues/9218
2014-09-30 15:49:49 +02:00
Dan Jones 4bbea118c2 fix tiny thumbnails in public preview/share mode 2014-08-06 19:32:21 +01:00
Jan-Christoph Borchardt 8e617453e5 use icon-confirm instead of text for accepting remote share, works better with translations 2014-07-04 00:07:24 +02:00
Morris Jobke d2f3ff5c34 Merge pull request #9245 from owncloud/server2server-sharing-design-fixes
drop unneeded code
2014-07-02 15:34:57 +02:00
Vincent Petry 13b7937381 Allow late registration of file actions in public page 2014-06-27 16:10:20 +02:00
Morris Jobke d9aa8c9f0e drop unneeded code 2014-06-27 00:30:14 +02:00
Vincent Petry 9ef7410abe Fixed uploading by drag and drop into folder 2014-06-19 16:14:10 +02:00
Robin Appelman 2219087df6 organize js a bit better 2014-06-17 13:47:36 +02:00
Robin Appelman 2005c162bd Fix prompting for password 2014-06-14 10:14:07 +02:00
Robin Appelman cf5a72c103 Add interface for adding a public share to a different ownCloud instance 2014-06-14 10:13:24 +02:00
Robin Appelman 690e0b5070 Dont overwrite OCA.Sharing 2014-06-05 12:52:08 +02:00
Vincent Petry 1d9129eac3 Sharing overview fixes and unit tests
- Fixed renaming and fileActionsReady event
- Added unit tests for shares list
- Fixed public page with defer
- Fixed file actions in sharing overview
- Fixed sharing counterpart list (10 entries max)
- Fixed file path attribute to be used in download action
- Fix sharing list headers
- OC.Share icons now operate on fileList instance
- Fix OC.Share.updateIcon when more than one list in DOM
2014-05-30 10:06:29 +02:00
Vincent Petry ef59c69dc8 Distinguish legacy file actions from regular file actions
Legacy file actions are registered by legacy apps through
window.FileActions.register(). These actions can only be used by the
main file list ("all files") because legacy apps can only deal with a
single list / container.

New file actions of compatible apps must be registered through
OCA.Files.fileActions. These will be used for other lists like the
sharing overview.

Fixed versions and sharing actions to use OCA.Files.fileActions, which
makes them available in the sharing overview list.
2014-05-30 10:06:29 +02:00
Robin Appelman 157b139b57 Dont scale up the preview for publicly shared images 2014-05-22 16:45:51 +02:00
Vincent Petry 7d98bcf9a2 Fixed JS issues in public page
- fixed subdir detection when uploading into subdir
- add class detection before overriding to avoid JS errors
2014-05-20 13:37:58 +02:00
Vincent Petry 6fd084243b Fixed many issues, clean up
- fixed upload and storage statistics
- fixed infinite scroll to use the correct contain for scroll detection
- fixed unit test that sometimes fail for rename case
- controls are now sticky again
- fixed selection overlay to be aligned with the table
- fixed "select all" checkbox that had id conflicts
- fixed public page
- fixed global actions permissions detection
- fix when URL contains an invalid view id
- viewer mode now hides the sidebar (ex: text editor)
- added unit tests for trashbin
- clean up storage info in template (most is retrieved via ajax call now)
2014-05-15 17:51:04 +02:00
Vincent Petry 9d38e3602b Namespacing for FileList, FileActions and trashbin app
- FileList is now an instantiable class
- FileActions is now in namespace
- added App class for trashbin app
- moved trashbin overrides into classes extending FileList
- replaced many static calls with "this." or "self." to make the classes
  reusable/extendable
- new URL parameter "view" to specify which view is shown, for example
  "files" or "trashbin"
- added OC.Util.History utility class in core for handling history
- moved URL handling/routing to OCA.Files.App
- popstate will correctly update the current view and notify the view of
  the URL change so it can update the current dir
- added JS unitt tests for the trashbin app
- fixed public app to work with the new namespaces
2014-05-15 17:51:04 +02:00
Thomas Müller d163441f3e load image via javascript and use $(document).width() to determine the proper side of the image to be returned 2014-05-02 18:36:58 +02:00
Thomas Müller 07ea57465b drop folder support on public shared folders 2014-04-11 14:54:13 +02:00
Vincent Petry 0be9de5df5 Files, trashbin, public apps use ajax/JSON for the file list
Files app:

- removed file list template, now rendering list from JSON response
- FileList.addFile/addDir is now FileList.add() and takes a JS map with all required
  arguments instead of having a long number of function arguments
- added unit tests for many FileList operations
- fixed newfile.php, newfolder.php and rename.php to return the file's
  full JSON on success
- removed obsolete/unused undo code
- removed download_url / loading options, now using
  Files.getDownloadUrl() for that
- server side now uses Helper::getFileInfo() to prepare file JSON response
- previews are now client-side only

Breadcrumbs are now JS only:

- Added BreadCrumb class to handle breadcrumb rendering and events
- Added unit test for BreadCrumb class
- Moved all relevant JS functions to the BreadCrumb class

Public page now uses ajax to load the file list:

- Added Helper class in sharing app to make it easier to authenticate
  and retrieve the file's real path
- Added ajax/list.php to retrieve the file list
- Fixed FileActions and FileList to work with the ajax list

Core:

- Fixed file picker dialog to use the same list format as files app
2014-04-02 15:33:47 +02:00
Vincent Petry d5397d813c Do not send file list for select all on Download/delete
- When all files are selected, do not send the whole file list
- Download will trigger download for the parent folder, also works
  with root
- Delete will send "allfiles" to the server that will find the file
  list or the passed directory by itself
2014-02-13 20:28:52 +01:00
Jan-Christoph Borchardt 13ed59c1cf merge master into mobile-style 2014-01-29 10:55:44 +01:00
Vincent Petry c6695bbd76 Fixed download URL in public page
- Refactored download URL building to make it overridable
- Added download URL override in public page
- Added JS unit tests for download URL
- Added OC.redirect() method to facilitate unit testing
2014-01-24 13:38:39 +01:00
Thomas Müller 617aa3cf29 Instead of 'No preview available for ...' we simple display the mieme-type icon 2014-01-23 20:15:10 +01:00
Thomas Müller ade726ad32 focus link text only on click in the input field - closes #6817 2014-01-23 01:08:42 +01:00
Thomas Müller f950ce82ae Merge branch 'master' into mobile-style
Conflicts:
	apps/files/js/files.js
	apps/files_sharing/css/public.css
	apps/files_sharing/js/public.js
	apps/files_sharing/templates/public.php
2014-01-23 00:39:11 +01:00
Morris Jobke cf6e79cda8 Merge pull request #6719 from tripflex/fix_pubup_progbar
Fix public upload progress bar
2014-01-22 02:28:28 -08:00
Thomas Müller b3a6683784 remove unused js code and css rules 2014-01-15 15:22:40 +01:00
Myles McNamara 97be32e2e8 modify js to move upload wrapper, modify css to match core values 2014-01-10 14:07:20 -05:00
Vincent Petry 1042733634 Fixed various file name escaping issues in core apps
- Refactored file tr lookup into FileList.findFileEl that uses
  filterAttr to avoid escaping issues in jQuery selectors
- Fixed versions and sharing app to properly escape file names in
  attributes
2014-01-10 15:02:26 +01:00
Vincent Petry 7abfe2bd4f Added direct link in public share page
Fixes #1167
2013-10-18 17:40:41 +02:00
Jörn Friedrich Dreyer b59ce403d8 Merge branch 'master' into fix_3728_with_file_exists_dialog
Conflicts:
	apps/files/css/files.css
	apps/files/js/file-upload.js
	apps/files/js/filelist.js
	apps/files/js/files.js
	apps/files_sharing/js/public.js
	core/js/jquery.ocdialog.js
	core/js/oc-dialogs.js
2013-09-17 19:10:46 +02:00
Jörn Friedrich Dreyer 7854cf04ee refactor upload js & html to always use only js to fill form data 2013-09-13 17:07:52 +02:00
Jörn Friedrich Dreyer 4af5a8c483 Merge branch 'master' into fix_3728_with_file_exists_dialog
Conflicts:
	apps/files/ajax/upload.php
	apps/files/js/file-upload.js
	apps/files/js/filelist.js
	apps/files/js/files.js
	apps/files/templates/part.list.php
2013-09-04 14:11:40 +02:00
Georg Ehrke 6ffa2a28d0 Merge branch 'master' into oc_preview 2013-08-23 23:10:37 +02:00
Jörn Friedrich Dreyer f94e603698 progress fixes 2013-08-16 11:40:55 +02:00
Georg Ehrke 41ba155a14 fix js error 2013-08-07 11:58:49 +02:00
Georg Ehrke 91bd4dd67b implement previews of single shared files 2013-08-07 11:48:08 +02:00
kondou 1348330c7d Fix a syntax error & have if-conds in an own line 2013-08-01 18:44:01 +02:00
kondou aaf0fec9f5 Fix some JSLint warnings 2013-07-31 21:21:02 +02:00
Thomas Müller 0c2ebb984e adding tipsy to the upload button showing the max upload and restoring client side upload size validation 2013-07-05 15:07:05 +02:00
Roman Geber ddb0ff346d Public upload feature 2013-06-25 12:24:14 +02:00
Björn Schießle 0d081ac5ac register download action for directories 2012-10-05 14:28:23 +02:00
Björn Schießle ef8a4a1629 register download action for files 2012-10-05 14:28:23 +02:00
Michael Gapczynski 39e587b52c Remove the content and table to prevent covering the download link 2012-09-19 00:27:53 -04:00
Michael Gapczynski 749b5b52ca Show preview for public folder links 2012-09-18 23:56:14 -04:00
Jörn Friedrich Dreyer 3ba27e624f unify permissions (2/3): change apps to use OC::PERMISSION_X 2012-08-31 01:11:10 +02:00
Michael Gapczynski f2534e7428 Show notification that no preview is available if no previewer is found for a public link to a file 2012-08-29 21:12:23 -04:00
Michael Gapczynski 0a9d1ed3a6 Initial previewer for public links 2012-08-27 20:37:38 -04:00