-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Added Drozone to favorites quickaccess #12917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Drozone to favorites quickaccess #12917
Conversation
|
CI is failing, but i think the errors are unrelated: and |
danxuliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase on current master :-) (then you will need to force push the branch again).
Tested and works, but it should be tested again once rebased ;-)
Maybe it would be good to not enable the favorite drop zone when dragging an already favorited folder, but that is a minor detail. In any case, a really nice feature, thanks :-D
apps/files/js/filelist.js
Outdated
| $.event.trigger({type: "droppedOnTrash"}); | ||
|
|
||
| var self=this; | ||
| var _self=this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the rename?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially i had problems with self, it would not work properly. I can look if it works now
apps/files/js/filelist.js
Outdated
| _self.do_delete(filename, directory); | ||
| }); | ||
|
|
||
| $.event.trigger({type: "droppedOnFavorites"}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This deletes the folder when it is dropped on the trash
Yes, |
c4d4384 to
2c8a4b1
Compare
|
@danxuliu rebased |
|
oh, and removed the duplicate _self |
Since 6ad7f32 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 <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
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 <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
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 <[email protected]>
Signed-off-by: fnuesse <[email protected]>
Signed-off-by: fnuesse <[email protected]>
Signed-off-by: fnuesse <[email protected]>
2c8a4b1 to
f13b3ab
Compare
|
@newhinton, sorry for the delay. I have taken the liberty of rebasing again your pull request and do some cleaning of the drop zone feature and the pull request history. Please refer to each individual commit and its comment for further information. Regarding the commit that adds the drop zone to the favorites I have removed |
danxuliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
Currently favoriting by dropping is limited to only one file or folder at a time due to some unrelated bugs in the Files app; I would merge this anyway in its current state.
Thanks again @newhinton!
MorrisJobke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
|
I didn't know that there was an OC.Tag introduced, i wrote a majority of this back at the conf, so there may have been some changes which im not aware of ^^ but good to know :D |
|
No problem at all about that @newhinton, you did not have to know it; I just mentioned it for your information :-) |
closes #10908
This adds the ability to drop a folder on the quickaccess and add it to it