FIX: denote that we are not collapsed if no buttons are hidden

This commit is contained in:
Sam 2015-06-19 16:09:26 +10:00
parent 309d1b267b
commit d12de36c82
1 changed files with 4 additions and 1 deletions

View File

@ -135,8 +135,11 @@ var PostMenuView = Discourse.View.extend(StringBuffer, {
});
// Only show ellipsis if there is more than one button hidden
if (!this.get('collapsed') || (allButtons.length <= visibleButtons.length + 1)) {
// if there are no more buttons, we are not collapsed
var collapsed = this.get('collapsed');
if (!collapsed || (allButtons.length <= visibleButtons.length + 1)) {
visibleButtons = allButtons;
if (collapsed) { this.set('collapsed', false); }
} else {
visibleButtons.splice(visibleButtons.length - 1, 0, this.buttonForShowMoreActions(post));
}