mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 03:59:39 +08:00
Update for discussion controls API
This commit is contained in:
parent
d44b2e840b
commit
b65c1f8624
4
extensions/sticky/js/bootstrap.js
vendored
4
extensions/sticky/js/bootstrap.js
vendored
@ -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'});
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user