Rename alert model to SystemFeedback
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
CMS.Models.Alert = Backbone.Model.extend({
|
||||
defaults: {
|
||||
"type": null,
|
||||
"title": null,
|
||||
"message": null,
|
||||
"shown": true
|
||||
}
|
||||
});
|
||||
32
cms/static/js/models/feedback.js
Normal file
32
cms/static/js/models/feedback.js
Normal 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) {}
|
||||
}
|
||||
]
|
||||
}
|
||||
*/
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user