-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Allow Owncloud apps to add new items to the “new” file menu. #20051
Allow Owncloud apps to add new items to the “new” file menu. #20051
Conversation
|
||
/* Find the right actionHandler that should be called. | ||
* Actions is retrieved by using `actionSpec.id` */ | ||
action = self._menuItems.filter(function(item) { |
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 use _.filter()
instead, because Array's filter will not work in IE8... (yes, we all hate that browser)
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.
Great stuff! |
👍 |
@otetard is this the final form or did you intend to add additional things ? I'm fine with having this merged in its current form 😄 |
Also some formalities: Thanks a lot for your contribution! Alternatively you can add a comment here where you state that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
Owncloud apps can now add new items to the “new” file menu. A new `addMenuEntry()` was added to `NewFileMenu`. To add a new item, you have to attach a plugin to `OCA.Files.NewFileMenu` that will call `addMenuEntry()`.
Thanks @PVince81 for the feedback, I’ve just refreshed the PR in order to use I will sign the CLA quickly. |
@otetard thanks. I haven't tested the plugin part, I assume you did with your own app maybe. From looking at the code it should work fine. |
@karlitschek @otetard any update on the CLA ? Alternatively you can state the MIT license here. |
Hi @PVince81. Everything should be ok, I’ve signed and sent the CLA to @karlitschek. |
Yes. confirmed :-) |
Needs a second reviewer @rullzer @nickvergessen @MorrisJobke @blizzz |
I just tested this and it works. I also directly documented it: owncloud-archive/documentation#1839 👍 |
Cool stuff! 🚀 |
Allow Owncloud apps to add new items to the “new” file menu.
CC @jancborchardt FYI |
Is there already an example of an app using this? I’d say it’s good, similar to how Google Drive does it actually. |
Hi @jancborchardt. I’m using this functionality in my OwnPad app (which add the ability to create links to etherpad from ownCloud). The code that use this |
@otetard so does it then open the app with a fresh document on click? That’s what I would expect to happen at least. |
A new
addMenuEntry()
was added toNewFileMenu
. To add a new item, you have to attach a plugin toOCA.Files.NewFileMenu
that will calladdMenuEntry()
.This fixes #19945