diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Browser.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Browser.Controller.js index eb8e7dd..2287f42 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Browser.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Browser.Controller.js @@ -5,7 +5,7 @@ app.requires.push('tableSort'); app.controller("Analytics.BrowserController", - function ($scope, $location, $routeParams, statsResource, settingsResource, localizationService, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, localizationService, navigationService) { var profileID = ""; @@ -14,13 +14,13 @@ app.controller("Analytics.BrowserController", $scope.itemSpecs = []; $scope.loadingViews = true; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.$watch('dateFilter', function () { $scope.loadingViews = true; - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function (response) { + analyticsSettingsResource.getprofile().then(function (response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Country.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Country.Controller.js index fb8e9e1..bff657f 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Country.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Country.Controller.js @@ -1,5 +1,5 @@ angular.module("umbraco").controller("Analytics.CountryController", - function ($scope, $location, $routeParams, statsResource, settingsResource, assetsService, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, assetsService, navigationService) { var profileID = ""; @@ -17,18 +17,18 @@ }); }); - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.$watch('dateFilter', function() { - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); initChart(); }); function initChart() { $scope.loadingViews = true; //Get Profile - settingsResource.getprofile().then(function(response) { + analyticsSettingsResource.getprofile().then(function(response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Dashboard.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Dashboard.Controller.js index e03f381..2e47043 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Dashboard.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Dashboard.Controller.js @@ -1,5 +1,5 @@ angular.module("umbraco").controller("Analytics.DashboardController", - function ($scope, $location, statsResource, settingsResource, localizationService) { + function ($scope, $location, statsResource, analyticsSettingsResource, localizationService) { var profileID = ""; @@ -22,7 +22,7 @@ $scope.dateFilter.startDate = moment().subtract('days', 6).format('YYYY-MM-DD'); $scope.dateFilter.endDate = moment().format('YYYY-MM-DD'); - settingsResource.getprofile().then(function(response) { + analyticsSettingsResource.getprofile().then(function(response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Device.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Device.Controller.js index 2648605..c891865 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Device.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Device.Controller.js @@ -1,5 +1,5 @@ angular.module("umbraco").controller("Analytics.DeviceController", - function ($scope, $location, $routeParams, statsResource, settingsResource, localizationService, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, localizationService, navigationService) { var profileID = ""; @@ -7,15 +7,15 @@ $scope.types = []; $scope.items = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.loadingViews = true; $scope.$watch('dateFilter', function () { $scope.loadingViews = true; - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function(response) { + analyticsSettingsResource.getprofile().then(function(response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Ecommerce.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Ecommerce.Controller.js index 59edc47..485edb3 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Ecommerce.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Ecommerce.Controller.js @@ -1,5 +1,5 @@ angular.module("umbraco").controller("Analytics.EcommerceController", - function ($scope, $location, $routeParams, statsResource, settingsResource, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, navigationService) { var profileID = ""; @@ -7,15 +7,15 @@ $scope.itemProducts = []; $scope.itemRevenuePerSource = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.loadingViews = true; $scope.$watch('dateFilter', function () { $scope.loadingViews = true; - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function (response) { + analyticsSettingsResource.getprofile().then(function (response) { $scope.profile = response.data; profileID = response.data.Id; $scope.currencyCode = $scope.profile.Currency; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Keyword.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Keyword.Controller.js index c61bd19..cef5296 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Keyword.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Keyword.Controller.js @@ -1,20 +1,20 @@ angular.module("umbraco").controller("Analytics.KeywordController", - function ($scope, $location, $routeParams, statsResource, settingsResource, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, navigationService) { var profileID = ""; // items list array $scope.items = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.loadingViews = true; $scope.$watch('dateFilter', function () { $scope.loadingViews = true; - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function(response) { + analyticsSettingsResource.getprofile().then(function(response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Language.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Language.Controller.js index 9126729..b8cb2f7 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Language.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Language.Controller.js @@ -1,18 +1,18 @@ angular.module("umbraco").controller("Analytics.LanguageController", - function ($scope, $location, $routeParams, statsResource, settingsResource, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, navigationService) { var profileID = ""; // items list array $scope.items = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.$watch('dateFilter', function () { - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function(response) { + analyticsSettingsResource.getprofile().then(function(response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/OS.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/OS.Controller.js index 9834966..3c90ac7 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/OS.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/OS.Controller.js @@ -1,5 +1,5 @@ angular.module("umbraco").controller("Analytics.OSController", - function ($scope, $location, $routeParams, statsResource, settingsResource, localizationService, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, localizationService, navigationService) { var profileID = ""; @@ -7,14 +7,14 @@ $scope.items = []; $scope.itemsVersions = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.$watch('dateFilter', function () { - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function(response) { + analyticsSettingsResource.getprofile().then(function(response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/PageViews.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/PageViews.Controller.js index 96fe5ea..60d5d04 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/PageViews.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/PageViews.Controller.js @@ -1,5 +1,5 @@ angular.module("umbraco").controller("Analytics.PageViewsController", - function ($scope, $location, $routeParams, statsResource, settingsResource, dateRangeService, localizationService, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, dateRangeService, localizationService, navigationService) { var profileID = ""; @@ -7,14 +7,14 @@ $scope.items = []; $scope.itemSources = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.$watch('dateFilter', function () { - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function (response) { + analyticsSettingsResource.getprofile().then(function (response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/ProductPerformance.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/ProductPerformance.Controller.js index 1847f54..cc9cc78 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/ProductPerformance.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/ProductPerformance.Controller.js @@ -1,20 +1,20 @@ angular.module("umbraco").controller("Analytics.ProductPerformanceController", - function ($scope, $location, $routeParams, statsResource, settingsResource, localizationService, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, localizationService, navigationService) { var profileID = ""; // items list array $scope.itemProducts = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.loadingViews = true; $scope.$watch('dateFilter', function () { $scope.loadingViews = true; - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function (response) { + analyticsSettingsResource.getprofile().then(function (response) { $scope.profile = response.data; profileID = response.data.Id; $scope.currencyCode = $scope.profile.Currency; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/SalesPerformance.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/SalesPerformance.Controller.js index c9251a0..0025a29 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/SalesPerformance.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/SalesPerformance.Controller.js @@ -1,20 +1,20 @@ angular.module("umbraco").controller("Analytics.SalesPerformanceController", - function ($scope, $location, $routeParams, statsResource, settingsResource, localizationService, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, localizationService, navigationService) { var profileID = ""; // items list array $scope.itemSales = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.loadingViews = true; $scope.$watch('dateFilter', function () { $scope.loadingViews = true; - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function (response) { + analyticsSettingsResource.getprofile().then(function (response) { $scope.profile = response.data; profileID = response.data.Id; $scope.currencyCode = $scope.profile.Currency; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/ScreenRes.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/ScreenRes.Controller.js index b273d38..f641c8f 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/ScreenRes.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/ScreenRes.Controller.js @@ -1,19 +1,19 @@ angular.module("umbraco").controller("Analytics.ScreenResController", - function ($scope, $location, $routeParams, statsResource, settingsResource, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, navigationService) { var profileID = ""; // items list array $scope.items = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.$watch('dateFilter', function () { - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function(response) { + analyticsSettingsResource.getprofile().then(function(response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Settings.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Settings.Controller.js index 8e4faea..c41319c 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Settings.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Settings.Controller.js @@ -1,16 +1,16 @@ angular.module("umbraco").controller("Analytics.SettingsController", - function ($scope, $routeParams, settingsResource, notificationsService, localizationService, navigationService) { + function ($scope, $routeParams, analyticsSettingsResource, notificationsService, localizationService, navigationService) { //By default user has not authorised var hasUserAuthd = false; - //Get all settings via settingsResource - does WebAPI GET call - settingsResource.getall().then(function (response) { + //Get all settings via analyticsSettingsResource - does WebAPI GET call + analyticsSettingsResource.getall().then(function (response) { $scope.settings = response.data; }); //Get Account JSON & bind back to dropdown - settingsResource.getaccount().then(function (response) { + analyticsSettingsResource.getaccount().then(function (response) { if (response.data === "null") { $scope.selectedaccount = null; } @@ -20,7 +20,7 @@ }); //Get Profile JSON & bind back to dropdown - settingsResource.getprofile().then(function (response) { + analyticsSettingsResource.getprofile().then(function (response) { if (response.data === "null") { $scope.selectedprofile = null; } @@ -31,7 +31,7 @@ //Get oAuth Check - WebAPI GET (Basically checks if RefreshToken has a value) - settingsResource.checkauth().then(function (response) { + analyticsSettingsResource.checkauth().then(function (response) { //Show or hide the auth button (set on scope & local var for if check) hasUserAuthd = response.data === "true"; @@ -44,14 +44,14 @@ //Only load/fetch if showAuth is true if (hasUserAuthd === true) { - //Get all accounts via settingsResource - does WebAPI GET call - settingsResource.getaccounts().then(function (response) { + //Get all accounts via analyticsSettingsResource - does WebAPI GET call + analyticsSettingsResource.getaccounts().then(function (response) { $scope.accounts = response.data; if ($scope.selectedaccount != null) { $scope.selectedaccount = _.where($scope.accounts, { Id: $scope.selectedaccount.Id })[0]; - settingsResource.getprofiles($scope.selectedaccount.Id).then(function (response) { + analyticsSettingsResource.getprofiles($scope.selectedaccount.Id).then(function (response) { $scope.profiles = response.data; if ($scope.selectedprofile != null) { $scope.selectedprofile = _.where($scope.profiles, { Id: $scope.selectedprofile.Id })[0]; @@ -63,7 +63,7 @@ //When an account is selected $scope.accountSelected = function (selectedAccount) { - settingsResource.getprofiles(selectedAccount.Id).then(function (response) { + analyticsSettingsResource.getprofiles(selectedAccount.Id).then(function (response) { $scope.profiles = response.data; }); }; @@ -83,7 +83,7 @@ $scope.save = function (settings, account, profile) { //Save settings resource - does a WebAPI POST call - settingsResource.save(settings).then(function (response) { + analyticsSettingsResource.save(settings).then(function (response) { $scope.settings = response.data; //Display Success message @@ -91,7 +91,7 @@ }); //Save settings resource - does a WebAPI POST call - settingsResource.saveAccount(account).then(function (response) { + analyticsSettingsResource.saveAccount(account).then(function (response) { //Don't need anything from response.data back //Display Success message @@ -99,7 +99,7 @@ }); //Save settings resource - does a WebAPI POST call - settingsResource.saveProfile(profile).then(function (response) { + analyticsSettingsResource.saveProfile(profile).then(function (response) { //Don't need anything from response.data back //Display Success message diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Social.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Social.Controller.js index 0d3cd3c..37505ed 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Social.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Social.Controller.js @@ -1,19 +1,19 @@ angular.module("umbraco").controller("Analytics.SocialController", - function ($scope, $location, $routeParams, statsResource, settingsResource, localizationService, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, localizationService, navigationService) { var profileID = ""; // items list array $scope.items = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.$watch('dateFilter', function () { - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function(response) { + analyticsSettingsResource.getprofile().then(function(response) { $scope.profile = response.data; profileID = response.data.Id; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Transaction.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Transaction.Controller.js index 8c86b52..7182b47 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Transaction.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/Transaction.Controller.js @@ -1,20 +1,20 @@ angular.module("umbraco").controller("Analytics.TransactionController", - function ($scope, $location, $routeParams, statsResource, settingsResource, localizationService, navigationService) { + function ($scope, $location, $routeParams, statsResource, analyticsSettingsResource, localizationService, navigationService) { var profileID = ""; // items list array $scope.itemTransactions = []; - $scope.dateFilter = settingsResource.getDateFilter(); + $scope.dateFilter = analyticsSettingsResource.getDateFilter(); $scope.loadingViews = true; $scope.$watch('dateFilter', function () { $scope.loadingViews = true; - settingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); + analyticsSettingsResource.setDateFilter($scope.dateFilter.startDate, $scope.dateFilter.endDate); //Get Profile - settingsResource.getprofile().then(function (response) { + analyticsSettingsResource.getprofile().then(function (response) { $scope.profile = response.data; profileID = response.data.Id; $scope.currencyCode = $scope.profile.Currency; diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/View.Controller.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/View.Controller.js index f8f36b5..1f90ae0 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/View.Controller.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/controllers/View.Controller.js @@ -1,9 +1,9 @@ angular.module("umbraco").controller("Analytics.ViewController", - function ($scope, $routeParams, settingsResource, assetsService) { + function ($scope, $routeParams, analyticsSettingsResource, assetsService) { //Currently loading /umbraco/general.html //Need it to look at /App_Plugins/ - //$scope.dateFilter = settingsResource.getDateFilter(); + //$scope.dateFilter = analyticsSettingsResource.getDateFilter(); //$scope.$watch('dateFilter', function () { // console.log("parent watch"); //}); diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/directives/DateRangePicker.Directive.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/directives/DateRangePicker.Directive.js index 5ace371..3197321 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/directives/DateRangePicker.Directive.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/directives/DateRangePicker.Directive.js @@ -47,7 +47,7 @@ }, function (start, end) { - //settingsResource.setDateFilter(start.format('YYYY-MM-DD'), end.format('YYYY-MM-DD')); + //analyticsSettingsResource.setDateFilter(start.format('YYYY-MM-DD'), end.format('YYYY-MM-DD')); var dateFilter = {}; dateFilter.startDate = start.format('YYYY-MM-DD'); diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/resources/Settings.Resource.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/resources/Settings.Resource.js index 333ec76..ee2fb87 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/resources/Settings.Resource.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/resources/Settings.Resource.js @@ -1,6 +1,6 @@  angular.module("umbraco.resources") - .factory("settingsResource", function ($http, $cookieStore) { + .factory("analyticsSettingsResource", function ($http, $cookieStore) { return { checkauth: function () { diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/resources/Stats.Resource.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/resources/Stats.Resource.js index 0b869e1..d9f3953 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/resources/Stats.Resource.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/resources/Stats.Resource.js @@ -1,111 +1,111 @@  angular.module("umbraco.resources") - .factory("statsResource", function ($http, settingsResource) { + .factory("statsResource", function ($http, analyticsSettingsResource) { return { //TODO: Get Profile ID from saved profile in settings getlanguage: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetLanguage", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetLanguage", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getcountries: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetCountry", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetCountry", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getbrowsers: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetBrowser", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetBrowser", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getbrowserspecifics: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetBrowserVersion", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetBrowserVersion", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getdevicetypes: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetDeviceTypes", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetDeviceTypes", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getdevices: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetDevices", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetDevices", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getresolutions: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetScreenRes", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetScreenRes", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getos: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetOperatingSystems", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetOperatingSystems", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getosversions: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi//GetOperatingSystemVersions", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi//GetOperatingSystemVersions", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getsocialnetworks: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetSocialNetworkSources", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetSocialNetworkSources", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getkeywords: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetKeywords", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetKeywords", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getvisits: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetVisits", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetVisits", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getsources: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetSources", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetSources", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getvisitcharts: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetVisitsOverTime", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetVisitsOverTime", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, gettransactions: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetTransactions", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetTransactions", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, gettransactionscharts: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetTransactionsOverTime", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetTransactionsOverTime", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getproductperformance: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetProductPerformance", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetProductPerformance", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getproductperformancecharts: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetProductPerformanceOverTime", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetProductPerformanceOverTime", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getsalesperformance: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetSalesPerformance", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetSalesPerformance", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getsalesperformancecharts: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetSalesPerformanceOverTime", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetSalesPerformanceOverTime", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getstoredetails: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetStoreDetails", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetStoreDetails", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getbestsellers: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetBestSellers", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetBestSellers", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); }, getrevenuepersource: function (profileID, startDate, endDate) { - return $http.get(settingsResource.getApiPath() + "Analytics/AnalyticsApi/GetRevenuePerSource", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); + return $http.get(analyticsSettingsResource.getApiPath() + "Analytics/AnalyticsApi/GetRevenuePerSource", { params: { profile: profileID, startDate: startDate, endDate: endDate } }); } }; }); \ No newline at end of file diff --git a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/services/DateRange.Service.js b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/services/DateRange.Service.js index ca864bb..45ca006 100644 --- a/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/services/DateRange.Service.js +++ b/Analytics/App_Plugins/Analytics/backOffice/AnalyticsTree/services/DateRange.Service.js @@ -1,12 +1,12 @@ angular.module("umbraco") - .service('dateRangeService', function ($rootScope, settingsResource) { - var filter = settingsResource.getDateFilter(); + .service('dateRangeService', function ($rootScope, analyticsSettingsResource) { + var filter = analyticsSettingsResource.getDateFilter(); return { getFilter: function() { return filter; }, setFilter: function (filt) { - settingsResource.setDateFilter(filt.startDate, filt.endDate); + analyticsSettingsResource.setDateFilter(filt.startDate, filt.endDate); filter.startDate = filt.startDate; filter.endDate = filt.endDate; console.log("broad start");