The variable 'visible' is also used for toggling the admin menu visibility, so it is always true when the visibility toggle is shown. Hence, it's caption is always 'Make Invisible', even when the topic already is invisible.
22 lines
420 B
JavaScript
22 lines
420 B
JavaScript
/**
|
|
This controller supports the admin menu on topics
|
|
|
|
@class TopicAdminMenuController
|
|
@extends Discourse.ObjectController
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.TopicAdminMenuController = Discourse.ObjectController.extend({
|
|
menuVisible: false,
|
|
needs: ['modal'],
|
|
|
|
show: function() {
|
|
this.set('menuVisible', true);
|
|
},
|
|
|
|
hide: function() {
|
|
this.set('menuVisible', false);
|
|
}
|
|
|
|
});
|