aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests/js/fileactionsSpec.js
Commit message (Collapse)AuthorAgeFilesLines
* chore(files): Remove legacy UI scripts now that everything is migrated to VueFerdinand Thiessen2024-09-201-739/+0
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-291-25/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Remove legacy #dir element in files listVincent Petry2022-07-271-2/+2
| | | | | | | | | | Removed legacy "#dir" input element in the DOM. Apps should use OCA.Files.App.currentFileList or OCA.Sharing.PublicApp.fileList and call getCurrentDirectory() to retrieve the current directory and changeDirectory() to change it. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Replace files app ids to classesVincent Petry2022-07-261-2/+4
| | | | | | | | | | | Replaced ids to classes for the following: - #filestable -> .files-filestable - #fileList -> .files-fileList - #controls -> .files-controls - #emptycontent -> .emptyfilelist.emptycontent Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Replace license information to SPDX expressionLouis Chemineau2022-01-111-1/+1
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Bump js licensesJohn Molakvoæ (skjnldsv)2021-03-311-18/+25
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Use grid view in other file views tooJan-Christoph Borchardt2018-10-181-1/+1
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Fix usage of deprecated OC.webrootChristoph Wurst2018-10-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Trigger events before and after a file action is executedDaniel Calviño Sánchez2017-12-191-0/+73
| | | | | | | | | | | | | | In the same way that other elements can know when a FileAction is registered or a default action is set this commit makes possible to be notified before and after a FileAction is executed. This is achieved by wrapping the registered action handler in a custom function that notifies the listeners before and after executing the handler itself. Due to this approach only FileActions registered through "registerAction" trigger the events, although that is not a problem as this is how the actions should be added to the FileActions anyway. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* fixes size of the download spinnerVincent Chan2016-05-301-2/+2
|
* Fix download spinner to work with CSS stylesVincent Petry2016-03-041-0/+20
| | | | | | A recent change replaced img elements with CSS icons for file actions. This fix adjusts the logic to work properly with CSS icons instead of images.
* Make file actions use icon CSS classesRoeland Jago Douma2016-02-251-2/+59
| | | | This makes theming of file actions possible
* Fix unit tests affected by side effectsVincent Petry2016-02-221-1/+3
| | | | | | | | The notification tests were not restoring the clock properly, but indirectly helped other tests pass. Since now we're restoring the clock properly, the other tests were fixed to still work.
* Make files app use Webdav for most operationsVincent Petry2015-11-221-1/+1
|
* Fix file action download spinnerVincent Petry2015-10-301-1/+42
|
* If an inline files action provides an alt text show itRoeland Jago Douma2015-10-031-0/+56
| | | | | * Added unit tests for icon display * Added unit tests for icon alt text display
* Make file actions work from sidebarVincent Petry2015-08-121-3/+29
| | | | | | | | | | | | | The favorite icon in the sidebar now triggers the file action and also updates itself according to the model's state when triggered from the file row. The thumbnail triggers the default action. Currently only one FileInfoModel is used for the selection and state synchronization between views. FileList reload now auto-closes the sidebar.
* Fixed file actions menu to close when reclicking triggerVincent Petry2015-08-111-4/+20
| | | | | | FileActionsMenu is now a backbone view. The trigger and highlight handling is now done in the FileActions.showMenu() method using events.
* Updated unit tests for file actions and actions menuVincent Petry2015-08-101-286/+261
|
* Fix unit tests and introduce better mocks of the HTMLMorris Jobke2015-07-071-2/+2
|
* Show hint if there is no delete permissionMorris Jobke2015-04-231-0/+42
| | | | | | * add class .no-permission which shows the default delete icon * fixes #15172 * add unit test for no permission and for delete permission
* Improve FileActions JS to allow for custom renderingVincent Petry2014-11-241-0/+48
| | | | | | | | | | 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.
* Propagate file action changes to the file listsVincent Petry2014-07-091-3/+3
| | | | | | | | | Whenever an app needs to register an event late, it does that on the original file actions object. Since the file actions that the file list work on is a merged list, not the original one, the registration event needs to be propagated there as well.
* Fix FileActions merging overrideVincent Petry2014-07-041-0/+150
| | | | | | When merging FileActions, the register() functio needs to correctly override the previously merged action handler without affecting the original one.
* Sync file list with file actionsVincent Petry2014-06-271-1/+52
| | | | | | | | | | | | | | Whenever file actions are registered later, now the file lists are automatically notified. Added FileActions.addUpdateListener() to be able to receive such notifications. This removes the need for apps to manually call FileActions.display() after registering new actions. This fixes issues with race conditions when file actions are registered after the file list was already rendered.
* Use actual file path on rename/deleteVincent Petry2014-06-061-0/+3
| | | | | | | When renaming or deleting a file that is in a subdirectory, performing the action from the sharing overview or another file list view, the actual directory of the file must be used instead of the current directory.
* Sharing overview fixes and unit testsVincent Petry2014-05-301-1/+28
| | | | | | | | | | | | - 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
* Distinguish legacy file actions from regular file actionsVincent Petry2014-05-301-3/+4
| | | | | | | | | | | | | | 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.
* Added "dir" in file actions handler context and fixed versionsVincent Petry2014-05-301-0/+8
| | | | | | | | | Added "dir" in file actions handler context so that handlers can know what the path of the file was without having to look it up from the file list. Fixed versions app to use the context.dir instead of the old $('#dir') element. This makes the versions popup work in the sharing overview.
* Added unit test for file action context argumentVincent Petry2014-05-301-4/+32
|
* Fixed many issues, clean upVincent Petry2014-05-151-4/+11
| | | | | | | | | | | | | | | - 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)
* Namespacing for FileList, FileActions and trashbin appVincent Petry2014-05-151-10/+13
| | | | | | | | | | | | | | | | | - 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
* Fixed insertion of filesVincent Petry2014-04-281-0/+1
| | | | | | | | | 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.
* Files, trashbin, public apps use ajax/JSON for the file listVincent Petry2014-04-021-14/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed broken delete file actionVincent Petry2014-04-011-7/+19
|
* Do not send file list for select all on Download/deleteVincent Petry2014-02-131-1/+1
| | | | | | | | - 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
* Merge pull request #7011 from owncloud/jshintThomas Müller2014-02-041-0/+3
|\ | | | | Added .jshintrc
| * Added .jshintrcVincent Petry2014-01-301-0/+3
| | | | | | | | | | | | - Also fixes a few JSHint warnings in files app - Added "global" comment on top of files app to suppress warning and also inform devs about what globals are use
* | Updated unit tests for rename actionVincent Petry2014-01-301-1/+12
|/ | | | | | - rename action is now checked inside of ".nametext" element - added test to ensure that display() correctly resets all actions including the rename one
* Fixed download URL in public pageVincent Petry2014-01-241-0/+61
- 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