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

@ -7,6 +7,7 @@
<div class="control-group">
<label class="control-label">Name</label>
<div class="controls">
<input type="text" name="name">
<span class="help-inline">
@ -17,11 +18,12 @@
<div class="control-group">
<label class="control-label">Cutoff</label>
<div class="controls">
<select class="x-cutoff" name="cutoff">
{{#each allowed}}
<option value="{{id}}">{{name}}</option>
<option value="{{id}}">{{name}}</option>
{{/each}}
</select>
<span class="help-inline">
@ -35,20 +37,20 @@
{{#each qualities}}
<div class="control-group">
<label class="control-label">{{name}}</label>
<div class="controls">
<div class="switch" data-on-label="Yes" data-off-label="No">
<input type="checkbox" name="allowed" />
<input type="checkbox" name="allowed"/>
</div>
</div>
</div>
{{/each}}
</div>
</div>
<div class="modal-footer">
<button class="btn btn-danger pull-left x-remove" >delete</button>
<button class="btn btn-danger pull-left x-remove">delete</button>
<button class="btn" data-dismiss="modal">cancel</button>
<button class="btn btn-primary x-save">save</button>
</div>

View file

@ -2,8 +2,8 @@
define(['app', 'Quality/QualityProfileModel'], function () {
NzbDrone.Settings.Quality.Profile.EditQualityProfileView = Backbone.Marionette.ItemView.extend({
template: 'Settings/Quality/Profile/EditQualityProfileTemplate',
tagName: 'div',
template : 'Settings/Quality/Profile/EditQualityProfileTemplate',
tagName : 'div',
className: "modal",
ui: {
@ -29,10 +29,10 @@ define(['app', 'Quality/QualityProfileModel'], function () {
this.$el.parent().modal('hide');
},
// removeSeries: function () {
// var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
// NzbDrone.modalRegion.show(view);
// }
// removeSeries: function () {
// var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
// NzbDrone.modalRegion.show(view);
// }
});
});

View file

@ -2,12 +2,12 @@
<legend>Quality Profiles</legend>
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Allowed</th>
<th>Cutoff</th>
<th>Controls</th>
</tr>
<tr>
<th>Name</th>
<th>Allowed</th>
<th>Cutoff</th>
<th>Controls</th>
</tr>
</thead>
<tbody></tbody>
</table>

View file

@ -2,19 +2,18 @@
define(['app', 'Settings/Quality/Profile/QualityProfileView'], function (app) {
NzbDrone.Settings.Quality.Profile.QualityProfileCollectionView = Backbone.Marionette.CompositeView.extend({
itemView: NzbDrone.Settings.Quality.Profile.QualityProfileView,
itemView : NzbDrone.Settings.Quality.Profile.QualityProfileView,
itemViewContainer: 'tbody',
template: 'Settings/Quality/Profile/QualityProfileCollectionTemplate',
template : 'Settings/Quality/Profile/QualityProfileCollectionTemplate',
initialize: function (options) {
},
ui:{
ui: {
},
onCompositeCollectionRendered: function()
{
onCompositeCollectionRendered: function () {
}
});

View file

@ -1,7 +1,7 @@
<td name="name"></td>
<td>
{{#each allowed}}
{{name}} |
{{name}} |
{{/each}}
</td>
<td name="cutoffName"></td>

View file

@ -1,22 +1,22 @@
'use strict';
define([
'app',
'Quality/QualityProfileCollection',
'Settings/Quality/Profile/EditQualityProfileView'
'app',
'Quality/QualityProfileCollection',
'Settings/Quality/Profile/EditQualityProfileView'
], function () {
NzbDrone.Settings.Quality.Profile.QualityProfileView = Backbone.Marionette.ItemView.extend({
template: 'Settings/Quality/Profile/QualityProfileTemplate',
tagName: 'tr',
tagName : 'tr',
ui: {
'progressbar': '.progress .bar'
},
events: {
'click .x-edit': 'editSeries',
'click .x-edit' : 'editSeries',
'click .x-remove': 'removeSeries'
},