AC-725 Added tower version to app footer and license dialog. Refactored license dialog to use tabs rather than accordions. Fixed conflict between angular routes and TB tabs.

This commit is contained in:
Chris Houseknecht
2014-02-13 19:01:17 +00:00
parent 9aea64eb3f
commit c77db691eb
9 changed files with 66 additions and 46 deletions

View File

@@ -11,8 +11,8 @@
angular.module('AuthService', ['ngCookies', 'Utilities'])
.factory('Authorization', ['$http', '$rootScope', '$location', '$cookieStore', 'GetBasePath',
function ($http, $rootScope, $location, $cookieStore, GetBasePath) {
.factory('Authorization', ['$http', '$rootScope', '$location', '$cookieStore', 'GetBasePath', 'Store',
function ($http, $rootScope, $location, $cookieStore, GetBasePath, Store) {
return {
setToken: function (token, expires) {
// set the session cookie
@@ -63,7 +63,6 @@ angular.module('AuthService', ['ngCookies', 'Utilities'])
$cookieStore.remove('token_expires');
$cookieStore.remove('current_user');
$cookieStore.remove('lastPath');
$cookieStore.remove('license');
$cookieStore.put('userLoggedIn', false);
$cookieStore.put('sessionExpired', false);
$cookieStore.remove('lastPath', '/home');
@@ -86,9 +85,11 @@ angular.module('AuthService', ['ngCookies', 'Utilities'])
});
},
setLicense: function (license) {
setLicense: function (data) {
var license = data.license_info;
license.version = data.version;
license.tested = false;
$cookieStore.put('license', license);
Store('license', license);
},
licenseTested: function () {
@@ -96,7 +97,9 @@ angular.module('AuthService', ['ngCookies', 'Utilities'])
if ($rootScope.license_tested !== undefined) {
result = $rootScope.license_tested;
} else {
license = $cookieStore.get('license');
// User may have hit browser refresh
license = Store('license');
$rootScope.version = license.version;
if (license && license.tested !== undefined) {
result = license.tested;
} else {