From f98002c576f379adf1457fa49bb5b24d6793952d Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Tue, 22 Jan 2013 21:03:57 -0800 Subject: [PATCH] fixed api root url --- NzbDrone.Web/Web.config | 2 +- .../_backboneApp/AddSeries/SearchResultCollection.js | 2 +- NzbDrone.Web/_backboneApp/app.js | 5 ++++- NzbDrone.Web/_backboneApp/errorHandler.js | 6 +++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/NzbDrone.Web/Web.config b/NzbDrone.Web/Web.config index d2baa4460..aeb634253 100644 --- a/NzbDrone.Web/Web.config +++ b/NzbDrone.Web/Web.config @@ -6,7 +6,7 @@ - + diff --git a/NzbDrone.Web/_backboneApp/AddSeries/SearchResultCollection.js b/NzbDrone.Web/_backboneApp/AddSeries/SearchResultCollection.js index 432a63fc3..c69890fff 100644 --- a/NzbDrone.Web/_backboneApp/AddSeries/SearchResultCollection.js +++ b/NzbDrone.Web/_backboneApp/AddSeries/SearchResultCollection.js @@ -2,7 +2,7 @@ /// NzbDrone.AddSeries.SearchResultCollection = Backbone.Collection.extend({ - url: NzbDrone.Constants.ApiRoot + "/series/lookup", + url: NzbDrone.Constants.ApiRoot + 'series/lookup', model: NzbDrone.AddSeries.SearchResultModel, }); diff --git a/NzbDrone.Web/_backboneApp/app.js b/NzbDrone.Web/_backboneApp/app.js index 82387c629..bc7cf21d1 100644 --- a/NzbDrone.Web/_backboneApp/app.js +++ b/NzbDrone.Web/_backboneApp/app.js @@ -13,8 +13,11 @@ if (typeof console == "undefined") { NzbDrone = new Backbone.Marionette.Application(); NzbDrone.AddSeries = NzbDrone.module("AddSeries"); + + + NzbDrone.Constants = { - ApiRoot: 'http://localhost:8080/api/v1/' + ApiRoot: '/api/' }; NzbDrone.Events = { diff --git a/NzbDrone.Web/_backboneApp/errorHandler.js b/NzbDrone.Web/_backboneApp/errorHandler.js index c293880d4..58f2e6277 100644 --- a/NzbDrone.Web/_backboneApp/errorHandler.js +++ b/NzbDrone.Web/_backboneApp/errorHandler.js @@ -8,4 +8,8 @@ window.onerror = function (msg, url, line) { // If you return true, then error alerts (like in older versions of // Internet Explorer) will be suppressed. return suppressErrorAlert; -}; \ No newline at end of file +}; + +$(document).ajaxSuccess(function (event, XMLHttpRequest, ajaxOptionsa) { + console.log(ajaxOptionsa); +}); \ No newline at end of file