Commit Graph

144 Commits

Author SHA1 Message Date
Abijeet 45db89f3e6
Added a new action menu in files and trash list.
Uses the new file-multi-select-menu component.

Towards #7647

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
2018-06-18 07:39:43 +02:00
John Molakvoæ (skjnldsv) 24ecf3f4c9
Fixed files copy/move when in favorites or recent section
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-22 18:09:30 +01:00
Roland Tapken 38ba64af77 Split move and copy operations
The new 'Move and copy' operation from #6040 requires UPDATE permissions
on the selected files. However, READ would be sufficient to create a
copy of a file (if not viewed as a public share). For this reason this patch:

- changes the permission of the 'MoveCopy' action to PERMISSION_READ
- changes the label of the action depending on the permissions
- changes the available buttons in the Move/Copy dialog depending on the
  permissions.

The same changes are done to the filelist view for bulk actions.

Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
2018-02-15 18:51:12 +01:00
Daniel Calviño Sánchez c059fbd409 Remove internal unused property
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-12-21 02:08:40 +01:00
Daniel Calviño Sánchez 7760f16521 Trigger events before and after a file action is executed
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>
2017-12-19 18:33:34 +01:00
Daniel Calviño Sánchez e6b74fac40 Add proper handling of files without permissions
Now a file gets its directory permissions only if it contained no
permissions (they were undefined or null), but not if its permissions
were set to "NONE".

Besides that, now file actions that do not require any permission on the
file to be performed can be used on files that have no permissions.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-11-02 19:37:00 +01:00
Daniel Calviño Sánchez a8f1902b02 Add support to FileActionsMenu for icon class functions
Icon class function properties make possible to render a different icon
class depending on the context of the file action.

Inline file actions had support for them already and called them passing
the file name and context of the file action as parameters. Due to this
the FileActionsMenu passes those parameters too to icon class functions
instead of just the context like done for display name functions.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-10-19 01:46:13 +02:00
Thomas Citharel 5767659d22 Change move copy order and debug leftover
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-09-15 16:53:10 +02:00
Thomas Citharel 33f0601862 [WIP] Added copy and move buttons
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-09-15 16:53:10 +02:00
Thomas Citharel 246a5a5750 Allow files to be copied through action menu & multiple files actions
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-09-15 16:53:10 +02:00
Jan-Christoph Borchardt 2b79490201 use more fitting icon for files move action 2016-10-17 18:52:25 +02:00
Robin Appelman fdc2e8ba56
Add file action to move files and folders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-14 16:23:11 +02:00
Vincent Chan 3538e90ba1
fixes size of the download spinner 2016-05-30 11:23:54 +02:00
Vincent Petry fdeafef6a0
Auto-add fileid in URL for currently displayed folder 2016-05-06 16:46:59 +02:00
Vincent Petry 3a36163e91 Fix download spinner to work with CSS styles
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.
2016-03-04 10:48:08 +01:00
Roeland Jago Douma c767030f07 Close class 2016-02-25 22:49:52 +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 baa5a69c55 Bring back file delete action text to be based on context
For received shares, the delete action becomes "Unshare" and for
personal mounts it becomes "Disconnect storage".

This also makes it possible from now on to pass a function to a file
action's "displayName" attribute.
2015-12-11 15:14:30 +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
Vincent Petry 80cf4e84e3 Fix file action download spinner 2015-10-30 14:58:53 +01:00
Roeland Jago Douma 6bf6ff9564 If an inline files action provides an alt text show it
* Added unit tests for icon display
* Added unit tests for icon alt text display
2015-10-03 15:47:20 +02:00
Vincent Petry f35b6833ff Fix order of actions in the files actions menu 2015-09-28 11:19:49 +02:00
Vincent Petry a35144e961 Properly translate file actions 2015-09-22 14:52:52 +02:00
Vincent Petry 37a842a18e Only show delete action in menu when delete permission exists
This reverts an older decision where we said the delete action must
always appear but be grayed out when the permission is missing.
The actions menu obsoletes that.
2015-08-18 11:35:40 +02:00
Jan-Christoph Borchardt 4e53b5922d Merge pull request #18178 from owncloud/files-sidebar-actions
Sidebar file actions
2015-08-13 17:17:10 +02:00
Hendrik Leppelsack e5444a1a5d replace tipsys with tooltips 2015-08-12 23:09:49 +02:00
Vincent Petry c964eff17b Make file actions work from sidebar
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.
2015-08-12 17:30:20 +02:00
Vincent Petry 984ae8140d Fixed file actions menu to close when reclicking trigger
FileActionsMenu is now a backbone view.
The trigger and highlight handling is now done in the
FileActions.showMenu() method using events.
2015-08-11 11:35:46 +02:00
Vincent Petry 86e1eaf370 Inline actions using default renderer are now always permanent
Default renderer like the favorite icon can decide whether to use the
permanent class or not.

Fixed sharing code to properly update the icon according to sharing
state modifications.
2015-08-10 15:57:21 +02:00
Vincent Petry 9454e9043a Updated unit tests for file actions and actions menu 2015-08-10 14:12:34 +02:00
Vincent Petry dd4e0a8253 Make file action menu icon permanent 2015-08-10 14:12:34 +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
Morris Jobke 009d1f3214 move updateFileActionSpinner to OCA.Files.FileActions 2015-07-22 10:35:15 +02:00
Morris Jobke 43afa4c0e3 refactor this to proper separation of concerns 2015-07-15 11:14:20 +02:00
Morris Jobke 3f5aa27d49 refactoring into proper methods 2015-07-07 15:16:37 +02:00
Morris Jobke e557fe0aab Add proper download started feedback
* this code adds a cookie when a special get parameter is set
* the content of this get parameter is used as value for the cookie
* the cookie expires after 20 seconds
* the JS code checks every 500 milliseconds for the cookie
  -> if the cookie is set the request returned and the download is started
2015-07-07 13:56:49 +02:00
Morris Jobke 28a8697995 Reduce timeout for download spinner to 2 seconds 2015-07-07 13:56:49 +02:00
Morris Jobke 0cdb46b5c6 Fix layout of disabled links in the file list
* also disable download button after click
2015-07-07 13:56:48 +02:00
Morris Jobke 28a51ef724 Add loading spinner to download icon
* vanishes after 7 seconds
2015-07-07 13:56:48 +02:00
Morris Jobke f4bc852db3 Show hint if there is no delete permission
* add class .no-permission which shows the default delete icon
* fixes #15172
* add unit test for no permission and for delete permission
2015-04-23 21:49:59 +02:00
Sergei Shuykov 4d2ae71bf2 fix_#11348 Safari rename button positioning 2015-01-16 14:43:34 +03:00
Volkan Gezer 691fab8be3 make Share button localized again
it seems we have forgotten to use named FileAction
2015-01-11 15:57:45 +01:00
Jan-Christoph Borchardt 6f4ed59883 use method to only visually hide elements, show only for screen reader 2014-12-17 14:12:13 +01:00
Jan-Christoph Borchardt 4344b3d3cf fix Delete action text being translatable 2014-12-17 11:55:35 +01:00
Jan-Christoph Borchardt edc8967c93 add text to Delete action 2014-12-17 11:50:58 +01:00
Morris Jobke 1bfa405a93 introduce alt text for rename icon - fixes #12067 2014-12-08 15:49:09 +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 5ca869c324 Merge pull request #9177 from owncloud/jsdocexperiment
Improved JS Docs + added build script for JS Docs
2014-11-13 11:16:08 +01:00
Jan-Christoph Borchardt af743efff0 add alt text for file actions, but leave empty since text is directly next to it 2014-11-06 15:33:38 +01:00