mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Publish button fixes
Fixes #352 - Ensure publish button's default status is set in the `render` function. - Ensure publish button's popup arrow has animation reverted when a status has been selected. - Bumped up timeout in failing mocha test for exports-002.
This commit is contained in:
parent
087872484b
commit
2329b34be7
@ -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')
|
||||
@ -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]);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -86,7 +86,8 @@ describe("Export", function () {
|
||||
});
|
||||
|
||||
describe("002", function () {
|
||||
|
||||
this.timeout(5000);
|
||||
|
||||
should.exist(Exporter001);
|
||||
|
||||
it("exports data", function (done) {
|
||||
|
Loading…
Reference in New Issue
Block a user