Commit Graph

1447 Commits

Author SHA1 Message Date
Christian Aigner ce37930910 HBOX-297 trim in webfrontend for new files to stay compatible with windows 2019-02-01 09:47:07 +00:00
fnuesse f13b3ab4ae Add drop zone for favorites quick access in navigation
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
2019-02-01 01:45:03 +01:00
fnuesse ad407f64bd Fix drop zone shadow
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
2019-02-01 00:59:05 +01:00
Daniel Calviño Sánchez 8680ced1ae Unify handling of dropping one file or several files on the trash bin
When a single file was dropped on the trash bin the file information was
gotten from the original element in the file list. When several files
were dropped on the trash bin the file information was gotten from the
helper elements being dragged around. The helper element also contain
the needed file information when a single file is being dragged, so the
handling was unified to always get the file information from the helper
elements.

As the handling of several files is the same as before there is still
the issue of only deleting those files shown in the drag helper instead
of all the selected files.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-01 00:56:50 +01:00
Daniel Calviño Sánchez e46a67ef4c Use full names instead of abbreviations in variable names
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-31 19:55:51 +01:00
Daniel Calviño Sánchez 3baa078f70 Make code format more consistent with the rest of the file
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-31 19:55:51 +01:00
Daniel Calviño Sánchez 75edcad549 Replace double quotes with single quotes
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-31 19:55:51 +01:00
Daniel Calviño Sánchez 96bc1397b1 Add missing trailing ";"
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-31 19:55:33 +01:00
Daniel Calviño Sánchez 72a424d4c8 Remove unneeded triggering of event
The "droppedOnTrash" event was being triggered when the file list was
initialized, but it should be triggered only when the user actually
drops a file on the trash bin.

Besides that, the event had no effect; only the file list handles it,
but as it was not triggered on any element it ended being triggered on
the document, and thus not handled. Moreover, even if it had been
triggered on the file list it would have been done before the handler
was set, so it would not have been handled anyway. And even if it had
been handled no data was provided, so the handler would have failed.

In conclusion, triggering the event there was not needed, and thus it
was removed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-31 19:14:58 +01:00
Daniel Calviño Sánchez dd91c4e500 Remove duplicated variable declaration
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-31 17:59:50 +01:00
Daniel Calviño Sánchez 47937a5062 Remove leftover from a WIP
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-31 17:49:25 +01:00
Daniel Calviño Sánchez 2aee19a4ba Remove hack to prefetch the starred trash icon
Since 6ad7f32938 SVG icons are directly embedded in "icons-vars.css", so
the starred trash icon is now loaded along with the regular trash icon
all at once. Therefore it is not needed to explicitly prefetch it using
a hidden div.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-31 17:40:14 +01:00
John Molakvoæ 53fd4997cc
Merge pull request #12364 from tomasz-grobelny/file_range_select
Ability to select file ranges with mouse or touchscreen
2019-01-30 10:21:23 +01:00
Daniel Calviño Sánchez 038e665db9 Fix dropping a folder on a folder row
When the uploaded files have a relative path (that is, when a folder is
uploaded) it is first ensured that all the parent folders exist, which
is done by trying to create them. When a folder is created in the
currently opened folder the file list is updated and a row for the new
folder is added. However, this was done too when the folder already
existed, which caused the previous row to be removed and a new one added
to replace it.

For security reasons, some special headers need to be set in requests;
this is done automatically for jQuery by handling the "ajaxSend" event
in the document. In the case of DAV requests, if the headers are not set
the server rejects the request with "CSRF check not passed".

When a file or folder is dropped on a folder row the jQuery upload
events are chained from the initial drop event, which has the row as its
target. In order to upload the file jQuery performs a request, which
triggers the "ajaxSend" event in the row; this event then bubbles up to
the document, which is then handled by adding the special headers to the
request.

However, when a folder was dropped on a folder row that folder row was
removed when ensuring that the folder exists. The jQuery upload events
were still triggered on the row, but as it had been removed it had no
parent nodes, and thus the events did not bubble up. Due to this the
"ajaxSend" event never reached the document when triggered on the
removed row, the headers were not set, and the upload failed.

All this is simply fixed by not removing the folder row when trying to
create it if it existed already.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-29 13:04:19 +01:00
Christoph Wurst 8fcb9fcfdc
Merge pull request #13855 from tomasz-grobelny/faster_file_upload
Throttle getstoragestats.php calls and allow simultaneous uploads
2019-01-29 08:51:38 +01:00
Tomasz Grobelny f99ce0d546 Throttle getstoragestats.php calls and allow simultaneous uploads
Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
2019-01-27 22:59:14 +01:00
imsolost 5742ec79ab changed case on variable to match initial case
Signed-off-by: imsolost <imsolost@gmail.com>
2019-01-25 11:16:37 -08:00
imsolost 3e37620cc2 fixed replacement functions to catch all instances of parenthesis
Signed-off-by: imsolost <imsolost@gmail.com>
2019-01-25 11:16:37 -08:00
Tomasz Grobelny 907deab278 Add more accessible method of selecting file ranges
Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
2019-01-24 22:04:52 +01:00
Tigran Mkrtchyan 0573413134 apps: file-upload: fix typo in comments
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2019-01-21 19:11:13 +01:00
Florian Schunk 332b4aee9d fix testing for undefined
Signed-off-by: Florian Schunk <florian.schunk@rwth-aachen.de>
2019-01-16 22:54:16 +01:00
Florian Schunk ecb936495f also remember folder for multiselect actions
Signed-off-by: Florian Schunk <florian.schunk@rwth-aachen.de>
2019-01-16 22:54:16 +01:00
Florian Schunk 37270fc525 remember last copied to directory
Signed-off-by: Florian Schunk <florian.schunk@rwth-aachen.de>
2019-01-16 22:54:16 +01:00
Florian Schunk 528964e0b7 copy Dialog starts in current directory
Signed-off-by: Florian Schunk <florian.schunk@rwth-aachen.de>
2019-01-16 22:54:16 +01:00
Roeland Jago Douma bcea6c3697
Merge pull request #13212 from nextcloud/bugfix/noid/ie11-files-loading
Files list not rendering if user has favorites navigation unfolded
2018-12-21 14:20:41 +01:00
Julius Härtl 6bcc77a7c6
Replace ChildNode.before with custom before helper
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-12-21 12:03:34 +01:00
Roeland Jago Douma 00446ffb9e
Only check whatsnew once per hour
Store the last check in the session storage. (Which gets cleared on
logout). And only check once an hour.
Saves a request to the server on most requests when browsing.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-12-20 20:09:05 +01:00
Roeland Jago Douma 9204ce7d3d
Do not show general warning on free space error
Fixes #12588
Probably needs more fixing for the other cases. But this is the quick
fix I could come up with for now.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-12-05 22:40:07 +01:00
Morris Jobke 68ad2ae118
Merge pull request #10825 from greenido/fixing-issue-9931
Copy a file to the same directory
2018-11-22 17:37:04 +01:00
Julius Härtl a90b4bcc32
Do not switch to root folder if filelist is already shown
Navigating to the root folder is already handled by
OCA.Files.Navigation.setActiveItem in case the view doesn't change.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-22 14:03:23 +01:00
Daniel Calviño Sánchez e39db808fb Fix rendering of the sidebar in Files app
When a view is rendered it should not be concerned with where it is
going to be placed in the document; in general this should be a
responsibility of the object using the view.

Moreover, when the details view is rendered it should simply prepare a
skeleton that includes the root elements provided by the plugins; those
elements will be updated by the plugins as needed when a file or a tab
is selected.

Finally, the details view should not be explicitly rendered. The
rendering removes the previous elements, but that is needed only when
the details view is in a dirty state, that is, when new plugins were
added since the last time that it was rendered. However, that dirty
state is internally handled, and the view is automatically rendered
again if needed when a file info is set.

Due to all that the details view is no longer explicitly rendered when
updating it with a different file. Also, as each file list has its own
details view, and each details view has its own element, but there can
be only one details view/sidebar element in the document, when the file
list updates the details view it also replaces the current one in the
document with its own details view if needed (that is, if it is not the
current one already).

Besides that, when the element of a details view is replaced with the
element of a different details view the old one should be detached from
the document, but never removed. Otherwise the event handlers would not
work when that element is attached again later (when changing to a
different section in the Files app and then going back to the previous
one).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-22 05:58:25 +01:00
Julius Härtl 78056a3bef
Fix whitespace and file action cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-20 19:46:49 +01:00
Julius Härtl fb8aa31dbf
Allow to hide download option for folders shared by link
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-20 19:46:35 +01:00
Morris Jobke 802e4a79d1
JSUnit tests are not compatible with let/const yet
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-19 15:22:10 +01:00
Morris Jobke 85a491a6fb
Translate name for "(copy)"
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-19 13:57:27 +01:00
Ido Green 313aee91ca
Per the last comment on having only (copy) for the first one
Signed-off-by: Ido Green <greenido@gmail.com>
2018-11-19 13:57:23 +01:00
Ido Green 48d74482c1
Use the new naming per the comments on #9931
More details here: https://github.com/nextcloud/server/issues/9931#issuecomment-402318120

Signed-off-by: Ido Green <greenido@gmail.com>
2018-11-19 13:57:17 +01:00
Ido Green c794452689
fixing issue 9931 - copy a file to the same directory
Signed-off-by: Ido Green <greenido@gmail.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-19 13:56:40 +01:00
Julius Härtl eb039608f9
Make number of file list entries depending on the width for grid view
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-18 10:44:53 +01:00
Morris Jobke 61f7eecc0b
Show thumbnail on rename
* does not hide thumbnail when rename is shown
* fixes layout for grid and list view
* fixes #11901

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-15 12:14:15 +01:00
John Molakvoæ (skjnldsv) 98edf3612c
Fix min trhumbnail size
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-06 11:45:19 +01:00
John Molakvoæ (skjnldsv) 5682d302c7
Add grid toggle for every files view
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-06 11:42:18 +01:00
Morris Jobke f350f2e3ec
Merge pull request #12128 from tomasz-grobelny/fix_file_move
Fix file move operation for large number of files
2018-11-06 00:24:27 +01:00
John Molakvoæ (skjnldsv) a793b1027c
Ask before cancelling an ongoing upload
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-05 10:11:50 +01:00
Tomasz Grobelny 1fa6e0be23 Merge remote-tracking branch 'upstream/master' into fix_file_move
Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
2018-11-04 09:39:19 +00:00
Tomasz Grobelny 41687ef00f Fix move related tests
Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
2018-11-03 23:01:32 +00:00
Roeland Jago Douma b1fd72c1cf
Set the filemodel before rending the detailsview
fixes #10934

Else it triggers the rendering two times. Resulting is weird state in
for example the comments. Because the comments for OLD_FILEID are
retrieved but then the model is changed to NEW_FILEID. But the old
comments still get in and get parsed.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-11-02 22:45:25 +01:00
Julius Härtl 838105877c
Merge pull request #11647 from nextcloud/make-possible-for-tab-views-to-add-css-classes-to-their-container
Make possible for tab views to add CSS classes to their container
2018-10-31 15:37:48 +01:00
Tomasz Grobelny 68a27debd1 Fix file move operation for large number of files
Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
2018-10-30 15:37:21 +01:00
Julius Härtl 5d888984a0
Fix jsdocs build on server repo
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-24 15:41:08 +02:00