Commit f2107439c8de548d6e2cbf6bc04ac60b186520e5
Merge branch 'AIA_Develop' into AIABugFixes
Showing
61 changed files
with
1248 additions
and
608 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
... | ... | @@ -312,16 +312,18 @@ namespace AIAHTML5.ADMIN.API.Controllers |
312 | 312 | public HttpResponseMessage UpdateLicenseModestySettings(JObject jsonData) |
313 | 313 | { |
314 | 314 | bool Status = false; |
315 | - List<Tuple<int, int, bool>> LicenseModestyList = new List<Tuple<int, int, bool>>(); | |
316 | - Tuple<int, int, bool> LicenseModesty; | |
315 | + List<Tuple<int, int, bool,bool>> LicenseModestyList = new List<Tuple<int, int, bool,bool>>(); | |
316 | + Tuple<int, int, bool,bool> LicenseModesty; | |
317 | 317 | for (int i = 0; i < jsonData["obj"].Count(); i++) |
318 | 318 | { |
319 | - LicenseModesty = new Tuple<int, int, bool>( | |
319 | + LicenseModesty = new Tuple<int, int, bool,bool>( | |
320 | 320 | ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["licenseEditionId"])).Value<int>(), |
321 | 321 | ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["siteId"])).Value<int>(), |
322 | - ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["isModesty"])).Value<bool>()); | |
322 | + ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["isModesty"])).Value<bool>(), | |
323 | + ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["isSiteUser"])).Value<bool>()); | |
323 | 324 | LicenseModestyList.Add(LicenseModesty); |
324 | 325 | } |
326 | + | |
325 | 327 | try |
326 | 328 | { |
327 | 329 | Status = LicenseModel.UpdateLicenseModestySettings(dbContext, LicenseModestyList); | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
... | ... | @@ -120,9 +120,10 @@ namespace AIAHTML5.ADMIN.API.Controllers |
120 | 120 | int userId = jsonData["userId"].Value<Int32>(); |
121 | 121 | string tagName = jsonData["tagName"].Value<string>(); |
122 | 122 | long SessionId = jsonData["SessionId"].Value<long>(); |
123 | + bool isSiteUser = jsonData["isSiteUser"].Value<bool>(); | |
123 | 124 | try |
124 | 125 | { |
125 | - Status = UserModel.ManageUserLoginStatus(dbContext, userId, tagName, SessionId); | |
126 | + Status = UserModel.ManageUserLoginStatus(dbContext, userId, tagName, SessionId, isSiteUser); | |
126 | 127 | |
127 | 128 | return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); |
128 | 129 | } | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... | ... | @@ -1262,13 +1262,17 @@ namespace AIAHTML5.ADMIN.API.Entity |
1262 | 1262 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetLicenseByIPAndAccount_Result>("GetLicenseByIPAndAccount", sSiteIPParameter, sAccountNumberParameter, iEditionIdParameter); |
1263 | 1263 | } |
1264 | 1264 | |
1265 | - public virtual ObjectResult<GetLicenseBySiteId_Result> GetLicenseBySiteId(Nullable<int> sSiteId) | |
1265 | + public virtual ObjectResult<GetLicenseBySiteId_Result> GetLicenseBySiteId(Nullable<int> sSiteId, Nullable<int> sEditionId) | |
1266 | 1266 | { |
1267 | 1267 | var sSiteIdParameter = sSiteId.HasValue ? |
1268 | 1268 | new ObjectParameter("sSiteId", sSiteId) : |
1269 | 1269 | new ObjectParameter("sSiteId", typeof(int)); |
1270 | 1270 | |
1271 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetLicenseBySiteId_Result>("GetLicenseBySiteId", sSiteIdParameter); | |
1271 | + var sEditionIdParameter = sEditionId.HasValue ? | |
1272 | + new ObjectParameter("sEditionId", sEditionId) : | |
1273 | + new ObjectParameter("sEditionId", typeof(int)); | |
1274 | + | |
1275 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetLicenseBySiteId_Result>("GetLicenseBySiteId", sSiteIdParameter, sEditionIdParameter); | |
1272 | 1276 | } |
1273 | 1277 | |
1274 | 1278 | public virtual ObjectResult<GetLicenseDetailByUserId_Result> GetLicenseDetailByUserId(Nullable<int> iUserId) |
... | ... | @@ -3528,7 +3532,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
3528 | 3532 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseBasicSettings", iLicenseIdParameter, sLicenseeFnameParameter, sLicenseeLnameParameter, sInstitutionNameParameter, sAddress1Parameter, sAddress2Parameter, sCityParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, sPhoneParameter, sEmailIdParameter, status); |
3529 | 3533 | } |
3530 | 3534 | |
3531 | - public virtual int usp_UpdateLicenseModestySettings(Nullable<int> licenseEditionId, Nullable<int> siteId, Nullable<bool> isModesty, ObjectParameter status) | |
3535 | + public virtual int usp_UpdateLicenseModestySettings(Nullable<int> licenseEditionId, Nullable<int> siteId, Nullable<bool> isModesty, Nullable<bool> isSiteUser, ObjectParameter status) | |
3532 | 3536 | { |
3533 | 3537 | var licenseEditionIdParameter = licenseEditionId.HasValue ? |
3534 | 3538 | new ObjectParameter("LicenseEditionId", licenseEditionId) : |
... | ... | @@ -3542,7 +3546,11 @@ namespace AIAHTML5.ADMIN.API.Entity |
3542 | 3546 | new ObjectParameter("IsModesty", isModesty) : |
3543 | 3547 | new ObjectParameter("IsModesty", typeof(bool)); |
3544 | 3548 | |
3545 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModestySettings", licenseEditionIdParameter, siteIdParameter, isModestyParameter, status); | |
3549 | + var isSiteUserParameter = isSiteUser.HasValue ? | |
3550 | + new ObjectParameter("isSiteUser", isSiteUser) : | |
3551 | + new ObjectParameter("isSiteUser", typeof(bool)); | |
3552 | + | |
3553 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModestySettings", licenseEditionIdParameter, siteIdParameter, isModestyParameter, isSiteUserParameter, status); | |
3546 | 3554 | } |
3547 | 3555 | |
3548 | 3556 | public virtual int usp_UpdateLicenseModuleStatus(Nullable<int> licenseId, string moduleStatusText, ObjectParameter status) |
... | ... | @@ -4995,7 +5003,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
4995 | 5003 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertAIAUser", sLoginIdParameter, sPasswordParameter, sFirstnameParameter, sLastnameParameter, iUserTypeIdParameter, sEmailIdParameter, iSecurityQuesIdParameter, sSecurityAnswerParameter, iCreatorIdParameter, iLicenseIdParameter, iEditionIdParameter, status); |
4996 | 5004 | } |
4997 | 5005 | |
4998 | - public virtual ObjectResult<Nullable<bool>> usp_ManageUserLoginStatus(Nullable<int> userId, string tag, Nullable<long> sessionId) | |
5006 | + public virtual ObjectResult<Nullable<bool>> usp_ManageUserLoginStatus(Nullable<int> userId, string tag, Nullable<long> sessionId, Nullable<bool> isSiteUser) | |
4999 | 5007 | { |
5000 | 5008 | var userIdParameter = userId.HasValue ? |
5001 | 5009 | new ObjectParameter("userId", userId) : |
... | ... | @@ -5009,7 +5017,11 @@ namespace AIAHTML5.ADMIN.API.Entity |
5009 | 5017 | new ObjectParameter("sessionId", sessionId) : |
5010 | 5018 | new ObjectParameter("sessionId", typeof(long)); |
5011 | 5019 | |
5012 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Nullable<bool>>("usp_ManageUserLoginStatus", userIdParameter, tagParameter, sessionIdParameter); | |
5020 | + var isSiteUserParameter = isSiteUser.HasValue ? | |
5021 | + new ObjectParameter("isSiteUser", isSiteUser) : | |
5022 | + new ObjectParameter("isSiteUser", typeof(bool)); | |
5023 | + | |
5024 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Nullable<bool>>("usp_ManageUserLoginStatus", userIdParameter, tagParameter, sessionIdParameter, isSiteUserParameter); | |
5013 | 5025 | } |
5014 | 5026 | } |
5015 | 5027 | } | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... | ... | @@ -430,6 +430,7 @@ |
430 | 430 | </Function> |
431 | 431 | <Function Name="GetLicenseBySiteId" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
432 | 432 | <Parameter Name="sSiteId" Type="int" Mode="In" /> |
433 | + <Parameter Name="sEditionId" Type="int" Mode="In" /> | |
433 | 434 | </Function> |
434 | 435 | <Function Name="GetLicenseDetailByUserId" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
435 | 436 | <Parameter Name="iUserId" Type="int" Mode="In" /> |
... | ... | @@ -1411,6 +1412,7 @@ |
1411 | 1412 | <Parameter Name="userId" Type="int" Mode="In" /> |
1412 | 1413 | <Parameter Name="tag" Type="varchar" Mode="In" /> |
1413 | 1414 | <Parameter Name="sessionId" Type="bigint" Mode="In" /> |
1415 | + <Parameter Name="isSiteUser" Type="bit" Mode="In" /> | |
1414 | 1416 | </Function> |
1415 | 1417 | <Function Name="usp_SaveLabExerciseAttempts" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
1416 | 1418 | <Parameter Name="UserId" Type="int" Mode="In" /> |
... | ... | @@ -1495,6 +1497,7 @@ |
1495 | 1497 | <Parameter Name="LicenseEditionId" Type="int" Mode="In" /> |
1496 | 1498 | <Parameter Name="SiteId" Type="int" Mode="In" /> |
1497 | 1499 | <Parameter Name="IsModesty" Type="bit" Mode="In" /> |
1500 | + <Parameter Name="isSiteUser" Type="bit" Mode="In" /> | |
1498 | 1501 | <Parameter Name="Status" Type="bit" Mode="InOut" /> |
1499 | 1502 | </Function> |
1500 | 1503 | <Function Name="usp_UpdateLicenseModuleStatus" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
... | ... | @@ -1910,6 +1913,7 @@ |
1910 | 1913 | </FunctionImport> |
1911 | 1914 | <FunctionImport Name="GetLicenseBySiteId" ReturnType="Collection(AIADatabaseV5Model.GetLicenseBySiteId_Result)"> |
1912 | 1915 | <Parameter Name="sSiteId" Mode="In" Type="Int32" /> |
1916 | + <Parameter Name="sEditionId" Mode="In" Type="Int32" /> | |
1913 | 1917 | </FunctionImport> |
1914 | 1918 | <FunctionImport Name="GetLicenseDetailByUserId" ReturnType="Collection(AIADatabaseV5Model.GetLicenseDetailByUserId_Result)"> |
1915 | 1919 | <Parameter Name="iUserId" Mode="In" Type="Int32" /> |
... | ... | @@ -2572,6 +2576,7 @@ |
2572 | 2576 | <Parameter Name="LicenseEditionId" Mode="In" Type="Int32" /> |
2573 | 2577 | <Parameter Name="SiteId" Mode="In" Type="Int32" /> |
2574 | 2578 | <Parameter Name="IsModesty" Mode="In" Type="Boolean" /> |
2579 | + <Parameter Name="isSiteUser" Mode="In" Type="Boolean" /> | |
2575 | 2580 | <Parameter Name="Status" Mode="InOut" Type="Boolean" /> |
2576 | 2581 | </FunctionImport> |
2577 | 2582 | <FunctionImport Name="usp_UpdateLicenseModuleStatus"> |
... | ... | @@ -3007,6 +3012,7 @@ |
3007 | 3012 | <Parameter Name="userId" Mode="In" Type="Int32" /> |
3008 | 3013 | <Parameter Name="tag" Mode="In" Type="String" /> |
3009 | 3014 | <Parameter Name="sessionId" Mode="In" Type="Int64" /> |
3015 | + <Parameter Name="isSiteUser" Mode="In" Type="Boolean" /> | |
3010 | 3016 | </FunctionImport> |
3011 | 3017 | </EntityContainer> |
3012 | 3018 | <ComplexType Name="DA_GetBaseLayer_Result"> | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
... | ... | @@ -395,14 +395,14 @@ namespace AIAHTML5.ADMIN.API.Models |
395 | 395 | } |
396 | 396 | } |
397 | 397 | |
398 | - public static bool UpdateLicenseModestySettings(AIADatabaseV5Entities dbContext, List<Tuple<int, int, bool>> LicenseModestyList) | |
398 | + public static bool UpdateLicenseModestySettings(AIADatabaseV5Entities dbContext, List<Tuple<int, int, bool,bool>> LicenseModestyList) | |
399 | 399 | { |
400 | 400 | var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); |
401 | 401 | try |
402 | 402 | { |
403 | 403 | foreach (var item in LicenseModestyList) |
404 | 404 | { |
405 | - dbContext.usp_UpdateLicenseModestySettings(item.Item1, item.Item2, item.Item3, spStatus); | |
405 | + dbContext.usp_UpdateLicenseModestySettings(item.Item1, item.Item2, item.Item3, item.Item4, spStatus); | |
406 | 406 | if (!(bool)spStatus.Value) break; |
407 | 407 | } |
408 | 408 | return (bool)spStatus.Value; | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
... | ... | @@ -65,12 +65,12 @@ namespace AIAHTML5.ADMIN.API.Models |
65 | 65 | return false; |
66 | 66 | } |
67 | 67 | } |
68 | - public static bool ManageUserLoginStatus(AIADatabaseV5Entities dbContext, int userId, string tagName, long SessionId) | |
68 | + public static bool ManageUserLoginStatus(AIADatabaseV5Entities dbContext, int userId, string tagName, long SessionId, bool isSiteUser) | |
69 | 69 | { |
70 | 70 | bool loginStatus = false; |
71 | 71 | try |
72 | 72 | { |
73 | - loginStatus = Convert.ToBoolean(dbContext.usp_ManageUserLoginStatus(userId, tagName, SessionId).FirstOrDefault()); | |
73 | + loginStatus = Convert.ToBoolean(dbContext.usp_ManageUserLoginStatus(userId, tagName, SessionId, isSiteUser).FirstOrDefault()); | |
74 | 74 | |
75 | 75 | return loginStatus; |
76 | 76 | } | ... | ... |
400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected> |
9 | 9 | <ProjectView>ProjectFiles</ProjectView> |
10 | 10 | <NameOfLastUsedPublishProfile>API_Profile</NameOfLastUsedPublishProfile> |
11 | + <UseIISExpress>false</UseIISExpress> | |
11 | 12 | </PropertyGroup> |
12 | 13 | <ProjectExtensions> |
13 | 14 | <VisualStudio> | ... | ... |
400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs
... | ... | @@ -42,6 +42,7 @@ namespace AIAHTML5.API.Constants |
42 | 42 | public const string INSERT_EXPORTED_IMAGE = "usp_InsertExportedImage"; |
43 | 43 | public const string GET_USER_DETAIL_BYLOGIN_AND_ACCOUNT = "usp_GetUserDetailsByLoginIdandAccount"; |
44 | 44 | public const string GET_USER_LOGIN_STATUS = "usp_ManageUserLoginStatus"; |
45 | + public const string GET_AOD_AUTHENTICATION_STATUS = "usp_AodAuthenticationStatus"; | |
45 | 46 | public const string INSERT_SITE_LOGIN_LOG = "usp_InsertSiteLoginLog"; |
46 | 47 | } |
47 | 48 | } |
48 | 49 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs
... | ... | @@ -241,11 +241,13 @@ namespace AIAHTML5.API.Controllers |
241 | 241 | { |
242 | 242 | //based on old .net code(AIA flex), we get modules based on licenseId if licenseid>0. |
243 | 243 | //we verified in database that only superadmin has no licenseid so getting all modules for supeadmin |
244 | - int licenseId, editionId; | |
245 | - AIAHTML5.API.Models.Users.getLicenseIdForThisUser(userInfo.Id, out licenseId, out editionId); | |
244 | + int licenseId, editionId, LicenseEditionId; | |
245 | + AIAHTML5.API.Models.Users.getLicenseIdForThisUser(userInfo.Id, out licenseId, out editionId,out LicenseEditionId); | |
246 | 246 | |
247 | 247 | userInfo.LicenseId = licenseId; |
248 | 248 | userInfo.EditionId = editionId; |
249 | + userInfo.LicenseEditionId = LicenseEditionId; | |
250 | + userInfo.isSiteUser = false; | |
249 | 251 | |
250 | 252 | //if (userInfo.UserType == AIAHTML5.API.Models.User.SUPER_ADMIN) |
251 | 253 | if (userInfo.LicenseId == 0) |
... | ... | @@ -271,7 +273,7 @@ namespace AIAHTML5.API.Controllers |
271 | 273 | //get use settings |
272 | 274 | string skintone; |
273 | 275 | string modesty; |
274 | - User us = AIAHTML5.API.Models.Users.GetUserSelectedSettings(userInfo.Id, out skintone, out modesty); | |
276 | + User us = AIAHTML5.API.Models.Users.GetUserSelectedSettings(userInfo.Id, false, out skintone, out modesty); | |
275 | 277 | if (us != null) |
276 | 278 | { |
277 | 279 | userInfo.userselectedModesty = modesty; |
... | ... | @@ -437,9 +439,13 @@ namespace AIAHTML5.API.Controllers |
437 | 439 | settings.userSelectedSkintone = jsonData["skintone"].Value<string>(); |
438 | 440 | settings.userSelectedFont = null; |
439 | 441 | settings.Id= jsonData["userId"].Value<int>(); |
442 | + settings.LicenseEditionId = jsonData["LicenseEditionId"].Value<int>(); | |
443 | + settings.isSiteUser = jsonData["isSiteUser"].Value<bool>(); | |
444 | + | |
440 | 445 | userLexicon.primaryid= jsonData["primaryid"].Value<string>(); |
441 | 446 | userLexicon.secondryids = jsonData["secondryids"].Value<string>(); |
442 | 447 | settings.userLexicon= userLexicon; |
448 | + | |
443 | 449 | |
444 | 450 | Status = AIAHTML5.API.Models.Users.SaveUserSelectedSettings(settings); |
445 | 451 | if (Status == 1) |
... | ... | @@ -528,8 +534,9 @@ namespace AIAHTML5.API.Controllers |
528 | 534 | int userId = jsonData["userId"].Value<int>(); |
529 | 535 | string tagName = jsonData["tagName"].Value<string>(); |
530 | 536 | long SessionId = jsonData["SessionId"].Value<long>(); |
537 | + bool isSiteUser = jsonData["isSiteUser"].Value<bool>(); | |
531 | 538 | |
532 | - loginStatus = AIAHTML5.API.Models.Users.GetUserLoginStatus(userId, tagName, SessionId); | |
539 | + loginStatus = AIAHTML5.API.Models.Users.GetUserLoginStatus(userId, tagName, SessionId, isSiteUser); | |
533 | 540 | |
534 | 541 | return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(loginStatus) }; |
535 | 542 | } |
... | ... | @@ -539,6 +546,51 @@ namespace AIAHTML5.API.Controllers |
539 | 546 | } |
540 | 547 | } |
541 | 548 | |
549 | + [HttpPost] | |
550 | + [Route("api/AodAuthentication")] | |
551 | + public HttpResponseMessage AodAuthentication([FromBody]JObject jsonData) | |
552 | + { | |
553 | + ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); | |
554 | + int requestStatus = 0; | |
555 | + try | |
556 | + { | |
557 | + string aodpasskey = jsonData["aiapasskey"].Value<string>(); | |
558 | + long SessionId = jsonData["SessionId"].Value<long>(); | |
559 | + string CourseId = jsonData["CourseId"].Value<string>(); | |
560 | + | |
561 | + logger.Debug("AOD request parameter: Session =" + SessionId +", aodkeypass="+ aodpasskey + ", CourseId=" + CourseId); | |
562 | + | |
563 | + string aiaConfigKey= ConfigurationManager.AppSettings["aiapasskey"]; | |
564 | + | |
565 | + requestStatus = AIAHTML5.API.Models.Users.ValidateAodAthenticationStatus(SessionId, aiaConfigKey, aodpasskey, CourseId); | |
566 | + | |
567 | + switch(requestStatus) | |
568 | + { | |
569 | + case 200: | |
570 | + { | |
571 | + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent("authentication successful") }; | |
572 | + } | |
573 | + case 401: | |
574 | + { | |
575 | + return new HttpResponseMessage { StatusCode = HttpStatusCode.Unauthorized, Content = new StringContent("passing key to api is not valid") }; | |
576 | + } | |
577 | + case 404: | |
578 | + { | |
579 | + return new HttpResponseMessage { StatusCode = HttpStatusCode.NotFound, Content = new StringContent("session has expired or does not exist") }; | |
580 | + } | |
581 | + default: | |
582 | + { | |
583 | + return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent("server encountered an unexpected error.") }; | |
584 | + } | |
585 | + } | |
586 | + | |
587 | + } | |
588 | + catch (Exception ex) | |
589 | + { | |
590 | + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message); | |
591 | + } | |
592 | + } | |
593 | + | |
542 | 594 | // PUT api/authenticate/5 |
543 | 595 | public void Put(int id, [FromBody]string value) |
544 | 596 | { |
... | ... | @@ -550,5 +602,4 @@ namespace AIAHTML5.API.Controllers |
550 | 602 | } |
551 | 603 | } |
552 | 604 | |
553 | - | |
554 | 605 | } |
555 | 606 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.API/Controllers/ConfigurationController.cs
... | ... | @@ -6,6 +6,9 @@ using System.Net.Http; |
6 | 6 | using System.Web.Http; |
7 | 7 | using System.Configuration; |
8 | 8 | using Newtonsoft.Json; |
9 | +using System.Text; | |
10 | +using System.Security.Cryptography; | |
11 | +using System.IO; | |
9 | 12 | |
10 | 13 | namespace AIAHTML5.API.Controllers |
11 | 14 | { |
... | ... | @@ -24,6 +27,9 @@ namespace AIAHTML5.API.Controllers |
24 | 27 | mconfig.serverPath = ConfigurationManager.AppSettings["ANIMATION_HOSTING_SERVER"]; |
25 | 28 | mconfig.fileSize = Int32.Parse(ConfigurationManager.AppSettings["UploadMaxFileSize"]); |
26 | 29 | |
30 | + mconfig.aodSiteUrl = ConfigurationManager.AppSettings["Aod_site_Url"]; | |
31 | + mconfig.aodkeypass = ConfigurationManager.AppSettings["aiapasskey"]; | |
32 | + | |
27 | 33 | responseData = JsonConvert.SerializeObject(mconfig); |
28 | 34 | |
29 | 35 | return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(responseData) }; |
... | ... | @@ -38,4 +44,7 @@ public class MyConfig |
38 | 44 | public int pingInterval { get; set; } |
39 | 45 | public string serverPath { get; set; } |
40 | 46 | public int fileSize { get; set; } |
41 | -} | |
42 | 47 | \ No newline at end of file |
48 | + | |
49 | + public string aodSiteUrl { get; set; } | |
50 | + public string aodkeypass { get; set; } | |
51 | +} | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
... | ... | @@ -157,6 +157,8 @@ namespace AIAHTML5.API.Models |
157 | 157 | { |
158 | 158 | hash.Add(AIAConstants.LICENSE_KEY_ID, ds.Tables[0].Rows[0][0]); |
159 | 159 | hash.Add(AIAConstants.EDITION_KEY_ID, ds.Tables[0].Rows[0][1]); |
160 | + // LicenseEditionId use to update modesty in LicenseToEdition table | |
161 | + hash.Add("LicenseEditionId", ds.Tables[0].Rows[0][2]); | |
160 | 162 | } |
161 | 163 | } |
162 | 164 | |
... | ... | @@ -348,7 +350,7 @@ namespace AIAHTML5.API.Models |
348 | 350 | return objUser; |
349 | 351 | } |
350 | 352 | |
351 | - internal static string GetUserLoginStatus(int userId,string tagName, long SessionId) | |
353 | + internal static string GetUserLoginStatus(int userId,string tagName, long SessionId, bool isSiteUser) | |
352 | 354 | { |
353 | 355 | string status=string.Empty; |
354 | 356 | DBModel objModel = new DBModel(); |
... | ... | @@ -364,6 +366,7 @@ namespace AIAHTML5.API.Models |
364 | 366 | cmd.Parameters.AddWithValue("@userId", userId); |
365 | 367 | cmd.Parameters.AddWithValue("@tag", tagName); |
366 | 368 | cmd.Parameters.AddWithValue("@sessionId", SessionId); |
369 | + cmd.Parameters.AddWithValue("@isSiteUser", isSiteUser); | |
367 | 370 | adapter = new SqlDataAdapter(cmd); |
368 | 371 | adapter.Fill(ds); |
369 | 372 | |
... | ... | @@ -384,7 +387,45 @@ namespace AIAHTML5.API.Models |
384 | 387 | return status; |
385 | 388 | } |
386 | 389 | |
387 | - internal User GetSelectedSettings(int userId) | |
390 | + internal static int ValidateAodAthenticationStatus(long SessionId, string aiaConfigKey, string aodpasskey, string CourseId) | |
391 | + { | |
392 | + int status = 0; | |
393 | + DBModel objModel = new DBModel(); | |
394 | + | |
395 | + SqlConnection conn = new SqlConnection(dbConnectionString); | |
396 | + SqlCommand cmd = new SqlCommand(); | |
397 | + SqlDataAdapter adapter; | |
398 | + DataSet ds = new DataSet(); | |
399 | + | |
400 | + cmd.Connection = conn; | |
401 | + cmd.CommandText = DBConstants.GET_AOD_AUTHENTICATION_STATUS; | |
402 | + cmd.CommandType = CommandType.StoredProcedure; | |
403 | + cmd.Parameters.AddWithValue("@sessionId", SessionId); | |
404 | + cmd.Parameters.AddWithValue("@aiaConfigKey", aiaConfigKey); | |
405 | + cmd.Parameters.AddWithValue("@aodpasskey", aodpasskey); | |
406 | + cmd.Parameters.AddWithValue("@CourseId", CourseId); | |
407 | + | |
408 | + adapter = new SqlDataAdapter(cmd); | |
409 | + adapter.Fill(ds); | |
410 | + | |
411 | + if (ds != null && ds.Tables.Count > 0) | |
412 | + { | |
413 | + DataTable dt = ds.Tables[0]; | |
414 | + | |
415 | + if (dt.Rows.Count > 0) | |
416 | + { | |
417 | + foreach (DataRow dr in dt.Rows) | |
418 | + { | |
419 | + status =Convert.ToInt32( dr["requestStatus"]); | |
420 | + | |
421 | + } | |
422 | + } | |
423 | + } | |
424 | + | |
425 | + return status; | |
426 | + } | |
427 | + | |
428 | + internal User GetSelectedSettings(int userId,bool isSiteUser) | |
388 | 429 | { |
389 | 430 | logger.Debug(" Inside GetSelectedSettings for userId = " + userId); |
390 | 431 | UserLexicon objlexicon = null; |
... | ... | @@ -394,18 +435,16 @@ namespace AIAHTML5.API.Models |
394 | 435 | SqlConnection conn = new SqlConnection(dbConnectionString); |
395 | 436 | SqlCommand cmd = new SqlCommand(); |
396 | 437 | SqlDataAdapter adapter; |
397 | - SqlParameter param; | |
438 | + | |
398 | 439 | DataSet ds = new DataSet(); |
399 | 440 | |
400 | 441 | cmd.Connection = conn; |
401 | 442 | cmd.CommandText = DBConstants.GET_SETTINGS; |
402 | 443 | cmd.CommandType = CommandType.StoredProcedure; |
403 | 444 | |
404 | - param = new SqlParameter("@iUserId", userId); | |
405 | - param.Direction = ParameterDirection.Input; | |
406 | - param.DbType = DbType.Int32; | |
407 | - cmd.Parameters.Add(param); | |
408 | - | |
445 | + cmd.Parameters.AddWithValue("@iUserId", userId); | |
446 | + cmd.Parameters.AddWithValue("@isSiteUser", isSiteUser); | |
447 | + | |
409 | 448 | adapter = new SqlDataAdapter(cmd); |
410 | 449 | adapter.Fill(ds); |
411 | 450 | |
... | ... | @@ -784,6 +823,8 @@ namespace AIAHTML5.API.Models |
784 | 823 | cmd.Parameters.AddWithValue("@ifont","" ); |
785 | 824 | cmd.Parameters.AddWithValue("@pLexicon", settings.userLexicon.primaryid); |
786 | 825 | cmd.Parameters.AddWithValue("@sLexicon", settings.userLexicon.secondryids); |
826 | + cmd.Parameters.AddWithValue("@isSiteUser", settings.isSiteUser); | |
827 | + cmd.Parameters.AddWithValue("@LicenseEditionId", settings.LicenseEditionId); | |
787 | 828 | |
788 | 829 | |
789 | 830 | result = cmd.ExecuteNonQuery(); |
... | ... | @@ -1249,7 +1290,7 @@ namespace AIAHTML5.API.Models |
1249 | 1290 | return dt; |
1250 | 1291 | } |
1251 | 1292 | |
1252 | - internal DataTable GetLicenseBySiteId(int siteId) | |
1293 | + internal DataTable GetLicenseBySiteId(int siteId, int editionId) | |
1253 | 1294 | { |
1254 | 1295 | logger.Debug(" inside GetLicenseBySiteId for siteId= " + siteId); |
1255 | 1296 | |
... | ... | @@ -1262,7 +1303,8 @@ namespace AIAHTML5.API.Models |
1262 | 1303 | cmd.CommandText = DBConstants.GET_LICENSE_BY_SITE_ID; |
1263 | 1304 | cmd.CommandType = CommandType.StoredProcedure; |
1264 | 1305 | cmd.Parameters.AddWithValue("@sSiteId", siteId); |
1265 | - | |
1306 | + cmd.Parameters.AddWithValue("@sEditionId", editionId); | |
1307 | + | |
1266 | 1308 | SqlDataAdapter da = new SqlDataAdapter(); |
1267 | 1309 | da.SelectCommand = cmd; |
1268 | 1310 | dt = new DataTable(); | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/User.cs
... | ... | @@ -34,6 +34,8 @@ namespace AIAHTML5.API.Models |
34 | 34 | public bool IsBlocked { get; set; } |
35 | 35 | public int LicenseId { get; set; } |
36 | 36 | public int EditionId { get; set; } |
37 | + public int LicenseEditionId { get; set; } | |
38 | + public bool isSiteUser { get; set; } | |
37 | 39 | public Int16 LoginFailureCauseId { get; set; } |
38 | 40 | public bool IsModestyOn { get; set; } |
39 | 41 | public ArrayList Modules { get; set; } | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/Users.cs
... | ... | @@ -114,13 +114,14 @@ namespace AIAHTML5.API.Models |
114 | 114 | return userDetails; |
115 | 115 | } |
116 | 116 | |
117 | - internal static void getLicenseIdForThisUser(int userId, out int licenseId, out int editionId) | |
117 | + internal static void getLicenseIdForThisUser(int userId, out int licenseId, out int editionId, out int LicenseEditionId) | |
118 | 118 | { |
119 | 119 | logger.Debug("inside getLicenseIdForThisUser for UserId =" + userId); |
120 | 120 | |
121 | 121 | //assigning below variable to avoid compiler error for unassignd out params |
122 | 122 | licenseId = 0; |
123 | 123 | editionId = 0; |
124 | + LicenseEditionId = 0; | |
124 | 125 | |
125 | 126 | |
126 | 127 | |
... | ... | @@ -133,6 +134,9 @@ namespace AIAHTML5.API.Models |
133 | 134 | if (licenseEditionHash.ContainsKey(AIAConstants.EDITION_KEY_ID)) |
134 | 135 | editionId = Convert.ToInt32(licenseEditionHash[AIAConstants.EDITION_KEY_ID]); |
135 | 136 | |
137 | + if (licenseEditionHash.ContainsKey("LicenseEditionId")) | |
138 | + LicenseEditionId = Convert.ToInt32(licenseEditionHash["LicenseEditionId"]); | |
139 | + | |
136 | 140 | |
137 | 141 | } |
138 | 142 | |
... | ... | @@ -336,10 +340,17 @@ namespace AIAHTML5.API.Models |
336 | 340 | return objUser; |
337 | 341 | } |
338 | 342 | |
339 | - internal static string GetUserLoginStatus(int userId, string tagName, long SessionId) | |
343 | + internal static string GetUserLoginStatus(int userId, string tagName, long SessionId, bool isSiteUser) | |
340 | 344 | { |
341 | 345 | string status = null; |
342 | - status = DBModel.GetUserLoginStatus(userId, tagName, SessionId); | |
346 | + status = DBModel.GetUserLoginStatus(userId, tagName, SessionId, isSiteUser); | |
347 | + | |
348 | + return status; | |
349 | + } | |
350 | + internal static int ValidateAodAthenticationStatus(long SessionId, string aiaConfigKey, string aodpasskey, string CourseId) | |
351 | + { | |
352 | + int status = 0; | |
353 | + status = DBModel.ValidateAodAthenticationStatus(SessionId, aiaConfigKey, aodpasskey, CourseId); | |
343 | 354 | |
344 | 355 | return status; |
345 | 356 | } |
... | ... | @@ -356,14 +367,14 @@ namespace AIAHTML5.API.Models |
356 | 367 | return result; |
357 | 368 | } |
358 | 369 | |
359 | - internal static User GetUserSelectedSettings(int userId,out string skintone, out string modesty) | |
370 | + internal static User GetUserSelectedSettings(int userId,bool isSiteUser, out string skintone, out string modesty) | |
360 | 371 | { |
361 | 372 | logger.Debug("inside GetUserSelectedSettings for userid =" + userId); |
362 | 373 | |
363 | 374 | skintone = null; |
364 | 375 | modesty = null; |
365 | 376 | DBModel objModel = new DBModel(); |
366 | - User result = objModel.GetSelectedSettings(userId); | |
377 | + User result = objModel.GetSelectedSettings(userId, isSiteUser); | |
367 | 378 | if (result != null) |
368 | 379 | { |
369 | 380 | skintone = result.userSelectedSkintone; |
... | ... | @@ -538,8 +549,7 @@ namespace AIAHTML5.API.Models |
538 | 549 | bool isSubscriptionNotStart = false; |
539 | 550 | |
540 | 551 | int intLicenseId = 0; |
541 | - int intEditionId = Convert.ToInt16(strEdition); | |
542 | - | |
552 | + | |
543 | 553 | DateTime dtLogDate = DateTime.Now; |
544 | 554 | |
545 | 555 | if (string.IsNullOrEmpty(strAcccountNumber)) |
... | ... | @@ -554,8 +564,10 @@ namespace AIAHTML5.API.Models |
554 | 564 | } |
555 | 565 | else |
556 | 566 | { |
567 | + int intEditionId = Convert.ToInt16(strEdition); | |
568 | + | |
557 | 569 | DBModel objDBModel = new DBModel(); |
558 | - DataTable dtLicense = objDBModel.GetLicenseBySiteId(intSiteId); | |
570 | + DataTable dtLicense = objDBModel.GetLicenseBySiteId(intSiteId, intEditionId); | |
559 | 571 | if (dtLicense.Rows.Count > 0) |
560 | 572 | { |
561 | 573 | |
... | ... | @@ -597,6 +609,8 @@ namespace AIAHTML5.API.Models |
597 | 609 | { |
598 | 610 | //User objUserContext = new User(); |
599 | 611 | userInfo.Id = 0; |
612 | + userInfo.siteId = intSiteId; | |
613 | + userInfo.isSiteUser = true; | |
600 | 614 | userInfo.FirstName = licRow["LicenseeFirstName"].ToString(); |
601 | 615 | userInfo.LastName = licRow["LicenseeLastName"].ToString(); |
602 | 616 | userInfo.UserTypeId = AIAConstants.SITE_USER; |
... | ... | @@ -612,6 +626,7 @@ namespace AIAHTML5.API.Models |
612 | 626 | userInfo.EditionId = (Byte)intEditionId; |
613 | 627 | userInfo.LicenseTypeId = (byte)licRow["LicenseTypeId"]; |
614 | 628 | userInfo.LicenseId = Convert.ToInt32(licRow["Id"]); |
629 | + userInfo.LicenseEditionId = Convert.ToInt32(licRow["LicenseEditionId"]); | |
615 | 630 | userInfo.LoginId = ""; |
616 | 631 | userInfo.Modesty = (bool)licRow["IsModesty"]; |
617 | 632 | //Retreive ModestyMode |
... | ... | @@ -631,8 +646,25 @@ namespace AIAHTML5.API.Models |
631 | 646 | } |
632 | 647 | } |
633 | 648 | |
634 | - // get edition features details | |
635 | - userInfo.objEditionFeatures = objDBModel.GetEditionFeatures((Byte)intEditionId); | |
649 | + string skintone; | |
650 | + string modesty; | |
651 | + User us =GetUserSelectedSettings(userInfo.siteId,true, out skintone, out modesty); | |
652 | + if (us != null) | |
653 | + { | |
654 | + userInfo.userselectedModesty = modesty; | |
655 | + userInfo.userSelectedSkintone = skintone; | |
656 | + userInfo.userLexicon = us.userLexicon; | |
657 | + } | |
658 | + else | |
659 | + { | |
660 | + userInfo.userselectedModesty = null; | |
661 | + userInfo.userSelectedSkintone = null; | |
662 | + userInfo.userLexicon = null; | |
663 | + | |
664 | + } | |
665 | + | |
666 | + // get edition features details | |
667 | + userInfo.objEditionFeatures = objDBModel.GetEditionFeatures((Byte)intEditionId); | |
636 | 668 | |
637 | 669 | if (intLicenseId > 0) |
638 | 670 | userInfo.Modules = getModuleListByLicenseId(intLicenseId); | ... | ... |
400-SOURCECODE/AIAHTML5.API/Web.config
... | ... | @@ -58,7 +58,10 @@ |
58 | 58 | <add key ="UnblockUserEmailTemplate" value="~/Templates/unblock-User.html"/> |
59 | 59 | <add key ="ForgotPasswordEmailTemplate" value="~/Templates/forgot-Password.html"/> |
60 | 60 | <add key ="ForgotUserIdEmailTemplate" value="~/Templates/forgot-UserId.html"/> |
61 | - | |
61 | + | |
62 | + <!-- Aod used: Added by Birendra--> | |
63 | + <add key="Aod_site_Url" value="https://uat.adamondemand.com/"/> | |
64 | + <add key="aiapasskey" value="as@2$eDu8Jk"/> | |
62 | 65 | |
63 | 66 | <!--<add key ="AIADatabaseV5Context" value="Data Source=192.168.90.53;Initial Catalog=AIADatabaseV5;User ID=AIA_Dev;Password=india123;"/>--> |
64 | 67 | <add key ="AIADatabaseV5Context" value="Data Source=LAPTOP-BIRU-PC\SQLEXPRESS;Initial Catalog=AIADatabaseV5;User ID=AIA_Dev;Password=india123;"/> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
1 | -๏ปฟAIA.controller("AODController", ["$scope", "$rootScope", "pages", "$log","$location", | |
2 | -function ($scope, $rootScope, pages, log, $location) { | |
3 | - //$scope.showTabButton = true; | |
4 | - //$scope.IsVisible = function () { | |
5 | - // $scope.scroll(); | |
1 | +๏ปฟ'use strict'; | |
6 | 2 | |
7 | - //} | |
3 | +AIA.controller("AODController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout","DataService", "ModuleService", "$interval", "AIAConstants", | |
4 | +function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout,DataService, ModuleService, $interval, AIAConstants) { | |
5 | + $scope.ObjectAttribute=function(windowviewid) | |
6 | + { | |
7 | + var windata={ | |
8 | + 'multiwinid': windowviewid, | |
9 | + 'AODAnimationData': [], | |
10 | + 'moduleName': '', | |
11 | + 'aodUrl':'', | |
12 | + 'courseId':'', | |
13 | + 'uid':'2',//categoty id. courseid cheched in category id | |
14 | + 'requestType':'SCORMPackage', | |
15 | + 'currentViewTitle': '', | |
16 | + 'parentSlugName': '', | |
17 | + 'currentSlug': '', | |
18 | + 'imageId': '' | |
19 | + }; | |
20 | + return windata; | |
21 | + } | |
8 | 22 | |
9 | - $scope.setActiveTab = function (tabToSet) { | |
10 | - $scope.activeTab = tabToSet; | |
11 | - localStorage.setItem("currentAODTabView", $scope.activeTab); | |
12 | - }; | |
23 | + $scope.initializeAODWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) { | |
24 | + if (isOpenWithExistsModule || openPanelNo == 0) { | |
25 | + if ($rootScope.AODWindowData != undefined) { | |
26 | + $rootScope.AODWindowData.length = 0; | |
27 | + } | |
28 | + else { | |
29 | + $rootScope.AODWindowData = []; | |
30 | + } | |
31 | + | |
32 | + $rootScope.AODWindowData.push($scope.ObjectAttribute(windowviewid)); | |
33 | + | |
34 | + } | |
35 | + else { | |
36 | + var isNewWindow = true; | |
37 | + for (var k = 0; k < $rootScope.AODWindowData.length; k++) { | |
38 | + if ($rootScope.AODWindowData[k].multiwinid == windowviewid) { | |
39 | + isNewWindow = false; | |
40 | + break; | |
41 | + } | |
42 | + } | |
43 | + | |
44 | + if (isNewWindow) { | |
45 | + $rootScope.AODWindowData.push($scope.ObjectAttribute(windowviewid)); | |
46 | + } | |
47 | + } | |
48 | + } | |
49 | + | |
50 | + $scope.GetAODwindowStoreData = function (windowviewid, keyname) { | |
51 | + for (var x = 0 ; x < $rootScope.AODWindowData.length; x++) { | |
52 | + | |
53 | + if ($rootScope.AODWindowData[x].multiwinid == windowviewid) { | |
54 | + return $rootScope.AODWindowData[x][keyname]; | |
55 | + } | |
56 | + } | |
57 | + } | |
58 | + | |
59 | + $scope.SetAODwindowStoreData = function (windowviewid, keyname, value) { | |
60 | + for (var x = 0 ; x < $rootScope.AODWindowData.length; x++) { | |
61 | + | |
62 | + if ($rootScope.AODWindowData[x].multiwinid == windowviewid) { | |
63 | + $rootScope.AODWindowData[x][keyname] = value; | |
64 | + } | |
65 | + } | |
66 | + } | |
67 | + | |
68 | + $scope.DisableUI = function () { | |
69 | + | |
70 | + var aniImagePanelConetent = document.getElementsByClassName("jsPanel-content"); | |
71 | + for (var i = 0; i < aniImagePanelConetent.length; i++) { | |
72 | + aniImagePanelConetent[i].style.pointerEvents = "none"; | |
73 | + aniImagePanelConetent[i].style.opacity = "0.7"; | |
74 | + | |
75 | + } | |
76 | + $rootScope.isLoading = true; | |
77 | + $('#spinner').css('visibility', 'visible'); | |
78 | + | |
79 | + // CB module disable all | |
80 | + $('#HomeContainerDiv').css('pointer-events', 'none'); | |
81 | + $('#HomeContainerDiv').css('opacity', '0.7'); | |
82 | + } | |
13 | 83 | |
14 | - $scope.scroll = function () { | |
15 | - // $window.scrollTo(0, 0); | |
16 | - $("html,body").scrollTop(0); | |
17 | - //alert("scroll"); | |
84 | + $scope.EnableUI = function () { | |
85 | + | |
86 | + var aniImagePanelConetent = document.getElementsByClassName("jsPanel-content"); | |
87 | + for (var i = 0; i < aniImagePanelConetent.length; i++) { | |
88 | + aniImagePanelConetent[i].style.pointerEvents = "auto"; | |
89 | + aniImagePanelConetent[i].style.opacity = "1"; | |
90 | + } | |
91 | + | |
92 | + $rootScope.isLoading = false; | |
93 | + $('#spinner').css('visibility', 'hidden'); | |
94 | + // CB module enable all | |
95 | + $('#HomeContainerDiv').css('pointer-events', 'auto'); | |
96 | + $('#HomeContainerDiv').css('opacity', '1'); | |
97 | + | |
98 | + } | |
99 | + | |
100 | + $scope.RemoveJSPanel = function (panelid) { | |
101 | + | |
102 | + var len = (panelid).split("_").length; | |
103 | + var windowviewid = (panelid).split("_")[len - 1]; | |
104 | + | |
105 | + // remove old stored data after close panel | |
106 | + for (var index = 0 ; index < $rootScope.AODWindowData.length; index++) { | |
107 | + | |
108 | + if ($rootScope.AODWindowData[index].multiwinid == windowviewid) { | |
109 | + | |
110 | + if (index != -1) { | |
111 | + // remove module which one is loaded | |
112 | + var reffid=$rootScope.AODWindowData[index].imageId; | |
113 | + $rootScope.AODWindowData.splice(index, 1); | |
114 | + //remove also stream/source video from close panel from cb | |
115 | + if($rootScope.collectAnimationSource !=undefined) | |
116 | + { | |
117 | + for (var vdx = 0 ; vdx < $rootScope.collectAnimationSource.length; vdx++) { | |
118 | + if(reffid==$rootScope.collectAnimationSource[vdx].imageId) | |
119 | + $rootScope.collectAnimationSource.splice(vdx, 1); | |
120 | + } | |
121 | + } | |
122 | + if ($('#' + panelid).html() != undefined) { | |
123 | + | |
124 | + $('#' + panelid).remove(); | |
125 | + | |
126 | + } | |
127 | + // $rootScope.resetjsPanelTop(panelid); | |
128 | + } | |
129 | + } | |
130 | + } | |
18 | 131 | } |
19 | - //$rootScope.currentActiveModuleTitle = pages[10].name; | |
132 | + $scope.PanelActivity = function () { | |
133 | + // close panel | |
134 | + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function (event) { | |
20 | 135 | |
21 | - $scope.$on('$viewContentLoaded', function (event) { | |
136 | + var panelid = $(event.target).parent().parent().parent().parent().attr('id'); | |
137 | + | |
138 | + $scope.RemoveJSPanel(panelid); | |
139 | + | |
140 | + }); | |
141 | + } | |
142 | + | |
143 | + | |
144 | + $scope.loadAIModuleById = function (moduleId) { | |
145 | + | |
146 | + $rootScope.MULTI_VIEW_ID += 1 | |
147 | + | |
148 | + if($rootScope.AODWindowData!=undefined) | |
149 | + { | |
150 | + if($rootScope.AODWindowData.length>0) | |
151 | + { | |
152 | + for(var x=0 ;x < $rootScope.AODWindowData.length;x++){ | |
153 | + var winid=$rootScope.AODWindowData[x].multiwinid; | |
154 | + if ($('#aodImagePanel_' + winid).html() != undefined) { | |
155 | + $('#aodImagePanel_' + winid).remove(); | |
156 | + } | |
157 | + } | |
158 | + $rootScope.AODWindowData=[]; | |
159 | + } | |
160 | + } | |
161 | + | |
162 | + $scope.initializeAODWindowData($rootScope.MULTI_VIEW_ID, true, undefined); | |
163 | + | |
164 | + $scope.DisableUI(); | |
22 | 165 | |
23 | 166 | if ($rootScope.refreshcheck == null) { |
24 | 167 | $location.path('/'); |
25 | 168 | } |
26 | - | |
27 | - // code that will be executed ... | |
169 | + // code that will be executed ... | |
28 | 170 | // every time this view is loaded |
29 | 171 | |
30 | - //get current path | |
31 | - var currentURL = $location.path(); | |
32 | - var selectedModuleName = ''; | |
33 | - //set module title | |
34 | - angular.forEach($rootScope.userModules, function (value, key) { | |
35 | - if (value.slug === currentURL.replace('/', '')) { | |
36 | - selectedModuleName = value.name; | |
172 | + | |
173 | + $rootScope.currentActiveModuleTitle = "ADAM ON DEMAND"; | |
174 | + | |
175 | + $scope.SetAODwindowStoreData($rootScope.MULTI_VIEW_ID, 'moduleName', "ADAM ON DEMAND"); | |
176 | + | |
177 | + $scope.LoadAODJsonData($rootScope.MULTI_VIEW_ID); | |
178 | + | |
179 | + setTimeout(function () { | |
180 | + | |
181 | + //call time interval function until load Illustration data | |
182 | + var timeintval = null; | |
183 | + timeintval = $interval(function () { | |
184 | + var AODAnimationData = $scope.GetAODwindowStoreData($rootScope.MULTI_VIEW_ID, 'AODAnimationData'); | |
185 | + if (AODAnimationData.length>0) { | |
186 | + $scope.stopIntervalAOD(); | |
187 | + $scope.loadAODList($rootScope.MULTI_VIEW_ID); | |
188 | + } | |
189 | + else | |
190 | + { | |
191 | + console.log("waiting for aod Data"); | |
192 | + } | |
193 | + }, 100); | |
194 | + | |
195 | + $scope.stopIntervalAOD = function () { | |
196 | + if (angular.isDefined(timeintval)) { | |
197 | + $interval.cancel(timeintval); | |
198 | + timeintval = undefined; | |
199 | + } | |
200 | + }; | |
201 | + | |
202 | + }, 200); | |
203 | + }; | |
204 | + | |
205 | + $scope.LoadAODJsonData = function (windowviewid) { | |
206 | + | |
207 | + var promise = DataService.getJson('~/../content/data/json/aod/aod_courselist.json') | |
208 | + promise.then( | |
209 | + function (result) { | |
210 | + | |
211 | + var AODAnimationData = new jinqJs() | |
212 | + .from(result.root.AODData) | |
213 | + .orderBy([{ field: '_BodySystem', sort: 'asc' }]) | |
214 | + .select(); | |
215 | + | |
216 | + $scope.SetAODwindowStoreData(windowviewid, 'AODAnimationData', AODAnimationData); | |
217 | + | |
218 | + }, | |
219 | + function (error) { | |
220 | + $scope.EnableUI(); | |
221 | + | |
222 | + } | |
223 | + ); | |
224 | + | |
225 | + | |
226 | + }; | |
227 | + | |
228 | + $scope.loadAODList = function (windowviewid) { | |
229 | + | |
230 | + var selectedAODListViewData = $scope.GetAODwindowStoreData(windowviewid, 'AODAnimationData'); | |
231 | + | |
232 | + $('#grid-view').empty(); | |
233 | + | |
234 | + angular.forEach(selectedAODListViewData, function (value, key) { | |
235 | + var imagePath = "~/../content/images/aod/thumbnails/" + value._ThumbnailImage; | |
236 | + | |
237 | + | |
238 | + var $el = $('<div id="' + value._ImageId + '" class="col-sm-3 col-lg-2" title = "'+ value._Title + '" data-ng-click="openView($event)">' | |
239 | + + '<div class="thumbnail" ><a href="#">' | |
240 | + + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + imagePath + '" alt="" title="" >' | |
241 | + + '<div class="caption" style="padding:0px;height:80px"><p style="height:15px"><em>'+'ID: '+ value._ImageId + '</em></p><p style="font-weight:bold;white-space:pre-wrap">' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
242 | + | |
243 | + $compile($el)($scope); | |
244 | + | |
245 | + $(".sidebar").mCustomScrollbar({ | |
246 | + autoHideScrollbar: true, | |
247 | + //theme:"rounded" | |
248 | + }); | |
249 | + | |
250 | + }); | |
251 | + | |
252 | + $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); | |
253 | + $timeout(function () { | |
254 | + if ($rootScope.getLocalStorageValue('AODGridViewScroll') !== null && $location.url() == "/ADAM-on-demand") { | |
255 | + | |
256 | + $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AODGridViewScroll') }, 'slow'); | |
37 | 257 | } |
38 | - $rootScope.currentActiveModuleTitle = selectedModuleName; | |
39 | - }) | |
258 | + }, | |
259 | + 200); | |
260 | + | |
261 | + | |
262 | + $timeout(function () { | |
263 | + $scope.EnableUI(); | |
264 | + $scope.ResetGridListLength(); | |
265 | + }, 400); | |
40 | 266 | |
41 | - $scope.showTabButton = true; | |
42 | - $scope.IsVisible = function () { | |
43 | - $scope.scroll(); | |
267 | + } | |
268 | + $scope.ResetGridListLength=function() | |
269 | + { | |
270 | + var $ua = navigator.userAgent; | |
271 | + | |
272 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
44 | 273 | |
274 | + if(screen.height<=768) | |
275 | + { | |
276 | + $('#grid-view').css({"height":"660","overflow":"scroll"}); | |
277 | + } | |
278 | + else if(screen.height<=1024) | |
279 | + { | |
280 | + $('#grid-view').css({"height":"910","overflow":"scroll"}); | |
281 | + } | |
282 | + else | |
283 | + { | |
284 | + $('#grid-view').css({"height":"1250","overflow":"scroll"}); | |
285 | + } | |
45 | 286 | } |
287 | + else | |
288 | + { | |
289 | + $('#grid-view').css({"height":"830","overflow":"scroll"}); | |
290 | + } | |
291 | + } | |
46 | 292 | |
47 | - // $rootScope.currentActiveModuleTitle = pages[10].name; | |
293 | + $scope.openView = function ($event) { | |
294 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
48 | 295 | |
49 | - //set the local storage | |
296 | + $rootScope.MenuModuleName = "AOD"; | |
297 | + $rootScope.currentBodyViewId = $event.currentTarget.id; | |
298 | + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | |
299 | + var selectedAODListViewData = $scope.GetAODwindowStoreData(windowviewid, 'AODAnimationData'); | |
300 | + var selectedTileData = []; | |
301 | + selectedTileData = new jinqJs() | |
302 | + .from(selectedAODListViewData) | |
303 | + .where('_ImageId = ' + $event.currentTarget.id) | |
304 | + .select(); | |
50 | 305 | |
51 | - var curtab = $rootScope.getLocalStorageValue("currentAODTabView"); | |
52 | - if (curtab == 2) { | |
53 | - $scope.setActiveTab(2); | |
306 | + $rootScope.ViewTitle = selectedTileData[0]._Title; | |
54 | 307 | } |
55 | 308 | else { |
56 | - $scope.setActiveTab(1); | |
309 | + $rootScope.ViewTitle = $event.currentTarget.textContent; | |
57 | 310 | } |
58 | 311 | |
59 | - }); | |
312 | + localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); | |
313 | + localStorage.setItem("currentBodyViewId", $event.currentTarget.id); | |
314 | + | |
315 | + $scope.SetAODwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); | |
316 | + $scope.SetAODwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); | |
60 | 317 | |
61 | -}] | |
318 | + var promise = DataService.getJson('~/../content/data/json/aod/aod_courselist_video.json') | |
319 | + promise.then( | |
320 | + function (result) { | |
321 | + // $scope.AnimationData = result; | |
322 | + $scope.AODlistViewData = result.root.AODData; | |
323 | + var id = $scope.GetAODwindowStoreData(windowviewid, 'imageId'); | |
324 | + var clickedAODVideoData = []; | |
325 | + clickedAODVideoData = new jinqJs() | |
326 | + .from($scope.AODlistViewData) | |
327 | + .where('_CourseId == ' + id) | |
328 | + .select(); | |
329 | + | |
330 | + $scope.SetAODwindowStoreData(windowviewid, 'aodUrl', clickedAODVideoData[0]._VideoUrl); | |
331 | + $scope.SetAODwindowStoreData(windowviewid, 'courseId', clickedAODVideoData[0]._CourseId); | |
332 | + | |
333 | + var AODGridViewScrollPosition = $($window).scrollTop(); | |
334 | + localStorage.setItem('AODGridViewScroll', AODGridViewScrollPosition); | |
335 | + $location.url('/AOD-view-detail'); | |
336 | + | |
337 | + }, | |
338 | + function (error) { | |
339 | + | |
340 | + } | |
341 | + | |
342 | + ); | |
343 | + | |
344 | + | |
345 | + } | |
346 | + | |
347 | + | |
348 | + $scope.openAODBodyViewMain = function () { | |
349 | + $scope.SetAODwindowStoreData($rootScope.MULTI_VIEW_ID, 'parentSlugName', 'ADAM-on-demand'); | |
350 | + $scope.loadAdamVideo($rootScope.MULTI_VIEW_ID); | |
351 | + | |
352 | + } | |
353 | + | |
354 | + $scope.loadAdamVideo = function (windowviewid) { | |
355 | + $scope.DisableUI(); | |
356 | + $scope.jsPanelID = 'aodImagePanel' + '_' + windowviewid; | |
357 | + var tittle = $scope.GetAODwindowStoreData(windowviewid, 'currentViewTitle'); | |
358 | + | |
359 | + var aodlink = $rootScope.aodDomainName+ $scope.GetAODwindowStoreData(windowviewid, 'aodUrl'); | |
360 | + var courseid = $scope.GetAODwindowStoreData(windowviewid, 'courseId'); | |
361 | + var uid = $scope.GetAODwindowStoreData(windowviewid, 'uid'); | |
362 | + var requestType = $scope.GetAODwindowStoreData(windowviewid, 'requestType'); | |
363 | + var aodSiteUrl = aodlink+"?SessionId=" + $rootScope.userData.SessionId + "&Courseid=" + courseid + "&type="+requestType +"&uID=" + uid+ ",_self"; | |
364 | + | |
365 | + $scope.jsPanelWidth = $(window).outerWidth() - 20; | |
366 | + $scope.jsPanelHeight = $(window).outerHeight() - 140; | |
367 | + $scope.jsPanelLeft = 1; | |
368 | + $scope.jsPanelTop = 70; | |
369 | + | |
370 | + if (aodlink.length > 0 ) { | |
371 | + $scope.jsPanelVideo = $.jsPanel({ | |
372 | + id: $scope.jsPanelID, | |
373 | + selector: '.aodView', | |
374 | + theme: 'success', | |
375 | + currentController: 'AODController', | |
376 | + parentSlug: $scope.GetAODwindowStoreData(windowviewid, 'parentSlugName'), | |
377 | + content: '<div style="height: 100%;overflow: scroll;" >' + | |
378 | + '<iframe name="aodFrame" src="" style="width: 100%;height:100%" id="aodvideo_' + windowviewid + '" onload="MyAODvideoOnLoad(event)"></iframe>'+ | |
379 | + '</div><script>$(document).ready(function(){var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {var threeDivWidth = $("#AODView").css("width");$("#AODView").css({"left":"0px","width":"100%","min-idth": threeDivWidth}); var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth}); $("#aodImagePanel_' + windowviewid + '").css("width", "100%"); }});</script>', | |
380 | + title: tittle, | |
381 | + position: { | |
382 | + top: $scope.jsPanelTop, | |
383 | + left: $scope.jsPanelLeft | |
384 | + }, | |
385 | + | |
386 | + size: { | |
387 | + width: $scope.jsPanelWidth, | |
388 | + height: $scope.jsPanelHeight | |
389 | + }, | |
390 | + controls: { buttons: 'closeonly' }, | |
391 | + resizable: { | |
392 | + start:function(event, ui) | |
393 | + { | |
394 | + var len = (event.currentTarget.id).split("_").length; | |
395 | + var windowviewid = (event.currentTarget.id).split("_")[len - 1]; | |
396 | + $('#aodvideo_'+windowviewid).css("display",'block'); | |
397 | + | |
398 | + } | |
399 | + }, | |
400 | + | |
401 | + }); | |
402 | + | |
403 | + | |
404 | + $scope.jsPanelVideo.maximize(); | |
405 | + $scope.SetAODwindowStoreData(windowviewid, 'currentSlug', 'AOD-view-detail'); | |
406 | + $('html, body').animate({ scrollTop: 0 }); | |
407 | + | |
408 | + $('#aodvideo_' + windowviewid).attr('src', aodSiteUrl); | |
409 | + } | |
410 | + $('#AODView').css("height", $(window).outerHeight() - 20); | |
411 | + | |
412 | + $('#AODView').css("width", $(window).outerWidth() - 30); | |
413 | + | |
414 | + //Calling methode for save Js Panel Activity for SaveCB | |
415 | + $scope.PanelActivity(); | |
416 | + | |
417 | + } | |
418 | + | |
419 | + $scope.MyAODvideoOnLoad = function (windowviewid) | |
420 | + { | |
421 | + $scope.EnableUI(); | |
422 | + $scope.JsPanelMouseEnter(windowviewid); | |
423 | + } | |
424 | + | |
425 | + $scope.JsPanelMouseEnter = function (windowviewid) { | |
426 | + $rootScope.resetMenuOption(); | |
427 | + | |
428 | + var timeintval = null; | |
429 | + timeintval = $interval(PointerEventEnableDisable, 5000); | |
430 | + | |
431 | + function PointerEventEnableDisable() { | |
432 | + var pointevents = $("#aodvideo_" + windowviewid).css('pointer-events'); | |
433 | + if (pointevents=='auto') { | |
434 | + $scope.stop3drefresh(timeintval); | |
435 | + timeintval = $interval(PointerEventEnableDisable, 500); | |
436 | + $("#aodvideo_" + windowviewid).css('pointer-events', 'none'); | |
437 | + } | |
438 | + else if(pointevents=='none') | |
439 | + { | |
440 | + $("#aodvideo_" + windowviewid).css('pointer-events', 'auto'); | |
441 | + $scope.stop3drefresh(timeintval); | |
442 | + timeintval = $interval(PointerEventEnableDisable, 10000); | |
443 | + } | |
444 | + else | |
445 | + { | |
446 | + //auto clode interval when panel close | |
447 | + $scope.stop3drefresh(timeintval); | |
448 | + } | |
449 | + } | |
450 | + | |
451 | + $scope.stop3drefresh = function (timeintval) { | |
452 | + if (angular.isDefined(timeintval)) { | |
453 | + $interval.cancel(timeintval); | |
454 | + timeintval = undefined; | |
455 | + } | |
456 | + }; | |
457 | + } | |
62 | 458 | |
459 | + }]); | |
63 | 460 | |
461 | + function MyAODvideoOnLoad(event) { | |
64 | 462 | |
65 | -); | |
66 | 463 | \ No newline at end of file |
464 | + console.log('video loaded') | |
465 | + var scope = angular.element(document.getElementById("AODView")).scope(); | |
466 | + var windowviewid = (event.target.id).split("_")[1]; | |
467 | + | |
468 | + setTimeout(function() | |
469 | + { | |
470 | + scope.$apply(function () { | |
471 | + scope.MyAODvideoOnLoad(windowviewid); | |
472 | + }); | |
473 | + }, 500); | |
474 | + | |
475 | + } | |
67 | 476 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -31,20 +31,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
31 | 31 | $rootScope.shapeType; |
32 | 32 | $rootScope.canvasLayerNameCollection=[]; |
33 | 33 | $rootScope.islaxicanlanguageChange=false; |
34 | - $rootScope.globalSetting = { | |
35 | - ethnicity: 'W', | |
36 | - modesty: 'Y', | |
37 | - }; | |
38 | - $rootScope.formsetting = { | |
39 | - ethnicity: null, | |
40 | - modesty: null | |
41 | - }; | |
42 | - $rootScope.lexicons = { | |
43 | - primaryid:1, | |
44 | - secondryids:[] | |
45 | - }; | |
46 | - | |
47 | - | |
34 | + | |
48 | 35 | // on refersh this variable will also get null that is why we are only checking this variable on initialize that if it is null that means page gets refershed. |
49 | 36 | $rootScope.refreshcheck = null; |
50 | 37 | var isCommingSoonModel = true; |
... | ... | @@ -380,7 +367,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
380 | 367 | '#Link\\/symptom-navigator{pointer-events: none; opacity: .3} ' + |
381 | 368 | '#Link\\/health-navigator{pointer-events: none; opacity: .3} ' + |
382 | 369 | '#Link\\/wellness-tools{pointer-events: none; opacity: .3} ' + |
383 | - '#Link\\/aod{pointer-events: none; opacity: .3} ' + | |
370 | + '#ADAM-on-demand{pointer-events: none; opacity: .3} ' + | |
384 | 371 | |
385 | 372 | |
386 | 373 | '</style>'; |
... | ... | @@ -727,6 +714,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
727 | 714 | $rootScope.aiaPingInterval = configresult.pingInterval; |
728 | 715 | $rootScope.aiaAnimationPath = configresult.serverPath; |
729 | 716 | $rootScope.MaxOneFileSize = configresult.fileSize; |
717 | + $rootScope.aodDomainName = configresult.aodSiteUrl; | |
718 | + | |
730 | 719 | var loggedInUser = JSON.parse($scope.currentUserDetails); |
731 | 720 | //incase site user login userid is 0 so then using license id |
732 | 721 | //logout site user while reload url without parameter |
... | ... | @@ -734,7 +723,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
734 | 723 | $scope.checkuserstatus = { |
735 | 724 | userId: userId, |
736 | 725 | tagName: loggedInUser.Id==0?'logout':'update', |
737 | - SessionId:loggedInUser.SessionId | |
726 | + SessionId:loggedInUser.SessionId, | |
727 | + isSiteUser:loggedInUser.isSiteUser | |
738 | 728 | } |
739 | 729 | |
740 | 730 | // this case found when browser closed by user after login. after long time (after 20 min) open site again |
... | ... | @@ -958,6 +948,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
958 | 948 | $rootScope.aiaPingInterval = configresult.pingInterval; |
959 | 949 | $rootScope.aiaAnimationPath = configresult.serverPath; |
960 | 950 | $rootScope.MaxOneFileSize = configresult.fileSize; |
951 | + $rootScope.aodDomainName = configresult.aodSiteUrl; | |
961 | 952 | |
962 | 953 | }); |
963 | 954 | } |
... | ... | @@ -1482,6 +1473,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1482 | 1473 | $rootScope.aiaPingInterval = configresult.pingInterval; |
1483 | 1474 | $rootScope.aiaAnimationPath = configresult.serverPath; |
1484 | 1475 | $rootScope.MaxOneFileSize = configresult.fileSize; |
1476 | + $rootScope.aodDomainName = configresult.aodSiteUrl; | |
1485 | 1477 | |
1486 | 1478 | userInfo.username = result.LoginId; |
1487 | 1479 | userInfo.password = result.Password; |
... | ... | @@ -1536,6 +1528,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1536 | 1528 | $rootScope.aiaPingInterval = configresult.pingInterval; |
1537 | 1529 | $rootScope.aiaAnimationPath = configresult.serverPath; |
1538 | 1530 | $rootScope.MaxOneFileSize = configresult.fileSize; |
1531 | + $rootScope.aodDomainName = configresult.aodSiteUrl; | |
1539 | 1532 | |
1540 | 1533 | var loggedInUser = JSON.parse($scope.currentUserDetails); |
1541 | 1534 | //check already login by account number bcz no login id for site login |
... | ... | @@ -1624,45 +1617,90 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1624 | 1617 | if (typeof result.FirstName != undefined || result.FirstName != "" || result.FirstName != null) { |
1625 | 1618 | //code for modesty setting |
1626 | 1619 | if (result.LicenseInfo != null) { |
1627 | - if (result.Modesty) { | |
1628 | - $rootScope.isModestyOn = true; | |
1629 | - $rootScope.isModestyOff = false; | |
1630 | - localStorage.setItem("globalModesty", "Y"); | |
1631 | - $rootScope.formsetting = { | |
1632 | - ethnicity: "W", | |
1633 | - modesty: "Y" | |
1620 | + if (result.userselectedModesty == undefined || result.userselectedModesty == null || | |
1621 | + result.userSelectedSkintone == undefined || result.userSelectedSkintone == null) { | |
1622 | + if (result.Modesty) { | |
1623 | + $rootScope.isModestyOn = true; | |
1624 | + $rootScope.isModestyOff = false; | |
1625 | + localStorage.setItem("globalModesty", "Y"); | |
1626 | + $rootScope.formsetting = { | |
1627 | + ethnicity: "W", | |
1628 | + modesty: "Y" | |
1629 | + } | |
1630 | + | |
1631 | + $rootScope.UpdateSetting($rootScope.formsetting) | |
1632 | + } | |
1633 | + else { | |
1634 | + $rootScope.isModestyOn = false; | |
1635 | + $rootScope.isModestyOff = true; | |
1636 | + localStorage.setItem("globalModesty", "N"); | |
1637 | + $rootScope.formsetting = { | |
1638 | + ethnicity: "W", | |
1639 | + modesty: "N" | |
1640 | + } | |
1641 | + | |
1642 | + $rootScope.UpdateSetting($rootScope.formsetting) | |
1634 | 1643 | } |
1635 | - $rootScope.UpdateSetting($rootScope.formsetting) | |
1636 | 1644 | } |
1637 | - else { | |
1638 | - $rootScope.isModestyOn = false; | |
1639 | - $rootScope.isModestyOff = true; | |
1640 | - localStorage.setItem("globalModesty", "N"); | |
1645 | + else | |
1646 | + { | |
1647 | + localStorage.setItem("globalModesty", result.userselectedModesty); | |
1648 | + localStorage.setItem("globalEthnicity", result.userSelectedSkintone); | |
1649 | + | |
1641 | 1650 | $rootScope.formsetting = { |
1642 | - ethnicity: "W", | |
1643 | - modesty: "N" | |
1651 | + ethnicity: result.userSelectedSkintone, | |
1652 | + modesty: result.userselectedModesty | |
1644 | 1653 | } |
1645 | - $rootScope.UpdateSetting($rootScope.formsetting) | |
1654 | + | |
1655 | + $rootScope.UpdateSetting($rootScope.formsetting); | |
1656 | + | |
1646 | 1657 | } |
1658 | + | |
1659 | + $rootScope.lexicons = { | |
1660 | + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1", | |
1661 | + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:"" | |
1662 | + }; | |
1663 | + | |
1664 | + $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids) | |
1665 | + | |
1647 | 1666 | } |
1648 | - else { | |
1649 | - $rootScope.isModestyOn = true; | |
1650 | - $rootScope.isModestyOff = false; | |
1651 | - localStorage.setItem("globalModesty", "Y"); | |
1652 | - $rootScope.formsetting = { | |
1653 | - ethnicity: "W", | |
1654 | - modesty: "Y" | |
1667 | + else | |
1668 | + { | |
1669 | + if (result.userselectedModesty == undefined || result.userselectedModesty == null || | |
1670 | + result.userSelectedSkintone == undefined || result.userSelectedSkintone == null) { | |
1671 | + | |
1672 | + $rootScope.isModestyOn = true; | |
1673 | + $rootScope.isModestyOff = false; | |
1674 | + localStorage.setItem("globalModesty", "Y"); | |
1675 | + $rootScope.formsetting = { | |
1676 | + ethnicity: "W", | |
1677 | + modesty: "Y" | |
1678 | + } | |
1679 | + $rootScope.UpdateSetting($rootScope.formsetting); | |
1680 | + } | |
1681 | + else | |
1682 | + { | |
1683 | + localStorage.setItem("globalModesty", result.userselectedModesty); | |
1684 | + localStorage.setItem("globalEthnicity", result.userSelectedSkintone); | |
1685 | + | |
1686 | + $rootScope.formsetting = { | |
1687 | + ethnicity: result.userSelectedSkintone, | |
1688 | + modesty: result.userselectedModesty | |
1689 | + } | |
1690 | + $rootScope.UpdateSetting($rootScope.formsetting) | |
1691 | + | |
1655 | 1692 | } |
1656 | - $rootScope.UpdateSetting($rootScope.formsetting) | |
1693 | + | |
1694 | + $rootScope.lexicons = { | |
1695 | + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1", | |
1696 | + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:"" | |
1697 | + }; | |
1698 | + | |
1699 | + $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids) | |
1700 | + | |
1657 | 1701 | } |
1658 | 1702 | |
1659 | - //for site user set default lexicon | |
1660 | - $rootScope.lexicons = { | |
1661 | - primaryid:"1", | |
1662 | - secondryids:"" | |
1663 | - }; | |
1664 | 1703 | |
1665 | - $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids) | |
1666 | 1704 | //code for modesty setting |
1667 | 1705 | $rootScope.aiaModesty = $rootScope.formsetting.modesty; |
1668 | 1706 | |
... | ... | @@ -1683,7 +1721,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1683 | 1721 | |
1684 | 1722 | $rootScope.userData = result; |
1685 | 1723 | $rootScope.userModules = result.Modules; |
1686 | - | |
1724 | + | |
1687 | 1725 | localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); |
1688 | 1726 | |
1689 | 1727 | if (isCommingSoonModel == true) { |
... | ... | @@ -1732,9 +1770,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1732 | 1770 | } |
1733 | 1771 | |
1734 | 1772 | |
1735 | - $rootScope.userData = result; | |
1736 | - $rootScope.userModules = result.Modules; | |
1737 | - | |
1773 | + $rootScope.userData = result; | |
1774 | + $rootScope.userModules = result.Modules; | |
1775 | + | |
1738 | 1776 | //1. set haveRoleAdmin = false because LicenseInfo is not null |
1739 | 1777 | $rootScope.haveRoleAdmin = false; |
1740 | 1778 | |
... | ... | @@ -1855,6 +1893,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1855 | 1893 | $rootScope.isVisibleLogin = false; |
1856 | 1894 | $rootScope.userData = userInfo; |
1857 | 1895 | $rootScope.userModules = userInfo.Modules; |
1896 | + | |
1858 | 1897 | // ShowAssignedModulesPopup(userInfo.Modules);; |
1859 | 1898 | // for reseller type user first need to update profile |
1860 | 1899 | if (userInfo.UserTypeId == 7 && (userInfo.FirstName == "" || userInfo.EmailId == "" || userInfo.LastName == "")) { |
... | ... | @@ -1916,7 +1955,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1916 | 1955 | $rootScope.userStatus = { |
1917 | 1956 | userId: null, |
1918 | 1957 | tagName: null, |
1919 | - SessionId:null | |
1958 | + SessionId:null, | |
1959 | + isSiteUser:false | |
1920 | 1960 | } |
1921 | 1961 | console.log('user session start'); |
1922 | 1962 | $rootScope.CheckUserSession('insert'); |
... | ... | @@ -1992,6 +2032,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1992 | 2032 | $rootScope.userStatus.userId=$rootScope.userData.Id==0?$rootScope.userData.LicenseId:$rootScope.userData.Id; |
1993 | 2033 | $rootScope.userStatus.tagName=tagName; |
1994 | 2034 | $rootScope.userStatus.SessionId=$rootScope.userData.SessionId; |
2035 | + $rootScope.userStatus.isSiteUser=$rootScope.userData.isSiteUser; | |
1995 | 2036 | |
1996 | 2037 | AuthenticationService.ManageUserLoginStatus($rootScope.userStatus) |
1997 | 2038 | .then( |
... | ... | @@ -8092,6 +8133,20 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8092 | 8133 | |
8093 | 8134 | $rootScope.loadsettings = function () { |
8094 | 8135 | |
8136 | + //applcation reload blank these value after assign | |
8137 | + $rootScope.globalSetting = { | |
8138 | + ethnicity: 'W', | |
8139 | + modesty: 'Y', | |
8140 | + }; | |
8141 | + $rootScope.formsetting = { | |
8142 | + ethnicity: null, | |
8143 | + modesty: null | |
8144 | + }; | |
8145 | + $rootScope.lexicons = { | |
8146 | + primaryid:1, | |
8147 | + secondryids:[] | |
8148 | + }; | |
8149 | + | |
8095 | 8150 | //1. For now we are by default opening DA settings tab |
8096 | 8151 | $rootScope.SettingsTab = 3; |
8097 | 8152 | |
... | ... | @@ -8214,7 +8269,23 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8214 | 8269 | var setting={}; |
8215 | 8270 | setting.modesty =Formatsetting.modesty ; |
8216 | 8271 | setting.skintone = Formatsetting.ethnicity; |
8217 | - setting.userId = $rootScope.userData.Id; | |
8272 | + | |
8273 | + // var isallowToChange=false; | |
8274 | + if($rootScope.userData.isSiteUser) | |
8275 | + { | |
8276 | + // send as user id | |
8277 | + setting.userId = $rootScope.userData.siteId; | |
8278 | + //isallowToChange=$rootScope.userData.EditionId<3; | |
8279 | + } | |
8280 | + else | |
8281 | + { | |
8282 | + setting.userId = $rootScope.userData.Id; | |
8283 | + //concurrent license | |
8284 | + // only instructor | |
8285 | + //if($rootScope.userData.LicenseId!=0) | |
8286 | + // isallowToChange=$rootScope.userData.EditionId<3; | |
8287 | + | |
8288 | + } | |
8218 | 8289 | |
8219 | 8290 | var secondLan=[] |
8220 | 8291 | |
... | ... | @@ -8225,54 +8296,57 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8225 | 8296 | |
8226 | 8297 | setting.primaryid = $('#primarylaxican').attr("name"); |
8227 | 8298 | setting.secondryids = secondLan.join(","); |
8228 | - | |
8229 | - if($rootScope.userData.Id!=0) | |
8230 | - { | |
8299 | + | |
8300 | + setting.isSiteUser=$rootScope.userData.isSiteUser; | |
8301 | + setting.LicenseEditionId=$rootScope.userData.LicenseEditionId; | |
8302 | + | |
8303 | + // if(isallowToChange ||$rootScope.userData.LicenseId==0) | |
8304 | + // { | |
8231 | 8305 | AuthenticationService.saveSetings(setting) |
8232 | - .then( | |
8233 | - function (result) { | |
8234 | - if(result==1) | |
8235 | - { | |
8306 | + .then( | |
8307 | + function (result) { | |
8308 | + if(result==1) | |
8309 | + { | |
8236 | 8310 | $timeout(function () { |
8237 | - $('#setting-spinner').css('visibility', 'hidden'); | |
8238 | - $('#modal-settings').css("display", "none"); | |
8239 | - $('#modelsettingsbackground').css('z-index', '12000000'); | |
8240 | - $("#modelsettingsbackground").css("display", "none"); | |
8241 | - $rootScope.UpdateSetting(Formatsetting); | |
8242 | - | |
8311 | + $('#setting-spinner').css('visibility', 'hidden'); | |
8312 | + $('#modal-settings').css("display", "none"); | |
8313 | + $('#modelsettingsbackground').css('z-index', '12000000'); | |
8314 | + $("#modelsettingsbackground").css("display", "none"); | |
8315 | + $rootScope.UpdateSetting(Formatsetting); | |
8316 | + | |
8243 | 8317 | }, 500); |
8244 | 8318 | |
8245 | - } | |
8246 | - else | |
8247 | - { | |
8248 | - $rootScope.errorMessage =AIAConstants.SETTING_SAVE_ERROR; | |
8249 | - $("#messageModal").modal('show'); | |
8250 | - } | |
8251 | - | |
8252 | - }), | |
8319 | + } | |
8320 | + else | |
8321 | + { | |
8322 | + $rootScope.errorMessage =AIAConstants.SETTING_SAVE_ERROR; | |
8323 | + $("#messageModal").modal('show'); | |
8324 | + } | |
8325 | + | |
8326 | + }), | |
8253 | 8327 | function (error) { |
8254 | 8328 | console.log(' Error in Saving settings = ' + error.statusText); |
8255 | 8329 | $rootScope.isVisibleLogin = true; |
8256 | 8330 | $('#setting-spinner').css('visibility', 'hidden'); |
8257 | 8331 | $('#modal-settings').css("display", "none"); |
8258 | - $('#modelsettingsbackground').css('zIndex', '12000000'); | |
8332 | + $('#modelsettingsbackground').css('z-index', '12000000'); | |
8259 | 8333 | $("#modelsettingsbackground").css("display", "none"); |
8260 | 8334 | $rootScope.errorMessage = error; |
8261 | 8335 | $("#messageModal").modal('show'); |
8262 | 8336 | } |
8263 | - | |
8264 | - } | |
8265 | - else | |
8266 | - { | |
8267 | - // for site user. no user id for site license | |
8268 | - $('#setting-spinner').css('visibility', 'hidden'); | |
8269 | - $('#modal-settings').css("display", "none"); | |
8270 | - $('#modelsettingsbackground').css('zIndex', '12000000'); | |
8271 | - $("#modelsettingsbackground").css("display", "none"); | |
8272 | - $rootScope.UpdateSetting(setting); | |
8273 | - | |
8274 | - } | |
8275 | - | |
8337 | + // } | |
8338 | + // else | |
8339 | + // { | |
8340 | + // $timeout(function () { | |
8341 | + // $('#setting-spinner').css('visibility', 'hidden'); | |
8342 | + // $('#modal-settings').css("display", "none"); | |
8343 | + // $('#modelsettingsbackground').css('z-index', '12000000'); | |
8344 | + // $("#modelsettingsbackground").css("display", "none"); | |
8345 | + // $rootScope.UpdateSetting(Formatsetting); | |
8346 | + | |
8347 | + // }, 500); | |
8348 | + | |
8349 | + // } | |
8276 | 8350 | |
8277 | 8351 | }; |
8278 | 8352 | |
... | ... | @@ -9025,7 +9099,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
9025 | 9099 | $("#profileUpdateModal").modal('hide'); |
9026 | 9100 | $timeout(function () { |
9027 | 9101 | $rootScope.isRedirectToAdmin=true; |
9028 | - window.location.href = "Admin"; | |
9102 | + window.location.href = "/Admin"; | |
9029 | 9103 | }, 300) |
9030 | 9104 | |
9031 | 9105 | }; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... | ... | @@ -146,11 +146,11 @@ AIA.constant('pages', [ |
146 | 146 | pageController: 'LinkController' |
147 | 147 | |
148 | 148 | }, |
149 | - { | |
150 | - name: 'A.D.A.M OnDemand', | |
151 | - pageSlug: 'Link/aod', | |
152 | - pageUrl: 'app/views/Link/Link-view.html', | |
153 | - pageController: 'LinkController' | |
149 | + { | |
150 | + name: 'A.D.A.M OnDemand', | |
151 | + pageSlug: 'AOD-view-detail', | |
152 | + pageUrl: 'app/views/AOD/AOD-view-detail.html', | |
153 | + pageController: 'AODController' | |
154 | 154 | |
155 | 155 | }, |
156 | 156 | { //id:18, | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view-detail.html
0 โ 100644
400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html
1 | 1 | ๏ปฟ<div class="bodyWrap row "> |
2 | 2 | <div ng-include="'app/widget/MainMenu.html'" /> |
3 | - <div class="main"> | |
4 | - | |
5 | - | |
6 | - <div class="row tab-content" style="padding-left:25px; width:99%"> | |
7 | - <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view"> | |
8 | - <div class="col-sm-3 col-lg-2"> | |
9 | - <div class="thumbnail"> | |
10 | - <a href="clinical-animations-details.html"> | |
11 | - <img src="~/../content/images/aod-1.jpg" alt="" title=""> | |
12 | - <div class="caption"> | |
13 | - <p>Cardiovascular System - Anatomy</p> | |
14 | - </div> | |
15 | - </a> | |
16 | - </div> | |
17 | - </div> | |
18 | - <div class="col-sm-3 col-lg-2"> | |
19 | - <div class="thumbnail"> | |
20 | - <a href="clinical-animations-details.html"> | |
21 | - <img src="~/../content/images/aod-2.jpg" alt="" title=""> | |
22 | - <div class="caption"> | |
23 | - <p>Cardiovascular System - Physiology</p> | |
24 | - </div> | |
25 | - </a> | |
26 | - </div> | |
27 | - </div> | |
28 | - <div class="col-sm-3 col-lg-2"> | |
29 | - <div class="thumbnail"> | |
30 | - <a href="clinical-animations-details.html"> | |
31 | - <img src="~/../content/images/aod-3.jpg" alt="" title=""> | |
32 | - <div class="caption"> | |
33 | - <p>Digestive System - Anatomy</p> | |
34 | - </div> | |
35 | - </a> | |
36 | - </div> | |
37 | - </div> | |
38 | - <div class="col-sm-3 col-lg-2"> | |
39 | - <div class="thumbnail"> | |
40 | - <a href="clinical-animations-details.html"> | |
41 | - <img src="~/../content/images/aod-4.jpg" alt="" title=""> | |
42 | - <div class="caption"> | |
43 | - <p>Digestive System - Physiology</p> | |
44 | - </div> | |
45 | - </a> | |
46 | - </div> | |
47 | - </div> | |
48 | - <div class="col-sm-3 col-lg-2"> | |
49 | - <div class="thumbnail"> | |
50 | - <a href="clinical-animations-details.html"> | |
51 | - <img src="~/../content/images/aod-5.jpg" alt="" title=""> | |
52 | - <div class="caption"> | |
53 | - <p>Endocrine System - Anatomy</p> | |
54 | - </div> | |
55 | - </a> | |
56 | - </div> | |
57 | - </div> | |
58 | - <div class="col-sm-3 col-lg-2"> | |
59 | - <div class="thumbnail"> | |
60 | - <a href="clinical-animations-details.html"> | |
61 | - <img src="~/../content/images/aod-6.jpg" alt="" title=""> | |
62 | - <div class="caption"> | |
63 | - <p>Endocrine System - Physiology</p> | |
64 | - </div> | |
65 | - </a> | |
66 | - </div> | |
67 | - </div> | |
68 | - <div class="col-sm-3 col-lg-2"> | |
69 | - <div class="thumbnail"> | |
70 | - <a href="clinical-animations-details.html"> | |
71 | - <img src="~/../content/images/aod-7.jpg" alt="" title=""> | |
72 | - <div class="caption"> | |
73 | - <p>Immune System - Anatomy</p> | |
74 | - </div> | |
75 | - </a> | |
76 | - </div> | |
77 | - </div> | |
78 | - <div class="col-sm-3 col-lg-2"> | |
79 | - <div class="thumbnail"> | |
80 | - <a href="clinical-animations-details.html"> | |
81 | - <img src="~/../content/images/aod-8.jpg" alt="" title=""> | |
82 | - <div class="caption"> | |
83 | - <p>Immune System - Physiology</p> | |
84 | - </div> | |
85 | - </a> | |
86 | - </div> | |
87 | - </div> | |
88 | - <div class="col-sm-3 col-lg-2"> | |
89 | - <div class="thumbnail"> | |
90 | - <a href="clinical-animations-details.html"> | |
91 | - <img src="~/../content/images/aod-9.jpg" alt="" title=""> | |
92 | - <div class="caption"> | |
93 | - <p>Musculoskeletal System - Anatomy</p> | |
94 | - </div> | |
95 | - </a> | |
96 | - </div> | |
97 | - </div> | |
98 | - <div class="col-sm-3 col-lg-2"> | |
99 | - <div class="thumbnail"> | |
100 | - <a href="clinical-animations-details.html"> | |
101 | - <img src="~/../content/images/aod-10.jpg" alt="" title=""> | |
102 | - <div class="caption"> | |
103 | - <p>Musculoskeletal System - Physiology</p> | |
104 | - </div> | |
105 | - </a> | |
106 | - </div> | |
107 | - </div> | |
108 | - <div class="col-sm-3 col-lg-2"> | |
109 | - <div class="thumbnail"> | |
110 | - <a href="clinical-animations-details.html"> | |
111 | - <img src="~/../content/images/aod-11.jpg" alt="" title=""> | |
112 | - <div class="caption"> | |
113 | - <p>Nervous System - Anatomy</p> | |
114 | - </div> | |
115 | - </a> | |
116 | - </div> | |
117 | - </div> | |
118 | - <div class="col-sm-3 col-lg-2"> | |
119 | - <div class="thumbnail"> | |
120 | - <a href="clinical-animations-details.html"> | |
121 | - <img src="~/../content/images/aod-12.jpg" alt="" title=""> | |
122 | - <div class="caption"> | |
123 | - <p>Nervous System - Physiology</p> | |
124 | - </div> | |
125 | - </a> | |
126 | - </div> | |
127 | - </div> | |
128 | - | |
129 | - <div class="col-sm-3 col-lg-2"> | |
130 | - <div class="thumbnail"> | |
131 | - <a href="clinical-animations-details.html"> | |
132 | - <img src="~/../content/images/aod-13.jpg" alt="" title=""> | |
133 | - <div class="caption"> | |
134 | - <p>Respiratory System - Anatomy</p> | |
135 | - </div> | |
136 | - </a> | |
137 | - </div> | |
138 | - </div> | |
139 | - <div class="col-sm-3 col-lg-2"> | |
140 | - <div class="thumbnail"> | |
141 | - <a href="clinical-animations-details.html"> | |
142 | - <img src="~/../content/images/aod-14.jpg" alt="" title=""> | |
143 | - <div class="caption"> | |
144 | - <p>Respiratory System - Physiology</p> | |
145 | - </div> | |
146 | - </a> | |
147 | - </div> | |
148 | - </div> | |
149 | - <div class="col-sm-3 col-lg-2"> | |
150 | - <div class="thumbnail"> | |
151 | - <a href="clinical-animations-details.html"> | |
152 | - <img src="~/../content/images/aod-15.jpg" alt="" title=""> | |
153 | - <div class="caption"> | |
154 | - <p>Skin - Anatomy</p> | |
155 | - </div> | |
156 | - </a> | |
157 | - </div> | |
158 | - </div> | |
159 | - <div class="col-sm-3 col-lg-2"> | |
160 | - <div class="thumbnail"> | |
161 | - <a href="clinical-animations-details.html"> | |
162 | - <img src="~/../content/images/aod-16.jpg" alt="" title=""> | |
163 | - <div class="caption"> | |
164 | - <p>Skin - Physiology</p> | |
165 | - </div> | |
166 | - </a> | |
167 | - </div> | |
168 | - </div> | |
169 | - <div class="col-sm-3 col-lg-2"> | |
170 | - <div class="thumbnail"> | |
171 | - <a href="clinical-animations-details.html"> | |
172 | - <img src="~/../content/images/aod-17.jpg" alt="" title=""> | |
173 | - <div class="caption"> | |
174 | - <p>The Blood Anatomy and Physiology</p> | |
175 | - </div> | |
176 | - </a> | |
177 | - </div> | |
178 | - </div> | |
179 | - <div class="col-sm-3 col-lg-2"> | |
180 | - <div class="thumbnail"> | |
181 | - <a href="clinical-animations-details.html"> | |
182 | - <img src="~/../content/images/aod-18.jpg" alt="" title=""> | |
183 | - <div class="caption"> | |
184 | - <p>Understanding Cell Biology</p> | |
185 | - </div> | |
186 | - </a> | |
187 | - </div> | |
188 | - </div> | |
189 | - <div class="col-sm-3 col-lg-2"> | |
190 | - <div class="thumbnail"> | |
191 | - <a href="clinical-animations-details.html"> | |
192 | - <img src="~/../content/images/aod-19.jpg" alt="" title=""> | |
193 | - <div class="caption"> | |
194 | - <p>Urinary System - Physiology</p> | |
195 | - </div> | |
196 | - </a> | |
197 | - </div> | |
198 | - </div> | |
199 | - <div class="col-sm-3 col-lg-2"> | |
200 | - <div class="thumbnail"> | |
201 | - <a href="clinical-animations-details.html"> | |
202 | - <img src="~/../content/images/aod-20.jpg" alt="" title=""> | |
203 | - <div class="caption"> | |
204 | - <p>Visual System - Anatomy</p> | |
205 | - </div> | |
206 | - </a> | |
207 | - </div> | |
208 | - </div> | |
209 | - <div class="col-sm-3 col-lg-2"> | |
210 | - <div class="thumbnail"> | |
211 | - <a href="clinical-animations-details.html"> | |
212 | - <img src="~/../content/images/aod-21.jpg" alt="" title=""> | |
213 | - <div class="caption"> | |
214 | - <p>Visual System - Physiology</p> | |
215 | - </div> | |
216 | - </a> | |
217 | - </div> | |
218 | - </div> | |
219 | - | |
220 | - | |
221 | - | |
222 | - </div> | |
223 | - <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view"> | |
224 | - <div class="col-sm-12 table-responsive "> | |
225 | - <table class="table table-hover table-condensed bg-white"> | |
226 | - <thead> | |
227 | - <tr class="active"> | |
228 | - <th>Title</th> | |
229 | - <th>System</th> | |
230 | - | |
231 | - </tr> | |
232 | - </thead> | |
233 | - <tbody> | |
234 | - <tr> | |
235 | - <td>1st & 2nd Intercostal Spaces</td> | |
236 | - <td>Thorax</td> | |
237 | - | |
238 | - </tr> | |
239 | - <tr> | |
240 | - <td>1st, 3rd, &8th Ribs</td> | |
241 | - <td>Body Wall and Back</td> | |
242 | - | |
243 | - </tr> | |
244 | - <tr> | |
245 | - <td>Abdomen at L5 Vertebra (Inf)</td> | |
246 | - <td>Abdomen</td> | |
247 | - | |
248 | - </tr> | |
249 | - <tr> | |
250 | - <td>1st & 2nd Intercostal Spaces</td> | |
251 | - <td>Thorax</td> | |
252 | - | |
253 | - </tr> | |
254 | - <tr> | |
255 | - <td>1st, 3rd, &8th Ribs</td> | |
256 | - <td>Body Wall and Back</td> | |
257 | - | |
258 | - </tr> | |
259 | - <tr> | |
260 | - <td>Abdomen at L5 Vertebra (Inf)</td> | |
261 | - <td>Abdomen</td> | |
262 | - | |
263 | - </tr> | |
264 | - <tr> | |
265 | - <td>1st & 2nd Intercostal Spaces</td> | |
266 | - <td>Thorax</td> | |
267 | - | |
268 | - </tr> | |
269 | - <tr> | |
270 | - <td>1st, 3rd, &8th Ribs</td> | |
271 | - <td>Body Wall and Back</td> | |
272 | - | |
273 | - </tr> | |
274 | - <tr> | |
275 | - <td>Abdomen at L5 Vertebra (Inf)</td> | |
276 | - <td>Abdomen</td> | |
277 | - | |
278 | - </tr> | |
279 | - <tr> | |
280 | - <td>1st & 2nd Intercostal Spaces</td> | |
281 | - <td>Thorax</td> | |
282 | - | |
283 | - </tr> | |
284 | - <tr> | |
285 | - <td>1st, 3rd, &8th Ribs</td> | |
286 | - <td>Body Wall and Back</td> | |
287 | - | |
288 | - </tr> | |
289 | - <tr> | |
290 | - <td>Abdomen at L5 Vertebra (Inf)</td> | |
291 | - <td>Abdomen</td> | |
292 | - | |
293 | - </tr> | |
294 | - <tr> | |
295 | - <td>1st & 2nd Intercostal Spaces</td> | |
296 | - <td>Thorax</td> | |
297 | - | |
298 | - </tr> | |
299 | - <tr> | |
300 | - <td>1st, 3rd, &8th Ribs</td> | |
301 | - <td>Body Wall and Back</td> | |
302 | - | |
303 | - </tr> | |
304 | - <tr> | |
305 | - <td>Abdomen at L5 Vertebra (Inf)</td> | |
306 | - <td>Abdomen</td> | |
307 | - | |
308 | - </tr> | |
309 | - <tr class="active"> | |
310 | - <td colspan="6"> | |
311 | - | |
312 | - <div class="col-sm-3 col-lg-2 no-padding"> | |
313 | - <div class="thumbnail no-margin"> | |
314 | - <a href="atlas-anatomy-detail.html"> | |
315 | - <img src="~/../content/images/aod-12.jpg" alt="" title=""> | |
316 | - | |
317 | - </a> | |
318 | - </div> | |
319 | - </div> | |
320 | - </td> | |
321 | - </tr> | |
322 | - </tbody> | |
323 | - </table> | |
324 | - | |
325 | - </div> | |
326 | - </div> | |
3 | + <div class="main" ng-init="loadAIModuleById(13)"> | |
4 | + <div id="grid-view" class="col-sm-12" style="padding-left:25px; width:99%"> | |
327 | 5 | </div> |
328 | 6 | </div> |
329 | 7 | </div> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/content/data/json/aod/aod_courselist.json
0 โ 100644
1 | +{ | |
2 | + "root":{ | |
3 | + "AODData":[ | |
4 | + { | |
5 | + "_ImageId":"11014009", | |
6 | + "_Title":"Anatomy and Physiology of the Breast", | |
7 | + "_BodySystem":"Breast", | |
8 | + "_ThumbnailImage":"11014009.jpg" | |
9 | + }, | |
10 | + { | |
11 | + "_ImageId":"02011209", | |
12 | + "_Title":"Understanding the Physiology of the Skin", | |
13 | + "_BodySystem":"Skin", | |
14 | + "_ThumbnailImage":"02011209.jpg" | |
15 | + }, | |
16 | + { | |
17 | + "_ImageId":"14011109", | |
18 | + "_Title":"Understanding the Anatomy of the Urinary System", | |
19 | + "_BodySystem":"Urinary System", | |
20 | + "_ThumbnailImage":"14011109.jpg" | |
21 | + }, | |
22 | + { | |
23 | + "_ImageId":"06011109", | |
24 | + "_Title":"Understanding the Anatomy of the Immune System", | |
25 | + "_BodySystem":"Immune System", | |
26 | + "_ThumbnailImage":"06011109.jpg" | |
27 | + }, | |
28 | + { | |
29 | + "_ImageId":"09011209", | |
30 | + "_Title":"Understanding the Physiology of the Visual System", | |
31 | + "_BodySystem":"Visual System", | |
32 | + "_ThumbnailImage":"09011209.jpg" | |
33 | + }, | |
34 | + { | |
35 | + "_ImageId":"02011109", | |
36 | + "_Title":"Understanding the Anatomy of the Skin", | |
37 | + "_BodySystem":"Skin", | |
38 | + "_ThumbnailImage":"02011109.jpg" | |
39 | + }, | |
40 | + { | |
41 | + "_ImageId":"09011109", | |
42 | + "_Title":"Understanding the Anatomy of the Visual System", | |
43 | + "_BodySystem":"Visual System", | |
44 | + "_ThumbnailImage":"09011109.jpg" | |
45 | + }, | |
46 | + { | |
47 | + "_ImageId":"01011209", | |
48 | + "_Title":"Understanding the Physiology of the Cardiovascular System", | |
49 | + "_BodySystem":"Cardiovascular System", | |
50 | + "_ThumbnailImage":"01011209.jpg" | |
51 | + }, | |
52 | + { | |
53 | + "_ImageId":"13011209", | |
54 | + "_Title":"Understanding the Physiology of the Musculoskeletal System", | |
55 | + "_BodySystem":"Musculoskeletal System", | |
56 | + "_ThumbnailImage":"13011209.jpg" | |
57 | + }, | |
58 | + { | |
59 | + "_ImageId":"04011209", | |
60 | + "_Title":"Understanding the Physiology of the Digestive System", | |
61 | + "_BodySystem":"Digestive System", | |
62 | + "_ThumbnailImage":"04011209.jpg" | |
63 | + }, | |
64 | + { | |
65 | + "_ImageId":"01011109", | |
66 | + "_Title":"Understanding the Anatomy of the Cardiovascular System", | |
67 | + "_BodySystem":"Cardiovascular System", | |
68 | + "_ThumbnailImage":"01011109.jpg" | |
69 | + }, | |
70 | + { | |
71 | + "_ImageId":"13011109", | |
72 | + "_Title":"Understanding the Anatomy of the Musculoskeletal System", | |
73 | + "_BodySystem":"Musculoskeletal System", | |
74 | + "_ThumbnailImage":"13011109.jpg" | |
75 | + }, | |
76 | + { | |
77 | + "_ImageId":"04011109", | |
78 | + "_Title":"Understanding the Anatomy of the Digestive System", | |
79 | + "_BodySystem":"Digestive System", | |
80 | + "_ThumbnailImage":"04011109.jpg" | |
81 | + }, | |
82 | + { | |
83 | + "_ImageId":"07011209", | |
84 | + "_Title":"Understanding the Physiology of the Nervous System", | |
85 | + "_BodySystem":"Nervous System", | |
86 | + "_ThumbnailImage":"07011209.jpg" | |
87 | + }, | |
88 | + { | |
89 | + "_ImageId":"01011009", | |
90 | + "_Title":"Introduction to the Cardiovascular System", | |
91 | + "_BodySystem":"Cardiovascular System", | |
92 | + "_ThumbnailImage":"01011009.jpg" | |
93 | + }, | |
94 | + { | |
95 | + "_ImageId":"12011209", | |
96 | + "_Title":"Understanding the Physiology of the Respiratory System", | |
97 | + "_BodySystem":"Respiratory System", | |
98 | + "_ThumbnailImage":"12011209.jpg" | |
99 | + }, | |
100 | + { | |
101 | + "_ImageId":"03011209", | |
102 | + "_Title":"Understanding the Physiology of the Endocrine System", | |
103 | + "_BodySystem":"Endocrine System", | |
104 | + "_ThumbnailImage":"03011209.jpg" | |
105 | + }, | |
106 | + { | |
107 | + "_ImageId":"07011109", | |
108 | + "_Title":"Understanding the Anatomy of the Nervous System", | |
109 | + "_BodySystem":"Nervous System", | |
110 | + "_ThumbnailImage":"07011109.jpg" | |
111 | + }, | |
112 | + { | |
113 | + "_ImageId":"12011109", | |
114 | + "_Title":"Understanding the Anatomy of the Respiratory System", | |
115 | + "_BodySystem":"Respiratory System", | |
116 | + "_ThumbnailImage":"12011109.jpg" | |
117 | + }, | |
118 | + { | |
119 | + "_ImageId":"03011109", | |
120 | + "_Title":"Understanding the Anatomy of the Endocrine System", | |
121 | + "_BodySystem":"Endocrine System", | |
122 | + "_ThumbnailImage":"03011109.jpg" | |
123 | + }, | |
124 | + { | |
125 | + "_ImageId":"14011209", | |
126 | + "_Title":"Understanding the Physiology of the Urinary System", | |
127 | + "_BodySystem":"Urinary System", | |
128 | + "_ThumbnailImage":"14011209.jpg" | |
129 | + }, | |
130 | + { | |
131 | + "_ImageId":"06011209", | |
132 | + "_Title":"Understanding the Physiology of the Immune System", | |
133 | + "_BodySystem":"Immune System", | |
134 | + "_ThumbnailImage":"06011209.jpg" | |
135 | + }, | |
136 | + { | |
137 | + "_ImageId":"00016009", | |
138 | + "_Title":"Understanding Cell Biology", | |
139 | + "_BodySystem":"1", | |
140 | + "_ThumbnailImage":"00016009.jpg" | |
141 | + }, | |
142 | + { | |
143 | + "_ImageId":"05011009", | |
144 | + "_Title":"Blood Anatomy and Physiology", | |
145 | + "_BodySystem":"2", | |
146 | + "_ThumbnailImage":"05011009.jpg" | |
147 | + }, | |
148 | + { | |
149 | + "_ImageId":"07029109", | |
150 | + "_Title":"Understanding the Physiology of Pain", | |
151 | + "_BodySystem":"3", | |
152 | + "_ThumbnailImage":"07029109.jpg" | |
153 | + } | |
154 | + ] | |
155 | + } | |
156 | +} | |
0 | 157 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/content/data/json/aod/aod_courselist_video.json
0 โ 100644
1 | +{ | |
2 | + "root":{ | |
3 | + "AODData":[ | |
4 | + { | |
5 | + "_id":"1", | |
6 | + "_CourseId":"11014009", | |
7 | + "_Title":"Anatomy and Physiology of the Breast", | |
8 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
9 | + }, | |
10 | + { | |
11 | + "_id":"2", | |
12 | + "_CourseId":"02011209", | |
13 | + "_Title":"Understanding the Physiology of the Skin", | |
14 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
15 | + }, | |
16 | + { | |
17 | + "_id":"3", | |
18 | + "_CourseId":"14011109", | |
19 | + "_Title":"Understanding the Anatomy of the Urinary System", | |
20 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
21 | + }, | |
22 | + { | |
23 | + "_id":"4", | |
24 | + "_CourseId":"06011109", | |
25 | + "_Title":"Understanding the Anatomy of the Immune System", | |
26 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
27 | + }, | |
28 | + { | |
29 | + "_id":"5", | |
30 | + "_CourseId":"09011209", | |
31 | + "_Title":"Understanding the Physiology of the Visual System", | |
32 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
33 | + }, | |
34 | + { | |
35 | + "_id":"6", | |
36 | + "_CourseId":"02011109", | |
37 | + "_Title":"Understanding the Anatomy of the Skin", | |
38 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
39 | + }, | |
40 | + { | |
41 | + "_id":"7", | |
42 | + "_CourseId":"00016009", | |
43 | + "_Title":"Understanding Cell Biology", | |
44 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
45 | + }, | |
46 | + { | |
47 | + "_id":"8", | |
48 | + "_CourseId":"05011009", | |
49 | + "_Title":"Blood Anatomy and Physiology", | |
50 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
51 | + }, | |
52 | + { | |
53 | + "_id":"9", | |
54 | + "_CourseId":"09011109", | |
55 | + "_Title":"Understanding the Anatomy of the Visual System", | |
56 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
57 | + }, | |
58 | + { | |
59 | + "_id":"10", | |
60 | + "_CourseId":"01011209", | |
61 | + "_Title":"Understanding the Physiology of the Cardiovascular System", | |
62 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
63 | + }, | |
64 | + { | |
65 | + "_id":"11", | |
66 | + "_CourseId":"13011209", | |
67 | + "_Title":"Understanding the Physiology of the Musculoskeletal System", | |
68 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
69 | + }, | |
70 | + { | |
71 | + "_id":"12", | |
72 | + "_CourseId":"04011209", | |
73 | + "_Title":"Understanding the Physiology of the Digestive System", | |
74 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
75 | + }, | |
76 | + { | |
77 | + "_id":"13", | |
78 | + "_CourseId":"07029109", | |
79 | + "_Title":"Understanding the Physiology of Pain", | |
80 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
81 | + }, | |
82 | + { | |
83 | + "_id":"14", | |
84 | + "_CourseId":"01011109", | |
85 | + "_Title":"Understanding the Anatomy of the Cardiovascular System", | |
86 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
87 | + }, | |
88 | + { | |
89 | + "_id":"15", | |
90 | + "_CourseId":"13011109", | |
91 | + "_Title":"Understanding the Anatomy of the Musculoskeletal System", | |
92 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
93 | + }, | |
94 | + { | |
95 | + "_id":"16", | |
96 | + "_CourseId":"04011109", | |
97 | + "_Title":"Understanding the Anatomy of the Digestive System", | |
98 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
99 | + }, | |
100 | + { | |
101 | + "_id":"17", | |
102 | + "_CourseId":"07011209", | |
103 | + "_Title":"Understanding the Physiology of the Nervous System", | |
104 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
105 | + }, | |
106 | + { | |
107 | + "_id":"18", | |
108 | + "_CourseId":"01011009", | |
109 | + "_Title":"Introduction to the Cardiovascular System", | |
110 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
111 | + }, | |
112 | + { | |
113 | + "_id":"19", | |
114 | + "_CourseId":"12011209", | |
115 | + "_Title":"Understanding the Physiology of the Respiratory System", | |
116 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
117 | + }, | |
118 | + { | |
119 | + "_id":"20", | |
120 | + "_CourseId":"03011209", | |
121 | + "_Title":"Understanding the Physiology of the Endocrine System", | |
122 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
123 | + }, | |
124 | + { | |
125 | + "_id":"21", | |
126 | + "_CourseId":"07011109", | |
127 | + "_Title":"Understanding the Anatomy of the Nervous System", | |
128 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
129 | + }, | |
130 | + { | |
131 | + "_id":"22", | |
132 | + "_CourseId":"12011109", | |
133 | + "_Title":"Understanding the Anatomy of the Respiratory System", | |
134 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
135 | + }, | |
136 | + { | |
137 | + "_id":"23", | |
138 | + "_CourseId":"03011109", | |
139 | + "_Title":"Understanding the Anatomy of the Endocrine System", | |
140 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
141 | + }, | |
142 | + { | |
143 | + "_id":"24", | |
144 | + "_CourseId":"14011209", | |
145 | + "_Title":"Understanding the Physiology of the Urinary System", | |
146 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
147 | + }, | |
148 | + { | |
149 | + "_id":"25", | |
150 | + "_CourseId":"06011209", | |
151 | + "_Title":"Understanding the Physiology of the Immune System", | |
152 | + "_VideoUrl":"AodHome/CoursePlayerAIA" | |
153 | + } | |
154 | + ] | |
155 | + } | |
156 | +} | |
0 | 157 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/00016009.jpg
0 โ 100644
16.7 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011009.jpg
0 โ 100644
36.5 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011109.jpg
0 โ 100644
42.5 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/01011209.jpg
0 โ 100644
45 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/02011109.jpg
0 โ 100644
38.9 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/02011209.jpg
0 โ 100644
45.4 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/03011109.jpg
0 โ 100644
31.5 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/03011209.jpg
0 โ 100644
35.5 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/04011109.jpg
0 โ 100644
37.8 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/04011209.jpg
0 โ 100644
34.5 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/05011009.jpg
0 โ 100644
29.2 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/06011109.jpg
0 โ 100644
40.1 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/06011209.jpg
0 โ 100644
19 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07011109.jpg
0 โ 100644
34.3 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07011209.jpg
0 โ 100644
39.8 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/07029109.jpg
0 โ 100644
30.2 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/09011109.jpg
0 โ 100644
30.3 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/09011209.jpg
0 โ 100644
38.7 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/11014009.jpg
0 โ 100644
34.6 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/12011109.jpg
0 โ 100644
37.3 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/12011209.jpg
0 โ 100644
17.3 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/13011109.jpg
0 โ 100644
16.2 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/13011209.jpg
0 โ 100644
16.1 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/14011109.jpg
0 โ 100644
33.7 KB
400-SOURCECODE/AIAHTML5.Web/content/images/aod/thumbnails/14011209.jpg
0 โ 100644
19.4 KB
400-SOURCECODE/Admin/src/app/app.component.ts
... | ... | @@ -37,7 +37,7 @@ export class AppComponent implements OnInit { |
37 | 37 | constructor(private idle: Idle, private keepalive: Keepalive,private titleService: Title,private _confirmService: ConfirmService,private userservice: UserService,private _loadingService: LoadingService, public global: GlobalService, private router: Router,) { |
38 | 38 | const projectTitle= this.titleService.getTitle(); |
39 | 39 | |
40 | - console.log("idleTime: "+this.global.aiaIdleTime+" aiaIdleTimeOut: "+this.global.aiaIdleTimeOut+" Interval: "+this.global.aiaPingInterval); | |
40 | + //console.log("idleTime: "+this.global.aiaIdleTime+" aiaIdleTimeOut: "+this.global.aiaIdleTimeOut+" Interval: "+this.global.aiaPingInterval); | |
41 | 41 | // sets an idle timeout of 20 minutes. |
42 | 42 | this.idle.setIdle(this.global.aiaIdleTime); |
43 | 43 | |
... | ... | @@ -141,9 +141,10 @@ export class AppComponent implements OnInit { |
141 | 141 | this.userservice.ManageUserLoginStatus({ |
142 | 142 | userId: this.global.UserId, |
143 | 143 | tagName: tagname, |
144 | - SessionId:this.global.SessionId | |
144 | + SessionId:this.global.SessionId, | |
145 | + isSiteUser:this.global.isSiteUser | |
145 | 146 | }).subscribe(status => { |
146 | - console.log(status); | |
147 | + //console.log(status); | |
147 | 148 | if(status=='False') |
148 | 149 | { |
149 | 150 | if(tagname=='logout') | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.html
... | ... | @@ -118,8 +118,8 @@ |
118 | 118 | <div class="form-group marginTop5"> |
119 | 119 | <label for="AccountNo" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account No <span class="red">*</span> : </label> |
120 | 120 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
121 | - <input type="text" class="form-control input-sm" id="AccountNo" formControlName="accountNumber" maxlength="16" *ngIf="license.LicenseId > 0" [attr.disabled]="license.LicenseId > 0" (blur)="OnAccountNoBlur($event.target.value)"> | |
122 | - <input type="text" class="form-control input-sm" id="AccountNo" formControlName="accountNumber" maxlength="16" *ngIf="license.LicenseId == 0" (blur)="OnAccountNoBlur($event.target.value)"> | |
121 | + <input type="text" class="form-control input-sm" id="AccountNo" formControlName="accountNumber" maxlength="16" *ngIf="license.LicenseId > 0" [attr.disabled]="license.LicenseId > 0" (blur)="OnAccountNoBlur($event.target.value)" (keydown.space)="$event.preventDefault();"> | |
122 | + <input type="text" class="form-control input-sm" id="AccountNo" formControlName="accountNumber" maxlength="16" *ngIf="license.LicenseId == 0" (blur)="OnAccountNoBlur($event.target.value)" (keydown.space)="$event.preventDefault();"> | |
123 | 123 | <div *ngIf="insertUpdateLicenseFrm.controls.accountNumber.hasError('required') && insertUpdateLicenseFrm.controls.accountNumber.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Account number is required</div> |
124 | 124 | </div> |
125 | 125 | </div> |
... | ... | @@ -267,7 +267,7 @@ |
267 | 267 | <div class="form-group marginTop5"> |
268 | 268 | <label for="Zip" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Zip <span class="red">*</span> : </label> |
269 | 269 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
270 | - <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20"> | |
270 | + <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20" (keydown.space)="$event.preventDefault();"> | |
271 | 271 | <div *ngIf="insertUpdateLicenseFrm.controls.zip.hasError('required') && insertUpdateLicenseFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div> |
272 | 272 | </div> |
273 | 273 | </div> |
... | ... | @@ -276,7 +276,7 @@ |
276 | 276 | <div class="form-group marginTop5"> |
277 | 277 | <label for="Phone" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Phone <span class="red">*</span> : </label> |
278 | 278 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
279 | - <input type="text" class="form-control input-sm" id="Phone" formControlName="phone" maxlength="30" (keyup)="onKeyUp($event)"> | |
279 | + <input type="text" class="form-control input-sm" id="Phone" formControlName="phone" maxlength="30" (keyup)="onKeyUp($event)" (keydown.space)="$event.preventDefault();"> | |
280 | 280 | <span class="help-block">(xxx-xxx-xxxx)</span> |
281 | 281 | <div *ngIf="insertUpdateLicenseFrm.controls.phone.hasError('required') && insertUpdateLicenseFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is required</div> |
282 | 282 | <div *ngIf="insertUpdateLicenseFrm.controls.phone.hasError('pattern') && (insertUpdateLicenseFrm.controls.phone.dirty || license.LicenseId > 0)" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is invalid</div> |
... | ... | @@ -292,7 +292,7 @@ |
292 | 292 | <div class="form-group marginTop5"> |
293 | 293 | <label for="Email" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Email ID <span class="red">*</span> : </label> |
294 | 294 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
295 | - <input type="text" class="form-control input-sm" id="Email" formControlName="emailId" maxlength="50" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$"> | |
295 | + <input type="text" class="form-control input-sm" id="Email" formControlName="emailId" maxlength="50" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$" (keydown.space)="$event.preventDefault();"> | |
296 | 296 | <div *ngIf="insertUpdateLicenseFrm.controls.emailId.hasError('required') && !insertUpdateLicenseFrm.controls.emailId.value && insertUpdateLicenseFrm.controls.emailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email is required</div> |
297 | 297 | <div *ngIf="insertUpdateLicenseFrm.controls.emailId.invalid && insertUpdateLicenseFrm.controls.emailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email is invalid</div> |
298 | 298 | </div> |
... | ... | @@ -311,7 +311,7 @@ |
311 | 311 | <label for="SubscriptionStartDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Subscription Start Date<span class="red">*</span>:</label> |
312 | 312 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
313 | 313 | <div id="datetimepicker1" class="input-group input-group-sm input-append date"> |
314 | - <input type="text" class="form-control" id="SubscriptionStartDate" formControlName="subscriptionStartDate" | |
314 | + <input type="text" class="form-control" id="SubscriptionStartDate" formControlName="subscriptionStartDate" (keydown.space)="$event.preventDefault();" | |
315 | 315 | #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1" |
316 | 316 | [minDate]="minDate" [maxDate]="maxDate" [bsConfig]="bsConfig" |
317 | 317 | (bsValueChange)="DateChange(dp1)" (change)="DateChange(dp1)"> |
... | ... | @@ -331,7 +331,7 @@ |
331 | 331 | <label for="SubscriptionEndDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Subscription End Date<span class="red">*</span>:</label> |
332 | 332 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
333 | 333 | <div id="datetimepicker2" class="input-group input-group-sm input-append date"> |
334 | - <input type="text" class="form-control" id="SubscriptionEndDate" formControlName="subscriptionEndDate" | |
334 | + <input type="text" class="form-control" id="SubscriptionEndDate" formControlName="subscriptionEndDate" (keydown.space)="$event.preventDefault();" | |
335 | 335 | #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2" |
336 | 336 | [minDate]="minDate" [maxDate]="maxDate" [bsConfig]="bsConfig" |
337 | 337 | (bsValueChange)="DateChange(dp2)" (change)="DateChange(dp2)"> |
... | ... | @@ -351,7 +351,7 @@ |
351 | 351 | <label for="RenewDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Renew Date <span class="red">*</span> :</label> |
352 | 352 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
353 | 353 | <div id="datetimepicker3" class="input-group input-group-sm input-append date"> |
354 | - <input type="text" class="form-control" id="RenewDate" formControlName="renewDate" | |
354 | + <input type="text" class="form-control" id="RenewDate" formControlName="renewDate" (keydown.space)="$event.preventDefault();" | |
355 | 355 | #dp3="bsDatepicker" bsDatepicker [(bsValue)]="bsValue3" |
356 | 356 | [minDate]="minDate" [maxDate]="maxDate" [bsConfig]="bsConfig" |
357 | 357 | (bsValueChange)="DateChange(dp3)" (change)="DateChange(dp3)"> |
... | ... | @@ -370,7 +370,7 @@ |
370 | 370 | <div class="form-group marginTop5"> |
371 | 371 | <label for="SubscriptionPrice" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Subscription Price <span class="red">*</span> : </label> |
372 | 372 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
373 | - <input type="text" class="form-control input-sm" id="SubscriptionPrice" formControlName="subscriptionPrice" maxlength="11" (blur)="SubscriptionPriceBlur()" (keyup)="onKeyPress($event)"> | |
373 | + <input type="text" class="form-control input-sm" id="SubscriptionPrice" formControlName="subscriptionPrice" maxlength="11" (blur)="SubscriptionPriceBlur()" (keyup)="onKeyPress($event)" (keydown.space)="$event.preventDefault();"> | |
374 | 374 | <div *ngIf="insertUpdateLicenseFrm.controls.subscriptionPrice.hasError('required') && insertUpdateLicenseFrm.controls.subscriptionPrice.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription price is required</div> |
375 | 375 | <div *ngIf="insertUpdateLicenseFrm.controls.subscriptionPrice.hasError('pattern') && insertUpdateLicenseFrm.controls.subscriptionPrice.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription price must be numeric</div> |
376 | 376 | </div> |
... | ... | @@ -381,7 +381,7 @@ |
381 | 381 | <div class="form-group marginTop5"> |
382 | 382 | <label for="ExportImages" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">No. of Export Images <span class="red">*</span> : </label> |
383 | 383 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
384 | - <input type="text" class="form-control input-sm" id="ExportImages" formControlName="noOfImages" maxlength="5"> | |
384 | + <input type="text" class="form-control input-sm" id="ExportImages" formControlName="noOfImages" maxlength="5" (keydown.space)="$event.preventDefault();"> | |
385 | 385 | <div *ngIf="insertUpdateLicenseFrm.controls.noOfImages.hasError('required') && insertUpdateLicenseFrm.controls.noOfImages.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Number of export images is required</div> |
386 | 386 | <div *ngIf="insertUpdateLicenseFrm.controls.noOfImages.hasError('pattern') && insertUpdateLicenseFrm.controls.noOfImages.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Number of export images must be numeric</div> |
387 | 387 | </div> |
... | ... | @@ -392,7 +392,7 @@ |
392 | 392 | <div class="form-group marginTop5"> |
393 | 393 | <label for="MasterSiteURL" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Master Site URL <span class="red">*</span> : </label> |
394 | 394 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
395 | - <input type="text" class="form-control input-sm" id="MasterSiteURL" formControlName="masterSiteUrl"> | |
395 | + <input type="text" class="form-control input-sm" id="MasterSiteURL" formControlName="masterSiteUrl" (keydown.space)="$event.preventDefault();"> | |
396 | 396 | </div> |
397 | 397 | </div> |
398 | 398 | </div> |
... | ... | @@ -419,7 +419,7 @@ |
419 | 419 | <div class="form-group marginTop5"> |
420 | 420 | <label for="UserName1" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">User Name <span class="red">*</span> : </label> |
421 | 421 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
422 | - <input type="text" class="form-control input-sm" id="UserName" formControlName="login" maxlength="50"> | |
422 | + <input type="text" class="form-control input-sm" id="UserName" formControlName="login" maxlength="50" (keydown.space)="$event.preventDefault();"> | |
423 | 423 | <span class="help-block">(Minimum 8 characters)</span> |
424 | 424 | <div *ngIf="!insertUpdateLicenseFrm.controls.login.valid && insertUpdateLicenseFrm.controls.login.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">User Name of minimum 8 characters is required.</div> |
425 | 425 | </div> |
... | ... | @@ -430,7 +430,7 @@ |
430 | 430 | <div class="form-group marginTop5"> |
431 | 431 | <label for="Password" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Password <span class="red">*</span> : </label> |
432 | 432 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
433 | - <input type="password" class="form-control input-sm" id="Password" formControlName="password" maxlength="50"> | |
433 | + <input type="password" class="form-control input-sm" id="Password" formControlName="password" maxlength="50" (keydown.space)="$event.preventDefault();"> | |
434 | 434 | <span class="help-block">(Minimum 8 characters)</span> |
435 | 435 | <div *ngIf="!insertUpdateLicenseFrm.controls.password.valid && insertUpdateLicenseFrm.controls.password.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Password of minimum 8 characters is required.</div> |
436 | 436 | </div> | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts
... | ... | @@ -66,7 +66,7 @@ export class AddLicense implements OnInit { |
66 | 66 | this.editionLoginsText = ''; |
67 | 67 | this.insertUpdateLicenseFrm = this.fb.group({ |
68 | 68 | licenseId: [0], |
69 | - accountNumber: ['', [Validators.required,this.ClearWhitespaceValidator]], | |
69 | + accountNumber: ['', [Validators.required]], | |
70 | 70 | accountTypeId: [0, Validators.min(1)], |
71 | 71 | productId: [''], |
72 | 72 | licenseeFirstName: ['', [Validators.required,this.noWhitespaceValidator]], |
... | ... | @@ -78,21 +78,21 @@ export class AddLicense implements OnInit { |
78 | 78 | city: ['', [Validators.required,this.noWhitespaceValidator]], |
79 | 79 | stateId: [0, Validators.min(1)], |
80 | 80 | countryId: [0, Validators.min(1)], |
81 | - zip: ['', [Validators.required,this.noWhitespaceValidator]], | |
82 | - emailId: ['', [Validators.required,this.ClearWhitespaceValidator]], | |
83 | - phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$'),this.noWhitespaceValidator]], | |
81 | + zip: ['', [Validators.required]], | |
82 | + emailId: ['', [Validators.required]], | |
83 | + phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$')]], | |
84 | 84 | editionLoginArr: this.fb.array([]), |
85 | 85 | editionLogins: [''], |
86 | 86 | totalLogins: [0], |
87 | - subscriptionPrice: [0, [Validators.required, Validators.pattern('[0-9.]*'),this.noWhitespaceValidator]], | |
87 | + subscriptionPrice: [0, [Validators.required, Validators.pattern('[0-9.]*')]], | |
88 | 88 | subscriptionStartDate: [this.startDate, Validators.required], |
89 | 89 | subscriptionEndDate: ['', Validators.required], |
90 | - noOfImages: ['', [Validators.required, Validators.pattern('[0-9]*'),this.noWhitespaceValidator]], | |
91 | - masterSiteUrl: ['a', [Validators.required,this.noWhitespaceValidator]], | |
90 | + noOfImages: ['', [Validators.required, Validators.pattern('[0-9]*')]], | |
91 | + masterSiteUrl: ['a', [Validators.required]], | |
92 | 92 | siteUrlFrom: [''], |
93 | 93 | siteUrlTo: [''], |
94 | - login: ['a', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]], | |
95 | - password: ['a', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]], | |
94 | + login: ['a', [Validators.required, Validators.minLength(8)]], | |
95 | + password: ['a', [Validators.required, Validators.minLength(8)]], | |
96 | 96 | securityQuestionId: [0, Validators.min(1)], |
97 | 97 | answer: ['a', [Validators.required,this.noWhitespaceValidator]], |
98 | 98 | testLicenseEditionId: [1], | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.html
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | <div class="form-group"> |
77 | 77 | <label for="inputEmail3" class="col-sm-4 control-label">Email ID <span class="red">*</span> :</label> |
78 | 78 | <div class="col-sm-7"> |
79 | - <input type="text" class="form-control input-sm" id="Email" formControlName="emailId" maxlength="50" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$"> | |
79 | + <input type="text" class="form-control input-sm" id="Email" formControlName="emailId" maxlength="50" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$" (keydown.space)="$event.preventDefault();"> | |
80 | 80 | <div *ngIf="updateLicenseBasicSettingsFrm.controls.emailId.hasError('required') && !updateLicenseBasicSettingsFrm.controls.emailId.value && updateLicenseBasicSettingsFrm.controls.emailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email is required</div> |
81 | 81 | <div *ngIf="updateLicenseBasicSettingsFrm.controls.emailId.invalid && updateLicenseBasicSettingsFrm.controls.emailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email is invalid</div> |
82 | 82 | </div> |
... | ... | @@ -108,7 +108,7 @@ |
108 | 108 | <div class="form-group"> |
109 | 109 | <label for="inputEmail3" class="col-sm-4 control-label">Zip <span class="red">*</span> :</label> |
110 | 110 | <div class="col-sm-7"> |
111 | - <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20"> | |
111 | + <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20" (keydown.space)="$event.preventDefault();"> | |
112 | 112 | <div *ngIf="updateLicenseBasicSettingsFrm.controls.zip.hasError('required') && updateLicenseBasicSettingsFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div> |
113 | 113 | </div> |
114 | 114 | </div> |
... | ... | @@ -140,7 +140,7 @@ |
140 | 140 | <div class="form-group"> |
141 | 141 | <label for="inputEmail3" class="col-sm-4 control-label">Phone <span class="red">*</span> :</label> |
142 | 142 | <div class="col-sm-7"> |
143 | - <input type="text" class="form-control input-sm" id="Phone" formControlName="phone" maxlength="30" (keyup)="onKeyUp($event)"> | |
143 | + <input type="text" class="form-control input-sm" id="Phone" formControlName="phone" maxlength="30" (keyup)="onKeyUp($event)" (keydown.space)="$event.preventDefault();"> | |
144 | 144 | <span class="help-block">(xxx-xxx-xxxx)</span> |
145 | 145 | <div *ngIf="updateLicenseBasicSettingsFrm.controls.phone.hasError('required') && updateLicenseBasicSettingsFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is required</div> |
146 | 146 | <div *ngIf="updateLicenseBasicSettingsFrm.controls.phone.hasError('pattern') && updateLicenseBasicSettingsFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is invalid</div> | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts
... | ... | @@ -55,9 +55,9 @@ export class EditLicenseBasicSettings implements OnInit { |
55 | 55 | city: ['', [Validators.required,this.noWhitespaceValidator]], |
56 | 56 | stateId: [0], |
57 | 57 | countryId: [0], |
58 | - zip: ['', [Validators.required,this.noWhitespaceValidator]], | |
59 | - emailId: ['', [Validators.required,this.noWhitespaceValidator]], | |
60 | - phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$'),this.noWhitespaceValidator]], | |
58 | + zip: ['', [Validators.required]], | |
59 | + emailId: ['', [Validators.required]], | |
60 | + phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$')]], | |
61 | 61 | }); |
62 | 62 | this.GetCountry(); |
63 | 63 | this.GetState(); | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/license.service.ts
... | ... | @@ -250,7 +250,8 @@ export class LicenseService{ |
250 | 250 | { |
251 | 251 | 'siteId': jsonObj.siteId, |
252 | 252 | 'licenseEditionId': element.m_Item1, |
253 | - 'isModesty': element.m_Item2 | |
253 | + 'isModesty': element.m_Item2, | |
254 | + 'isSiteUser': jsonObj.isSiteUser | |
254 | 255 | } |
255 | 256 | ); |
256 | 257 | }); |
... | ... | @@ -258,6 +259,7 @@ export class LicenseService{ |
258 | 259 | var headers = new Headers({ |
259 | 260 | 'Content-Type': 'application/json' |
260 | 261 | }); |
262 | + | |
261 | 263 | return this.http.post(this.commonService.resourceBaseUrl + "License/UpdateLicenseModestySettings", |
262 | 264 | JSON.stringify(jsonData), {headers: headers}) |
263 | 265 | .map(this.extractData) | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.ts
... | ... | @@ -29,7 +29,7 @@ export class LicenseModestySettings implements OnInit { |
29 | 29 | isBuildingLevel: boolean = false; |
30 | 30 | LicenseId:number=0; |
31 | 31 | AccountNumber:string=''; |
32 | - | |
32 | + | |
33 | 33 | constructor(private _loadingService: LoadingService,private licenseService: LicenseService, public globalService: GlobalService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder, |
34 | 34 | private modalService: BsModalService, private _confirmService: ConfirmService) { |
35 | 35 | } |
... | ... | @@ -42,6 +42,7 @@ export class LicenseModestySettings implements OnInit { |
42 | 42 | licenseId: [0], |
43 | 43 | accountNumber: ['', Validators.required], |
44 | 44 | siteId: [0], |
45 | + isSiteUser:[false], | |
45 | 46 | lstModesty: [this.fb.array([])], |
46 | 47 | }); |
47 | 48 | $('#AccountNumber').prop('disabled', true); |
... | ... | @@ -94,6 +95,7 @@ export class LicenseModestySettings implements OnInit { |
94 | 95 | this.lstLicenseEditionModesty = null; |
95 | 96 | this.lstLicenseSites = null; |
96 | 97 | this.selectedSiteId = 0; |
98 | + this.updateModestySettingsFrm.controls['siteId'].setValue(0); | |
97 | 99 | if (!this.isBuildingLevel) { |
98 | 100 | this.GetLicenseEditionModesty(); |
99 | 101 | } |
... | ... | @@ -109,6 +111,27 @@ export class LicenseModestySettings implements OnInit { |
109 | 111 | }, error => this.error = <any>error); |
110 | 112 | } |
111 | 113 | } |
114 | + | |
115 | + GetLicenseById() { | |
116 | + //use for to check is siteuser or not | |
117 | + if (this.LicenseId != 0) { | |
118 | + this._loadingService.ShowLoading("global-loading"); | |
119 | + this.licenseService.GetLicenseById(this.LicenseId) | |
120 | + .subscribe(st => { | |
121 | + if (st.LicenseId > 0) { | |
122 | + if(st.LicenseTypeId==3) | |
123 | + { | |
124 | + this.updateModestySettingsFrm.controls['isSiteUser'].setValue(true); | |
125 | + } | |
126 | + else | |
127 | + { | |
128 | + this.updateModestySettingsFrm.controls['isSiteUser'].setValue(false); | |
129 | + } | |
130 | + this._loadingService.HideLoading("global-loading"); | |
131 | + } | |
132 | + }, error => this.error = <any>error); | |
133 | + } | |
134 | + } | |
112 | 135 | |
113 | 136 | GetLicenseEditionModesty() { |
114 | 137 | this.licenseService.GetLicenseModestySettings(this.LicenseId, this.selectedSiteId) |
... | ... | @@ -139,6 +162,7 @@ export class LicenseModestySettings implements OnInit { |
139 | 162 | |
140 | 163 | this.updateModestySettingsFrm.controls['licenseId'].setValue(LicenseId); |
141 | 164 | this.updateModestySettingsFrm.controls['accountNumber'].setValue(AccountNumber); |
165 | + this.GetLicenseById() | |
142 | 166 | } |
143 | 167 | |
144 | 168 | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.html
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | <div class="form-group"> |
23 | 23 | <label for="inputEmail3" class="col-sm-4 control-label">User Name <span class="red">*</span> :</label> |
24 | 24 | <div class="col-sm-7"> |
25 | - <input type="text" class="form-control input-sm" id="name" placeholder="User Name" formControlName="UserName"> | |
25 | + <input type="text" class="form-control input-sm" id="name" placeholder="User Name" formControlName="UserName" (keydown.space)="$event.preventDefault();"> | |
26 | 26 | <span class="help-block">(Minimum 8 characters)</span> |
27 | 27 | <div *ngIf="!adduserFrm.controls.UserName.valid && adduserFrm.controls.UserName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">User Name of minimum 8 characters is required.</div> |
28 | 28 | </div> |
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | <div class="form-group"> |
31 | 31 | <label for="inputPassword3" class="col-sm-4 control-label">Password <span class="red">*</span> :</label> |
32 | 32 | <div class="col-sm-7"> |
33 | - <input type="password" class="form-control input-sm" id="password" placeholder="" formControlName="Password"> | |
33 | + <input type="password" class="form-control input-sm" id="password" placeholder="" formControlName="Password" (keydown.space)="$event.preventDefault();"> | |
34 | 34 | <span class="help-block">(Minimum 8 characters)</span> |
35 | 35 | <div *ngIf="!adduserFrm.controls.Password.valid && adduserFrm.controls.Password.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Password of minimum 8 characters is required</div> |
36 | 36 | </div> |
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | <div class="form-group"> |
39 | 39 | <label for="inputPassword3" class="col-sm-4 control-label">Confirm Password <span class="red">*</span> :</label> |
40 | 40 | <div class="col-sm-7"> |
41 | - <input type="password" class="form-control input-sm" id="cpassword" placeholder="" formControlName="ConfirmPassword"> | |
41 | + <input type="password" class="form-control input-sm" id="cpassword" placeholder="" formControlName="ConfirmPassword" (keydown.space)="$event.preventDefault();"> | |
42 | 42 | <div *ngIf="!adduserFrm.controls.ConfirmPassword.valid && !adduserFrm.controls.ConfirmPassword.value && adduserFrm.controls.ConfirmPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Confirm Password is required</div> |
43 | 43 | |
44 | 44 | <div *ngIf="adduserFrm.controls.ConfirmPassword.value!=adduserFrm.controls.Password.value && adduserFrm.controls.ConfirmPassword.valid" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;"> |
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | <div class="form-group"> |
50 | 50 | <label for="inputPassword3" class="col-sm-4 control-label">Email Id <span class="red">*</span> :</label> |
51 | 51 | <div class="col-sm-7"> |
52 | - <input type="text" class="form-control" id="inputPassword3" placeholder="Email Id" formControlName="EmailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$"> | |
52 | + <input type="text" class="form-control" id="inputPassword3" placeholder="Email Id" formControlName="EmailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$" (keydown.space)="$event.preventDefault();"> | |
53 | 53 | <div *ngIf="adduserFrm.controls.EmailId.invalid && !adduserFrm.controls.EmailId.value && adduserFrm.controls.EmailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email Id is required</div> |
54 | 54 | |
55 | 55 | <div *ngIf="adduserFrm.controls.EmailId.invalid && adduserFrm.controls.EmailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;"> | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts
... | ... | @@ -47,12 +47,12 @@ export class AddUser implements OnInit { |
47 | 47 | this.alerts = ''; |
48 | 48 | this.adduserFrm = this.fb.group({ |
49 | 49 | id: [''], |
50 | - UserName: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]], | |
51 | - Password: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]], | |
52 | - ConfirmPassword: ['', [Validators.required,this.ClearWhitespaceValidator]], | |
50 | + UserName: ['', [Validators.required, Validators.minLength(8)]], | |
51 | + Password: ['', [Validators.required, Validators.minLength(8)]], | |
52 | + ConfirmPassword: ['', [Validators.required]], | |
53 | 53 | FirstName: ['', [Validators.required,this.noWhitespaceValidator]], |
54 | 54 | LastName: ['', [Validators.required,this.noWhitespaceValidator]], |
55 | - EmailId: ['', [Validators.required,this.ClearWhitespaceValidator]], | |
55 | + EmailId: ['', [Validators.required]], | |
56 | 56 | AccountNumberId: ['', Validators.required], |
57 | 57 | UserTypeId: ['', Validators.required], |
58 | 58 | ProductEditionId: ['', Validators.required] |
... | ... | @@ -87,35 +87,7 @@ export class AddUser implements OnInit { |
87 | 87 | redirect() { |
88 | 88 | this.router.navigate(['/']); |
89 | 89 | } |
90 | - public ClearWhitespaceValidator(control: FormControl) { | |
91 | - // new validation for intial whaite space | |
92 | - //****Birendra *****/ | |
93 | - var isValid=false; | |
94 | - if(control.value!=null) | |
95 | - { | |
96 | - var inputvalue=control.value; | |
97 | - var controlLen=inputvalue.length; | |
98 | - if(controlLen==undefined)//undefined for integer value | |
99 | - { | |
100 | - isValid=true; | |
101 | - } | |
102 | - else if(controlLen!=0) | |
103 | - { | |
104 | - const isWhitespace = controlLen!=inputvalue.trim().length; | |
105 | - isValid = !isWhitespace; | |
106 | - if(!isValid) | |
107 | - { | |
108 | - control.setValue(inputvalue.trim()); | |
109 | - | |
110 | - } | |
111 | - | |
112 | - } | |
113 | - } | |
114 | - // can use also on page of input control | |
115 | - // | |
116 | - return isValid ? null: { 'whitespace': true }; | |
117 | - | |
118 | - } | |
90 | + | |
119 | 91 | public noWhitespaceValidator(control: FormControl) { |
120 | 92 | // new validation for intial whaite space |
121 | 93 | //****Birendra *****/ |
... | ... | @@ -263,12 +235,12 @@ export class AddUser implements OnInit { |
263 | 235 | _buildForm(lcid) { |
264 | 236 | this.adduserFrm = this.fb.group({ |
265 | 237 | id: [''], |
266 | - UserName: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]], | |
267 | - Password: ['', [Validators.required, Validators.minLength(8),this.ClearWhitespaceValidator]], | |
268 | - ConfirmPassword: ['', [Validators.required,this.ClearWhitespaceValidator]], | |
238 | + UserName: ['', [Validators.required, Validators.minLength(8)]], | |
239 | + Password: ['', [Validators.required, Validators.minLength(8)]], | |
240 | + ConfirmPassword: ['', [Validators.required]], | |
269 | 241 | FirstName: ['', [Validators.required,this.noWhitespaceValidator]], |
270 | 242 | LastName: ['', [Validators.required,this.noWhitespaceValidator]], |
271 | - EmailId: ['', [Validators.required,this.ClearWhitespaceValidator]], | |
243 | + EmailId: ['', [Validators.required]], | |
272 | 244 | AccountNumberId: ['', Validators.required], |
273 | 245 | UserTypeId: ['', Validators.required], |
274 | 246 | ProductEditionId: ['', Validators.required] | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | <div class="form-group"> |
38 | 38 | <label for="emailId" class="col-sm-4 control-label">Email Id <span class="red">*</span> :</label> |
39 | 39 | <div class="col-sm-7"> |
40 | - <input type="text" class="form-control" id="emailId" formControlName="emailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$"> | |
40 | + <input type="text" class="form-control" id="emailId" formControlName="emailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$" (keydown.space)="$event.preventDefault();"> | |
41 | 41 | <div *ngIf="userFrm.controls.emailId.invalid && !userFrm.controls.emailId.value && userFrm.controls.emailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email Id is required</div> |
42 | 42 | |
43 | 43 | <div *ngIf="userFrm.controls.emailId.invalid && userFrm.controls.emailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;"> Email is Invalid. </div> | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.ts
... | ... | @@ -48,7 +48,7 @@ export class UpdateUserProfile implements OnInit { |
48 | 48 | id: [''], |
49 | 49 | firstName: ['', [Validators.required,this.noWhitespaceValidator]], |
50 | 50 | lastName: ['', [Validators.required,this.noWhitespaceValidator]], |
51 | - emailId: ['', [Validators.required,this.noWhitespaceValidator]] | |
51 | + emailId: ['', [Validators.required]] | |
52 | 52 | |
53 | 53 | }); |
54 | 54 | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts
... | ... | @@ -56,7 +56,7 @@ export class UserService { |
56 | 56 | |
57 | 57 | //////////Manage UserLogin Status/////////// |
58 | 58 | ManageUserLoginStatus(obj: any) { |
59 | - var jsonData = { 'userId': obj.userId, 'tagName': obj.tagName,'SessionId': obj.SessionId }; | |
59 | + var jsonData = { 'userId': obj.userId, 'tagName': obj.tagName,'SessionId': obj.SessionId,'isSiteUser': obj.isSiteUser }; | |
60 | 60 | console.log(obj); |
61 | 61 | var headers = new Headers({ |
62 | 62 | 'Content-Type': 'application/json' | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html
... | ... | @@ -203,7 +203,7 @@ |
203 | 203 | <div class="form-group"> |
204 | 204 | <label for="inputEmail3" class="col-sm-5 control-label">User Name <span class="red">*</span> :</label> |
205 | 205 | <div class="col-sm-7"> |
206 | - <input type="text" class="form-control input-sm" id="name" placeholder="User Name" formControlName="UserName"> | |
206 | + <input type="text" class="form-control input-sm" id="name" placeholder="User Name" formControlName="UserName" (keydown.space)="$event.preventDefault();"> | |
207 | 207 | <span class="help-block">(Minimum 8 characters)</span> |
208 | 208 | <div *ngIf="!adduserFrm.controls.UserName.valid && adduserFrm.controls.UserName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">User Name of minimum 8 characters is required</div> |
209 | 209 | </div> |
... | ... | @@ -211,7 +211,7 @@ |
211 | 211 | <div class="form-group"> |
212 | 212 | <label for="inputPassword3" class="col-sm-5 control-label">Password <span class="red">*</span> :</label> |
213 | 213 | <div class="col-sm-7"> |
214 | - <input type="password" class="form-control input-sm" id="password" placeholder="" formControlName="Password"> | |
214 | + <input type="password" class="form-control input-sm" id="password" placeholder="" formControlName="Password" (keydown.space)="$event.preventDefault();"> | |
215 | 215 | <span class="help-block">(Minimum 8 characters)</span> |
216 | 216 | <div *ngIf="!adduserFrm.controls.Password.valid && adduserFrm.controls.Password.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Password of minimum 8 characters is required</div> |
217 | 217 | </div> |
... | ... | @@ -219,7 +219,7 @@ |
219 | 219 | <div class="form-group"> |
220 | 220 | <label for="inputPassword3" class="col-sm-5 control-label">Confirm Password <span class="red">*</span> :</label> |
221 | 221 | <div class="col-sm-7"> |
222 | - <input type="password" class="form-control input-sm" id="cpassword" placeholder="" formControlName="ConfirmPassword"> | |
222 | + <input type="password" class="form-control input-sm" id="cpassword" placeholder="" formControlName="ConfirmPassword"(keydown.space)="$event.preventDefault();"> | |
223 | 223 | <div *ngIf="!adduserFrm.controls.ConfirmPassword.valid && !adduserFrm.controls.ConfirmPassword.value && adduserFrm.controls.ConfirmPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Confirm Password is required</div> |
224 | 224 | <div *ngIf="adduserFrm.controls.ConfirmPassword.value!=adduserFrm.controls.Password.value && adduserFrm.controls.ConfirmPassword.valid" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;"> |
225 | 225 | Password not match. |
... | ... | @@ -229,7 +229,7 @@ |
229 | 229 | <div class="form-group"> |
230 | 230 | <label for="inputPassword3" class="col-sm-5 control-label">Email Id <span class="red">*</span> :</label> |
231 | 231 | <div class="col-sm-7"> |
232 | - <input type="text" class="form-control" id="inputPassword3" placeholder="Email Id" formControlName="EmailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$"> | |
232 | + <input type="text" class="form-control" id="inputPassword3" placeholder="Email Id" formControlName="EmailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$" (keydown.space)="$event.preventDefault();"> | |
233 | 233 | <div *ngIf="adduserFrm.controls.EmailId.invalid && !adduserFrm.controls.EmailId.value && adduserFrm.controls.EmailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email Id is required</div> |
234 | 234 | |
235 | 235 | <div *ngIf="adduserFrm.controls.EmailId.invalid && adduserFrm.controls.EmailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;"> | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
... | ... | @@ -105,12 +105,12 @@ export class UsersList implements OnInit, AfterViewChecked { |
105 | 105 | }); |
106 | 106 | this.adduserFrm = this.fb.group({ |
107 | 107 | id: [''], |
108 | - UserName: ['', [Validators.required, Validators.minLength(8),this.noWhitespaceValidator]], | |
109 | - Password: ['', [Validators.required, Validators.minLength(8),this.noWhitespaceValidator]], | |
110 | - ConfirmPassword: ['', [Validators.required,this.noWhitespaceValidator]], | |
108 | + UserName: ['', [Validators.required, Validators.minLength(8)]], | |
109 | + Password: ['', [Validators.required, Validators.minLength(8)]], | |
110 | + ConfirmPassword: ['', [Validators.required]], | |
111 | 111 | FirstName: ['', [Validators.required,this.noWhitespaceValidator]], |
112 | 112 | LastName: ['', [Validators.required,this.noWhitespaceValidator]], |
113 | - EmailId: ['', [Validators.required,this.noWhitespaceValidator]], | |
113 | + EmailId: ['', [Validators.required]], | |
114 | 114 | AccountNumber: [''], |
115 | 115 | UserTypeTitle: [''], |
116 | 116 | AccountTypeTitle: [''], | ... | ... |
400-SOURCECODE/Admin/src/app/shared/global.ts
... | ... | @@ -28,23 +28,37 @@ export class GlobalService { |
28 | 28 | aiaIdleTimeOut:number=0; |
29 | 29 | aiaPingInterval:number=0; |
30 | 30 | SessionId:number=0; |
31 | + isSiteUser:boolean=false; | |
31 | 32 | RemoveColumns: Array<string> = ["Serial_No", "LicenseId","RowNum"] |
32 | 33 | error; |
33 | 34 | public href: string = ""; |
34 | 35 | constructor(private csvService: CsvService, private http: Http) { |
35 | - this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails")); | |
36 | - if (this.loggedInUser != null) { | |
37 | - this.UserId = this.loggedInUser.Id; | |
38 | - this.UserType = this.loggedInUser.UserTypeId; | |
39 | - this.UserTypeName = this.loggedInUser.UserType; | |
40 | - this.DisplayName = this.loggedInUser.FirstName + " " + this.loggedInUser.LastName; | |
41 | - this.LoginId=this.loggedInUser.LoginId; | |
42 | - this.aiaIdleTime=this.loggedInUser.aiaIdleTime; | |
43 | - this.aiaIdleTimeOut=this.loggedInUser.aiaIdleTimeOut; | |
44 | - this.aiaPingInterval=this.loggedInUser.aiaPingInterval; | |
45 | - this.SessionId=this.loggedInUser.SessionId; | |
36 | + if(window.location.host=="localhost:4200") | |
37 | + { | |
38 | + // for 'ng serve --open' command | |
39 | + //**** for localhost:4200 *****// | |
40 | + var date = new Date(); | |
41 | + var newsessionid = date.getTime();//timestamp is the number of milliseconds that have passed since January 1, 1970 | |
42 | + localStorage.setItem('loggedInUserDetails', JSON.stringify( | |
43 | + { | |
44 | + "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016","aiaIdleTime": 300,"aiaIdleTimeOut": 30,"aiaPingInterval": 10,"SessionId":newsessionid,"isSiteUser":false, "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": { "Id": 0, "AccountNumber": "AIAS000319" }, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null | |
45 | + })); | |
46 | + } | |
47 | + | |
48 | + this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails")); | |
49 | + if (this.loggedInUser != null) { | |
50 | + this.UserId = this.loggedInUser.Id; | |
51 | + this.UserType = this.loggedInUser.UserTypeId; | |
52 | + this.UserTypeName = this.loggedInUser.UserType; | |
53 | + this.DisplayName = this.loggedInUser.FirstName + " " + this.loggedInUser.LastName; | |
54 | + this.LoginId=this.loggedInUser.LoginId; | |
55 | + this.aiaIdleTime=this.loggedInUser.aiaIdleTime; | |
56 | + this.aiaIdleTimeOut=this.loggedInUser.aiaIdleTimeOut; | |
57 | + this.aiaPingInterval=this.loggedInUser.aiaPingInterval; | |
58 | + this.SessionId=this.loggedInUser.SessionId; | |
59 | + this.isSiteUser=this.loggedInUser.isSiteUser; | |
46 | 60 | |
47 | - } | |
61 | + } | |
48 | 62 | |
49 | 63 | this.NoRecords = 'No Record Found.'; |
50 | 64 | |
... | ... | @@ -69,20 +83,8 @@ export class GlobalService { |
69 | 83 | |
70 | 84 | } |
71 | 85 | |
72 | - if (this.resourceBaseUrl == this.ProtocolType+"localhost/API/Adminapi/") { | |
73 | - if(window.location.host=="localhost:4200") | |
74 | - { | |
75 | - // for 'ng serve --open' command | |
76 | - //**** for localhost:4200 *****// | |
77 | - var date = new Date(); | |
78 | - var newsessionid = date.getTime();//timestamp is the number of milliseconds that have passed since January 1, 1970 | |
79 | - localStorage.setItem('loggedInUserDetails', JSON.stringify( | |
80 | - { | |
81 | - "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016","aiaIdleTime": 300,"aiaIdleTimeOut": 30,"aiaPingInterval": 10,"SessionId":newsessionid, "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": { "Id": 0, "AccountNumber": "AIAS000319" }, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null | |
82 | - })); | |
83 | - } | |
84 | - | |
85 | - this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails")); | |
86 | + if (this.resourceBaseUrl == this.ProtocolType+"localhost/API/Adminapi/") { | |
87 | + | |
86 | 88 | if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") { |
87 | 89 | this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber |
88 | 90 | } | ... | ... |