Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish button fixes #692

Merged
merged 1 commit into from
Sep 11, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions core/client/views/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,16 @@
});
},

setActiveStatus: function setActiveStatus(status, displayText) {
setActiveStatus: function (status, displayText) {
// Set the publish button's action
$('.js-post-button')
.attr('data-status', status)
.text(displayText);

// Remove the animated popup arrow
$('.splitbutton-save > a')
.removeClass('active');

// Set the active action in the popup
$('.splitbutton-save .editor-options li')
.removeClass('active')
Expand Down Expand Up @@ -234,7 +238,10 @@
},

render: function () {
this.$('.js-post-button').text(this.statusMap[this.model.get('status')]);
var status = this.model.get('status');

// Default the selected publish option to the current status of the post.
this.setActiveStatus(status, this.statusMap[status]);
}

});
Expand Down
3 changes: 2 additions & 1 deletion core/test/unit/export_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ describe("Export", function () {
});

describe("002", function () {

this.timeout(5000);

should.exist(Exporter001);

it("exports data", function (done) {
Expand Down