framework/extensions/likes/js/admin/dist/extension.js
2015-10-11 15:30:19 +10:30

26 lines
818 B
JavaScript

System.register('flarum/likes/main', ['flarum/extend', 'flarum/app', 'flarum/components/PermissionGrid'], function (_export) {
'use strict';
var extend, app, PermissionGrid;
return {
setters: [function (_flarumExtend) {
extend = _flarumExtend.extend;
}, function (_flarumApp) {
app = _flarumApp['default'];
}, function (_flarumComponentsPermissionGrid) {
PermissionGrid = _flarumComponentsPermissionGrid['default'];
}],
execute: function () {
app.initializers.add('flarum-likes', function () {
extend(PermissionGrid.prototype, 'replyItems', function (items) {
items.add('likePosts', {
icon: 'thumbs-o-up',
label: 'Like posts',
permission: 'discussion.likePosts'
});
});
});
}
};
});