Save chapter information more frequently
This commit is contained in:
@@ -219,10 +219,22 @@ CMS.Views.EditChapter = Backbone.View.extend({
|
||||
return this;
|
||||
},
|
||||
events: {
|
||||
"change .chapter-name": "changeName",
|
||||
"change .chapter-asset-path": "changeAssetPath",
|
||||
"click .action-close": "removeChapter",
|
||||
"click .action-upload": "openUploadDialog",
|
||||
"submit": "uploadAsset"
|
||||
},
|
||||
changeName: function(e) {
|
||||
if(e && e.preventDefault) { e.preventDefault(); }
|
||||
this.model.set("name", this.$(".chapter-name").val());
|
||||
return this;
|
||||
},
|
||||
changeAssetPath: function(e) {
|
||||
if(e && e.preventDefault) { e.preventDefault(); }
|
||||
this.model.set("asset_path", this.$(".chapter-asset-path").val());
|
||||
return this;
|
||||
},
|
||||
removeChapter: function(e) {
|
||||
if(e && e.preventDefault) { e.preventDefault(); }
|
||||
this.model.collection.remove(this.model);
|
||||
|
||||
Reference in New Issue
Block a user