FIX: Works with post menu as a component

This commit is contained in:
Robin Ward 2015-07-07 00:29:02 -04:00
parent 7c146315ea
commit 7b37021403
2 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<section class='field'>
<div class="enable-accepted-answer">
<label class="checkbox-label">
{{input type="checkbox" checked=model.enable_accepted_answers}}
{{input type="checkbox" checked=category.enable_accepted_answers}}
{{i18n 'solved.allow_accepted_answers'}}
</label>
</div>

View File

@ -1,6 +1,6 @@
import PostMenuView from 'discourse/views/post-menu';
import PostMenuComponent from 'discourse/components/post-menu';
import PostView from 'discourse/views/post';
import { Button } from 'discourse/views/post-menu';
import { Button } from 'discourse/components/post-menu';
import Topic from 'discourse/models/topic';
import User from 'discourse/models/user';
import TopicStatus from 'discourse/views/topic-status';
@ -59,7 +59,7 @@ export default {
classNameBindings: ['post.accepted_answer:accepted-answer']
});
PostMenuView.registerButton(function(visibleButtons){
PostMenuComponent.registerButton(function(visibleButtons){
var position = 0;
var canAccept = this.get('post.can_accept_answer');
@ -87,7 +87,7 @@ export default {
});
PostMenuView.reopen({
PostMenuComponent.reopen({
acceptedChanged: function(){
this.rerender();
}.observes('post.accepted_answer'),