minor js cleanup.

pull/3113/head
kay.one 12 years ago
parent d3694461f1
commit 85fd4248a6

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value />
</option>
</component>
</project>

@ -0,0 +1,7 @@
<component name="ProjectDictionaryState">
<dictionary name="Keivan">
<words>
<w>rootfolder</w>
</words>
</dictionary>
</component>

@ -1,10 +1,10 @@
define([
'app',
'AddSeries/RootFolders/RootFolderCollection',
'Quality/QualityProfileCollection',
'AddSeries/RootFolders/RootFolderView',
'AddSeries/New/AddNewSeriesView',
'AddSeries/Existing/ImportSeriesView'
'app',
'AddSeries/RootFolders/RootFolderCollection',
'Quality/QualityProfileCollection',
'AddSeries/RootFolders/RootFolderView',
'AddSeries/New/AddNewSeriesView',
'AddSeries/Existing/ImportSeriesView'
],
function (app, rootFolderCollection, qualityProfileCollection) {
NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({

@ -1,5 +1,4 @@
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'AddSeries/New/SearchResultView', 'Shared/SpinnerView'], function (app, rootFolders) {
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'AddSeries/New/SearchResultView', 'Shared/SpinnerView'], function () {
NzbDrone.AddSeries.New.AddNewSeriesView = Backbone.Marionette.Layout.extend({
template: 'AddSeries/New/AddNewSeriesTemplate',
route: 'Series/add/new',
@ -35,18 +34,18 @@
var term = context.ui.seriesSearch.val();
context.collection.reset();
if (term !== '') {
if (term === '') {
context.searchResult.close();
} else {
context.searchResult.show(new NzbDrone.Shared.SpinnerView());
context.currentSearchRequest = context.collection.fetch({
data: { term: term },
success: function (model) {
success: function () {
context.searchResult.show(context.resultView);
}
});
} else {
context.searchResult.close();
}
},

@ -28,7 +28,7 @@ define(['app','Shared/NotificationCollection', 'AddSeries/SearchResultCollection
var quality = this.ui.qualityProfile.val();
var rootFolderId = this.ui.rootFolder.val();
//Todo: This wiil create an invalid path on linux...
//Todo: This will create an invalid path on linux...
var rootPath = this.model.get('rootFolders').get(rootFolderId).get('path');
var path = rootPath + "\\" + title;
@ -62,11 +62,10 @@ define(['app','Shared/NotificationCollection', 'AddSeries/SearchResultCollection
NzbDrone.AddSeries.SearchResultView = Backbone.Marionette.CollectionView.extend({
itemView: NzbDrone.AddSeries.New.SearchItemView,
className: 'accordion',
initialize: function () {
this.listenTo(this.collection, 'reset', this.render);
}
});
});

@ -1,8 +1,8 @@
<td name="path" class="span10" />
<td name="path" class="span10"/>
<td class="span3">
<span name="freeSpaceString"></span>
</td>
<td class="span1 nz-row-action">
<div class="btn btn-danger icon-minus x-remove">
</div>
</div>
</td>

@ -26,25 +26,3 @@
};
} ());
/*
var xhrMixin = function (){
console.log ('mixing in xhr');
var originalOnRender = Backbone.Marionette.View.prototype.onRender;
var originalBeforeClose = Backbone.Marionette.View.prototype.beforeClose;
Backbone.Marionette.View.prototype.onRender = function (){
console.log ('render');
if (originalOnRender){
originalOnRender.call (this);
}
};
Backbone.Marionette.View.prototype.beforeClose = function (){
console.log ('beforeClose');
if (originalBeforeClose){
originalBeforeClose.call (this);
}
};
} ();*/

Loading…
Cancel
Save