Commit Graph

131 Commits

Author SHA1 Message Date
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
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 91d9d45c6c correct delete-icon to icon-delete, fix #11128 2014-09-22 18:17:33 +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
Vincent Petry 22653e21a2 Propagate file action changes to the file lists
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.
2014-07-09 12:26:33 +02:00
Vincent Petry 07118f599e Fix FileActions merging override
When merging FileActions, the register() functio needs to correctly
override the previously merged action handler without affecting the
original one.
2014-07-04 12:56:04 +02:00
Vincent Petry 025b71d068 Use fileActionsReady to re-render sharing icons
Whenever file actions are modified, either by registering new actions or
when appending a new page of entries, the sharing app is now notified so
it can correctly refresh the sharing icon status.

Additionally, the core's loadIcons() method is also used to load the
existing shares and also refresh the sharing icons afterwards.
2014-07-01 21:32:04 +02:00
Vincent Petry 586b3a9683 Sync file list with file actions
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.
2014-06-27 13:41:01 +02:00
Vincent Petry 6850d0c6d7 Merge pull request #8931 from owncloud/filelist-usepathforaction
[master] Use actual file path on rename/delete
2014-06-23 15:53:23 +02:00
Vincent Petry 502573eb2e Fixed file actions fallback
Some apps are calling FileActions.display() directly but omit the new
fileList argument.

This fix makes the fileList argument correctly fall back to the default
file list (the one from the "All files" section)
2014-06-20 12:58:04 +02:00
Vincent Petry d3d0035a9a Use actual file path on rename/delete
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.
2014-06-06 15:17:55 +02:00
Morris Jobke 57ef089aac drop allowZIPdownload and maxZIPSize as options 2014-06-02 16:29:03 +02:00
Vincent Petry 1d9129eac3 Sharing overview fixes and unit tests
- 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
2014-05-30 10:06:29 +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