Replaced utils setTitle and scrollTitle by a dedicated service
- Adds a Page service that will control the page's title from anywhere. - Adds a setTitleSong method. It takes a song as parameter, that way player-directive isn't responsible for correctly formatting the title. It also scrolls the title if the global setting is true - Removes the title-related methods from utils-service
This commit is contained in:
parent
0646b02e94
commit
c478f0116f
7 changed files with 138 additions and 47 deletions
|
@ -1,6 +1,6 @@
|
|||
angular.module('JamStash')
|
||||
.controller('AppController', ['$scope', '$rootScope', '$document', '$window', '$location', '$cookieStore', '$http', 'utils', 'globals', 'model', 'notifications', 'player', 'persistence',
|
||||
function($scope, $rootScope, $document, $window, $location, $cookieStore, $http, utils, globals, model, notifications, player, persistence) {
|
||||
.controller('AppController', ['$scope', '$rootScope', '$document', '$window', '$location', '$cookieStore', '$http', 'utils', 'globals', 'model', 'notifications', 'player', 'persistence', 'Page',
|
||||
function($scope, $rootScope, $document, $window, $location, $cookieStore, $http, utils, globals, model, notifications, player, persistence, Page) {
|
||||
'use strict';
|
||||
|
||||
$rootScope.settings = globals.settings;
|
||||
|
@ -13,6 +13,7 @@ angular.module('JamStash')
|
|||
|
||||
$rootScope.SelectedMusicFolder = "";
|
||||
$rootScope.unity = null;
|
||||
$scope.Page = Page;
|
||||
$rootScope.loggedIn = function () {
|
||||
if (globals.settings.Server !== '' && globals.settings.Username !== '' && globals.settings.Password !== '') {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue