diff --git a/index.html b/index.html index bfb1524..2db4ae6 100755 --- a/index.html +++ b/index.html @@ -31,17 +31,22 @@ + - - + + + + + - + - + +
diff --git a/js/controllers/archive.js b/js/controllers/archive.js index a9bde1d..b81982b 100644 --- a/js/controllers/archive.js +++ b/js/controllers/archive.js @@ -1,4 +1,8 @@ -JamStash.controller('ArchiveCtrl', +'use strict'; + +var jamstash = angular.module('JamStash'); + +jamstash.controller('ArchiveCtrl', function ArchiveCtrl($scope, $rootScope, $location, $routeParams, $http, $timeout, utils, globals, model, notifications, player, archive, json) { $scope.settings = globals.settings; $scope.itemType = 'archive'; diff --git a/js/controllers/main.js b/js/controllers/main.js index 809ccb2..81a1daf 100644 --- a/js/controllers/main.js +++ b/js/controllers/main.js @@ -1,4 +1,8 @@ -JamStash.controller('AppCtrl', +'use strict'; + +var jamstash = angular.module('JamStash'); + +jamstash.controller('AppCtrl', function AppCtrl($scope, $rootScope, $document, $window, $location, $cookieStore, utils, globals, model, notifications, player) { $rootScope.settings = globals.settings; $rootScope.song = []; diff --git a/js/controllers/podcasts.js b/js/controllers/podcasts.js index 0b03529..525ecef 100644 --- a/js/controllers/podcasts.js +++ b/js/controllers/podcasts.js @@ -1,4 +1,8 @@ -JamStash.controller('PodcastCtrl', +'use strict'; + +var jamstash = angular.module('JamStash'); + +jamstash.controller('PodcastCtrl', function PodcastCtrl($scope, $rootScope, $location, utils, globals, model, notifications) { $rootScope.song = []; diff --git a/js/controllers/queue.js b/js/controllers/queue.js index 9d4487c..e9206c4 100644 --- a/js/controllers/queue.js +++ b/js/controllers/queue.js @@ -1,4 +1,8 @@ -JamStash.controller('QueueCtrl', +'use strict'; + +var jamstash = angular.module('JamStash'); + +jamstash.controller('QueueCtrl', function QueueCtrl($scope, $rootScope, $routeParams, $location, utils, globals, json, notifications) { $scope.settings = globals.settings; $scope.song = $rootScope.queue; diff --git a/js/controllers/settings.js b/js/controllers/settings.js index b949ed7..9a9efff 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -1,4 +1,8 @@ -JamStash.controller('SettingsCtrl', +'use strict'; + +var jamstash = angular.module('JamStash'); + +jamstash.controller('SettingsCtrl', function SettingsCtrl($rootScope, $scope, $routeParams, $location, utils, globals, json, notifications, player) { $scope.settings = globals.settings; /* See service.js */ $scope.Timeouts = [ diff --git a/js/controllers/subsonic-controller.js b/js/controllers/subsonic.js similarity index 99% rename from js/controllers/subsonic-controller.js rename to js/controllers/subsonic.js index 501f5e8..3843924 100644 --- a/js/controllers/subsonic-controller.js +++ b/js/controllers/subsonic.js @@ -1,8 +1,8 @@ 'use strict'; -var Jamstash = angular.module('JamStash'); +var jamstash = angular.module('JamStash'); -Jamstash.controller('SubsonicCtrl', +jamstash.controller('SubsonicCtrl', function SubsonicCtrl($scope, $rootScope, $location, $window, $routeParams, $http, utils, globals, model, map, subsonic, notifications) { $scope.settings = globals.settings; diff --git a/js/services/player-service.js b/js/services/player-service.js index 8387bb2..e590f35 100644 --- a/js/services/player-service.js +++ b/js/services/player-service.js @@ -33,7 +33,7 @@ jamstash.service('player', function ($rootScope, $window, utils, globals, model, $rootScope.restartSong(); } }; - getNextSong = function (previous) { + this.getNextSong = function (previous) { var song; if (globals.settings.Debug) { console.log('Getting Next Song > ' + 'Queue length: ' + $rootScope.queue.length); } if ($rootScope.queue.length > 0) { @@ -361,7 +361,7 @@ jamstash.service('player', function ($rootScope, $window, utils, globals, model, } } }; - playVideo = function (id, bitrate) { + this.playVideo = function (id, bitrate) { var w, h; bitrate = parseInt(bitrate); if (bitrate <= 600) { @@ -392,7 +392,7 @@ jamstash.service('player', function ($rootScope, $window, utils, globals, model, supplied: "m4v" }); }; - scrobbleSong = function (submission) { + this.scrobbleSong = function (submission) { if ($rootScope.loggedIn && submission) { var id = $rootScope.playingSong.id; if (globals.settings.Debug) { console.log('Scrobble Song: ' + id); } @@ -407,7 +407,7 @@ jamstash.service('player', function ($rootScope, $window, utils, globals, model, }); } }; - rateSong = function (songid, rating) { + this.rateSong = function (songid, rating) { $.ajax({ url: baseURL + '/setRating.view?' + baseParams + '&id=' + songid + "&rating=" + rating, method: 'GET', diff --git a/test/controllers/subsonic-controller_test.js b/test/controllers/subsonic-controller_test.js deleted file mode 100644 index 7d51850..0000000 --- a/test/controllers/subsonic-controller_test.js +++ /dev/null @@ -1,4 +0,0 @@ -describe("SubsonicCtrl", function() { - - -}); \ No newline at end of file diff --git a/test/controllers/subsonic_test.js b/test/controllers/subsonic_test.js new file mode 100644 index 0000000..7faa18e --- /dev/null +++ b/test/controllers/subsonic_test.js @@ -0,0 +1,4 @@ +describe("Subsonic controller", function() { + + +}); \ No newline at end of file