mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 10:42:45 +03:00
Merge pull request #1632 from hswolff/issue1582
Debounce post settings events
This commit is contained in:
commit
589b4a8cea
@ -53,7 +53,7 @@
|
||||
e.currentTarget.select();
|
||||
},
|
||||
|
||||
editSlug: function (e) {
|
||||
editSlug: _.debounce(function (e) {
|
||||
e.preventDefault();
|
||||
var self = this,
|
||||
slug = self.model.get('slug'),
|
||||
@ -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'],
|
||||
@ -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
|
||||
@ -204,7 +204,7 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
}, 500),
|
||||
|
||||
deletePost: function (e) {
|
||||
e.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user