diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
index ffe6f27..c0e7d47 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
@@ -3240,55 +3240,6 @@ namespace AIAHTML5.ADMIN.API.Entity
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetUserType", idParameter);
}
- public virtual ObjectResult> usp_InsertAIAUser(string sLoginId, string sPassword, string sFirstname, string sLastname, Nullable iUserTypeId, string sEmailId, Nullable iSecurityQuesId, string sSecurityAnswer, Nullable iCreatorId, Nullable iLicenseId, Nullable iEditionId, ObjectParameter status)
- {
- var sLoginIdParameter = sLoginId != null ?
- new ObjectParameter("sLoginId", sLoginId) :
- new ObjectParameter("sLoginId", typeof(string));
-
- var sPasswordParameter = sPassword != null ?
- new ObjectParameter("sPassword", sPassword) :
- new ObjectParameter("sPassword", typeof(string));
-
- var sFirstnameParameter = sFirstname != null ?
- new ObjectParameter("sFirstname", sFirstname) :
- new ObjectParameter("sFirstname", typeof(string));
-
- var sLastnameParameter = sLastname != null ?
- new ObjectParameter("sLastname", sLastname) :
- new ObjectParameter("sLastname", typeof(string));
-
- var iUserTypeIdParameter = iUserTypeId.HasValue ?
- new ObjectParameter("iUserTypeId", iUserTypeId) :
- new ObjectParameter("iUserTypeId", typeof(byte));
-
- var sEmailIdParameter = sEmailId != null ?
- new ObjectParameter("sEmailId", sEmailId) :
- new ObjectParameter("sEmailId", typeof(string));
-
- var iSecurityQuesIdParameter = iSecurityQuesId.HasValue ?
- new ObjectParameter("iSecurityQuesId", iSecurityQuesId) :
- new ObjectParameter("iSecurityQuesId", typeof(byte));
-
- var sSecurityAnswerParameter = sSecurityAnswer != null ?
- new ObjectParameter("sSecurityAnswer", sSecurityAnswer) :
- new ObjectParameter("sSecurityAnswer", typeof(string));
-
- var iCreatorIdParameter = iCreatorId.HasValue ?
- new ObjectParameter("iCreatorId", iCreatorId) :
- new ObjectParameter("iCreatorId", typeof(int));
-
- var iLicenseIdParameter = iLicenseId.HasValue ?
- new ObjectParameter("iLicenseId", iLicenseId) :
- new ObjectParameter("iLicenseId", typeof(int));
-
- var iEditionIdParameter = iEditionId.HasValue ?
- new ObjectParameter("iEditionId", iEditionId) :
- new ObjectParameter("iEditionId", typeof(byte));
-
- return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("usp_InsertAIAUser", sLoginIdParameter, sPasswordParameter, sFirstnameParameter, sLastnameParameter, iUserTypeIdParameter, sEmailIdParameter, iSecurityQuesIdParameter, sSecurityAnswerParameter, iCreatorIdParameter, iLicenseIdParameter, iEditionIdParameter, status);
- }
-
public virtual int usp_InsertDeleteUserManageRights(string roleName, Nullable activityId, Nullable userId, string requestType, ObjectParameter status)
{
var roleNameParameter = roleName != null ?
@@ -4133,13 +4084,17 @@ namespace AIAHTML5.ADMIN.API.Entity
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetLicenseEditionById", licenseEditionIdParameter);
}
- public virtual ObjectResult> usp_GetModestyForThisLicense(Nullable licenseId)
+ public virtual ObjectResult> usp_GetModestyForThisLicense(Nullable licenseId, Nullable editionId)
{
var licenseIdParameter = licenseId.HasValue ?
new ObjectParameter("licenseId", licenseId) :
new ObjectParameter("licenseId", typeof(int));
- return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("usp_GetModestyForThisLicense", licenseIdParameter);
+ var editionIdParameter = editionId.HasValue ?
+ new ObjectParameter("editionId", editionId) :
+ new ObjectParameter("editionId", typeof(byte));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("usp_GetModestyForThisLicense", licenseIdParameter, editionIdParameter);
}
public virtual ObjectResult usp_GetModuleStatusByLicenseId(Nullable iLicenseId)
@@ -4982,5 +4937,54 @@ namespace AIAHTML5.ADMIN.API.Entity
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateUserProfile", idParameter, firstNameParameter, lastNameParameter, emailIdParameter, status);
}
+
+ public virtual int usp_InsertAIAUser(string sLoginId, string sPassword, string sFirstname, string sLastname, Nullable iUserTypeId, string sEmailId, Nullable iSecurityQuesId, string sSecurityAnswer, Nullable iCreatorId, Nullable iLicenseId, Nullable iEditionId, ObjectParameter status)
+ {
+ var sLoginIdParameter = sLoginId != null ?
+ new ObjectParameter("sLoginId", sLoginId) :
+ new ObjectParameter("sLoginId", typeof(string));
+
+ var sPasswordParameter = sPassword != null ?
+ new ObjectParameter("sPassword", sPassword) :
+ new ObjectParameter("sPassword", typeof(string));
+
+ var sFirstnameParameter = sFirstname != null ?
+ new ObjectParameter("sFirstname", sFirstname) :
+ new ObjectParameter("sFirstname", typeof(string));
+
+ var sLastnameParameter = sLastname != null ?
+ new ObjectParameter("sLastname", sLastname) :
+ new ObjectParameter("sLastname", typeof(string));
+
+ var iUserTypeIdParameter = iUserTypeId.HasValue ?
+ new ObjectParameter("iUserTypeId", iUserTypeId) :
+ new ObjectParameter("iUserTypeId", typeof(byte));
+
+ var sEmailIdParameter = sEmailId != null ?
+ new ObjectParameter("sEmailId", sEmailId) :
+ new ObjectParameter("sEmailId", typeof(string));
+
+ var iSecurityQuesIdParameter = iSecurityQuesId.HasValue ?
+ new ObjectParameter("iSecurityQuesId", iSecurityQuesId) :
+ new ObjectParameter("iSecurityQuesId", typeof(byte));
+
+ var sSecurityAnswerParameter = sSecurityAnswer != null ?
+ new ObjectParameter("sSecurityAnswer", sSecurityAnswer) :
+ new ObjectParameter("sSecurityAnswer", typeof(string));
+
+ var iCreatorIdParameter = iCreatorId.HasValue ?
+ new ObjectParameter("iCreatorId", iCreatorId) :
+ new ObjectParameter("iCreatorId", typeof(int));
+
+ var iLicenseIdParameter = iLicenseId.HasValue ?
+ new ObjectParameter("iLicenseId", iLicenseId) :
+ new ObjectParameter("iLicenseId", typeof(int));
+
+ var iEditionIdParameter = iEditionId.HasValue ?
+ new ObjectParameter("iEditionId", iEditionId) :
+ new ObjectParameter("iEditionId", typeof(byte));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertAIAUser", sLoginIdParameter, sPasswordParameter, sFirstnameParameter, sLastnameParameter, iUserTypeIdParameter, sEmailIdParameter, iSecurityQuesIdParameter, sSecurityAnswerParameter, iCreatorIdParameter, iLicenseIdParameter, iEditionIdParameter, status);
+ }
}
}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
index 3429bc7..f7ad830 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
@@ -1103,6 +1103,7 @@
+
@@ -2475,20 +2476,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2663,14 +2650,14 @@
-
+
-
+
@@ -2744,19 +2731,20 @@
-
+
-
+
-
+
+
-
+
@@ -2862,7 +2850,7 @@
-
+
@@ -2992,6 +2980,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5809,7 +5811,6 @@
-
@@ -6301,6 +6302,7 @@
+
diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/ClientController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/ClientController.cs
index 4209f1e..aa23a95 100644
--- a/400-SOURCECODE/AIAHTML5.API/Controllers/ClientController.cs
+++ b/400-SOURCECODE/AIAHTML5.API/Controllers/ClientController.cs
@@ -46,20 +46,24 @@ namespace AIAHTML5.API.Controllers
{
dynamic uerinfo = AIAHTML5.API.Models.Users.ValidateSiteLogin(siteUrl["siteIP"].ToString(), siteUrl["accountNumber"].ToString(), siteUrl["urlReferer"].ToString(), siteUrl["edition"].ToString(), siteId);
if (uerinfo != null)
+ {
+ uerinfo.siteId = siteId;
response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(JsonConvert.SerializeObject(uerinfo)) };
+ }
else
{
//ser user = new User();
//user.LoginFailureCauseId = AIAConstants.INVALID_CLIENT;
//dynamic userinfo = user;
//response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(userInfo) };
-
+ logger.Debug("IVALID CLIENT");
response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.INVALID_CLIENT) };
}
}
else
{
+ logger.Debug("NOT AUTHORIZED");
response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MSG_NOT_AUTHORIZE_SITE_USER) };
}
@@ -70,7 +74,7 @@ namespace AIAHTML5.API.Controllers
response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = null };
}
-
+ logger.Debug("response = " + response);
return response;
}
catch (SqlException e)
diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs
index 77dd165..06a8d73 100644
--- a/400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs
+++ b/400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs
@@ -260,8 +260,11 @@ namespace AIAHTML5.API.Controllers
{
aar.Add(User["EmailAdd"].ToString());
}
- AIAHTML5.API.Models.UserUtility.SendEmail(User, aar, User["EmailAdd"].ToString(), User["reportTitle"].ToString(), User["reportImage"].ToString(), true);
- return Request.CreateResponse(HttpStatusCode.OK);
+ // AIAHTML5.API.Models.UserUtility.SendEmail(User, aar, User["EmailAdd"].ToString(), User["reportTitle"].ToString(), User["reportImage"].ToString(), true);
+ // return Request.CreateResponse(HttpStatusCode.OK);
+ bool isEMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(User, aar, User["EmailAdd"].ToString(), User["reportTitle"].ToString(), User["reportImage"].ToString(), true);
+ // return Request.CreateResponse(HttpStatusCode.OK,);
+ return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(isEMailSent.ToString()) };
}
[Route("api/LabExercise/GetParameter")]
[HttpGet]
diff --git a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
index 9ab9f39..e8dd01a 100644
--- a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
+++ b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
@@ -302,6 +302,7 @@ namespace AIAHTML5.API.Models
objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
+ logger.Debug("objUser.Id= " + objUser.Id + ",objUser.FirstName= " + objUser.FirstName + ",objUser.LoginId= " + objUser.LoginId + ",objUser.Password= " + objUser.Password + ",objUser.SecurityQuestionId= " + objUser.SecurityQuestionId);
}
}
}
diff --git a/400-SOURCECODE/AIAHTML5.API/Models/User.cs b/400-SOURCECODE/AIAHTML5.API/Models/User.cs
index 0b0de79..862e67b 100644
--- a/400-SOURCECODE/AIAHTML5.API/Models/User.cs
+++ b/400-SOURCECODE/AIAHTML5.API/Models/User.cs
@@ -38,6 +38,7 @@ namespace AIAHTML5.API.Models
public bool IsModestyOn { get; set; }
public ArrayList Modules { get; set; }
public int siteId { get; set; }
+ public string pwd { get; set; }
public License LicenseInfo { get; set; }
public LicenseSubscriptionDetails LicenseSubscriptions { get; set; }
diff --git a/400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs b/400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs
index a02ff79..728a7df 100644
--- a/400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs
+++ b/400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs
@@ -314,10 +314,10 @@ namespace AIAHTML5.API.Models
if (UserUtility.CheckIfPropertyExists(userInfo, "accountNumber") && !string.IsNullOrEmpty(userInfo["accountNumber"].ToString()))
emailMessage += "accountNumber: " + userInfo["accountNumber"].ToString() + "
";
- if (string.IsNullOrEmpty(sender))
+ // if (string.IsNullOrEmpty(sender))
senderEmailId = Convert.ToString(ConfigurationManager.AppSettings["SenderEmailAddress"]);
- else
- senderEmailId = sender;
+ // else
+ // senderEmailId = sender;
emailMessage += mailBody;
diff --git a/400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs b/400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs
index 960420c..31f4d1b 100644
--- a/400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs
+++ b/400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs
@@ -31,6 +31,9 @@ namespace AIAHTML5.API.Utility
public void SendMail(MailMessage mm)
{
+ ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
+ //logger.Debug("inside SendMail");
+
try
{
SmtpClient smtp = new SmtpClient();
@@ -39,11 +42,13 @@ namespace AIAHTML5.API.Utility
System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential(mm.From.ToString(), ConfigurationManager.AppSettings["SenderPassword"]);
smtp.Credentials = NetworkCred;
smtp.Port = Convert.ToInt32(ConfigurationManager.AppSettings["SMTPPort"]);
- smtp.EnableSsl = false;
+ // smtp.EnableSsl = false;
smtp.Send(mm);
}
catch (Exception e)
- {
+ {
+ logger.Fatal("Exception inside SendMail. Ex= " + e.Message + "....STACKTRACE = " + e.StackTrace);
+
throw;
}
}
@@ -136,7 +141,7 @@ namespace AIAHTML5.API.Utility
catch (Exception ex)
{
logger.Fatal("exception in SendSmtpEmail.msg= " + ex.Message + ", stacktarce= " + ex.StackTrace);
- throw ex;
+ throw ;
}
}
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index f32faaa..6a439d6 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -513,8 +513,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
else {
$rootScope.isVisibleLogin = false;
- $rootScope.loadSearchData();
-
+
console.log('currentBodyViewId picked from localStorage: ' + currentBodyViewId);
var openViews;
@@ -536,8 +535,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var tittle = $rootScope.getLocalStorageValue("currentViewTitle");
$rootScope.StoreTitleName(tittle);
- // store image for export
- $scope.LoadImageToExport();
+ $rootScope.loadSearchData();
+
+
//WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD
//if (openViews != null && openViews != undefined) {
@@ -910,8 +910,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
- // store image for export
- $scope.LoadImageToExport();
+
//console.log("s" + $rootScope.vocabTermDataArray);
//call watch on '$scope.VocabTermTxt and compile and append to on first time load
@@ -922,6 +921,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//}, true);
}
+ // store image for export
+ $scope.LoadImageToExport();
}
@@ -8029,8 +8030,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// store image for export
var tittle = $rootScope.getLocalStorageValue("currentViewTitle");
$rootScope.StoreTitleName(tittle);
- $scope.LoadImageToExport();
-
+
$rootScope.isLoading = true;
}
@@ -8066,7 +8066,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// store image for export
var tittle = $rootScope.getLocalStorageValue("currentViewTitle");
$rootScope.StoreTitleName(tittle);
- $scope.LoadImageToExport();
+
$rootScope.isLoading = true;
@@ -8362,8 +8362,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// store image for export
var tittle = $rootScope.getLocalStorageValue("currentViewTitle");
$rootScope.StoreTitleName(tittle);
- $scope.LoadImageToExport();
-
+
$rootScope.openViews.push(
{
"module": $rootScope.currentActiveModuleTitle, "bodyView": $rootScope.getLocalStorageValue("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId,
@@ -8452,6 +8451,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.loadNavigatorForSelectedBodyView(data.bodyViewId);
+ // store image for export
+ $scope.LoadImageToExport();
+
})
//Reload DA controller Body View after setting Change
$scope.$on('reloadDABodyViewEvent', function (event, data) {
@@ -8475,6 +8477,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.loadNavigatorForSelectedBodyView(data.reloadDABodyViewId);
+ // store image for export
+ $scope.LoadImageToExport();
+
if ($scope.layerNumber != 0) {
$scope.EnableUI();
}
@@ -8488,10 +8493,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.loadNavigatorForSelectedBodyView = function (currentBodyViewId) {
-
- // store image for export
- $scope.LoadImageToExport();
-
if ($rootScope.NavigatorData != null || $rootScope.NavigatorData != undefined) {
var navdtlOrient = new jinqJs()
.from($rootScope.NavigatorData.Navigtor.ViewOrientation)
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 9f6ff8a..0c238af 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 account
+ if (result.LicenseInfo.LicenseTypeId == 5 ) {
+ $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('/');
+ }
+
}
- }
-
-
+
+ }
}
@@ -697,10 +693,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
}
- // disable export image option for demo and for cross the Image limit
- if(result.LicenseInfo.LicenseTypeId==5 || result.UserExportImageDetail.isExportImage==false)
+ // disable export image option for demo account
+ if(result.LicenseInfo.LicenseTypeId==5)
{
- $rootScope.exportImage = "disableSubMenu";
+ $rootScope.exportImage = "exportImage";
}
$rootScope.userData = result;
@@ -5433,25 +5429,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
};
- $rootScope.ShowExportImageWindow = function () {
-
- var $ua = navigator.userAgent;
- if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
- $(".export-image-ipad").modal("show").draggable({ handle: ".modal-header" });
-
- $(".modal-backdrop").css("opacity", ".5");
- $(".modal-backdrop").css("z-index", "1200001");
- }
- else {
- $(".export-image").modal("show").draggable({ handle: ".modal-header" });
-
- $(".modal-backdrop").css("opacity", ".5");
- $(".modal-backdrop").css("z-index", "1200001");
- }
- };
-
-
-
+
$rootScope.ShowPrintWindow = function () { // Print Active Viewer
html2canvas($("#canvasDiv"), {
onrendered: function (canvas) {
@@ -5832,7 +5810,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
'Title': null,
'ModuleName': null,
'ImageName': null,
- 'OriginalFileName': null
+ 'OriginalFileName': null,
+ 'LimitOverMessage': 'This License has exceeded the maximum limit of export image.
Please contact administrator.'
});
@@ -5888,6 +5867,42 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
}
+ $rootScope.ShowExportImageWindow = function () {
+
+ var userid = $rootScope.userData.Id;
+ var isExportedImage = $scope.GetUserExportImageData(userid, 'isExportImage');
+
+ if (isExportedImage)
+ {
+ var $ua = navigator.userAgent;
+ if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
+ $(".export-image-ipad").modal("show").draggable({ handle: ".modal-header" });
+
+ $(".modal-backdrop").css("opacity", ".5");
+ $(".modal-backdrop").css("z-index", "1200001");
+ }
+ else
+ {
+ $(".export-image").modal("show").draggable({ handle: ".modal-header" });
+
+ $(".modal-backdrop").css("opacity", ".5");
+ $(".modal-backdrop").css("z-index", "1200001");
+ }
+
+ }
+ else
+ {
+ var exptAlertMessage = $scope.GetUserExportImageData(userid, 'LimitOverMessage');
+
+ $(".export-image-message").modal("show").draggable({ handle: ".modal-header" });
+
+ $(".modal-backdrop").css("opacity", ".5");
+ $(".modal-backdrop").css("z-index", "1200001");
+ document.getElementById("expMessage").innerHTML = exptAlertMessage;
+
+ }
+
+ };
$rootScope.SaveImagefile = function () {
$("#canvasDiv").append("
");
@@ -5928,10 +5943,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
$scope.UpdateUserExportImageData(userid,'isExportImage',result.isExportImage);
// disable export image option when export Image limit over
- if(result.isExportImage==false)
- {
- $rootScope.exportImage = "disableSubMenu";
- }
+ //if(result.isExportImage==false)
+ //{
+ // $rootScope.exportImage = "exportImage";
+ //}
}
}),
diff --git a/400-SOURCECODE/AIAHTML5.Web/index.aspx b/400-SOURCECODE/AIAHTML5.Web/index.aspx
index aab0230..b20c4bf 100644
--- a/400-SOURCECODE/AIAHTML5.Web/index.aspx
+++ b/400-SOURCECODE/AIAHTML5.Web/index.aspx
@@ -1120,6 +1120,36 @@
+
+
+
+
+
+
+
+
Alert Message!
+
+
+
+
+
+
+
+