Skip to content

Commit

Permalink
Merge pull request #1632 from hswolff/issue1582
Browse files Browse the repository at this point in the history
Debounce post settings events
  • Loading branch information
ErisDS committed Dec 11, 2013
2 parents c1683e5 + 7bc4d43 commit 589b4a8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/client/views/post-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
e.currentTarget.select();
},

editSlug: function (e) {
editSlug: _.debounce(function (e) {
e.preventDefault();
var self = this,
slug = self.model.get('slug'),
Expand Down Expand Up @@ -88,9 +88,9 @@
});
}
});
},
}, 500),

editDate: function (e) {
editDate: _.debounce(function (e) {
e.preventDefault();
var self = this,
parseDateFormats = ['DD MMM YY HH:mm', 'DD MMM YYYY HH:mm', 'DD/MM/YY HH:mm', 'DD/MM/YYYY HH:mm', 'DD-MM-YY HH:mm', 'DD-MM-YYYY HH:mm'],
Expand Down Expand Up @@ -177,11 +177,11 @@
}
});

},
}, 500),

toggleStaticPage: function (e) {
toggleStaticPage: _.debounce(function (e) {
var pageEl = $(e.currentTarget),
page = this.model ? !this.model.get('page') : false;
page = pageEl.prop('checked');

this.model.save({
page: page
Expand All @@ -204,7 +204,7 @@
});
}
});
},
}, 500),

deletePost: function (e) {
e.preventDefault();
Expand Down

0 comments on commit 589b4a8

Please sign in to comment.