Rename alert model to SystemFeedback

This commit is contained in:
David Baumgold
2013-05-09 10:57:57 -04:00
parent 56a92bff51
commit 5ff2adb882
3 changed files with 32 additions and 8 deletions

View File

@@ -1,8 +0,0 @@
CMS.Models.Alert = Backbone.Model.extend({
defaults: {
"type": null,
"title": null,
"message": null,
"shown": true
}
});

View File

@@ -0,0 +1,32 @@
CMS.Models.SystemFeedback = Backbone.Model.extend({
defaults: {
"type": null, // "warning", "confirmation", "error", "announcement", "step-required"
"title": null,
"message": null,
"shown": true,
"close": false // show a close button?
/* could also have an "actions" hash: here is an example demonstrating
the expected structure
"actions": {
"primary": {
"text": "Save",
"class": "action-save",
"click": function(model) {
// do something when Save is clicked
}
},
"secondary": [
{
"text": "Cancel",
"class": "action-cancel",
"click": function(model) {}
}, {
"text": "Discard Changes",
"class": "action-discard",
"click": function(model) {}
}
]
}
*/
}
});