mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
This commit is contained in:
parent
c7776f74e1
commit
663160c06a
230 changed files with 57 additions and 386 deletions
38
UI/Shared/NotificationModel.js
Normal file
38
UI/Shared/NotificationModel.js
Normal file
|
@ -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":''
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue