sync develop with local dev
This commit is contained in:
parent
09ac96526e
commit
149688b8ca
23 changed files with 496 additions and 157 deletions
10
js/app.js
10
js/app.js
|
@ -28,19 +28,25 @@ JamStash.config(function ($routeProvider) {
|
|||
.when('/archive/:artist/:album', { templateUrl: 'js/partials/archive.html', controller: 'ArchiveCtrl' })
|
||||
.otherwise({ redirectTo: '/index' });
|
||||
})
|
||||
.run(['$rootScope', '$location', 'globals', function ($rootScope, $location, globals) {
|
||||
.run(['$rootScope', '$location', 'globals', 'utils', function ($rootScope, $location, globals, utils) {
|
||||
$rootScope.$on("$locationChangeStart", function (event, next, current) {
|
||||
$rootScope.loggedIn = false;
|
||||
var path = $location.path().replace(/^\/([^\/]*).*$/, '$1');
|
||||
if (globals.settings.Username !== "" && globals.settings.Password !== "" && globals.settings.Server !== "" && path != 'archive') {
|
||||
$rootScope.loggedIn = true;
|
||||
$.fancybox.close();
|
||||
}
|
||||
if (!$rootScope.loggedIn && (path != 'settings' && path != 'archive')) {
|
||||
$location.path('/settings');
|
||||
var url = '/settings';
|
||||
$location.path(url);
|
||||
}
|
||||
});
|
||||
}]);
|
||||
|
||||
/*
|
||||
JamStash.config(function ($locationProvider) {
|
||||
$locationProvider.html5Mode(true);
|
||||
})
|
||||
JamStash.config(function ($httpProvider, globals) {
|
||||
$httpProvider.defaults.timeout = globals.settings.Timeout;
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue