mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
client side code webstorm code cleanup.
This commit is contained in:
parent
375f887539
commit
445ea4f344
94 changed files with 4355 additions and 4243 deletions
|
@ -1,3 +1,3 @@
|
|||
<div>
|
||||
<img src="/static/content/images/404.png" style="height:400px; margin-top: 50px" />
|
||||
<img src="/static/content/images/404.png" style="height:400px; margin-top: 50px"/>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
"use strict";
|
||||
define(['app'],function () {
|
||||
define(['app'], function () {
|
||||
NzbDrone.Shared.NotFoundView = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Shared/notfoundtemplate'
|
||||
});
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
var collection = Backbone.Collection.extend({
|
||||
|
||||
model: NzbDrone.Shared.NotificationModel,
|
||||
|
||||
|
||||
initialize: function () {
|
||||
|
||||
/* var model = new NzbDrone.Shared.NotificationModel();
|
||||
model.set('title','test notification');
|
||||
model.set('message','test message');
|
||||
model.set('level', 'error');
|
||||
this.push(model);
|
||||
*/
|
||||
/* var model = new NzbDrone.Shared.NotificationModel();
|
||||
model.set('title','test notification');
|
||||
model.set('message','test message');
|
||||
model.set('level', 'error');
|
||||
this.push(model);
|
||||
*/
|
||||
|
||||
var self = this;
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
define(['app'], function () {
|
||||
|
||||
NzbDrone.Shared.NotificationModel = Backbone.Model.extend({
|
||||
mutators:{
|
||||
mutators: {
|
||||
|
||||
preFormattedMessage:function () {
|
||||
preFormattedMessage: function () {
|
||||
return this.get('message').replace(/\\r\\n/g, '<br>');
|
||||
},
|
||||
|
||||
isPreFormatted:function () {
|
||||
isPreFormatted: function () {
|
||||
return this.get('message').indexOf('\\r\\n') !== -1;
|
||||
},
|
||||
|
||||
iconClass:function () {
|
||||
iconClass: function () {
|
||||
|
||||
if (this.has('icon')) {
|
||||
return 'icon';
|
||||
|
@ -29,10 +29,10 @@
|
|||
}
|
||||
},
|
||||
|
||||
defaults:{
|
||||
"level":'info',
|
||||
"title":'',
|
||||
"message":''
|
||||
defaults: {
|
||||
"level" : 'info',
|
||||
"title" : '',
|
||||
"message": ''
|
||||
}
|
||||
});
|
||||
});
|
|
@ -1,10 +1,10 @@
|
|||
<div class="alert alert-{{level}}">
|
||||
<button type="button" class="close x-close icon-remove-sign"></button>
|
||||
<i class="{{iconClass}}" /><strong>{{title}}</strong>
|
||||
<i class="{{iconClass}}"/><strong>{{title}}</strong>
|
||||
{{#if isPreFormatted}}
|
||||
<pre>{{{preFormattedMessage}}}</pre>
|
||||
<pre>{{{preFormattedMessage}}}</pre>
|
||||
{{else}}
|
||||
{{message}}
|
||||
{{message}}
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -16,8 +16,8 @@ define(['app', 'Shared/NotificationCollection'], function (app, notificationColl
|
|||
$.Deferred(function () {
|
||||
self.$el.slideUp('slow');
|
||||
}).done(function () {
|
||||
self.model.destroy();
|
||||
});
|
||||
self.model.destroy();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -34,7 +34,7 @@ define(['app', 'Shared/NotificationCollection'], function (app, notificationColl
|
|||
console.log('initializing notification view');
|
||||
NzbDrone.notificationRegion.show(new collectionView());
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define(['app'],function () {
|
||||
define(['app'], function () {
|
||||
NzbDrone.Shared.SpinnerView = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Shared/SpinnerTemplate',
|
||||
template : 'Shared/SpinnerTemplate',
|
||||
className: 'nz-spinner row'
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue