Correct caption of 'Make Visible' button

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.
This commit is contained in:
Adrian Lang 2013-07-10 10:16:39 +02:00
parent 7ccfc40389
commit d4ef582f94
2 changed files with 4 additions and 4 deletions

View File

@ -7,15 +7,15 @@
@module Discourse
**/
Discourse.TopicAdminMenuController = Discourse.ObjectController.extend({
visible: false,
menuVisible: false,
needs: ['modal'],
show: function() {
this.set('visible', true);
this.set('menuVisible', true);
},
hide: function() {
this.set('visible', false);
this.set('menuVisible', false);
}
});

View File

@ -1,4 +1,4 @@
{{#if visible}}
{{#if menuVisible}}
<div class="topic-admin-menu">
<h3>{{i18n admin_title}}</h3>