Use toggle() to hide the poll creator
This commit is contained in:
parent
77133a4062
commit
e6348aa705
2 changed files with 5 additions and 3 deletions
|
|
@ -202,7 +202,7 @@ app.views.Publisher = Backbone.View.extend({
|
|||
},
|
||||
|
||||
togglePollCreator: function(){
|
||||
this.view_poll_creator.$el.toggleClass('active');
|
||||
this.view_poll_creator.$el.toggle();
|
||||
this.el_input.focus();
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -150,6 +150,8 @@ describe("app.views.Publisher", function() {
|
|||
});
|
||||
|
||||
it("disables submitting", function() {
|
||||
this.view.togglePollCreator();
|
||||
|
||||
this.view.setText('TESTING');
|
||||
expect(this.view.el_submit.prop('disabled')).toBeFalsy();
|
||||
expect(this.view.el_preview.prop('disabled')).toBeFalsy();
|
||||
|
|
|
|||
Loading…
Reference in a new issue