client side code webstorm code cleanup.

This commit is contained in:
kay.one 2013-03-29 16:28:58 -07:00
commit 445ea4f344
94 changed files with 4355 additions and 4243 deletions

View file

@ -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>

View file

@ -1,5 +1,5 @@
"use strict";
define(['app'],function () {
define(['app'], function () {
NzbDrone.Shared.NotFoundView = Backbone.Marionette.ItemView.extend({
template: 'Shared/notfoundtemplate'
});

View file

@ -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;

View file

@ -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": ''
}
});
});

View file

@ -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>

View file

@ -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());
});
});

View file

@ -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'
});
});