Hi,
I try to develop an app and add an action to File menu. But I didn’t success at all. My new action doesn’t appear at all. Can someone help me with that ?
(function (OCA) {
"use strict";
OCA.Files = OCA.Files || {};
OCA.Files.QrCodePlugin = {
name: 'qrCode',
_extendFileActions: function (fileActions) {
fileActions.registerAction({
name: 'qrCode',
displayName: 'qrCode',
altText: t('qrCode', 'qrCode'),
mime: 'all',
permissions: OC.PERMISSION_NONE,
iconClass: 'icon-history',
type: OCA.Files.FileActions.TYPE_INLINE,
order : 100,
actionHandler: function actionHandler(filename, context) {
console.log('youhou');
console.log(filename, context);
}
});
},
attach: function (fileList) {
this._extendFileActions(fileList.fileActions);
}
}
}) (OCA);
OC.Plugins.register('OCA.Files.FileList', OCA.Files.QrCodePlugin);