You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would be good to allow apps to add actions to the “New” (+) filemenu from the files app. To do so that would (AFAIK) need to do some modifications in the JavaScript code of the files app (in newfilemenu.js and filelist.js) :
in filelist.js, add a new function getNewFileMenu() to be able to retrieve the NewFileMenu instance (and instanciate it, if it’s not already done);
in newfilemenu.js, in the render() function, move items that are sent to template() to a private instance variable (for example NewFileMenu._menuItems);
add a new function registerAction() in newfilemenu.js that could be used by plugins to add items to the menu.
I already did a proof of concept of this, but as JavaScript is not my mother tongue, it would require some polish.
Olivier;
The text was updated successfully, but these errors were encountered:
The plugin could then attach itself to the NewFileMenu instance and call a new function addMenuEntry(entrySpec) to add new entries. Each entry would look like these https://github.com/owncloud/core/blob/v8.2.0/apps/files/js/newfilemenu.js#L202 with an additional attribute template with the template (or render method) and another one action with a function to perform the action.
Hi,
I would be good to allow apps to add actions to the “New” (+) filemenu from the
files
app. To do so that would (AFAIK) need to do some modifications in the JavaScript code of thefiles
app (innewfilemenu.js
andfilelist.js
) :filelist.js
, add a new functiongetNewFileMenu()
to be able to retrieve theNewFileMenu
instance (and instanciate it, if it’s not already done);newfilemenu.js
, in therender()
function, moveitems
that are sent totemplate()
to a private instance variable (for exampleNewFileMenu._menuItems
);registerAction()
innewfilemenu.js
that could be used by plugins to add items to the menu.I already did a proof of concept of this, but as JavaScript is not my mother tongue, it would require some polish.
Olivier;
The text was updated successfully, but these errors were encountered: