splited MVC and nancy application

backbone app is now fully served from nancy including css,js,html
This commit is contained in:
kay.one
2013-02-17 18:10:21 -08:00
parent fd4ffa0fa2
commit 7093f352fe
184 changed files with 497 additions and 1959 deletions
@@ -0,0 +1,38 @@
define(['app'], function () {
NzbDrone.Shared.NotificationModel = Backbone.Model.extend({
mutators:{
preFormattedMessage:function () {
return this.get('message').replace(/\\r\\n/g, '<br>');
},
isPreFormatted:function () {
return this.get('message').indexOf('\\r\\n') !== -1;
},
iconClass:function () {
if (this.has('icon')) {
return 'icon';
}
if (this.get('level') === 'info') {
return "icon-info-sign";
} else if (this.get('level') === 'success') {
return 'icon-ok-sign';
} else if (this.get('level') === 'error') {
return 'icon-warning-sign';
}
return "";
}
},
defaults:{
"level":'info',
"title":'',
"message":''
}
});
});