Commit Graph

97 Commits

Author SHA1 Message Date
Vincent Petry 508c580e67
Fix trashed file name corruption when rerendering trashbin list
The trashbin code does some gymnastics with the file data at render
time. This fix makes sure that the modifications done on the file data
are only local to the rendering code and doesn't affect the actual file
data from the file list.
2016-06-23 11:51:23 +02:00
Christoph Wurst 6c5696d3a8
filter hidden files on the web interface
add checkbox to toggle show/hide hidden files

persist show hidden setting

fix settings menu layout

test ApiController::showHiddenFiles

don't show hidden files by default

Store config in Backbone model and inject it into FileList

Filter files only temporarily when rending the file list

Fix file rename validation
2016-04-19 16:08:56 +02:00
Vincent Petry dbdf2173ac Return false on 401 in file list + trash file list
This gives a chance to the global ajax error handler to do its work if
the session expired.
2016-03-03 09:09:30 +01:00
Roeland Jago Douma 92cff0984d Make file actions use icon CSS classes
This makes theming of file actions possible
2016-02-25 22:49:52 +01:00
Vincent Petry ec3166742b Properly join path sections
This prevents double slashes that can mess up path comparisons in some
cases.
2015-11-22 16:05:51 +01:00
Vincent Petry fa2be0750c Make files app use Webdav for most operations 2015-11-22 16:05:50 +01:00
Joas Schilling a378dc5a7b Fix scrollto= parameter in trashbin view 2015-11-02 10:31:06 +01:00
Thomas Müller 0a5349eec6 Merge pull request #19647 from owncloud/trashbin-removesidebar
Remove sidebar for trashbin view
2015-10-14 12:50:46 +02:00
Vincent Petry 6b71efb2b1 Make trashbin's "Restore" an inline action 2015-10-12 11:27:23 +02:00
Vincent Petry 8e84ab8613 Remove sidebar for trashbin view 2015-10-08 12:59:13 +02:00
Hendrik Leppelsack d4ce713749 display checkboxes properly after file restore 2015-10-01 22:54:36 +02:00
Vincent Petry a35144e961 Properly translate file actions 2015-09-22 14:52:52 +02:00
Vincent Petry 5e6fa3c938 Fix trashbin sidebar
Do not display size as it is not available.
Use display name instead of name to remove the ".d123456" suffix.
2015-08-25 11:29:35 +02:00
Vincent Petry ca34921cdf Implement file actions dropdown
File actions now have two types "inline" and "dropdown". The default is
"dropdown".
The file actions will now be shown in a dropdown menu.
2015-08-10 14:12:34 +02:00
Volkan Gezer d8adc76125 l10n: delete permanently fix 2015-01-11 17:15:58 +01:00
Jan-Christoph Borchardt 7faf3d17e5 fix accessibility for deleted files 2014-12-18 16:54:39 +01:00
Robin Appelman 3bf0922b13 Merge pull request #12527 from owncloud/js-pluginsystem
Simple Plugin system for Javascript
2014-12-12 11:43:31 +01:00
Robin Appelman baf5c44bec Merge pull request #12696 from owncloud/trashbin-selected-delete
Fix deleting selected files in the trashbin
2014-12-08 16:30:53 +01:00
Robin Appelman b2d4e53f66 Fix deleting selected files in the trashbin 2014-12-08 15:16:15 +01:00
Vincent Petry c02ef69521 Simple Plugin system for Javascript 2014-12-01 16:20:44 +01:00
Vincent Petry e689bc745f Improve FileActions JS to allow for custom rendering
This improves the OCA.Files.FileActions class to support passing a
"render" function in the action object.

The default function "_defaultRenderFunction" is used by default and
renders actions in the usual actions container.

Moved "Rename" and "Delete" to custom render functions.
2014-11-24 16:26:50 +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
Jan-Christoph Borchardt 2ac953e6a8 correct progress-icon to icon-loading-small 2014-09-22 18:24:32 +02:00
Jan-Christoph Borchardt 91d9d45c6c correct delete-icon to icon-delete, fix #11128 2014-09-22 18:17:33 +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
Vincent Petry 60bcdc550e Fixed file actions for sharing views
FileActions can now be clone to be use for separate file list views
without having the side-effect of affecting the main file list view.

Added "Open" action in sharing overview file lists to redirect to the
regular file list when clicking on a folder.
2014-05-30 10:06:29 +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
Vincent Petry c0e5975ab6 Set default sort of trashbin to timestamp descending 2014-04-28 17:42:04 +02:00
Vincent Petry 3c006a5a4d Cleanup and fix trashbin "clear all files" operation 2014-04-28 14:55:01 +02:00
Vincent Petry fd982df6ae Fixed selection to be based on FileList.files
The file selection is now based on the internal model array
FileList.files instead of the visible checkboxes.

This makes it possible to virtually select files that haven't been
rendered yet (select all, then deselect a visible one)

Added more unit tests for selection (with shift and ctrl as well)
2014-04-28 14:55:01 +02:00
Vincent Petry a952d80ad9 Fix trashbin previews and "delete selected" 2014-04-28 14:55:01 +02:00
Vincent Petry 9c2fbea6a4 Fix file selection for infinite scrolling
- moved file selection code to FileList
- fix selection summary when all files are selected
- nextPage now auto-selects files if "select all" checkbox is checked
- fixed trashbin to use the same selection logic as FileList
2014-04-28 14:55:00 +02:00
Vincent Petry 9f62059efa Fix file summary to use the whole file list
- moved the summary code into a new class FileSummary
- FileSummary is calculated only once, then updated with add/remove
- added new OC.Util namespace for JS utility functions
2014-04-28 14:49:39 +02:00
Volkan Gezer f434c3a213 Fix localization issues of files_trashbin 2014-04-17 21:10:21 +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 f3d6b2f3e9 Do not retrieve storage stats for trash bin 2014-03-28 11:21:33 +01:00
Vincent Petry 44441b56d6 Fixed trashbin title 2014-02-20 15:16:45 +01:00
Vincent Petry 94b3296a71 Trashbin select all now doesn't send file list
- Fixed "delete" and "restore" actions to not send the file list when
  all files are selected
- When some files are selected, sends the current dir
- Removed "dirListing" attribute as the backend is able to compute the
  value based on the current dir
2014-02-17 18:34:59 +01: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
Bjoern Schiessle 79719d9ae5 toggle select all checkbox 2013-12-12 17:33:04 +01:00
Bjoern Schiessle ee66db447f make it possible to select folders 2013-12-02 16:30:03 +01:00
Bjoern Schiessle 8ce3ea3e2c fix delete files from trash bin 2013-12-02 11:50:55 +01:00
Bjoern Schiessle 71589e65d2 fix restore from files in sub-folders 2013-11-29 16:43:50 +01:00
Vincent Petry 80c8666d3a Deleting all files in trash now only sends a single flag
To prevent having to send the list of all files for deletion, only set a
flag "allfiles". This should make it a bit smoother when deleting 5000+
files.

Also fixes some "empty trash" message issues.
2013-11-11 17:58:33 +01:00
Vincent Petry e41ea20ce4 Fixed clicking on the "Home" breadcrumb in the trash app
Clicking on the "home" breadcrumb now correctly brings the user back to
the files app.
2013-10-28 20:24:06 +01:00
Bjoern Schiessle 7ab4fef7a9 update file summary after group delete/restore 2013-10-09 16:17:43 +02:00
Bjoern Schiessle 46bce8e540 fix checkbox 2013-10-09 13:15:53 +02:00
Bjoern Schiessle 51cfdb32b1 fix indention 2013-10-09 12:43:56 +02:00
Bjoern Schiessle 31a91ef892 fix group delete/restore 2013-10-09 12:35:15 +02:00