diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 9f6ff8a..e5b26ff 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -364,106 +364,102 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
$location.path('/');
}
- else {
- if (result.LicenseInfo != null && result.LicenseInfo.IsTermAccepted)
- {
-
+ else
+ {
+ //1. set haveRoleAdmin = false because LicenseInfo is not null
+
+ if (result.LicenseTypeId != 5) {
+
+ $rootScope.haveRoleAdmin = true;
+
+ }
+ if (result.UserTypeId == 8) {
+
+ $rootScope.haveRoleAdmin = false;
+ }
+
+ // Remove Admin Link for LicenseEditionId 3/4 of student
+ if (result.EditionId == 3 || result.EditionId == 4) {
+ $rootScope.haveRoleAdmin = false;
+
+ }
+
+ if (result.LicenseInfo != null) {
+
// set license id
- $scope.UpdateUserExportImageData(result.Id,'LicenseId',result.LicenseId)
+ $scope.UpdateUserExportImageData(result.Id, 'LicenseId', result.LicenseId)
- // set license type :note 5 for demo/test license
- $scope.UpdateUserExportImageData(result.Id,'LicenseTypeId',result.LicenseInfo.LicenseTypeId);
-
- if(result.UserExportImageDetail!=null)
- {
+ // set license type :note 5 for demo/test license
+ $scope.UpdateUserExportImageData(result.Id, 'LicenseTypeId', result.LicenseInfo.LicenseTypeId);
+
+ if (result.UserExportImageDetail != null) {
// set already export image count
- $scope.UpdateUserExportImageData(result.Id,'CountExportImage',result.UserExportImageDetail.CountExportedImage);
-
- // set Image limit
- $scope.UpdateUserExportImageData(result.Id,'ExptImageLimit',result.UserExportImageDetail.ExptImageLimit);
+ $scope.UpdateUserExportImageData(result.Id, 'CountExportImage', result.UserExportImageDetail.CountExportedImage);
- // set is enable for export image
- $scope.UpdateUserExportImageData(result.Id,'isExportImage',result.UserExportImageDetail.isExportImage);
- }
-
-
- // disable export image option for demo and for cross the Image limit
- if(result.LicenseInfo.LicenseTypeId==5 || result.UserExportImageDetail.isExportImage==false)
- {
- $rootScope.exportImage = "disableSubMenu";
- }
+ // set Image limit
+ $scope.UpdateUserExportImageData(result.Id, 'ExptImageLimit', result.UserExportImageDetail.ExptImageLimit);
- //0.
- $rootScope.userData = result;
- $rootScope.userModules = result.Modules;
-
- //1. set haveRoleAdmin = false because LicenseInfo is not null
-
- if (result.LicenseTypeId != 5 ) {
+ // set is enable for export image
+ $scope.UpdateUserExportImageData(result.Id, 'isExportImage', result.UserExportImageDetail.isExportImage);
+ }
- $rootScope.haveRoleAdmin = true;
- }
- if (result.UserTypeId == 8)
- {
-
- $rootScope.haveRoleAdmin = false;
+ // disable export image option for demo and for cross the Image limit
+ if (result.LicenseInfo.LicenseTypeId == 5 || result.UserExportImageDetail.isExportImage == false) {
+ $rootScope.exportImage = "exportImage";
}
- // Remove Admin Link for LicenseEditionId 3/4 of student
- if(result.EditionId==3 ||result.EditionId==4)
- {
- $rootScope.haveRoleAdmin = false;
- }
+ if (result.LicenseInfo.IsTermAccepted) {
- $("#modestyDiv").css("pointer-events", "none");
- $("#modestyDiv").css("opacity", 0.5);
- //2.
- if ($scope.currentUserDetails == null || $scope.currentUserDetails == undefined || $scope.currentUserDetails == "") {
+ //0.
+ $rootScope.userData = result;
+ $rootScope.userModules = result.Modules;
- localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
- }
+ $("#modestyDiv").css("pointer-events", "none");
+ $("#modestyDiv").css("opacity", 0.5);
+ //2.
+ if ($scope.currentUserDetails == null || $scope.currentUserDetails == undefined || $scope.currentUserDetails == "") {
- // 3.ShowAssignedModulesPopup
- //isCommingSoonModel =true only when user comes first time on application and login
- if (isCommingSoonModel == true)
- {
+ localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
+ }
- // ShowAssignedModulesPopup(result.Modules);
- }
+ // 3.ShowAssignedModulesPopup
+ //isCommingSoonModel =true only when user comes first time on application and login
+ if (isCommingSoonModel == true) {
- //4.
- if($scope.rememberChk)
- {
-
- $scope.saveRemeberMeDetails(result, userInfo);
- }
-
- //5.
+ // ShowAssignedModulesPopup(result.Modules);
+ }
+
+ //4.
+ if ($scope.rememberChk) {
+
+ $scope.saveRemeberMeDetails(result, userInfo);
+ }
+
+ //5.
sessionStorage.setItem("loginSession", "true");
$rootScope.isVisibleLogin = false;
-
- //6. reset the isCommingSoonModel to false in local storage so that upcomming module pop up would not show again to the user after firts time
+
+ //6. reset the isCommingSoonModel to false in local storage so that upcomming module pop up would not show again to the user after firts time
localStorage.setItem('isCommingSoonModel', false);
-
- $location.path('/');
- }
- else {
- if ($('#dvTerms').length > 0) {
- $('#dvTerms').html(result.TermsAndConditionsText);
+ $location.path('/');
}
- $rootScope.isVisibleLogin = true;
- $('#dvTermCondition').fadeIn();
- $rootScope.userData = result;
- $rootScope.haveRoleAdmin = false;
- localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
- $location.path('/');
+ else {
+ if ($('#dvTerms').length > 0) {
+ $('#dvTerms').html(result.TermsAndConditionsText);
+ }
+ $rootScope.isVisibleLogin = true;
+ $('#dvTermCondition').fadeIn();
+ $rootScope.userData = result;
+ localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
+ $location.path('/');
+ }
+
}
- }
-
-
+
+ }
}