Commit graph

285 commits

Author SHA1 Message Date
Joas Schilling
a1037f1679 Do not use magic strings when there are constants for it 2015-07-22 15:10:34 +02:00
Joas Schilling
270ec3aaba Make the favorite type stream only 2015-07-22 15:10:34 +02:00
Morris Jobke
62ae39208a Add owner to the storage stats to enable better notifications
* getstoragestats.php returns now the owner and it's display name
* show proper storage stats notifications for shared folders
2015-06-05 18:21:41 +02:00
Vincent Petry
13617c8bf1 Check target name on rename with web UI
When renaming over the web UI, check early that the target name is
valid.

This prevents nonsensical error messages when renaming to a name with a
trailing backslash.
2015-05-29 19:30:09 +02:00
Morris Jobke
59efcb63a3 fix filepicker
* add ability to filter for mimetype
* fixes #15526
* fixes #11563
2015-04-13 10:38:08 +02:00
Joas Schilling
730efe25a4 Make scrutinizer happy 2015-04-01 12:13:49 +02:00
Joas Schilling
efcc2e87ab Adjust by/self filter aswell and fix tests 2015-03-31 17:35:04 +02:00
Joas Schilling
116b257b4d DeMorgan applied the wrong transformation 2015-03-31 17:07:44 +02:00
Joas Schilling
9233d32834 Move tag related code into a helper so we can test the query without a view 2015-03-30 17:21:06 +02:00
Joas Schilling
e365ea7ec5 Use DI for the objects where possible 2015-03-30 15:23:10 +02:00
Joas Schilling
17f882c3cf Add a filter for favorites and allow limiting the all-list to favorites
WARNING: do not use this, when you have a lot of favorites, ~50 should be the
limit
2015-03-30 15:23:09 +02:00
Jenkins for ownCloud
b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Morris Jobke
06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Jenkins for ownCloud
6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Joas Schilling
d20a8fae45 Move displaying of files related activities to files app 2015-02-13 13:37:10 +01:00
Lukas Reschke
cc80ce70b4 Catch exception properly
`\OCA\Files\Helper::buildFileStorageStatistics` might throw an exception from `OC_Helper::getStorageInfo`, previously this lead to a uncatched exception being thrown when invoking this methods.

This was user triggable by for example calling `/index.php/apps/files/ajax/delete.php` with a not existing dir (for example `dir=asdf/../&allfiles=true`)
2015-02-04 15:58:16 +01:00
Lukas Reschke
4766dac6f4 Fix PHP doc and enforce type 2015-01-13 14:47:54 +01:00
Vincent Petry
8cc13031e9 Return path attribute for ajax rename operations
This fixes an issue when renaming files from a flat list view like
"Favorites" or "Shared with you", in which case the path needs to be
present in the response to make sure the data-path attribute is properly
set in the JS side.
2015-01-12 18:15:31 +01:00
Vincent Petry
dac7828480 Return tags after rename
To make it possible for the web UI to correctly display the tag/favorite
information after a rename, this information is now returned in the
rename response
2015-01-12 18:14:17 +01:00
Vincent Petry
4b1b93507d Only populate tags in main file list
Moved populateTags to be done on the main file list.
This prevents the public file list to go through the same code and cause
an error when there is no user.
2014-12-18 15:36:18 +01:00
Vincent Petry
a5bb66f4a7 Added favorites feature to the files app 2014-12-15 12:10:54 +01:00
brumsel
4ba520e214 Merge remote-tracking branch 'upstream/master' 2014-12-03 23:04:49 +01:00
Lukas Reschke
61641293f4 Only show undelete capability if files_trashbin is enabled
Fixes the OCS capability API at /ocs/v1.php/cloud/capabilities
2014-11-18 23:06:39 +01:00
Lukas Reschke
b3a04840b5 Add type hinting to functions
It's only reasonable to have proper type hinting here which might even help us to catch bugs.
2014-10-24 14:13:40 +02:00
brumsoel
1e1be409b7 Fix timestamp comparator return value 2014-10-08 22:40:57 +02:00
brumsoel
40174b6b10 Fix file size comparator return value 2014-10-08 01:17:45 +02:00
Lukas Reschke
d2743e6ad6 Merge pull request #7254 from owncloud/core-sortalgo
Fixed JS sort comparator to be consistent between JS and PHP
2014-09-16 17:29:03 +02:00
Robin McCorkell
99d41bec5d Show original path information in trashbin and sharing views
Path will only be shown if in subdirectory, not in root.
2014-09-11 15:45:42 +01:00
Vincent Petry
173059f6d0 Fixed file list sorting
Now using a natural sort algorithm that is more consistent between JS
and PHP (although not perfect in some corner cases)

- added OC.Util.naturalSortComparator that uses the same algo that was
  used for the user list
- changed user list and files list to use OC.Util.naturalSortComparator
- removed toLowerCase() and changed the comparator to use
  String.localeCompare()
- added unit tests
- added OC_NaturalSort that is used by OCP\Util::naturalSortCompare()
2014-08-11 13:28:53 +02:00
Bjoern Schiessle
b3cff4beb6 add error message if user wants to rename a file which no longer exists 2014-08-11 12:03:08 +02:00
Robin Appelman
4a9b0d5465 Use svg mimeicons for empty text files 2014-07-30 16:31:37 +02:00
Vincent Petry
dd7529da98 Added mountType attribute and adapted Delete action text
Added mountType attribute for files/folder to indicated whether they are
regular, external or shared.

The client side then adapts the "Delete" action hint text based on this
information.

Only the mount roots must have the delete icon hint adapted.
To make this detectable on the client side, the mountType can now
be null, "shared", "shared-root", "external" or "external-root".

This also gives room to icon customization on the client side.
2014-07-14 10:36:04 +02:00
Robin Appelman
dea5219244 Fix folder name for storage root 2014-06-06 09:55:59 +02:00
Thomas Müller
95741f3936 Merge pull request #8435 from owncloud/fix-8322-master
Expose permission via WebDAV
2014-05-19 16:52:03 +02:00
Robin McCorkell
c4f1de63a8 Fix PHPDoc in /apps 2014-05-16 22:21:57 +01:00
Vincent Petry
88ebb15f1d Added navigation manager in files app for the sidebar
Apps can now register navigation items into the sidebar of the files app.
For every sidebar item there is a container.
The container's content is rendered based on the script name given at
registration time.
2014-05-15 17:51:04 +02:00
Thomas Müller
c92c577b5e - Introduce isShared() and isMounted() on FileInfo class
- Reuse these methods on determineIcon()
- Generate permission string for the desktop client
- expose {http://owncloud.org/ns}permissions as additional WebDAV property containing the permission string
2014-05-02 17:37:16 +02:00
Thomas Müller
535302b25e typos, indentation and remove of unused code 2014-04-28 17:59:50 +02:00
Vincent Petry
af22e7ec95 Added unit test in files app for sort function in helper class
Added unit test for the Helper class in the files app that tests the
different sort orders.
2014-04-28 17:42:04 +02:00
Vincent Petry
688f6162da Add sorting to files list, trashbin and public files 2014-04-28 17:42:04 +02:00
Bjoern Schiessle
7ef8f6d352 always allow to rename the share mount point 2014-04-23 12:54:26 +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
Bjoern Schiessle
83d6810725 don't overwrite shared folder icon 2014-04-23 12:54:25 +02:00
Volkan Gezer
1aa7774178 make max. text translatable 2014-04-21 02:41:33 +02:00
Thomas Müller
971a311fee adding parentId to file info array 2014-04-07 23:03:19 +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
Robin Appelman
214357ca68 Improve sorting performance of large lists of files 2014-03-19 13:53:59 +01:00
Robin Appelman
f33d35cd07 Fix svg icons for public shares and external/shared files 2014-02-19 15:08:05 +01:00
Robin Appelman
609a91a9b1 Show svg mime icons when no preview is available 2014-02-19 14:47:29 +01:00
Robin Appelman
d18b9f6ea4 use a FileInfo object of the directory when generting the filelist 2014-02-18 15:39:35 +01:00
Robin Appelman
1e79369338 merge master into storagestatistics-reuse 2014-02-05 13:36:55 +01:00
Pellaeon Lin
099b71c712 Merge branch 'master' into pr-exceed_upload_limit_msg
Conflicts:
	apps/files/templates/index.php
	apps/files_sharing/templates/public.php
2014-01-30 22:50:20 +08:00
Pellaeon Lin
929c930b0a Use $storageInfo['free'] 2014-01-29 21:24:31 +08:00
Vincent Petry
58c7042e70 Added error message for when target folder was removed
Whent trying to upload/rename/create files in a folder that was removed
or rename, the correct error message is now shown.

In the case of upload of multiple files, the upload is cancelled.

This situation can happen if the target folder was renamed or removed
from another browser window or client.
2014-01-29 12:46:11 +01:00
Vincent Petry
e6f93fc841 Fix warnings in logs when renaming over the web UI
The determineIcon() method was expecting attributes to be set which
caused warnings about undefined indices in the error log.

This fix pre-initializes the array with 'directory' and
'isPreviewAvailable' to make them disappear.
2014-01-29 10:43:13 +01:00
Robin Appelman
3c1ab66eda Reuse the calculated free_space in buildFileStorageStatistics 2014-01-27 15:56:57 +01:00
Pellaeon Lin
dbbbfee7de Fix namespace 2014-01-15 12:36:27 +08:00
Pellaeon Lin
0aa38165a4 Update #free_space on getstoragestats AJAX call 2013-12-11 12:18:18 +08:00
Vincent Petry
da1a89fd15 Fixed directory icon after rename 2013-11-28 13:15:20 +01:00
Vincent Petry
68f610a90e Update file list entry on rename
Whenever a file is renamed, if the extension changes, the mime type and
preview might change. This fix passes the updated info to the client
that updates it.
2013-11-27 21:35:00 +01:00
Vincent Petry
5d698b72fc Fixed folder icon for home storage
Fixes #5713
2013-11-06 15:11:14 +01:00
Thomas Müller
3488202f67 Merge pull request #5582 from owncloud/files-previewcaching
Append file etag to preview URLs
2013-11-05 01:21:51 -08:00
Thomas Müller
a90cefcea2 avoid usage of brand name 'ownCloud' 2013-10-28 21:42:48 +01:00
Vincent Petry
e62ca4ea4f Append file etag to preview URLs
Fixes #5534
2013-10-28 14:14:55 +01:00
Thomas Müller
0283589a19 adding PHPDoc comments 2013-10-22 22:38:05 +02:00
Jörn Friedrich Dreyer
45e6d96702 prevent user from creating or renaming sth. to an existing filename
- show tooltip when violating naming constraints while typing
- when target filename exists on server fallback to dialog to interrupt the users flow because something unexpected went wrong
- fixes #5062
- also fixes some whitespace and codestyle issues in files js
- uses css selector over filterAttr in touched js files
2013-10-22 18:11:03 +02:00
Thomas Müller
db39fede97 Merge branch 'master' into appframework-master
Conflicts:
	apps/files/lib/helper.php
	apps/files_trashbin/lib/helper.php
2013-09-25 09:52:12 +02:00
Georg Ehrke
edd38e5948 fix previews in shared folders 2013-09-23 10:26:46 +02:00
Jörn Friedrich Dreyer
4b3e56bcf9 remove unneccessary lib in namespace 2013-09-20 16:46:33 +02:00
Jörn Friedrich Dreyer
9e39118b52 namespaces use upcasefirst parts
when _ is left in namespace and files are named after their classes the autoloader will also find classes in the lib folder of an app
its magic!
2013-09-20 16:37:07 +02:00
Thomas Müller
9b420e8660 use \OC::$server->getPreviewManager() instead of \OCP\Preview 2013-09-17 13:33:47 +02:00
Vincent Petry
364e7991a4 Fixed ajax support to also update the current dir permissions 2013-09-13 19:59:15 +02:00
Vincent Petry
1304b511e9 Ajax calls for "files" and "files_trashbin" apps
Frontend:
- The files app list now uses ajax calls to refresh the list.
- Added support the browser back button (history API).
- Added mask + spinner while loading file list

Backend:
- Added utility function in core JS for parsing query strings.
- Moved file list + breadcrumb template data code to helper
  functions
- Fixed some file paths in trashbin app to be similar to the files app
2013-09-13 19:59:14 +02:00
Thomas Müller
5af111b0de added determineIcon to \OCA\files\lib\Helper 2013-09-12 00:39:52 +02:00
Thomas Müller
8cf9336bcb storage information is path specific 2013-08-27 00:59:58 +02:00
kondou
9e8a6b704d Add _many_ newlines at the end of files 2013-08-18 11:06:59 +02:00
Morris Jobke
e0547a25ab if rename of file fails, the rename is undone in the view - #fix 2820
Changes:
 * OC.dialog -> OC.Notification
 * Added test
 * Fixed OC.Notification.show() issue for queued items
 * Highlight failed item and show notification
2013-06-15 09:58:27 +02:00
Morris Jobke
0d8fa2eb98 [files] add private declaration of $view 2013-05-14 12:49:23 +02:00
Morris Jobke
b777c0fd75 [files] rename lib to "App" 2013-05-12 11:47:22 +02:00
Morris Jobke
b32c30b6d0 [files] ownCloud typo 2013-05-12 11:47:22 +02:00
Morris Jobke
b9f426b1d7 [files] remove normalizePath on rename and dependency injection 2013-05-12 11:47:22 +02:00
Morris Jobke
418e878ba8 [files] fix typos 2013-05-12 11:47:22 +02:00
Morris Jobke
1020d5c16c [files] refactoring 2013-05-12 11:47:22 +02:00
Tom Needham
f141f8b523 Add further capabilities to /cloud/capabilitites api call 2013-02-10 14:42:23 +01:00
Thomas Mueller
cdd07b3339 introducing class OCA/files/lib/Helper with new function to build an array with storage stats
DRYing the code by using \OCA\files\lib\Helper::buildFileStorageStatistics()
now returning used space percent on each ajax call
2013-01-19 00:31:09 +01:00