{{overview}}
diff --git a/src/UI/AddSeries/addSeries.less b/src/UI/AddSeries/addSeries.less
index 6a4d0258d..1d36d9906 100644
--- a/src/UI/AddSeries/addSeries.less
+++ b/src/UI/AddSeries/addSeries.less
@@ -57,6 +57,13 @@
.search-item {
+ .series-title {
+ .label {
+ margin-left: 15px;
+ vertical-align: middle;
+ }
+ }
+
.new-series-overview {
overflow : hidden;
height : 120px;
diff --git a/src/UI/Calendar/CalendarView.js b/src/UI/Calendar/CalendarView.js
index 0d4422845..727c8f578 100644
--- a/src/UI/Calendar/CalendarView.js
+++ b/src/UI/Calendar/CalendarView.js
@@ -7,7 +7,7 @@ define(
'moment',
'Calendar/Collection',
'fullcalendar'
- ], function (vent, Marionette, Moment, CalendarCollection) {
+ ], function (vent, Marionette, moment, CalendarCollection) {
var _instance;
@@ -16,7 +16,10 @@ define(
this.collection = new CalendarCollection();
},
render : function () {
- $(this.$el).empty().fullCalendar({
+
+ var self = this;
+
+ this.$el.empty().fullCalendar({
defaultView : 'basicWeek',
allDayDefault : false,
ignoreTimezone: false,
@@ -34,8 +37,8 @@ define(
},
events : this.getEvents,
eventRender : function (event, element) {
- $(element).addClass(event.statusLevel);
- $(element).children('.fc-event-inner').addClass(event.statusLevel);
+ self.$(element).addClass(event.statusLevel);
+ self.$(element).children('.fc-event-inner').addClass(event.statusLevel);
},
eventClick : function (event) {
vent.trigger(vent.Commands.ShowEpisodeDetails, {episode: event.model});
@@ -50,8 +53,8 @@ define(
},
getEvents: function (start, end, callback) {
- var startDate = Moment(start).toISOString();
- var endDate = Moment(end).toISOString();
+ var startDate = moment(start).toISOString();
+ var endDate = moment(end).toISOString();
_instance.collection.fetch({
data : { start: startDate, end: endDate },
@@ -61,7 +64,7 @@ define(
var seriesTitle = element.get('series').title;
var start = element.get('airDateUtc');
var runtime = element.get('series').runtime;
- var end = Moment(start).add('minutes', runtime).toISOString();
+ var end = moment(start).add('minutes', runtime).toISOString();
element.set({
@@ -83,9 +86,9 @@ define(
getStatusLevel: function (element) {
var hasFile = element.get('hasFile');
- var currentTime = Moment();
- var start = Moment(element.get('airDateUtc'));
- var end = Moment(element.get('end'));
+ var currentTime = moment();
+ var start = moment(element.get('airDateUtc'));
+ var end = moment(element.get('end'));
var statusLevel = 'primary';
@@ -94,10 +97,6 @@ define(
}
else if (currentTime.isAfter(start) && currentTime.isBefore(end)) {
- var s = start.toISOString();
- var e = end.toISOString();
- var c = currentTime.toISOString();
-
statusLevel = 'warning';
}
diff --git a/src/UI/Cells/EpisodeNumberCell.js b/src/UI/Cells/EpisodeNumberCell.js
index 0daf55b81..41a034ba2 100644
--- a/src/UI/Cells/EpisodeNumberCell.js
+++ b/src/UI/Cells/EpisodeNumberCell.js
@@ -3,8 +3,9 @@
define(
[
'Cells/NzbDroneCell',
- 'Shared/FormatHelpers'
- ], function (NzbDroneCell, FormatHelpers) {
+ 'Shared/FormatHelpers',
+ 'underscore'
+ ], function (NzbDroneCell, FormatHelpers, _) {
return NzbDroneCell.extend({
className: 'episode-number-cell',
diff --git a/src/UI/Cells/NzbDroneCell.js b/src/UI/Cells/NzbDroneCell.js
index e5e6c595e..15bd99e76 100644
--- a/src/UI/Cells/NzbDroneCell.js
+++ b/src/UI/Cells/NzbDroneCell.js
@@ -2,8 +2,9 @@
define(
[
- 'backgrid'
- ], function (Backgrid) {
+ 'backgrid',
+ 'backbone'
+ ], function (Backgrid, Backbone) {
return Backgrid.Cell.extend({
_originalInit: Backgrid.Cell.prototype.initialize,
@@ -15,8 +16,8 @@ define(
this.listenTo(this.model, 'change', this._refresh);
if (this._onEdit) {
- this.listenTo(this.model, "backgrid:edit", function (model, column, cell, editor) {
- if (column.get("name") == this.column.get("name")) {
+ this.listenTo(this.model, 'backgrid:edit', function (model, column, cell, editor) {
+ if (column.get('name') === this.column.get('name')) {
this._onEdit(model, column, cell, editor);
}
});
diff --git a/src/UI/Cells/QualityProfileCell.js b/src/UI/Cells/QualityProfileCell.js
index 292a1dd41..7cd6efd88 100644
--- a/src/UI/Cells/QualityProfileCell.js
+++ b/src/UI/Cells/QualityProfileCell.js
@@ -2,8 +2,9 @@
define(
[
'backgrid',
- 'Quality/QualityProfileCollection'
- ], function (Backgrid, QualityProfileCollection) {
+ 'Quality/QualityProfileCollection',
+ 'underscore'
+ ], function (Backgrid, QualityProfileCollection,_) {
return Backgrid.Cell.extend({
className: 'quality-profile-cell',
diff --git a/src/UI/Config.js b/src/UI/Config.js
index f1bbf757c..7721fa79f 100644
--- a/src/UI/Config.js
+++ b/src/UI/Config.js
@@ -18,7 +18,7 @@ define(
getValue: function (key, defaultValue) {
- var storeValue = localStorage.getItem(key);
+ var storeValue = window.localStorage.getItem(key);
if (!storeValue) {
return defaultValue;
@@ -35,7 +35,7 @@ define(
return;
}
- localStorage.setItem(key, value);
+ window.localStorage.setItem(key, value);
vent.trigger(this.Events.ConfigUpdatedEvent, {key: key, value: value});
}
diff --git a/src/UI/Controller.js b/src/UI/Controller.js
index ff9dec7ef..bd5be1819 100644
--- a/src/UI/Controller.js
+++ b/src/UI/Controller.js
@@ -9,7 +9,7 @@ define(
'AddSeries/AddSeriesLayout',
'Missing/MissingLayout',
'Calendar/CalendarLayout',
- 'Release/Layout',
+ 'Release/ReleaseLayout',
'System/SystemLayout',
'SeasonPass/SeasonPassLayout',
'System/Update/UpdateLayout'
@@ -29,49 +29,49 @@ define(
addSeries: function (action) {
this.setTitle('Add Series');
- AppLayout.mainRegion.show(new AddSeriesLayout({action: action}));
+ this.showMainRegion(new AddSeriesLayout({action: action}));
},
calendar: function () {
this.setTitle('Calendar');
- AppLayout.mainRegion.show(new CalendarLayout());
+ this.showMainRegion(new CalendarLayout());
},
settings: function (action) {
this.setTitle('Settings');
- AppLayout.mainRegion.show(new SettingsLayout({ action: action }));
+ this.showMainRegion(new SettingsLayout({ action: action }));
},
missing: function () {
this.setTitle('Missing');
- AppLayout.mainRegion.show(new MissingLayout());
+ this.showMainRegion(new MissingLayout());
},
history: function (action) {
this.setTitle('History');
- AppLayout.mainRegion.show(new HistoryLayout({ action: action }));
+ this.showMainRegion(new HistoryLayout({ action: action }));
},
rss: function () {
this.setTitle('RSS');
- AppLayout.mainRegion.show(new ReleaseLayout());
+ this.showMainRegion(new ReleaseLayout());
},
system: function (action) {
this.setTitle('System');
- AppLayout.mainRegion.show(new SystemLayout({ action: action }));
+ this.showMainRegion(new SystemLayout({ action: action }));
},
seasonPass: function () {
this.setTitle('Season Pass');
- AppLayout.mainRegion.show(new SeasonPassLayout());
+ this.showMainRegion(new SeasonPassLayout());
},
update: function () {
this.setTitle('Updates');
- AppLayout.mainRegion.show(new UpdateLayout());
+ this.showMainRegion(new UpdateLayout());
}
});
});
diff --git a/src/UI/Episode/Search/EpisodeSearchLayout.js b/src/UI/Episode/Search/EpisodeSearchLayout.js
index f527ec038..20767ebd1 100644
--- a/src/UI/Episode/Search/EpisodeSearchLayout.js
+++ b/src/UI/Episode/Search/EpisodeSearchLayout.js
@@ -5,7 +5,7 @@ define(
'marionette',
'Episode/Search/ButtonsView',
'Episode/Search/ManualLayout',
- 'Release/Collection',
+ 'Release/ReleaseCollection',
'Series/SeriesCollection',
'Commands/CommandController',
'Shared/LoadingView'
diff --git a/src/UI/Form/FormBuilder.js b/src/UI/Form/FormBuilder.js
index c0d4535ff..bb391f162 100644
--- a/src/UI/Form/FormBuilder.js
+++ b/src/UI/Form/FormBuilder.js
@@ -1,8 +1,10 @@
'use strict';
define(
[
- 'handlebars'
- ], function (Handlebars) {
+ 'marionette',
+ 'handlebars',
+ 'underscore'
+ ], function (Marionette, Handlebars, _) {
var _fieldBuilder = function (field) {
if (!field.type) {
diff --git a/src/UI/Instrumentation/ErrorHandler.js b/src/UI/Instrumentation/ErrorHandler.js
index 92ccd4db1..d55c10735 100644
--- a/src/UI/Instrumentation/ErrorHandler.js
+++ b/src/UI/Instrumentation/ErrorHandler.js
@@ -4,6 +4,10 @@
window.Messenger().post(message);
};
+ var addError = function(message){
+ window.$('#errors').append('
' + message + '
');
+ };
+
window.onerror = function (msg, url, line) {
try {
@@ -28,6 +32,8 @@
window.Messenger().post(message);
+ addError(message.message);
+
}
catch (error) {
console.log('An error occurred while reporting error. ' + error);
@@ -38,7 +44,7 @@
return false; //don't suppress default alerts and logs.
};
- $(document).ajaxError(function (event, xmlHttpRequest, ajaxOptions) {
+ window.$(document).ajaxError(function (event, xmlHttpRequest, ajaxOptions) {
//don't report 200 error codes
if (xmlHttpRequest.status >= 200 && xmlHttpRequest.status <= 300) {
@@ -58,22 +64,23 @@
if (xmlHttpRequest.status === 0 && xmlHttpRequest.readyState === 0) {
return false;
- //message.message = 'NzbDrone Server Not Reachable. make sure NzbDrone is running.';
}
- else if (xmlHttpRequest.status === 400 && ajaxOptions.isValidatedCall) {
+
+ if (xmlHttpRequest.status === 400 && ajaxOptions.isValidatedCall) {
return false;
}
- else if (xmlHttpRequest.status === 503) {
+ if (xmlHttpRequest.status === 503) {
message.message = xmlHttpRequest.responseJSON.message;
}
- else
- {
+ else {
message.message = '[{0}] {1} : {2}'.format(ajaxOptions.type, xmlHttpRequest.statusText, ajaxOptions.url);
}
window.Messenger().post(message);
+ addError(message.message);
+
return false;
});
diff --git a/src/UI/JsLibraries/backbone.deep.model.js b/src/UI/JsLibraries/backbone.deep.model.js
index cbea78c52..7d65d8802 100644
--- a/src/UI/JsLibraries/backbone.deep.model.js
+++ b/src/UI/JsLibraries/backbone.deep.model.js
@@ -1,3 +1,124 @@
+/*jshint expr:true eqnull:true */
+/**
+ *
+ * Backbone.DeepModel v0.10.4
+ *
+ * Copyright (c) 2013 Charles Davison, Pow Media Ltd
+ *
+ * https://github.com/powmedia/backbone-deep-model
+ * Licensed under the MIT License
+ */
+
+/**
+ * Underscore mixins for deep objects
+ *
+ * Based on https://gist.github.com/echong/3861963
+ */
+(function() {
+ var arrays, basicObjects, deepClone, deepExtend, deepExtendCouple, isBasicObject,
+ __slice = [].slice;
+
+ deepClone = function(obj) {
+ var func, isArr;
+ if (!_.isObject(obj) || _.isFunction(obj)) {
+ return obj;
+ }
+ if (obj instanceof Backbone.Collection || obj instanceof Backbone.Model) {
+ return obj;
+ }
+ if (_.isDate(obj)) {
+ return new Date(obj.getTime());
+ }
+ if (_.isRegExp(obj)) {
+ return new RegExp(obj.source, obj.toString().replace(/.*\//, ""));
+ }
+ isArr = _.isArray(obj || _.isArguments(obj));
+ func = function(memo, value, key) {
+ if (isArr) {
+ memo.push(deepClone(value));
+ } else {
+ memo[key] = deepClone(value);
+ }
+ return memo;
+ };
+ return _.reduce(obj, func, isArr ? [] : {});
+ };
+
+ isBasicObject = function(object) {
+ if (object == null) return false;
+ return (object.prototype === {}.prototype || object.prototype === Object.prototype) && _.isObject(object) && !_.isArray(object) && !_.isFunction(object) && !_.isDate(object) && !_.isRegExp(object) && !_.isArguments(object);
+ };
+
+ basicObjects = function(object) {
+ return _.filter(_.keys(object), function(key) {
+ return isBasicObject(object[key]);
+ });
+ };
+
+ arrays = function(object) {
+ return _.filter(_.keys(object), function(key) {
+ return _.isArray(object[key]);
+ });
+ };
+
+ deepExtendCouple = function(destination, source, maxDepth) {
+ var combine, recurse, sharedArrayKey, sharedArrayKeys, sharedObjectKey, sharedObjectKeys, _i, _j, _len, _len1;
+ if (maxDepth == null) {
+ maxDepth = 20;
+ }
+ if (maxDepth <= 0) {
+ console.warn('_.deepExtend(): Maximum depth of recursion hit.');
+ return _.extend(destination, source);
+ }
+ sharedObjectKeys = _.intersection(basicObjects(destination), basicObjects(source));
+ recurse = function(key) {
+ return source[key] = deepExtendCouple(destination[key], source[key], maxDepth - 1);
+ };
+ for (_i = 0, _len = sharedObjectKeys.length; _i < _len; _i++) {
+ sharedObjectKey = sharedObjectKeys[_i];
+ recurse(sharedObjectKey);
+ }
+ sharedArrayKeys = _.intersection(arrays(destination), arrays(source));
+ combine = function(key) {
+ return source[key] = _.union(destination[key], source[key]);
+ };
+ for (_j = 0, _len1 = sharedArrayKeys.length; _j < _len1; _j++) {
+ sharedArrayKey = sharedArrayKeys[_j];
+ combine(sharedArrayKey);
+ }
+ return _.extend(destination, source);
+ };
+
+ deepExtend = function() {
+ var finalObj, maxDepth, objects, _i;
+ objects = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), maxDepth = arguments[_i++];
+ if (!_.isNumber(maxDepth)) {
+ objects.push(maxDepth);
+ maxDepth = 20;
+ }
+ if (objects.length <= 1) {
+ return objects[0];
+ }
+ if (maxDepth <= 0) {
+ return _.extend.apply(this, objects);
+ }
+ finalObj = objects.shift();
+ while (objects.length > 0) {
+ finalObj = deepExtendCouple(finalObj, deepClone(objects.shift()), maxDepth);
+ }
+ return finalObj;
+ };
+
+ _.mixin({
+ deepClone: deepClone,
+ isBasicObject: isBasicObject,
+ basicObjects: basicObjects,
+ arrays: arrays,
+ deepExtend: deepExtend
+ });
+
+}).call(this);
+
/**
* Main source
*/
@@ -208,15 +329,11 @@
//
var separator = DeepModel.keyPathSeparator;
- var alreadyTriggered = {}; // * @restorer
for (var i = 0, l = changes.length; i < l; i++) {
var key = changes[i];
- if (!alreadyTriggered.hasOwnProperty(key) || !alreadyTriggered[key]) { // * @restorer
- alreadyTriggered[key] = true; // * @restorer
- this.trigger('change:' + key, this, getNested(current, key), options);
- } // * @restorer
+ this.trigger('change:' + key, this, getNested(current, key), options);
var fields = key.split(separator);
@@ -225,17 +342,7 @@
var parentKey = _.first(fields, n).join(separator),
wildcardKey = parentKey + separator + '*';
- if (!alreadyTriggered.hasOwnProperty(wildcardKey) || !alreadyTriggered[wildcardKey]) { // * @restorer
- alreadyTriggered[wildcardKey] = true; // * @restorer
- this.trigger('change:' + wildcardKey, this, getNested(current, parentKey), options);
- } // * @restorer
-
- // + @restorer
- if (!alreadyTriggered.hasOwnProperty(parentKey) || !alreadyTriggered[parentKey]) {
- alreadyTriggered[parentKey] = true;
- this.trigger('change:' + parentKey, this, getNested(current, parentKey), options);
- }
- // - @restorer
+ this.trigger('change:' + wildcardKey, this, getNested(current, parentKey), options);
}
//
}
diff --git a/src/UI/LifeCycle.js b/src/UI/LifeCycle.js
new file mode 100644
index 000000000..919f27fba
--- /dev/null
+++ b/src/UI/LifeCycle.js
@@ -0,0 +1,6 @@
+'use strict';
+define(function () {
+ window.onbeforeunload = function () {
+ window.NzbDrone.unloading = true;
+ };
+});
diff --git a/src/UI/Mixins/AutoComplete.js b/src/UI/Mixins/AutoComplete.js
index 7903cef05..a80610313 100644
--- a/src/UI/Mixins/AutoComplete.js
+++ b/src/UI/Mixins/AutoComplete.js
@@ -1,6 +1,6 @@
'use strict';
-define(function () {
+define(['jquery'],function ($) {
$.fn.autoComplete = function (resource) {
$(this).typeahead({
diff --git a/src/UI/Mixins/underscore.mixin.deepExtend.js b/src/UI/Mixins/underscore.mixin.deepExtend.js
deleted file mode 100644
index 70596a584..000000000
--- a/src/UI/Mixins/underscore.mixin.deepExtend.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Underscore mixins for deep objects
- *
- * Based on https://gist.github.com/echong/3861963
- */
-define(
- [
- 'underscore'
- ], function (_) {
-
- var arrays, basicObjects, deepClone, deepExtend, deepExtendCouple, isBasicObject, __slice =
- [
- ].slice;
-
- deepClone = function (obj) {
- var func, isArr;
- if (!_.isObject(obj) || _.isFunction(obj)) {
- return obj;
- }
- if (obj instanceof Backbone.Collection || obj instanceof Backbone.Model) {
- return obj;
- }
- if (_.isDate(obj)) {
- return new Date(obj.getTime());
- }
- if (_.isRegExp(obj)) {
- return new RegExp(obj.source, obj.toString().replace(/.*\//, ''));
- }
- isArr = _.isArray(obj || _.isArguments(obj));
- func = function (memo, value, key) {
- if (isArr) {
- memo.push(deepClone(value));
- }
- else {
- memo[key] = deepClone(value);
- }
- return memo;
- };
- return _.reduce(obj, func, isArr ?
- [
- ] :{});
- };
-
- isBasicObject = function (object) {
- if (object == null) {
- return false;
- }
- return (object.prototype === {}.prototype || object.prototype === Object.prototype) && _.isObject(object) && !_.isArray(object) && !_.isFunction(object) && !_.isDate(object) && !_.isRegExp(object) && !_.isArguments(object);
- };
-
- basicObjects = function (object) {
- return _.filter(_.keys(object), function (key) {
- return isBasicObject(object[key]);
- });
- };
-
- arrays = function (object) {
- return _.filter(_.keys(object), function (key) {
- return _.isArray(object[key]);
- });
- };
-
- deepExtendCouple = function (destination, source, maxDepth) {
- var combine, recurse, sharedArrayKey, sharedArrayKeys, sharedObjectKey, sharedObjectKeys, _i, _j, _len, _len1;
- if (maxDepth == null) {
- maxDepth = 20;
- }
- if (maxDepth <= 0) {
- console.warn('_.deepExtend(): Maximum depth of recursion hit.');
- return _.extend(destination, source);
- }
- sharedObjectKeys = _.intersection(basicObjects(destination), basicObjects(source));
- recurse = function (key) {
- return source[key] = deepExtendCouple(destination[key], source[key], maxDepth - 1);
- };
- for (_i = 0, _len = sharedObjectKeys.length; _i < _len; _i++) {
- sharedObjectKey = sharedObjectKeys[_i];
- recurse(sharedObjectKey);
- }
- sharedArrayKeys = _.intersection(arrays(destination), arrays(source));
- combine = function (key) {
- return source[key] = _.union(destination[key], source[key]);
- };
- for (_j = 0, _len1 = sharedArrayKeys.length; _j < _len1; _j++) {
- sharedArrayKey = sharedArrayKeys[_j];
- combine(sharedArrayKey);
- }
- return _.extend(destination, source);
- };
-
- deepExtend = function () {
- var finalObj, maxDepth, objects, _i;
- objects = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) :(_i = 0,
- [
- ]), maxDepth = arguments[_i++];
- if (!_.isNumber(maxDepth)) {
- objects.push(maxDepth);
- maxDepth = 20;
- }
- if (objects.length <= 1) {
- return objects[0];
- }
- if (maxDepth <= 0) {
- return _.extend.apply(this, objects);
- }
- finalObj = objects.shift();
- while (objects.length > 0) {
- finalObj = deepExtendCouple(finalObj, deepClone(objects.shift()), maxDepth);
- }
- return finalObj;
- };
-
-
- _.mixin({
- deepClone : deepClone,
- isBasicObject: isBasicObject,
- basicObjects : basicObjects,
- arrays : arrays,
- deepExtend : deepExtend
- });
- });
-
diff --git a/src/UI/Navbar/NavbarView.js b/src/UI/Navbar/NavbarView.js
index 85ca28cb6..b44a13562 100644
--- a/src/UI/Navbar/NavbarView.js
+++ b/src/UI/Navbar/NavbarView.js
@@ -2,10 +2,11 @@
define(
[
'marionette',
+ 'jquery',
'Navbar/Search'
- ], function (Marionette) {
+ ], function (Marionette, $) {
return Marionette.ItemView.extend({
- template : 'Navbar/NavbarTemplate',
+ template: 'Navbar/NavbarTemplate',
ui: {
search: '.x-series-search'
@@ -15,7 +16,7 @@ define(
'click a': 'onClick'
},
- onRender: function (){
+ onRender: function () {
this.ui.search.bindSearch();
},
diff --git a/src/UI/Quality/QualitySizeCollection.js b/src/UI/Quality/QualitySizeCollection.js
index b29fc62f7..92c580647 100644
--- a/src/UI/Quality/QualitySizeCollection.js
+++ b/src/UI/Quality/QualitySizeCollection.js
@@ -1,8 +1,9 @@
'use strict';
define(
[
+ 'backbone',
'Quality/QualitySizeModel'
- ], function (QualitySizeModel) {
+ ], function (Backbone, QualitySizeModel) {
return Backbone.Collection.extend({
model: QualitySizeModel,
url : window.NzbDrone.ApiRoot + '/qualitysize'
diff --git a/src/UI/Release/DownloadReportCell.js b/src/UI/Release/DownloadReportCell.js
index a9a1c7a3e..75ff71b20 100644
--- a/src/UI/Release/DownloadReportCell.js
+++ b/src/UI/Release/DownloadReportCell.js
@@ -22,21 +22,22 @@ define(
var self = this;
this.$el.html('
');
- var promise = this.model.save();
- promise.done(function () {
- self.$el.html('
');
- });
-
- promise.fail(function () {
- self.$el.html('
');
- });
+ //Using success callback instead of promise so it
+ //gets called before the sync event is triggered
+ this.model.save(null, { success: function () {
+ self.model.set('queued', true);
+ }});
},
render: function () {
this.$el.empty();
- if (this.model.get('downloadAllowed'))
+ if (this.model.get('queued')) {
+ this.$el.html('
');
+ }
+
+ else if (this.model.get('downloadAllowed'))
{
this.$el.html('
');
}
diff --git a/src/UI/Release/Collection.js b/src/UI/Release/ReleaseCollection.js
similarity index 79%
rename from src/UI/Release/Collection.js
rename to src/UI/Release/ReleaseCollection.js
index fb2a2ec63..c53ddccb7 100644
--- a/src/UI/Release/Collection.js
+++ b/src/UI/Release/ReleaseCollection.js
@@ -2,7 +2,7 @@
define(
[
'backbone',
- 'Release/Model'
+ 'Release/ReleaseModel'
], function (Backbone, ReleaseModel) {
return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/release',
@@ -13,7 +13,7 @@ define(
},
fetchEpisodeReleases: function (episodeId) {
- return this.fetch({ data: { episodeId: episodeId }});
+ return this.fetch({ data: { episodeId: episodeId }});
}
});
});
diff --git a/src/UI/Release/Layout.js b/src/UI/Release/ReleaseLayout.js
similarity index 87%
rename from src/UI/Release/Layout.js
rename to src/UI/Release/ReleaseLayout.js
index 05fd8e30b..8a427e283 100644
--- a/src/UI/Release/Layout.js
+++ b/src/UI/Release/ReleaseLayout.js
@@ -3,7 +3,7 @@ define(
[
'marionette',
'backgrid',
- 'Release/Collection',
+ 'Release/ReleaseCollection',
'Cells/IndexerCell',
'Cells/EpisodeNumberCell',
'Cells/FileSizeCell',
@@ -12,7 +12,7 @@ define(
'Shared/LoadingView'
], function (Marionette, Backgrid, ReleaseCollection, IndexerCell, EpisodeNumberCell, FileSizeCell, QualityCell, ApprovalStatusCell, LoadingView) {
return Marionette.Layout.extend({
- template: 'Release/LayoutTemplate',
+ template: 'Release/ReleaseLayoutTemplate',
regions: {
grid : '#x-grid',
@@ -27,7 +27,6 @@ define(
sortable: true,
cell : IndexerCell
},
-
{
name : 'title',
label : 'Title',
@@ -52,7 +51,6 @@ define(
sortable: true,
cell : QualityCell
},
-
{
name : 'rejections',
label: '',
@@ -60,7 +58,17 @@ define(
}
],
- showTable: function () {
+ initialize: function () {
+ this.collection = new ReleaseCollection();
+ this.listenTo(this.collection, 'sync', this._showTable);
+ },
+
+ onRender: function () {
+ this.grid.show(new LoadingView());
+ this.collection.fetch();
+ },
+
+ _showTable: function () {
if (!this.isClosed) {
this.grid.show(new Backgrid.Grid({
row : Backgrid.Row,
@@ -69,23 +77,6 @@ define(
className : 'table table-hover'
}));
}
- },
-
- initialize: function () {
- this.collection = new ReleaseCollection();
- this.fetchPromise = this.collection.fetch();
- },
-
- onShow: function () {
-
- var self = this;
-
- this.grid.show(new LoadingView());
-
- this.fetchPromise.done(function () {
- self.showTable();
- });
}
-
});
});
diff --git a/src/UI/Release/LayoutTemplate.html b/src/UI/Release/ReleaseLayoutTemplate.html
similarity index 100%
rename from src/UI/Release/LayoutTemplate.html
rename to src/UI/Release/ReleaseLayoutTemplate.html
diff --git a/src/UI/Release/Model.js b/src/UI/Release/ReleaseModel.js
similarity index 100%
rename from src/UI/Release/Model.js
rename to src/UI/Release/ReleaseModel.js
diff --git a/src/UI/Require/require.api.js b/src/UI/Require/require.api.js
index e3d855279..920cb76b0 100644
--- a/src/UI/Require/require.api.js
+++ b/src/UI/Require/require.api.js
@@ -1,9 +1,12 @@
-define(function () {
+define(
+ [
+ 'jquery'
+ ], function ($) {
'use strict';
return {
load: function (name, parentRequire, onload, config) {
- if(config.isBuild){
+ if (config.isBuild) {
return onload();
}
@@ -19,7 +22,7 @@ define(function () {
xhr : xhr,
status: status,
error : error});
- });
+ });
}
};
});
diff --git a/src/UI/SeasonPass/SeriesLayout.js b/src/UI/SeasonPass/SeriesLayout.js
index 828f25341..b4e6d3bff 100644
--- a/src/UI/SeasonPass/SeriesLayout.js
+++ b/src/UI/SeasonPass/SeriesLayout.js
@@ -112,13 +112,13 @@ define(
var element;
if (e.target.localName === 'i') {
- seasonNumber = parseInt($(e.target).parent('td').attr('data-season-number'), 10);
- element = $(e.target);
+ seasonNumber = parseInt(this.$(e.target).parent('td').attr('data-season-number'), 10);
+ element = this.$(e.target);
}
else {
- seasonNumber = parseInt($(e.target).attr('data-season-number'), 10);
- element = $(e.target).children('i');
+ seasonNumber = parseInt(this.$(e.target).attr('data-season-number'), 10);
+ element = this.$(e.target).children('i');
}
this.model.setSeasonMonitored(seasonNumber);
@@ -146,7 +146,7 @@ define(
}
},
- _toggleSeriesMonitored: function (e) {
+ _toggleSeriesMonitored: function () {
var savePromise = this.model.save('monitored', !this.model.get('monitored'), {
wait: true
});
diff --git a/src/UI/Series/Details/InfoViewTemplate.html b/src/UI/Series/Details/InfoViewTemplate.html
index 5c3753ea0..bef8be3df 100644
--- a/src/UI/Series/Details/InfoViewTemplate.html
+++ b/src/UI/Series/Details/InfoViewTemplate.html
@@ -2,6 +2,12 @@
{{network}}
{{runtime}} minutes
{{path}}
+{{#if_eq status compare="continuing"}}
+
Continuing
+{{else}}
+
Ended
+{{/if_eq}}
+
Trakt
diff --git a/src/UI/Series/Details/SeriesDetailsLayout.js b/src/UI/Series/Details/SeriesDetailsLayout.js
index e2b4ce627..b04aa0aa9 100644
--- a/src/UI/Series/Details/SeriesDetailsLayout.js
+++ b/src/UI/Series/Details/SeriesDetailsLayout.js
@@ -1,6 +1,7 @@
'use strict';
define(
[
+ 'jquery',
'vent',
'reqres',
'marionette',
@@ -15,7 +16,7 @@ define(
'underscore',
'backstrech',
'Mixins/backbone.signalr.mixin'
- ], function (vent,reqres, Marionette, Backbone, EpisodeCollection, EpisodeFileCollection, SeasonCollection, SeasonCollectionView, InfoView, CommandController, LoadingView, _) {
+ ], function ($,vent,reqres, Marionette, Backbone, EpisodeCollection, EpisodeFileCollection, SeasonCollection, SeasonCollectionView, InfoView, CommandController, LoadingView, _) {
return Marionette.Layout.extend({
itemViewContainer: '.x-series-seasons',
diff --git a/src/UI/Series/EpisodeCollection.js b/src/UI/Series/EpisodeCollection.js
index 3bd6d9979..8c72b2440 100644
--- a/src/UI/Series/EpisodeCollection.js
+++ b/src/UI/Series/EpisodeCollection.js
@@ -54,7 +54,7 @@ define(
options = {};
}
- options['data'] = { seriesId: this.seriesId };
+ options.data = { seriesId: this.seriesId };
return this.originalFetch.call(this, options);
}
diff --git a/src/UI/Series/EpisodeFileCollection.js b/src/UI/Series/EpisodeFileCollection.js
index 5cd65aaad..42472d0ed 100644
--- a/src/UI/Series/EpisodeFileCollection.js
+++ b/src/UI/Series/EpisodeFileCollection.js
@@ -23,7 +23,7 @@ define(
options = {};
}
- options['data'] = { seriesId: this.seriesId };
+ options.data = { seriesId: this.seriesId };
return this.originalFetch.call(this, options);
}
diff --git a/src/UI/Series/Index/SeriesIndexLayout.js b/src/UI/Series/Index/SeriesIndexLayout.js
index 704e7f725..6a78e0754 100644
--- a/src/UI/Series/Index/SeriesIndexLayout.js
+++ b/src/UI/Series/Index/SeriesIndexLayout.js
@@ -2,6 +2,7 @@
define(
[
'marionette',
+ 'backgrid',
'Series/Index/Posters/CollectionView',
'Series/Index/List/CollectionView',
'Series/Index/EmptyView',
@@ -16,8 +17,10 @@ define(
'Cells/SeriesStatusCell',
'Series/Index/FooterView',
'Series/Index/FooterModel',
- 'Shared/Toolbar/ToolbarLayout'
+ 'Shared/Toolbar/ToolbarLayout',
+ 'underscore'
], function (Marionette,
+ Backgrid,
PosterCollectionView,
ListCollectionView,
EmptyView,
@@ -32,7 +35,8 @@ define(
SeriesStatusCell,
FooterView,
FooterModel,
- ToolbarLayout) {
+ ToolbarLayout,
+ _) {
return Marionette.Layout.extend({
template: 'Series/Index/SeriesIndexLayoutTemplate',
diff --git a/src/UI/ServerStatus.js b/src/UI/ServerStatus.js
index 589d45fc6..95e1fd968 100644
--- a/src/UI/ServerStatus.js
+++ b/src/UI/ServerStatus.js
@@ -1,6 +1,6 @@
window.NzbDrone.ApiRoot = '/api';
-var statusText = $.ajax({
+var statusText = window.$.ajax({
type : 'GET',
url : window.NzbDrone.ApiRoot + '/system/status',
async: false,
@@ -13,10 +13,13 @@ window.NzbDrone.ServerStatus = JSON.parse(statusText);
var footerText = window.NzbDrone.ServerStatus.version;
-$(document).ready(function () {
- if (window.NzbDrone.ServerStatus.branch != 'master') {
+window.$(document).ready(function () {
+ if (window.NzbDrone.ServerStatus.branch !== 'master') {
footerText += '' + window.NzbDrone.ServerStatus.branch;
}
- $('#footer-region .version').html(footerText);
+ window.$('#footer-region .version').html(footerText);
});
+
+
+
diff --git a/src/UI/Settings/SettingsLayout.js b/src/UI/Settings/SettingsLayout.js
index f03ac5416..20ae6912d 100644
--- a/src/UI/Settings/SettingsLayout.js
+++ b/src/UI/Settings/SettingsLayout.js
@@ -83,7 +83,7 @@ define(
this.indexerSettings = new IndexerCollection();
this.notificationSettings = new NotificationCollection();
- $.when(this.settings.fetch(),
+ Backbone.$.when(this.settings.fetch(),
this.generalSettings.fetch(),
this.namingSettings.fetch(),
this.indexerSettings.fetch(),
diff --git a/src/UI/Shared/FormatHelpers.js b/src/UI/Shared/FormatHelpers.js
index c29e1606a..badfc18f3 100644
--- a/src/UI/Shared/FormatHelpers.js
+++ b/src/UI/Shared/FormatHelpers.js
@@ -51,7 +51,7 @@ define(
return '';
}
- return input.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+ return input.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
- }
+ };
});
diff --git a/src/UI/Shared/Grid/Pager.js b/src/UI/Shared/Grid/Pager.js
index 7ddfe4ab5..e230f8d1d 100644
--- a/src/UI/Shared/Grid/Pager.js
+++ b/src/UI/Shared/Grid/Pager.js
@@ -1,8 +1,9 @@
'use strict';
define(
[
+ 'marionette',
'backgrid.paginator'
- ], function (Paginator) {
+ ], function (Marionette, Paginator) {
return Paginator.extend({
@@ -24,7 +25,7 @@ define(
changePage: function (e) {
e.preventDefault();
- var target = $(e.target);
+ var target =this.$(e.target);
if (target.closest('li').hasClass('disabled')) {
return;
@@ -59,7 +60,7 @@ define(
}
var state = collection.state;
- var pageIndex = $(e.target).text() * 1;
+ var pageIndex = target.text();
collection.getPage(state.firstPage === 0 ? pageIndex - 1 :pageIndex);
},
diff --git a/src/UI/Shared/Messenger.js b/src/UI/Shared/Messenger.js
index ab53a619a..04823f984 100644
--- a/src/UI/Shared/Messenger.js
+++ b/src/UI/Shared/Messenger.js
@@ -23,12 +23,13 @@ define(function () {
}
}
- return window.Messenger().post({
+ return window.Messenger().post({
message : options.message,
type : options.type,
showCloseButton: true,
hideAfter : options.hideAfter,
- id : options.id
+ id : options.id,
+ actions : options.actions
});
},
diff --git a/src/UI/Shared/NzbDroneController.js b/src/UI/Shared/NzbDroneController.js
index 2ff57cfd4..0d2383fad 100644
--- a/src/UI/Shared/NzbDroneController.js
+++ b/src/UI/Shared/NzbDroneController.js
@@ -1,23 +1,43 @@
'use strict';
define(
[
+ 'vent',
'AppLayout',
'marionette',
'Shared/NotFoundView'
- ], function (AppLayout, Marionette, NotFoundView) {
+ ], function (vent, AppLayout, Marionette, NotFoundView) {
return Marionette.AppRouter.extend({
+ initialize: function () {
+ this.listenTo(vent, vent.Events.ServerUpdated, this._onServerUpdated);
+ },
+
showNotFound: function () {
this.setTitle('Not Found');
- AppLayout.mainRegion.show(new NotFoundView(this));
+ this.showMainRegion(new NotFoundView(this));
},
setTitle: function (title) {
if (title.toLocaleLowerCase() === 'nzbdrone') {
- window.document.title = 'NzbDrone';
+ document.title = 'NzbDrone';
}
else {
- window.document.title = title + ' - NzbDrone';
+ document.title = title + ' - NzbDrone';
+ }
+ },
+
+ _onServerUpdated: function () {
+ this.pendingUpdate = true;
+ },
+
+ showMainRegion: function (view) {
+ if (this.pendingUpdate) {
+ window.location.reload();
+ }
+
+ else {
+ //AppLayout
+ AppLayout.mainRegion.show(view);
}
}
});
diff --git a/src/UI/Shared/SignalRBroadcaster.js b/src/UI/Shared/SignalRBroadcaster.js
index 453b08843..a91e08a5c 100644
--- a/src/UI/Shared/SignalRBroadcaster.js
+++ b/src/UI/Shared/SignalRBroadcaster.js
@@ -2,8 +2,11 @@
define(
[
'vent',
+ 'jquery',
+ 'Shared/Messenger',
+ 'System/StatusModel',
'signalR'
- ], function (vent) {
+ ], function (vent, $, Messenger, StatusModel) {
return {
appInitializer: function () {
@@ -24,6 +27,9 @@ define(
}
};
+ var tryingToReconnect = false;
+ var messengerId = 'signalR';
+
this.signalRconnection = $.connection('/signalr');
this.signalRconnection.stateChanged(function (change) {
@@ -34,6 +40,62 @@ define(
vent.trigger('server:' + message.name, message.body);
});
+ this.signalRconnection.reconnecting(function() {
+ if (window.NzbDrone.unloading) {
+ return;
+ }
+
+ tryingToReconnect = true;
+
+ Messenger.show({
+ id : messengerId,
+ type : 'info',
+ hideAfter : 0,
+ message : 'Connection to backend lost, attempting to reconnect'
+ });
+ });
+
+ this.signalRconnection.reconnected(function() {
+ tryingToReconnect = false;
+
+ var currentVersion = StatusModel.get('version');
+
+ var promise = StatusModel.fetch();
+ promise.done(function () {
+ if (StatusModel.get('version') !== currentVersion) {
+ vent.trigger(vent.Events.ServerUpdated);
+ }
+ });
+
+ Messenger.show({
+ id : messengerId,
+ type : 'success',
+ hideAfter : 5,
+ message : 'Connection to backend restored'
+ });
+ });
+
+ this.signalRconnection.disconnected(function () {
+ if (tryingToReconnect) {
+ $('').appendTo(document.body);
+
+ Messenger.show({
+ id : messengerId,
+ type : 'error',
+ hideAfter : 0,
+ message : 'Connection to backend lost',
+ actions : {
+ cancel: {
+ label: 'Reload',
+ action: function() {
+ window.location.reload();
+ }
+ }
+ }
+ });
+ }
+ });
+
this.signalRconnection.start({ transport:
[
'longPolling'
diff --git a/src/UI/Shared/Toolbar/Button/ButtonView.js b/src/UI/Shared/Toolbar/Button/ButtonView.js
index a35d1a048..45300e988 100644
--- a/src/UI/Shared/Toolbar/Button/ButtonView.js
+++ b/src/UI/Shared/Toolbar/Button/ButtonView.js
@@ -11,6 +11,10 @@ define(
template : 'Shared/Toolbar/ButtonTemplate',
className: 'btn',
+ ui: {
+ icon: 'i'
+ },
+
events: {
'click': 'onClick'
},
@@ -73,7 +77,7 @@ define(
var callback = this.model.get('callback');
if (callback) {
- callback.call(this.model.ownerContext);
+ callback.call(this.model.ownerContext, this);
}
}
});
diff --git a/src/UI/Shared/Toolbar/ToolbarLayout.js b/src/UI/Shared/Toolbar/ToolbarLayout.js
index 8945337a2..7f4b64bf9 100644
--- a/src/UI/Shared/Toolbar/ToolbarLayout.js
+++ b/src/UI/Shared/Toolbar/ToolbarLayout.js
@@ -5,8 +5,9 @@ define(
'Shared/Toolbar/ButtonCollection',
'Shared/Toolbar/ButtonModel',
'Shared/Toolbar/Radio/RadioButtonCollectionView',
- 'Shared/Toolbar/Button/ButtonCollectionView'
- ], function (Marionette, ButtonCollection, ButtonModel, RadioButtonCollectionView, ButtonCollectionView) {
+ 'Shared/Toolbar/Button/ButtonCollectionView',
+ 'underscore'
+ ], function (Marionette, ButtonCollection, ButtonModel, RadioButtonCollectionView, ButtonCollectionView,_) {
return Marionette.Layout.extend({
template: 'Shared/Toolbar/ToolbarLayoutTemplate',
diff --git a/src/UI/System/Logs/Files/LogFileCollection.js b/src/UI/System/Logs/Files/LogFileCollection.js
index b26a983fe..88fefca42 100644
--- a/src/UI/System/Logs/Files/LogFileCollection.js
+++ b/src/UI/System/Logs/Files/LogFileCollection.js
@@ -1,14 +1,17 @@
-'use strict';
+'use strict';
-define(['System/Logs/Files/LogFileModel' ],
-function (LogFileModel) {
- return Backbone.Collection.extend({
- url : window.NzbDrone.ApiRoot + '/log/files',
- model: LogFileModel,
+define(
+ [
+ 'backbone',
+ 'System/Logs/Files/LogFileModel'
+ ], function (Backbone, LogFileModel) {
+ return Backbone.Collection.extend({
+ url : window.NzbDrone.ApiRoot + '/log/files',
+ model: LogFileModel,
- state: {
- sortKey : 'lastWriteTime',
- order : 1
- }
+ state: {
+ sortKey: 'lastWriteTime',
+ order : 1
+ }
+ });
});
-});
diff --git a/src/UI/System/Logs/Files/LogFileLayout.js b/src/UI/System/Logs/Files/LogFileLayout.js
index f8de17828..a324f8cfa 100644
--- a/src/UI/System/Logs/Files/LogFileLayout.js
+++ b/src/UI/System/Logs/Files/LogFileLayout.js
@@ -12,7 +12,8 @@ define(
'System/Logs/Files/ContentsView',
'System/Logs/Files/ContentsModel',
'Shared/Toolbar/ToolbarLayout',
- 'Shared/LoadingView'
+ 'Shared/LoadingView',
+ 'jQuery/jquery.spin'
], function (vent,
Marionette,
Backgrid,
@@ -139,9 +140,10 @@ define(
this.contents.show(new ContentsView({ model: model }));
},
- _refreshLogs: function () {
+ _refreshLogs: function (buttonContext) {
this.contents.close();
- this.collection.fetch();
+ var promise = this.collection.fetch();
+ buttonContext.ui.icon.spinForPromise(promise);
},
_commandComplete: function (options) {
diff --git a/src/UI/System/Logs/Table/LogsTableLayout.js b/src/UI/System/Logs/Table/LogsTableLayout.js
index 95a59851a..82960ba79 100644
--- a/src/UI/System/Logs/Table/LogsTableLayout.js
+++ b/src/UI/System/Logs/Table/LogsTableLayout.js
@@ -10,7 +10,8 @@ define(
'Shared/Grid/Pager',
'System/Logs/LogsCollection',
'Shared/Toolbar/ToolbarLayout',
- 'Shared/LoadingView'
+ 'Shared/LoadingView',
+ 'jQuery/jquery.spin'
], function (vent, Marionette, Backgrid, LogTimeCell, LogLevelCell, LogRow, GridPager, LogCollection, ToolbarLayout, LoadingView) {
return Marionette.Layout.extend({
template: 'System/Logs/Table/LogsTableLayoutTemplate',
@@ -58,22 +59,18 @@ define(
initialize: function () {
this.collection = new LogCollection();
- this.collectionPromise = this.collection.fetch();
+ this.listenTo(this.collection, 'sync', this._showTable);
vent.on(vent.Events.CommandComplete, this._commandComplete, this);
},
onRender: function () {
this.grid.show(new LoadingView());
+ this.collection.fetch();
},
onShow: function () {
- var self = this;
this._showToolbar();
-
- this.collectionPromise.done(function () {
- self._showTable();
- });
},
_showTable: function () {
@@ -120,10 +117,10 @@ define(
}));
},
- _refreshLogs: function () {
+ _refreshLogs: function (buttonContext) {
this.collection.state.currentPage = 1;
- this.collection.fetch({ reset: true });
- this._showTable();
+ var promise = this.collection.fetch({ reset: true });
+ buttonContext.ui.icon.spinForPromise(promise);
},
_commandComplete: function (options) {
diff --git a/src/UI/System/StatusModel.js b/src/UI/System/StatusModel.js
index 3210fe3e6..97dc696ca 100644
--- a/src/UI/System/StatusModel.js
+++ b/src/UI/System/StatusModel.js
@@ -8,7 +8,6 @@ define(
url: window.NzbDrone.ApiRoot + '/system/status'
});
-
var instance = new StatusModel();
instance.fetch();
return instance;
diff --git a/src/UI/System/Update/UpdateItemViewTemplate.html b/src/UI/System/Update/UpdateItemViewTemplate.html
index 7c2953838..796f1070e 100644
--- a/src/UI/System/Update/UpdateItemViewTemplate.html
+++ b/src/UI/System/Update/UpdateItemViewTemplate.html
@@ -6,7 +6,15 @@
{{#if installed}}{{/if}}
{{#if_windows}}
- {{#if isUpgrade}}Install{{/if}}
+ {{#if isUpgrade}}
+ Install
+ {{/if}}
+ {{else}}
+ {{#if isUpgrade}}
+
+ Install
+
+ {{/if}}
{{/if_windows}}
diff --git a/src/UI/System/Update/update.less b/src/UI/System/Update/update.less
index 26751cd49..48c138f40 100644
--- a/src/UI/System/Update/update.less
+++ b/src/UI/System/Update/update.less
@@ -29,4 +29,13 @@
.clickable();
margin-left: 10px;
}
+
+ a {
+ color: white;
+ text-decoration: none;
+ }
+
+ a:hover {
+ text-decoration: none;
+ }
}
\ No newline at end of file
diff --git a/src/UI/app.js b/src/UI/app.js
index 7d4aab71d..0c0dd9cc0 100644
--- a/src/UI/app.js
+++ b/src/UI/app.js
@@ -21,7 +21,7 @@ require.config({
'signalR' : 'JsLibraries/jquery.signalR',
'jquery.knob' : 'JsLibraries/jquery.knob',
'jquery.dotdotdot' : 'JsLibraries/jquery.dotdotdot',
- 'jquery' : 'JsLibraries/jquery',
+ 'jquery' : 'jQuery/jquery.shim',
'libs' : 'JsLibraries/',
'api': 'Require/require.api'
@@ -29,6 +29,11 @@ require.config({
shim: {
+
+ jquery :{
+ exports: '$'
+ },
+
signalR: {
deps:
[
@@ -77,20 +82,6 @@ require.config({
},
- 'backbone.deepmodel': {
- deps:
- [
- 'Mixins/underscore.mixin.deepExtend'
- ]
- },
-
- 'backbone.validation': {
- deps :
- [
- 'backbone'
- ],
- exports: 'Backbone.Validation'
- },
marionette: {
deps:
@@ -102,8 +93,8 @@ require.config({
exports: 'Marionette',
init : function (Backbone, TemplateMixin, AsNamedView) {
- TemplateMixin.call(Marionette.TemplateCache);
- AsNamedView.call(Marionette.ItemView.prototype);
+ TemplateMixin.call(window.Marionette.TemplateCache);
+ AsNamedView.call(window.Marionette.ItemView.prototype);
}
},
@@ -128,6 +119,26 @@ require.config({
'backbone'
]
},
+ 'backbone.deepmodel': {
+ deps:
+ [
+ 'backbone',
+ 'underscore'
+ ]
+ },
+ 'backbone.validation': {
+ deps :
+ [
+ 'backbone'
+ ],
+ exports: 'Backbone.Validation'
+ },
+ 'backbone.modelbinder':{
+ deps :
+ [
+ 'backbone'
+ ]
+ },
backgrid : {
deps:
@@ -143,7 +154,7 @@ require.config({
'Shared/Grid/HeaderCell'
], function () {
- Backgrid.Column.prototype.defaults = {
+ window.Backgrid.Column.prototype.defaults = {
name : undefined,
label : undefined,
sortable : true,
@@ -194,7 +205,8 @@ define(
'Series/SeriesController',
'Router',
'Shared/Modal/Controller',
- 'Instrumentation/StringFormat'
+ 'Instrumentation/StringFormat',
+ 'LifeCycle'
], function ($, Backbone, Marionette, RouteBinder, SignalRBroadcaster, NavbarView, AppLayout, SeriesController, Router, ModalController) {
new SeriesController();
diff --git a/src/UI/index.html b/src/UI/index.html
index 5af3cf1a8..515edecb9 100644
--- a/src/UI/index.html
+++ b/src/UI/index.html
@@ -61,7 +61,8 @@