sync develop with local dev

This commit is contained in:
Trevor Squillario 2014-04-05 11:53:30 -04:00
parent 09ac96526e
commit 149688b8ca
23 changed files with 496 additions and 157 deletions

View file

@ -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;
})