Commit Graph

128 Commits

Author SHA1 Message Date
Vincent Petry 5f6fb45704
Merge branch 'Superduper-Progressbar-branch-thingie' of https://github.com/luckydonald/core into luckydonald-Superduper-Progressbar-branch-thingie 2016-05-12 18:15:54 +02:00
Christoph Wurst 05d203a989
replace $.parseJSON() by JSON.parse() 2016-04-19 15:06:42 +02:00
Lukas Reschke f8ae1bb36e Disable pastezone for jquery.fileupload
jquery.fileupload offers the [`pastezone`](https://github.com/blueimp/jQuery-File-Upload/wiki/Options#pastezone) functionality. This functionality is enabled by default and if somebody copy-pastes something into Chrome it will automatically trigger an upload of the content to any configured jquery.fileupload element embedded in the JS.

This implementation triggers some problems:

1. The pastezone is defined globally by default (🙈). So if there are multiple fileupload's on a page (such as in the personal settings) then stuff is going to be uploaded to all embedded uploads.
2. Our server code is not able to parse the data. For example for uploads in the files app we expect a file name which is not specified => Just an error is thrown. You can reproduce this by taking a file into your clipboard and in Chrome then pressing <kbd>CTRL + V</kbd>.
3. When copy-pasting some string from MS Office on the personal page a temporary avatar with said content is created.

Considering that this is anyways was never working at all and causes bugs I've set the `pastezone` to `null`. This mens that upload via copy and paste will be disabled.

Lesson learned: Third-party JS libraries can have some weird details.
2016-03-22 20:28:57 +01:00
Vincent Petry 8ea80e114a Accumulate notifications instead of blinking
This makes it possible to display multiple notifications.
If the options.type is set to "error", it will also add a close button.
2016-02-22 17:25:32 +01:00
Vincent Petry ceaefc2c54 Defer quota check in web UI when overwriting shared file
When receiving a shared file, the quota for that file counts in the
owner's storage, not the current user's storage.

To make it possible to overwrite the file even when the current user
doesn't have enough space, the quota check is deferred for such files.
2016-02-17 15:38:21 +01:00
Vincent Petry abd0ba1f25 Fix file upload, conflict dialog, also in public link
- Use "FileList" instead of "OCA.Files.App.fileList" that doesn't exist in public
link page.
- Fix public link upload by properly adding the form data using a new
  utility function "addFormData". That one is needed because IE8 upload
  and regular upload use a different format...
2015-10-21 12:18:06 +02:00
Vincent Petry 47475f3b4c Debounce cancel upload message 2015-10-12 15:11:52 +02:00
Thomas Müller aedb7a7e70 Revert "Debounce cancel upload message" 2015-10-12 11:30:15 +02:00
Vincent Petry 8a1a1c1326 Debounce cancel upload message 2015-10-07 16:34:06 +02:00
Vincent Petry 5dff9d88cb Make sure the conflict dialog is loaded before adding conflicts 2015-10-02 09:55:43 +02:00
Vincent Petry cc8efaa037 Show conflict dialog before upload when possible
When uploading files, first check if the files exist in the current file
list. For the ones that do, show a conflict dialog.
For the rest, upload directly.

If the upload operation detects a conflict on the server side, it will
also continue populating the conflict dialog.

From now on, server side conflict can only occur if someone concurrently
uploaded a file into the same folder but the current user hasn't
refreshed the list yet.
2015-09-28 17:50:11 +02:00
Vincent Petry 59273a8863 Combine upload action into the "New" menu
Refactored the new menu to be encapsulated in the NewFileMenu JS class
2015-08-28 17:27:48 +02:00
Vincent Petry 69f88b38c9 Fix file name validation in New menu 2015-04-27 16:31:18 +02:00
Robin McCorkell a323d781a6 Revert "add https:// placeholder for From Link feature. closes #13255"
This reverts commit 18b5966f3a.
2015-03-26 14:47:21 +00:00
Lukas Reschke 02c0fe8d43 Merge pull request #13941 from owncloud/fix-folder-upload-on-firefox
Show message if upload of folder isn't allowed
2015-03-23 17:18:46 +01:00
Lukas Reschke acabd81f42 Remove "Download from URL" feature
Fixes https://github.com/owncloud/core/issues/13326
2015-03-02 21:06:25 +01:00
Morris Jobke 4e18b52527 Show message if upload of folder isn't allowed
* current firefox doesn't throw an exception anymore
	* it just reads 0 bytes -> folder or empty file
* upload of folder or empty file isn't supported in every
  browser except Chrome
* fixes #13940
2015-02-06 11:15:09 +01:00
Volkan Gezer 18b5966f3a add https:// placeholder for From Link feature. closes #13255 2015-01-12 20:11:45 +01:00
Morris Jobke 3036a8714d Merge pull request #12941 from owncloud/wave-accessibility-compliance
Wave accessibility compliance
2014-12-19 00:30:56 +01:00
Morris Jobke 7798ea0cd7 show spinner on file upload in IE8, 9 2014-12-18 22:24:07 +01:00
Jan-Christoph Borchardt cd81687a38 properly escape variable 2014-12-18 17:19:23 +01:00
Jan-Christoph Borchardt 137d19f6b1 fix accessibility for 'New' file inputs 2014-12-18 15:52:42 +01:00
Jan-Christoph Borchardt 0e78415cb1 fix accessibility of file upload 2014-12-18 14:12:34 +01:00
Jörn Friedrich Dreyer c615b3527f show readonly message in file conflict dialog, make it always selected 2014-12-11 16:32:27 +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
Vincent Petry 6ca9e27438 Scroll to new file/folder after adding
When creating a new file from the menu, the list now scrolls to that
file.
2014-09-04 12:34:17 +02:00
pdessauw 0d078e48ce Highlight every uploaded files and scroll down to the last one 2014-09-03 09:59:01 -04:00
luckydonald cacf5ed23f Optimized time formatting, optimized time smoothing. 2014-08-14 12:32:08 +02:00
luckydonald f261c45b0e Changes for scrutinizer. Yay! 2014-08-13 18:46:23 +02:00
luckydonald efdff4e148 fixed browser showing the tipsy tooltip as default tooltip twice. 2014-08-13 13:39:14 +02:00
luckydonald df72723fb9 Fixed "Any minute now" staying because of undefined buffer. Also increased buffer size to 20 to be less jittery. 2014-08-13 13:18:24 +02:00
luckydonald 69d88500d3 Updated String formatting. Label font-weight was already normal. 2014-08-13 13:06:00 +02:00
luckydonald 5e86ff6d85 Fixed Positioning, fixed formatting for both mobile and desktop.
Tooltips still frustrate me-
And the updated code with tabs nicely. yay.
2014-08-13 11:40:36 +02:00
Oliver Gasser eb2669448d Compare upload limit against biggest file
When uploading multiple files from the web interface, compare the PHP
upload limit against the largest file, not against the sum of all files.
2014-08-12 19:46:04 +02:00
luckydonald 159747117f Added remaining time displaying, moved Information to tooltip, removed now unneeded speed div 2014-08-12 00:32:46 +02:00
luckydonald 7fc574cc53 Updated and optimized Mobile Layout as well. 2014-08-11 02:37:01 +02:00
luckydonald 19efa259e9 Fixed translations, indentation and renamed the .percents class to .speed class. 2014-08-10 23:45:06 +02:00
luckydonald 03a34235e0 Upload progress bar now displays informations about uploades size (12kB of 3MB) and the current speed. 2014-08-10 22:26:03 +02:00
Vincent Petry ec4cf96f0d Breadcrumb width calculation fix
Rewrote the breadcrumb calculation to be more readable.

Breadcrumb now has a setMaxWidth() method to set the maximum allowed
width which is used to fit the breadcrumbs.

The breadcrumb width is now based on the container width, passed through
setMaxWidth() by the FileList class.

Now using fixed widths for the test crumbs to simulate consistent
widths across browsers which rendering engines might usually yield
different results.
2014-06-27 11:11:34 +02:00
Vincent Petry 9ef7410abe Fixed uploading by drag and drop into folder 2014-06-19 16:14:10 +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
Jörn Friedrich Dreyer f0f059576e polish jslint for files-upload.js 2014-05-09 15:22:11 +02:00
Vincent Petry 2883f231d0 Fixed insertion of files
Removed "insert" flag, inserting is by default for FileList.add().
Added "animate" flag to FileList.add().
Added logic to correctly detect when to insert/append elements whenever
the insertion point is visible or not.
Fixed "render next page" logic to work correctly when many pages of
files have been added.
2014-04-28 14:55:01 +02:00
Bjoern Schiessle 27c5a978f9 we no longer need to handle the Shared folder different from any other folder 2014-04-23 12:54:25 +02:00
Thomas Müller 83e8981e24 add link to further discussion about that folder check 2014-04-15 21:39:13 +02:00
Thomas Müller 0edacf372c fix single file upload in firefox 2014-04-10 18:07:36 +02:00
Thomas Müller e8be2ac554 In cases folder drag and drop is not supported a proper message is displayed 2014-04-09 23:32:12 +02:00
Thomas Müller 3587c88fe9 Merge branch 'master' of https://github.com/lukepolo/core-1 into lukepolo-master
Conflicts:
	apps/files/js/file-upload.js
2014-04-07 22:28:16 +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