Hidden files (dot files) are now always rendered in the DOM to make
sure that all file operations and selection still work as expected.
Their visibility is now toggled on CSS level.
When loading the next page of search results, make sure that the loop
can end if there are no more elements in case the total doesn't match.
Also added a check to avoid recomputing the search results whenever the
setFilter() is called with the same value. This happens when navigating
away to another folder, the search field gets cleared automatically and
it calls FileList.setFilter('').
When filtering the file list, if a result is on an unrendered page,
make sure to call _nextPage() to prerender the pages in order to
display all matching results.
* Fixed group share searching for members of
multiple group. Issue #11808.
* Fixed group share searching, continued.
Avoid searching for empty group list in getItemSharedWithUser().
Broke tests in previous commit, #12030.
* Simler check for group count.
* Fix for https://github.com/owncloud/core/issues/24783 , described there
* Now it's #24272, 24783 was a duplicate. Previous change was also not very good. Now we don't create ZIP with a single file inside.
this.updateSearch() sets the current file list instance and clears the box. This is unnecessary and makes the search box unsuable on some mobile devices where a keyboard fade-in causes a onResize trigger, which would then clear and blur the box.
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
and both receive a drop.
Build breadcrumb over and out callback in filelist.js and
pass them as options to utilize local selectors of filelist
Re-enable td elements after drop to bread crumb
Fix# drop handler still being called after enable,
it seems that waiting for a short time before re-enabling solves the
problem
* Add explanations for setTimeout re-enable td.filename drop handler
Plugins can extend _getWebdavProperties to add custom properties.
These should not be added to the original properties list, so now the
FileList makes a copy of the array.
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)
In case a permanent notification "storage full" was displayed, it will
be hidden after deleting a file.
Directly after that a getstoragestats.php call is made that will decide
whether to reshow the notification based on the new free space.
- calculate multiselect header width to exclude scrollbar
- call FileList._onResize() when sidebar is toggled ("appresized"), this
also updates the breadcrumb width
- moved global getScrollBarWidth() to OC.Util namespace
When uploading files, first check if the files exist in the current file
list. For the ones that do, show a conflict dialog.
For the rest, upload directly.
If the upload operation detects a conflict on the server side, it will
also continue populating the conflict dialog.
From now on, server side conflict can only occur if someone concurrently
uploaded a file into the same folder but the current user hasn't
refreshed the list yet.
- 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
- 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
- added unit tests for NewFileMenu
- use generateUrl for FileList.createFile and FileList.createDirectory
- added unit tests for FileList.createFile and FileList.createDirectory
The old one contains untranslatable ' & ' if both files and dirs are
selected. The new code is especially designed to reuse strings from file
listing summary view (apps/files/js/filesummary.js), so no translation
is broken.
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.
* 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
Make it possible to drop files below the table even if the table is
smaller than the window height.
Added a check to make sure upload is not triggered on invisible lists.
We already use `.text()` here which automatically properly encodes the string. Thus the string will be double-encoded and look ugly. (i.e. when you search for ">" you will see "No results found for >")
Fixes itself.
In the public page the scroll container is the window instead of a div.
The $(window) object doesn't support animating the scroll property, so
the $('body') element is used instead.
This is fix for https://github.com/owncloud/core/issues/10060
Instead of hard coding page size as 20 items, we check real page height, and divide by 50 (height of one row).
This will allow to load fewer items on small screens and enough items on large screens (4k, portrait orientation, etc.).
Also checking page height on every load to respond on browser window resizing,
When dropping files onto a read-only folder, a notification
is now shown instead of attempting to upload.
This for both the drag for upload and drag from inside the file list
cases.
Now passing the "scrollto" URL argument to the file list class which
will also automatically scroll and highlight the matching element.
This code is triggered by the search box when in a different folder and
also by the activity app.
Now using a natural sort algorithm that is more consistent between JS
and PHP (although not perfect in some corner cases)
- added OC.Util.naturalSortComparator that uses the same algo that was
used for the user list
- changed user list and files list to use OC.Util.naturalSortComparator
- removed toLowerCase() and changed the comparator to use
String.localeCompare()
- added unit tests
- added OC_NaturalSort that is used by OCP\Util::naturalSortCompare()
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.
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.
Reload the files app in case of authentication errors, expired tokens or disabled app
Reloading will triger the full server side handeling of those errors
formatting
fix missing semicolon + some jshint warnings
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.
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.
Rewrote the breadcrumb calculation to be more readable.
Breadcrumb now has a setMaxWidth() method to set the maximum allowed
width which is used to fit the breadcrumbs.
The breadcrumb width is now based on the container width, passed through
setMaxWidth() by the FileList class.
Now using fixed widths for the test crumbs to simulate consistent
widths across browsers which rendering engines might usually yield
different results.
When renaming to an existing file name, blurring the field should not
remove it.
This fix keeps the field until escape is pressed instead of replacing it
with a broken empty space.
When uploading files or folders, they only need to be appended or
updated when their path or a section of their path is inside the current
directory (which happens for folder upload)
Fixes issue where file was appended when dragging on a parent directory
onto the breadcrumb.
Fixes appending issue when uploading folders.
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.
- 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
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 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.
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.
- Fixed detection whether the drop zone is inside the currently visible
table
- Now dragging outside the table does nothing instead of uploading,
because the user might drop on the sidebar
- Added unit tests for the drop handler
- summary is now untouched on rename instead of bogus incrementation
- fixes "Share" status icon by only triggring "fileActionsReady" once
- row is now reinserted even when rename is cancelled, this removes the
hacky/buggy code that tried to rename the element back
- added unit tests to cover the fixed cases
- 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)