Create a dedicated CMS.Models.Course Backbone model

Initialize on every page that has a context_course set
This commit is contained in:
David Baumgold
2013-08-01 13:39:45 -04:00
parent 76948b52d9
commit 1eae675952
5 changed files with 34 additions and 10 deletions

View File

@@ -0,0 +1,10 @@
CMS.Models.Course = Backbone.Model.extend({
defaults: {
"name": ""
},
validate: function(attrs, options) {
if (!attrs.name) {
return gettext("You must specify a name");
}
}
});