Commit Graph

142 Commits

Author SHA1 Message Date
Vincent Petry 27544144ce Fix unit tests affected by side effects
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.
2016-02-22 17:25:32 +01:00
Thomas Müller 7af7d18cfa Merge pull request #16783 from owncloud/handle-redirects-global
Adding global error handler for ajax calls which run into redirection…
2016-02-17 14:49:04 +01:00
Vincent Petry d565290d16 Close file detail sidebar when selecting/unselecting files
Interacting with the checkboxes, also "Select all" will automatically
close the sidebar now.
2016-02-15 14:58:44 +01:00
Vincent Petry b8b77709c0 Add handler for global ajax errors 2016-02-15 12:48:47 +01:00
Vincent Petry ae367c7e97 Fix elementToFile to also return path when defined
Fixes issue when opening the share dialog for a file inside the favorite
list, and the file is from a subfolder
2016-02-08 22:33:39 +01:00
Thomas Müller 22010517f5 Merge pull request #21752 from owncloud/files-delete-fix
Only check selection for delete permissions, not parent folder
2016-01-26 16:13:10 +01:00
Morris Jobke 6e096936e5 update JS humanFileSize to use KB instead of kB 2016-01-19 10:51:57 +01:00
Robin McCorkell df7db3685e Remove faulty directory permissions test 2016-01-15 20:46:39 +00:00
Roeland Jago Douma 665d7b25b0 Add unit test for file update 2016-01-09 22:47:26 +01:00
Vincent Petry d27826bac0 Correctly render uploadtext indicator only on folders 2015-12-18 18:09:46 +01:00
Vincent Petry 4d9e12b8bc Fix mount type root detection
Since Webdav doesn't contain that information, we need to rely on the
parent folder's mount type to find out whether a child item is a
shared/external root or not.

Fixed the mount type detection logic and added unit test.

Also added a fix that ignores detection if no parent folder exists (ex:
shared file list, favorites, etc)
2015-12-14 10:44:47 +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 fa2be0750c Make files app use Webdav for most operations 2015-11-22 16:05:50 +01:00
Vincent Petry 8fc0e05564 Remove "Text file" entry in the "+" menu
The text editor app will register this instead.

Also made "fileList" a non-private attribute to make it possible for
plugins to access the attached file list object.
2015-11-19 15:36:21 +01:00
Vincent Petry 80cf4e84e3 Fix file action download spinner 2015-10-30 14:58:53 +01:00
Vincent Petry 9c9158e6b7 Fix icon update to be more consistent
Makes the details bar show the same icon as in the list.
2015-10-29 12:59:51 +01:00
Vincent Petry abd0ba1f25 Fix file upload, conflict dialog, also in public link
- Use "FileList" instead of "OCA.Files.App.fileList" that doesn't exist in public
link page.
- Fix public link upload by properly adding the form data using a new
  utility function "addFormData". That one is needed because IE8 upload
  and regular upload use a different format...
2015-10-21 12:18:06 +02:00
Vincent Petry 204b3ca189 Do not register sidebar panels when no sidebar 2015-10-15 16:30:50 +02: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
Morris Jobke 4b3a5a257f Fix moment.js "a few seconds ago" with "seconds ago"
* fixes #18627
2015-10-02 10:51:51 +02:00
Thomas Müller 750f19340f Merge pull request #19310 from owncloud/hide-sort-indicator
hide sort indicator when in multiselect mode, ref #19056
2015-09-30 11:07:45 +02:00
Thomas Müller 733673b39d Merge pull request #19365 from owncloud/files-detailsbar-interaction
Fix sidebar interaction
2015-09-29 14:44:28 +02:00
Vincent Petry d52361b09b Disable sorting when multiselect is enabled in file list 2015-09-29 13:24:33 +02:00
Vincent Petry f9acf4627e Fix sidebar interaction
- Clicking a file row or selecting it will open the sidebar.
- When sidebar is open, its contents update with the last selection.
- Dragging doesn't open the sidebar but does update its contents if it was
open already.
- Switching folders closes the sidebar.
- Close sidebar when highlighted file got deleted/removed from list
2015-09-28 15:23:37 +02:00
Vincent Petry a8fb0038e9 Hide sidebar tab headers conditionally
Added canDisplay() in DetailsTabView that should return false if the tab
header of this tab must be hidden
2015-09-28 14:57:44 +02:00
Thomas Müller 72024ad201 Merge pull request #19404 from owncloud/files-sidebar-sorttabs
Fix tabs order in files sidebar
2015-09-28 12:55:38 +02:00
Vincent Petry 5e4a52d3c2 Fix tabs order in files sidebar 2015-09-28 12:30:12 +02:00
Vincent Petry f35b6833ff Fix order of actions in the files actions menu 2015-09-28 11:19:49 +02:00
Jan-Christoph Borchardt 004de1425e Merge pull request #18630 from owncloud/files-combineuploadbutton
Combine upload action into the "New" menu
2015-09-07 14:03:57 +02:00
Vincent Petry 310d797284 Add versions tab to files sidebar
- move versions to a tab in the files sidebar
- added mechanism to auto-update the row in the FileList whenever values
  are set to the FileInfoModel given to the sidebar
- updated tags/favorite action to make use of that new mechanism
2015-09-03 16:47:24 +02:00
Vincent Petry 73c61941e2 Tags in FileInfo map must be an array
Fixes FileList.elementToFile to make an array for the tags instead of
keeping the original joined string
2015-09-03 13:01:14 +02:00
Vincent Petry 4ba2333507 Added unit tests for "new" file menu and small fixes
- added unit tests for NewFileMenu
- use generateUrl for FileList.createFile and FileList.createDirectory
- added unit tests for FileList.createFile and FileList.createDirectory
2015-09-03 12:17:35 +02:00
Vincent Petry 3ea9f97c36 Fix sidebar thumbnail loading JS unit tests 2015-09-03 08:24:50 +02:00
Raghu Nayyar c6053daf43 Fixes failing tests 2015-08-31 00:14:07 +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 37939fb0e8 Parse mtime from the data attributes 2015-08-24 17:16:20 +02:00
Vincent Petry ffff156965 Merge pull request #18310 from hasso/selection-string-fix
Fix the string counting a selected files/dirs
2015-08-18 10:43:17 +02:00
Hasso Tepper 97bc73ad49 Update unit test to reflect the string change 2015-08-17 15:31:44 +03:00
Vincent Petry e2549fa660 Improve right sidebar tabs behavior
Tab heads are not rendered if only one tab.

The tab contents is updated on-demand. This means that if a tab is not
visible it is not rendered at first. If the tab was already rendered
through switching, its model will not get updated until the next time it
becomes visible. This will prevent needless rerendering of invisible tab
contents, especially considering that some tabs might need extra ajax
requests.
2015-08-14 16:51:04 +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 9454e9043a Updated unit tests for file actions and actions menu 2015-08-10 14:12:34 +02:00
Vincent Petry 038d29b8de Fix unit test for tipsy->tooltip change 2015-08-10 11:23:39 +02:00
Arthur Schiwon 9c402c761f fix timezone issue with unittest 2015-08-07 01:22:45 +02:00
Vincent Petry bdfab8108e Fix sidebar mtime display unit test 2015-08-07 01:22:45 +02:00
Vincent Petry 781ba420c9 Use own tabs impl in files sidebar
Also change style.
2015-08-07 01:22:44 +02:00
Arthur Schiwon 734c6b0b6f extend MainFileInfoDetailView JS tests 2015-08-07 01:22:43 +02:00
Vincent Petry e0bcd56402 More work on right sidebar unit tests 2015-08-07 01:22:43 +02:00
Vincent Petry 3e44ca6dc2 Added unit tests for right sidebar 2015-08-07 01:22:43 +02:00
Morris Jobke 5699fff889 Merge pull request #17175 from owncloud/add-download-feedback
Add loading spinner to download icon
2015-07-30 16:34:35 +02:00