Update for discussion controls API

This commit is contained in:
Toby Zerner 2015-06-25 15:39:53 +09:30
parent d44b2e840b
commit b65c1f8624

View File

@ -44,13 +44,13 @@ app.initializers.add('sticky', function() {
}
// Add a sticky control to discussions.
extend(Discussion.prototype, 'controls', function(items) {
extend(Discussion.prototype, 'moderationControls', function(items) {
if (this.canSticky()) {
items.add('sticky', ActionButton.component({
label: this.isSticky() ? 'Unsticky' : 'Sticky',
icon: 'thumb-tack',
onclick: toggleSticky.bind(this)
}), {after: 'rename'});
}));
}
});